id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
1810705_39
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactoryTest.java", "identifier": "MobileSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void notRequestForRootSite() {\n\t\trequest.setRequestURI(\"/\");\n\t\tassertFalse(basicRootFactory.isRequestForSite(request));\n\t}", "class_method_signature": "MobileSitePathUrlFactoryTest.notRequestForRootSite()", "constructor": false, "full_signature": "@Test public void notReques...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactory.java", "identifier": "MobileSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "MobileSitePathUrlFactory.MobileSitePat...
{ "body": "public boolean isRequestForSite(HttpServletRequest request) {\n\t\treturn request.getRequestURI().startsWith(this.getFullMobilePath())\n\t\t\t\t|| request.getRequestURI().equals(this.getCleanMobilePath());\n\t}", "class_method_signature": "MobileSitePathUrlFactory.isRequestForSite(HttpServletRequest requ...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_162
{ "fields": [ { "declarator": "request = new MockHttpServletRequest()", "modifier": "private", "original_string": "private MockHttpServletRequest request = new MockHttpServletRequest();", "type": "MockHttpServletRequest", "var_name": "request" }, { "declarator": "respon...
{ "body": "@Test\n\tpublic void preHandleDefault() throws Exception {\n\t\tSitePreferenceHandlerInterceptor interceptor = new SitePreferenceHandlerInterceptor();\n\t\tboolean result = interceptor.preHandle(request, response, null);\n\t\tassertNull(SitePreferenceUtils.getCurrentSitePreference(request));\n\t\tassertTru...
{ "fields": [ { "declarator": "sitePreferenceHandler", "modifier": "private final", "original_string": "private final SitePreferenceHandler sitePreferenceHandler;", "type": "SitePreferenceHandler", "var_name": "sitePreferenceHandler" } ], "file": "spring-mobile-device/src/mai...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\tsitePreferenceHandler.handleSitePreference(request, response);\n\t\treturn true;\n\t}", "class_method_signature": "SitePreferenceHandlerInterceptor.preHandle(HttpServletRequest reque...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_19
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/NormalSitePathUrlFactoryTest.java", "identifier": "NormalSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void createPathSiteUrlMobilePort8080() {\n\t\trequest.setServerPort(8080);\n\t\trequest.setRequestURI(\"/showcase/mob/foo\");\n\t\tassertEquals(\"https://www.app.com:8080/showcase/foo\", basicPathFactory.createSiteUrl(request));\n\t}", "class_method_signature": "NormalSitePathUrlFactoryTe...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/NormalSitePathUrlFactory.java", "identifier": "NormalSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "NormalSitePathUrlFactory.NormalSitePat...
{ "body": "public String createSiteUrl(HttpServletRequest request) {\n\t\tString requestURI = request.getRequestURI();\n\t\tString adjustedRequestURI = \"\";\n\t\tif (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || \n\t\t\t\thasTabletPath() && requestURI.equals(getCleanTabletPath())) {\n\t\t\tif (hasRoo...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_135
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameTabletDeviceNormalSitePreferenceNormalSuffix() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.TABLET);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, Sit...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setNormalSuffix(String normalSuffix) {\n\t\tthis.normalSuffix = (normalSuffix != null ? normalSuffix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setNormalSuffix(String normalSuffix)", "constructor": false, "full_signature": "public void setNormalSuffix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_123
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameNormalDeviceTabletSitePreferenceTabletSuffix() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.NORMAL);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, Sit...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setTabletSuffix(String tabletSuffix) {\n\t\tthis.tabletSuffix = (tabletSuffix != null ? tabletSuffix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setTabletSuffix(String tabletSuffix)", "constructor": false, "full_signature": "public void setTabletSuffix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_58
{ "fields": [ { "declarator": "basicRootFactory", "modifier": "protected", "original_string": "protected AbstractSitePathUrlFactory basicRootFactory;", "type": "AbstractSitePathUrlFactory", "var_name": "basicRootFactory" }, { "declarator": "advRootFactory", "modif...
{ "body": "@Test\n\tpublic void rootCleanNormalPath() {\n\t\tassertEquals(\"\", basicRootFactory.getCleanNormalPath());\n\t}", "class_method_signature": "AbstractSitePathUrlFactoryTest.rootCleanNormalPath()", "constructor": false, "full_signature": "@Test public void rootCleanNormalPath()", "identifier": "roo...
{ "fields": [ { "declarator": "mobilePath", "modifier": "private final", "original_string": "private final String mobilePath;", "type": "String", "var_name": "mobilePath" }, { "declarator": "tabletPath", "modifier": "private final", "original_string": "priva...
{ "body": "protected String getCleanNormalPath() {\n\t\treturn getCleanPath(getFullNormalPath());\n\t}", "class_method_signature": "AbstractSitePathUrlFactory.getCleanNormalPath()", "constructor": false, "full_signature": "protected String getCleanNormalPath()", "identifier": "getCleanNormalPath", "invocati...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_23
{ "fields": [ { "declarator": "siteSwitcher", "modifier": "private", "original_string": "private SiteSwitcherRequestFilter siteSwitcher;", "type": "SiteSwitcherRequestFilter", "var_name": "siteSwitcher" }, { "declarator": "request = new MockHttpServletRequest()", ...
{ "body": "@Test\n\tpublic void urlPathTabletDeviceNoPreference() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.TABLET);\n\t\tSiteSwitcherRequestFilter urlPath = new SiteSwitcherRequestFilter();\n\t\tMockFilterConfig filterConfig = new MockFilterConfig();\n\t\tfilterConfig.addInitParameter(\"switcherMode\",...
{ "fields": [ { "declarator": "siteSwitcherHandler", "modifier": "private", "original_string": "private SiteSwitcherHandler siteSwitcherHandler;", "type": "SiteSwitcherHandler", "var_name": "siteSwitcherHandler" }, { "declarator": "switcherMode", "modifier": "priv...
{ "body": "public String getServerName() {\n\t\treturn serverName;\n\t}", "class_method_signature": "SiteSwitcherRequestFilter.getServerName()", "constructor": false, "full_signature": "public String getServerName()", "identifier": "getServerName", "invocations": [], "modifiers": "public", "parameters":...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_74
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactoryTest.java", "identifier": "TabletSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void createPathSiteUrlFromMobileSite() {\n\t\trequest.setServerPort(80);\n\t\trequest.setRequestURI(\"/showcase/mobile/about\");\n\t\tassertEquals(\"https://www.app.com/showcase/tablet/about\", advPathFactory.createSiteUrl(request));\n\t}", "class_method_signature": "TabletSitePathUrlFact...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactory.java", "identifier": "TabletSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "TabletSitePathUrlFactory.TabletSitePat...
{ "body": "public String createSiteUrl(HttpServletRequest request) {\n\t\tString urlPath = request.getRequestURI();\n\t\tif (getCleanMobilePath() != null && urlPath.startsWith(getCleanMobilePath())) {\n\t\t\turlPath = urlPath.substring(getCleanMobilePath().length());\n\t\t} else if (getRootPath() != null && urlPath.s...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_1
{ "fields": [ { "declarator": "device = new StubDevice()", "modifier": "private", "original_string": "private Device device = new StubDevice();", "type": "Device", "var_name": "device" }, { "declarator": "interceptor = new DeviceResolverHandlerInterceptor(new DeviceReso...
{ "body": "@Test\n\tpublic void resolveDefaultResolver() throws Exception {\n\t\tinterceptor = new DeviceResolverHandlerInterceptor();\n\t\trequest.addHeader(\"User-Agent\", \"Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.2...
{ "fields": [ { "declarator": "deviceResolver", "modifier": "private final", "original_string": "private final DeviceResolver deviceResolver;", "type": "DeviceResolver", "var_name": "deviceResolver" } ], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/d...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\tDevice device = deviceResolver.resolveDevice(request);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\treturn true;\n\t}", "class_method_signature": "De...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_158
{ "fields": [ { "declarator": "sitePreferenceHandler", "modifier": "private", "original_string": "private StandardSitePreferenceHandler sitePreferenceHandler;", "type": "StandardSitePreferenceHandler", "var_name": "sitePreferenceHandler" }, { "declarator": "request = ne...
{ "body": "@Test\n\tpublic void defaultSitePreferenceTabletDevice() throws Exception {\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, new StubDevice(DeviceType.TABLET));\n\t\tassertEquals(SitePreference.TABLET, sitePreferenceHandler.handleSitePreference(request, response));\n\t\tassertEquals(SitePref...
{ "fields": [ { "declarator": "sitePreferenceRepository", "modifier": "private final", "original_string": "private final SitePreferenceRepository sitePreferenceRepository;", "type": "SitePreferenceRepository", "var_name": "sitePreferenceRepository" }, { "declarator": "S...
{ "body": "public SitePreference handleSitePreference(HttpServletRequest request, HttpServletResponse response) {\n\t\tSitePreference preference = getSitePreferenceQueryParameter(request);\n\t\tif (preference != null) {\n\t\t\tsitePreferenceRepository.saveSitePreference(preference, request, response);\n\t\t} else {\n...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_62
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactoryTest.java", "identifier": "TabletSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void isRequestForPathSite() {\n\t\trequest.setRequestURI(\"/showcase/tablet/\");\n\t\tassertTrue(basicPathFactory.isRequestForSite(request));\n\t}", "class_method_signature": "TabletSitePathUrlFactoryTest.isRequestForPathSite()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactory.java", "identifier": "TabletSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "TabletSitePathUrlFactory.TabletSitePat...
{ "body": "public boolean isRequestForSite(HttpServletRequest request) {\n\t\treturn request.getRequestURI().startsWith(this.getFullTabletPath())\n\t\t\t\t|| request.getRequestURI().equals(this.getCleanTabletPath());\n\t}", "class_method_signature": "TabletSitePathUrlFactory.isRequestForSite(HttpServletRequest requ...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_35
{ "fields": [ { "declarator": "siteSwitcher", "modifier": "private", "original_string": "private SiteSwitcherHandlerInterceptor siteSwitcher;", "type": "SiteSwitcherHandlerInterceptor", "var_name": "siteSwitcher" }, { "declarator": "request = new MockHttpServletRequest(...
{ "body": "@Test\n\tpublic void tabletDeviceNormalPreference() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.TABLET);\n\t\tsitePreferenceRepository.setSitePreference(SitePreference.NORMAL);\n\t\tassertTrue(siteSwitcher.preHandle(request, response, null));\n\t\tassertNull(response.getRedirectedUrl());\n\t}",...
{ "fields": [ { "declarator": "siteSwitcherHandler", "modifier": "private final", "original_string": "private final SiteSwitcherHandler siteSwitcherHandler;", "type": "SiteSwitcherHandler", "var_name": "siteSwitcherHandler" } ], "file": "spring-mobile-device/src/main/java/org...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\treturn siteSwitcherHandler.handleSiteSwitch(request, response);\n\t}", "class_method_signature": "SiteSwitcherHandlerInterceptor.preHandle(HttpServletRequest request, HttpServletResp...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_119
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameNormalDeviceNormalSitePreferenceNormalSuffix() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.NORMAL);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, Sit...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setNormalSuffix(String normalSuffix) {\n\t\tthis.normalSuffix = (normalSuffix != null ? normalSuffix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setNormalSuffix(String normalSuffix)", "constructor": false, "full_signature": "public void setNormalSuffix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_118
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameNormalDeviceNormalSitePreferenceNormalPrefix() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.NORMAL);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, Sit...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setNormalPrefix(String normalPrefix) {\n\t\tthis.normalPrefix = (normalPrefix != null ? normalPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setNormalPrefix(String normalPrefix)", "constructor": false, "full_signature": "public void setNormalPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_34
{ "fields": [ { "declarator": "siteSwitcher", "modifier": "private", "original_string": "private SiteSwitcherHandlerInterceptor siteSwitcher;", "type": "SiteSwitcherHandlerInterceptor", "var_name": "siteSwitcher" }, { "declarator": "request = new MockHttpServletRequest(...
{ "body": "@Test\n\tpublic void tabletDeviceMobilePreference() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.TABLET);\n\t\tsitePreferenceRepository.setSitePreference(SitePreference.MOBILE);\n\t\tassertFalse(siteSwitcher.preHandle(request, response, null));\n\t\tassertEquals(\"https://m.app.com\", response.g...
{ "fields": [ { "declarator": "siteSwitcherHandler", "modifier": "private final", "original_string": "private final SiteSwitcherHandler siteSwitcherHandler;", "type": "SiteSwitcherHandler", "var_name": "siteSwitcherHandler" } ], "file": "spring-mobile-device/src/main/java/org...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\treturn siteSwitcherHandler.handleSiteSwitch(request, response);\n\t}", "class_method_signature": "SiteSwitcherHandlerInterceptor.preHandle(HttpServletRequest request, HttpServletResp...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_63
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactoryTest.java", "identifier": "TabletSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void notRequestForRootSite() {\n\t\trequest.setRequestURI(\"/\");\n\t\tassertFalse(basicRootFactory.isRequestForSite(request));\n\t}", "class_method_signature": "TabletSitePathUrlFactoryTest.notRequestForRootSite()", "constructor": false, "full_signature": "@Test public void notReques...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactory.java", "identifier": "TabletSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "TabletSitePathUrlFactory.TabletSitePat...
{ "body": "public boolean isRequestForSite(HttpServletRequest request) {\n\t\treturn request.getRequestURI().startsWith(this.getFullTabletPath())\n\t\t\t\t|| request.getRequestURI().equals(this.getCleanTabletPath());\n\t}", "class_method_signature": "TabletSitePathUrlFactory.isRequestForSite(HttpServletRequest requ...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_0
{ "fields": [ { "declarator": "device = new StubDevice()", "modifier": "private", "original_string": "private Device device = new StubDevice();", "type": "Device", "var_name": "device" }, { "declarator": "interceptor = new DeviceResolverHandlerInterceptor(new DeviceReso...
{ "body": "@Test\n\tpublic void resolve() throws Exception {\n\t\tassertTrue(interceptor.preHandle(request, response, null));\n\t\tassertSame(device, DeviceUtils.getCurrentDevice(request));\n\t}", "class_method_signature": "DeviceResolverHandlerInterceptorTest.resolve()", "constructor": false, "full_signature":...
{ "fields": [ { "declarator": "deviceResolver", "modifier": "private final", "original_string": "private final DeviceResolver deviceResolver;", "type": "DeviceResolver", "var_name": "deviceResolver" } ], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/d...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\tDevice device = deviceResolver.resolveDevice(request);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\treturn true;\n\t}", "class_method_signature": "De...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_159
{ "fields": [ { "declarator": "resolver = new SitePreferenceHandlerMethodArgumentResolver()", "modifier": "private", "original_string": "private SitePreferenceHandlerMethodArgumentResolver resolver = new SitePreferenceHandlerMethodArgumentResolver();", "type": "SitePreferenceHandlerMethodA...
{ "body": "@Test\n\tpublic void unresolvedNormal() throws Exception {\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, SitePreference.NORMAL, WebRequest.SCOPE_REQUEST);\n\t\tMethodParameter parameter = new MethodParameter(getClass().getMethod(\"handlerMethodUnresolved\", String.class...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/site/SitePreferenceHandlerMethodArgumentResolver.java", "identifier": "SitePreferenceHandlerMethodArgumentResolver", "interfaces": "implements HandlerMethodArgumentResolver", "methods": [ { "class_method_si...
{ "body": "public boolean supportsParameter(MethodParameter parameter) {\n\t\treturn SitePreference.class.isAssignableFrom(parameter.getParameterType());\n\t}", "class_method_signature": "SitePreferenceHandlerMethodArgumentResolver.supportsParameter(MethodParameter parameter)", "constructor": false, "full_signa...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_75
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactoryTest.java", "identifier": "TabletSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void createPathSiteUrlFromMobileSitePort8080() {\n\t\trequest.setServerPort(8080);\n\t\trequest.setRequestURI(\"/showcase/mobile/about\");\n\t\tassertEquals(\"https://www.app.com:8080/showcase/tablet/about\", advPathFactory.createSiteUrl(request));\n\t}", "class_method_signature": "Tablet...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/TabletSitePathUrlFactory.java", "identifier": "TabletSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "TabletSitePathUrlFactory.TabletSitePat...
{ "body": "public String createSiteUrl(HttpServletRequest request) {\n\t\tString urlPath = request.getRequestURI();\n\t\tif (getCleanMobilePath() != null && urlPath.startsWith(getCleanMobilePath())) {\n\t\t\turlPath = urlPath.substring(getCleanMobilePath().length());\n\t\t} else if (getRootPath() != null && urlPath.s...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_22
{ "fields": [ { "declarator": "siteSwitcher", "modifier": "private", "original_string": "private SiteSwitcherRequestFilter siteSwitcher;", "type": "SiteSwitcherRequestFilter", "var_name": "siteSwitcher" }, { "declarator": "request = new MockHttpServletRequest()", ...
{ "body": "@Test\n\tpublic void urlPathRootPathMobileDeviceNoPreference() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.MOBILE);\n\t\tSiteSwitcherRequestFilter urlPath = new SiteSwitcherRequestFilter();\n\t\tMockFilterConfig filterConfig = new MockFilterConfig();\n\t\tfilterConfig.addInitParameter(\"switche...
{ "fields": [ { "declarator": "siteSwitcherHandler", "modifier": "private", "original_string": "private SiteSwitcherHandler siteSwitcherHandler;", "type": "SiteSwitcherHandler", "var_name": "siteSwitcherHandler" }, { "declarator": "switcherMode", "modifier": "priv...
{ "body": "public String getServerName() {\n\t\treturn serverName;\n\t}", "class_method_signature": "SiteSwitcherRequestFilter.getServerName()", "constructor": false, "full_signature": "public String getServerName()", "identifier": "getServerName", "invocations": [], "modifiers": "public", "parameters":...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_59
{ "fields": [ { "declarator": "basicRootFactory", "modifier": "protected", "original_string": "protected AbstractSitePathUrlFactory basicRootFactory;", "type": "AbstractSitePathUrlFactory", "var_name": "basicRootFactory" }, { "declarator": "advRootFactory", "modif...
{ "body": "@Test\n\tpublic void pathFullNormalPath() {\n\t\tassertEquals(\"/showcase/\", basicPathFactory.getFullNormalPath());\n\t}", "class_method_signature": "AbstractSitePathUrlFactoryTest.pathFullNormalPath()", "constructor": false, "full_signature": "@Test public void pathFullNormalPath()", "identifier"...
{ "fields": [ { "declarator": "mobilePath", "modifier": "private final", "original_string": "private final String mobilePath;", "type": "String", "var_name": "mobilePath" }, { "declarator": "tabletPath", "modifier": "private final", "original_string": "priva...
{ "body": "public String getFullNormalPath() {\n\t\treturn (this.rootPath == null ? \"/\" : getCleanPath(this.rootPath) + \"/\");\n\t}", "class_method_signature": "AbstractSitePathUrlFactory.getFullNormalPath()", "constructor": false, "full_signature": "public String getFullNormalPath()", "identifier": "getFu...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_122
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameNormalDeviceTabletSitePreferenceTabletPrefix() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.NORMAL);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, Sit...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setTabletPrefix(String tabletPrefix) {\n\t\tthis.tabletPrefix = (tabletPrefix != null ? tabletPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setTabletPrefix(String tabletPrefix)", "constructor": false, "full_signature": "public void setTabletPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_134
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameTabletDeviceNormalSitePreferenceNormalPrefix() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.TABLET);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, Sit...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setNormalPrefix(String normalPrefix) {\n\t\tthis.normalPrefix = (normalPrefix != null ? normalPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setNormalPrefix(String normalPrefix)", "constructor": false, "full_signature": "public void setNormalPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_18
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/NormalSitePathUrlFactoryTest.java", "identifier": "NormalSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void createPathSiteUrlTablet() {\n\t\trequest.setServerPort(80);\n\t\trequest.setRequestURI(\"/showcase/tab/foo\");\n\t\tassertEquals(\"https://www.app.com/showcase/foo\", basicPathFactory.createSiteUrl(request));\n\t}", "class_method_signature": "NormalSitePathUrlFactoryTest.createPathSi...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/NormalSitePathUrlFactory.java", "identifier": "NormalSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "NormalSitePathUrlFactory.NormalSitePat...
{ "body": "public String createSiteUrl(HttpServletRequest request) {\n\t\tString requestURI = request.getRequestURI();\n\t\tString adjustedRequestURI = \"\";\n\t\tif (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || \n\t\t\t\thasTabletPath() && requestURI.equals(getCleanTabletPath())) {\n\t\t\tif (hasRoo...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_163
{ "fields": [ { "declarator": "request = new MockHttpServletRequest()", "modifier": "private", "original_string": "private MockHttpServletRequest request = new MockHttpServletRequest();", "type": "MockHttpServletRequest", "var_name": "request" }, { "declarator": "respon...
{ "body": "@Test\n\tpublic void preHandleCustomNormal() throws Exception {\n\t\tSitePreferenceHandler handler = new SitePreferenceHandler() {\n\t\t\tpublic SitePreference handleSitePreference(HttpServletRequest request, HttpServletResponse response) {\n\t\t\t\trequest.setAttribute(\"currentSitePreference\", SitePrefe...
{ "fields": [ { "declarator": "sitePreferenceHandler", "modifier": "private final", "original_string": "private final SitePreferenceHandler sitePreferenceHandler;", "type": "SitePreferenceHandler", "var_name": "sitePreferenceHandler" } ], "file": "spring-mobile-device/src/mai...
{ "body": "public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\tsitePreferenceHandler.handleSitePreference(request, response);\n\t\treturn true;\n\t}", "class_method_signature": "SitePreferenceHandlerInterceptor.preHandle(HttpServletRequest reque...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_38
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactoryTest.java", "identifier": "MobileSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void isRequestForPathSite() {\n\t\trequest.setRequestURI(\"/showcase/mobile/\");\n\t\tassertTrue(basicPathFactory.isRequestForSite(request));\n\t}", "class_method_signature": "MobileSitePathUrlFactoryTest.isRequestForPathSite()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactory.java", "identifier": "MobileSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "MobileSitePathUrlFactory.MobileSitePat...
{ "body": "public boolean isRequestForSite(HttpServletRequest request) {\n\t\treturn request.getRequestURI().startsWith(this.getFullMobilePath())\n\t\t\t\t|| request.getRequestURI().equals(this.getCleanMobilePath());\n\t}", "class_method_signature": "MobileSitePathUrlFactory.isRequestForSite(HttpServletRequest requ...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_114
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameNoDeviceNoSitePreferenceNormalPrefix() throws Exception {\n\t\tviewResolver.setNormalPrefix(\"normal/\");\n\t\treplayMocks(\"normal/\" + viewName);\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolverTest.resolveViewNameNoDeviceNoSitePreferenceNormalPrefi...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setNormalPrefix(String normalPrefix) {\n\t\tthis.normalPrefix = (normalPrefix != null ? normalPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setNormalPrefix(String normalPrefix)", "constructor": false, "full_signature": "public void setNormalPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_80
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameNormalDeviceNormalPrefixRedirectToRoot() throws Exception {\n\t\tthis.viewName = \"redirect:/\";\n\t\tdevice.setDeviceType(DeviceType.NORMAL);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\tviewResolver.setNormalPrefix(\"normal/\");\n\t\tre...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setNormalPrefix(String normalPrefix) {\n\t\tthis.normalPrefix = (normalPrefix != null ? normalPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setNormalPrefix(String normalPrefix)", "constructor": false, "full_signature": "public void setNormalPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_143
{ "fields": [ { "declarator": "MOBILE_TO_STRING = \"[LiteDevice type=MOBILE]\"", "modifier": "private static final", "original_string": "private static final String MOBILE_TO_STRING = \"[LiteDevice type=MOBILE]\";", "type": "String", "var_name": "MOBILE_TO_STRING" }, { ...
{ "body": "@Test\n\tpublic void normalDeviceTabletOverride() {\n\t\tString[] normalDevices = new String[] { \"ipad\" };\n\t\tresolver.getNormalUserAgentKeywords().addAll(Arrays.asList(normalDevices));\n\t\trequest.setUserAgentHeader(UserAgent.IPAD_IOS5_STRING);\n\t\tassertNormal(request);\n\t\tassertUnknownPlatform(r...
{ "fields": [ { "declarator": "mobileUserAgentPrefixes = new ArrayList<String>()", "modifier": "private final", "original_string": "private final List<String> mobileUserAgentPrefixes = new ArrayList<String>();", "type": "List<String>", "var_name": "mobileUserAgentPrefixes" }, ...
{ "body": "protected List<String> getNormalUserAgentKeywords() {\n\t\treturn normalUserAgentKeywords;\n\t}", "class_method_signature": "LiteDeviceResolver.getNormalUserAgentKeywords()", "constructor": false, "full_signature": "protected List<String> getNormalUserAgentKeywords()", "identifier": "getNormalUserA...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_79
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameNormalDeviceNormalPrefixRedirect() throws Exception {\n\t\tthis.viewName = \"redirect:about\";\n\t\tdevice.setDeviceType(DeviceType.NORMAL);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\tviewResolver.setNormalPrefix(\"normal/\");\n\t\trepl...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setNormalPrefix(String normalPrefix) {\n\t\tthis.normalPrefix = (normalPrefix != null ? normalPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setNormalPrefix(String normalPrefix)", "constructor": false, "full_signature": "public void setNormalPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_96
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameMobileDeviceMobilePrefixForwardToRoot() throws Exception {\n\t\tthis.viewName = \"forward:/\";\n\t\tdevice.setDeviceType(DeviceType.MOBILE);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\tviewResolver.setMobilePrefix(\"mobile/\");\n\t\trepl...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setMobilePrefix(String mobilePrefix) {\n\t\tthis.mobilePrefix = (mobilePrefix != null ? mobilePrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setMobilePrefix(String mobilePrefix)", "constructor": false, "full_signature": "public void setMobilePrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_155
{ "fields": [ { "declarator": "sitePreferenceHandler", "modifier": "private", "original_string": "private StandardSitePreferenceHandler sitePreferenceHandler;", "type": "StandardSitePreferenceHandler", "var_name": "sitePreferenceHandler" }, { "declarator": "request = ne...
{ "body": "@Test\n\tpublic void defaultSitePreference() throws Exception {\n\t\tassertNull(sitePreferenceHandler.handleSitePreference(request, response));\n\t\tassertNull(SitePreferenceUtils.getCurrentSitePreference(request));\n\t}", "class_method_signature": "StandardSitePreferenceHandlerTest.defaultSitePreference...
{ "fields": [ { "declarator": "sitePreferenceRepository", "modifier": "private final", "original_string": "private final SitePreferenceRepository sitePreferenceRepository;", "type": "SitePreferenceRepository", "var_name": "sitePreferenceRepository" }, { "declarator": "S...
{ "body": "public SitePreference handleSitePreference(HttpServletRequest request, HttpServletResponse response) {\n\t\tSitePreference preference = getSitePreferenceQueryParameter(request);\n\t\tif (preference != null) {\n\t\t\tsitePreferenceRepository.saveSitePreference(preference, request, response);\n\t\t} else {\n...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_102
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameTabletDeviceNormalPrefixRedirectToAbsoluteUrl() throws Exception {\n\t\tthis.viewName = \"redirect:https://spring.io\";\n\t\tdevice.setDeviceType(DeviceType.TABLET);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\tviewResolver.setTabletPrefi...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setTabletPrefix(String tabletPrefix) {\n\t\tthis.tabletPrefix = (tabletPrefix != null ? tabletPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setTabletPrefix(String tabletPrefix)", "constructor": false, "full_signature": "public void setTabletPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_55
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactoryTest.java", "identifier": "MobileSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void createLongPathSiteUrlFromTabletSiteMultipleTablet() {\n\t\trequest.setServerPort(80);\n\t\trequest.setRequestURI(\"/showcase/tablet/about/x/y/tablet/z/contact\");\n\t\tassertEquals(\"https://www.app.com/showcase/mobile/about/x/y/tablet/z/contact\",\n\t\t\t\tadvPathFactory.createSiteUrl...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactory.java", "identifier": "MobileSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "MobileSitePathUrlFactory.MobileSitePat...
{ "body": "public String createSiteUrl(HttpServletRequest request) {\n\t\tString urlPath = request.getRequestURI();\n\t\tif (getCleanTabletPath() != null && urlPath.startsWith(getCleanTabletPath())) {\n\t\t\turlPath = urlPath.substring(getCleanTabletPath().length());\n\t\t} else if (getRootPath() != null && urlPath.s...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_14
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/NormalSitePathUrlFactoryTest.java", "identifier": "NormalSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void createRootSiteUrlTablet() {\n\t\trequest.setServerPort(80);\n\t\trequest.setRequestURI(\"/tab/foo\");\n\t\tassertEquals(\"https://www.app.com/foo\", basicRootFactory.createSiteUrl(request));\n\t}", "class_method_signature": "NormalSitePathUrlFactoryTest.createRootSiteUrlTablet()", ...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/NormalSitePathUrlFactory.java", "identifier": "NormalSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "NormalSitePathUrlFactory.NormalSitePat...
{ "body": "public String createSiteUrl(HttpServletRequest request) {\n\t\tString requestURI = request.getRequestURI();\n\t\tString adjustedRequestURI = \"\";\n\t\tif (hasMobilePath() && requestURI.equals(getCleanMobilePath()) || \n\t\t\t\thasTabletPath() && requestURI.equals(getCleanTabletPath())) {\n\t\t\tif (hasRoo...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_138
{ "fields": [ { "declarator": "viewResolver", "modifier": "private", "original_string": "private LiteDeviceDelegatingViewResolver viewResolver;", "type": "LiteDeviceDelegatingViewResolver", "var_name": "viewResolver" }, { "declarator": "delegateViewResolver", "mod...
{ "body": "@Test\n\tpublic void resolveViewNameTabletDeviceTabletSitePreferenceTabletPrefix() throws Exception {\n\t\tdevice.setDeviceType(DeviceType.TABLET);\n\t\trequest.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device);\n\t\trequest.setAttribute(SitePreferenceHandler.CURRENT_SITE_PREFERENCE_ATTRIBUTE, Sit...
{ "fields": [ { "declarator": "normalPrefix = \"\"", "modifier": "private", "original_string": "private String normalPrefix = \"\";", "type": "String", "var_name": "normalPrefix" }, { "declarator": "mobilePrefix = \"\"", "modifier": "private", "original_stri...
{ "body": "public void setTabletPrefix(String tabletPrefix) {\n\t\tthis.tabletPrefix = (tabletPrefix != null ? tabletPrefix : \"\");\n\t}", "class_method_signature": "LiteDeviceDelegatingViewResolver.setTabletPrefix(String tabletPrefix)", "constructor": false, "full_signature": "public void setTabletPrefix(Stri...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
1810705_43
{ "fields": [], "file": "spring-mobile-device/src/test/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactoryTest.java", "identifier": "MobileSitePathUrlFactoryTest", "interfaces": "", "superclass": "extends AbstractSitePathUrlFactoryTest" }
{ "body": "@Test\n\tpublic void createRootSiteUrl() {\n\t\trequest.setServerPort(80);\n\t\trequest.setRequestURI(\"/bar\");\n\t\tassertEquals(\"https://www.app.com/mobile/bar\", basicRootFactory.createSiteUrl(request));\n\t}", "class_method_signature": "MobileSitePathUrlFactoryTest.createRootSiteUrl()", "construc...
{ "fields": [], "file": "spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/MobileSitePathUrlFactory.java", "identifier": "MobileSitePathUrlFactory", "interfaces": "implements SiteUrlFactory", "methods": [ { "class_method_signature": "MobileSitePathUrlFactory.MobileSitePat...
{ "body": "public String createSiteUrl(HttpServletRequest request) {\n\t\tString urlPath = request.getRequestURI();\n\t\tif (getCleanTabletPath() != null && urlPath.startsWith(getCleanTabletPath())) {\n\t\t\turlPath = urlPath.substring(getCleanTabletPath().length());\n\t\t} else if (getRootPath() != null && urlPath.s...
{ "created": null, "fork": null, "fork_count": 114, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1810705, "size": 5135, "stargazer_count": 174, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-mobile" }
141267788_22
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_empty_user_email_when_no_setting() {\n assertThat(underTest.getUserEmail()).isNotPresent();\n }", "class_method_signature": "SamlSettingsTest.return_empty_user_email_when_no_setting()", "constructor": false, "full_signature": "@Test public void return_empty_user_email_...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "Optional<String> getUserEmail() {\n return configuration.get(USER_EMAIL_ATTRIBUTE);\n }", "class_method_signature": "SamlSettings.getUserEmail()", "constructor": false, "full_signature": " Optional<String> getUserEmail()", "identifier": "getUserEmail", "invocations": [ "get" ], "modif...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_18
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_certificate() {\n settings.setProperty(\"sonar.auth.saml.certificate.secured\", \"ABCDEFG\");\n\n assertThat(underTest.getCertificate()).isEqualTo(\"ABCDEFG\");\n }", "class_method_signature": "SamlSettingsTest.return_certificate()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getCertificate() {\n return configuration.get(CERTIFICATE).orElseThrow(() -> new IllegalArgumentException(\"Certificate is missing\"));\n }", "class_method_signature": "SamlSettings.getCertificate()", "constructor": false, "full_signature": " String getCertificate()", "identifier": "getC...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_2
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void init() throws IOException {\n setSettings(true);\n DumbInitContext context = new DumbInitContext();\n\n underTest.init(context);\n\n verify(context.response).sendRedirect(anyString());\n assertThat(context.generateCsrfState.get()).isTrue();\n }", "class_method_signatu...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void init(InitContext context) {\n try {\n Auth auth = newAuth(initSettings(context.getCallbackUrl()), context.getRequest(), context.getResponse());\n auth.login(context.generateCsrfState());\n } catch (IOException | SettingsException e) {\n throw new IllegalStateEx...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_14
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_provider_name() {\n settings.setProperty(\"sonar.auth.saml.providerName\", \"MyProviderName\");\n\n assertThat(underTest.getProviderName()).isEqualTo(\"MyProviderName\");\n }", "class_method_signature": "SamlSettingsTest.return_provider_name()", "constructor": false, ...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getProviderName() {\n return configuration.get(PROVIDER_NAME).orElseThrow(() -> new IllegalArgumentException(\"Provider Name is missing\"));\n }", "class_method_signature": "SamlSettings.getProviderName()", "constructor": false, "full_signature": " String getProviderName()", "identifier"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_15
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_default_value_of_application_name() {\n assertThat(underTest.getProviderName()).isEqualTo(\"SAML\");\n }", "class_method_signature": "SamlSettingsTest.return_default_value_of_application_name()", "constructor": false, "full_signature": "@Test public void return_default...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getProviderName() {\n return configuration.get(PROVIDER_NAME).orElseThrow(() -> new IllegalArgumentException(\"Provider Name is missing\"));\n }", "class_method_signature": "SamlSettings.getProviderName()", "constructor": false, "full_signature": " String getProviderName()", "identifier"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_3
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void fail_to_init_when_login_url_is_invalid() {\n setSettings(true);\n settings.setProperty(\"sonar.auth.saml.loginUrl\", \"invalid\");\n DumbInitContext context = new DumbInitContext();\n\n expectedException.expect(IllegalStateException.class);\n expectedException.expectMess...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void init(InitContext context) {\n try {\n Auth auth = newAuth(initSettings(context.getCallbackUrl()), context.getRequest(), context.getResponse());\n auth.login(context.generateCsrfState());\n } catch (IOException | SettingsException e) {\n throw new IllegalStateEx...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_19
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_user_login_attribute() {\n settings.setProperty(\"sonar.auth.saml.user.login\", \"userLogin\");\n\n assertThat(underTest.getUserLogin()).isEqualTo(\"userLogin\");\n }", "class_method_signature": "SamlSettingsTest.return_user_login_attribute()", "constructor": false, ...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getUserLogin() {\n return configuration.get(USER_LOGIN_ATTRIBUTE).orElseThrow(() -> new IllegalArgumentException(\"User login attribute is missing\"));\n }", "class_method_signature": "SamlSettings.getUserLogin()", "constructor": false, "full_signature": " String getUserLogin()", "identi...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_23
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_group_name_attribute() {\n settings.setProperty(\"sonar.auth.saml.group.name\", \"groupName\");\n\n assertThat(underTest.getGroupName().get()).isEqualTo(\"groupName\");\n }", "class_method_signature": "SamlSettingsTest.return_group_name_attribute()", "constructor": fa...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "Optional<String> getGroupName() {\n return configuration.get(GROUP_NAME_ATTRIBUTE);\n }", "class_method_signature": "SamlSettings.getGroupName()", "constructor": false, "full_signature": " Optional<String> getGroupName()", "identifier": "getGroupName", "invocations": [ "get" ], "modif...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_28
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void fail_to_get_provider_id_when_null() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Provider ID is missing\");\n\n underTest.getProviderId();\n }", "class_method_signature": "SamlSettingsTest.fail_to_get_provider_id_when_nul...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getProviderId() {\n return configuration.get(PROVIDER_ID).orElseThrow(() -> new IllegalArgumentException(\"Provider ID is missing\"));\n }", "class_method_signature": "SamlSettings.getProviderId()", "constructor": false, "full_signature": " String getProviderId()", "identifier": "getProv...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_4
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void callback() {\n setSettings(true);\n DumbCallbackContext callbackContext = new DumbCallbackContext(request, response, \"encoded_full_response.txt\", SQ_CALLBACK_URL);\n\n underTest.callback(callbackContext);\n\n assertThat(callbackContext.redirectedToRequestedPage.get()).isT...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void callback(CallbackContext context) {\n //\n // Workaround for onelogin/java-saml validation not taking into account running a reverse proxy configuration. This change\n // makes the validation take into account 'X-Forwarded-Proto' and 'Host' headers set by the reverse proxy...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_12
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_application_id() {\n settings.setProperty(\"sonar.auth.saml.applicationId\", \"MyApp\");\n\n assertThat(underTest.getApplicationId()).isEqualTo(\"MyApp\");\n }", "class_method_signature": "SamlSettingsTest.return_application_id()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getApplicationId() {\n return configuration.get(APPLICATION_ID).orElseThrow(() -> new IllegalArgumentException(\"Application ID is missing\"));\n }", "class_method_signature": "SamlSettings.getApplicationId()", "constructor": false, "full_signature": " String getApplicationId()", "identi...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_24
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_empty_group_name_when_no_setting() {\n assertThat(underTest.getGroupName()).isNotPresent();\n }", "class_method_signature": "SamlSettingsTest.return_empty_group_name_when_no_setting()", "constructor": false, "full_signature": "@Test public void return_empty_group_name_...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "Optional<String> getGroupName() {\n return configuration.get(GROUP_NAME_ATTRIBUTE);\n }", "class_method_signature": "SamlSettings.getGroupName()", "constructor": false, "full_signature": " Optional<String> getGroupName()", "identifier": "getGroupName", "invocations": [ "get" ], "modif...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_32
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void fail_to_get_user_name_attribute_when_null() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"User name attribute is missing\");\n\n underTest.getUserName();\n }", "class_method_signature": "SamlSettingsTest.fail_to_get_user_n...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getUserName() {\n return configuration.get(USER_NAME_ATTRIBUTE).orElseThrow(() -> new IllegalArgumentException(\"User name attribute is missing\"));\n }", "class_method_signature": "SamlSettings.getUserName()", "constructor": false, "full_signature": " String getUserName()", "identifier"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_8
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void fail_to_callback_when_name_is_missing() {\n setSettings(true);\n DumbCallbackContext callbackContext = new DumbCallbackContext(request, response, \"encoded_response_without_name.txt\", SQ_CALLBACK_URL);\n\n expectedException.expect(NullPointerException.class);\n expectedExc...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void callback(CallbackContext context) {\n //\n // Workaround for onelogin/java-saml validation not taking into account running a reverse proxy configuration. This change\n // makes the validation take into account 'X-Forwarded-Proto' and 'Host' headers set by the reverse proxy...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_9
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void fail_to_callback_when_certificate_is_invalid() {\n setSettings(true);\n settings.setProperty(\"sonar.auth.saml.certificate.secured\", \"invalid\");\n DumbCallbackContext callbackContext = new DumbCallbackContext(request, response, \"encoded_full_response.txt\", SQ_CALLBACK_URL...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void callback(CallbackContext context) {\n //\n // Workaround for onelogin/java-saml validation not taking into account running a reverse proxy configuration. This change\n // makes the validation take into account 'X-Forwarded-Proto' and 'Host' headers set by the reverse proxy...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_25
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void is_enabled() {\n settings.setProperty(\"sonar.auth.saml.applicationId\", \"MyApp\");\n settings.setProperty(\"sonar.auth.saml.providerId\", \"http://localhost:8080/auth/realms/sonarqube\");\n settings.setProperty(\"sonar.auth.saml.loginUrl\", \"http://localhost:8080/auth/realm...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "boolean isEnabled() {\n return configuration.getBoolean(ENABLED).orElse(false) &&\n configuration.get(PROVIDER_ID).isPresent() &&\n configuration.get(APPLICATION_ID).isPresent() &&\n configuration.get(LOGIN_URL).isPresent() &&\n configuration.get(CERTIFICATE).isPresent() &&\n co...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_13
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_default_value_of_application_id() {\n assertThat(underTest.getApplicationId()).isEqualTo(\"sonarqube\");\n }", "class_method_signature": "SamlSettingsTest.return_default_value_of_application_id()", "constructor": false, "full_signature": "@Test public void return_defau...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getApplicationId() {\n return configuration.get(APPLICATION_ID).orElseThrow(() -> new IllegalArgumentException(\"Application ID is missing\"));\n }", "class_method_signature": "SamlSettings.getApplicationId()", "constructor": false, "full_signature": " String getApplicationId()", "identi...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_5
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void failed_callback_when_behind_a_reverse_proxy_without_needed_header() {\n setSettings(true);\n // simulate reverse proxy stripping SSL and not adding X-Forwarded-Proto header\n when(this.request.getRequestURL()).thenReturn(new StringBuffer(\"http://localhost/oauth2/callback/saml...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void callback(CallbackContext context) {\n //\n // Workaround for onelogin/java-saml validation not taking into account running a reverse proxy configuration. This change\n // makes the validation take into account 'X-Forwarded-Proto' and 'Host' headers set by the reverse proxy...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_29
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void fail_to_get_login_url_when_null() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Login URL is missing\");\n\n underTest.getLoginUrl();\n }", "class_method_signature": "SamlSettingsTest.fail_to_get_login_url_when_null()", ...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getLoginUrl() {\n return configuration.get(LOGIN_URL).orElseThrow(() -> new IllegalArgumentException(\"Login URL is missing\"));\n }", "class_method_signature": "SamlSettings.getLoginUrl()", "constructor": false, "full_signature": " String getLoginUrl()", "identifier": "getLoginUrl", "...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_10
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void fail_to_callback_when_using_wrong_certificate() {\n setSettings(true);\n settings.setProperty(\"sonar.auth.saml.certificate.secured\", \"-----BEGIN CERTIFICATE-----\\n\" +\n \"MIIEIzCCAwugAwIBAgIUHUzPjy5E2TmnsmTRT2sIUBRXFF8wDQYJKoZIhvcNAQEF\\n\" +\n \"BQAwXDELMAkGA1UEBh...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void callback(CallbackContext context) {\n //\n // Workaround for onelogin/java-saml validation not taking into account running a reverse proxy configuration. This change\n // makes the validation take into account 'X-Forwarded-Proto' and 'Host' headers set by the reverse proxy...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_6
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void successful_callback_when_behind_a_reverse_proxy_with_needed_header() {\n setSettings(true);\n // simulate reverse proxy stripping SSL and adding X-Forwarded-Proto header\n when(this.request.getRequestURL()).thenReturn(new StringBuffer(\"http://localhost/oauth2/callback/saml\")...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void callback(CallbackContext context) {\n //\n // Workaround for onelogin/java-saml validation not taking into account running a reverse proxy configuration. This change\n // makes the validation take into account 'X-Forwarded-Proto' and 'Host' headers set by the reverse proxy...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_30
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void fail_to_get_certificate_when_null() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Certificate is missing\");\n\n underTest.getCertificate();\n }", "class_method_signature": "SamlSettingsTest.fail_to_get_certificate_when_nu...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getCertificate() {\n return configuration.get(CERTIFICATE).orElseThrow(() -> new IllegalArgumentException(\"Certificate is missing\"));\n }", "class_method_signature": "SamlSettings.getCertificate()", "constructor": false, "full_signature": " String getCertificate()", "identifier": "getC...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_26
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void is_enabled_using_default_values() {\n settings.setProperty(\"sonar.auth.saml.providerId\", \"http://localhost:8080/auth/realms/sonarqube\");\n settings.setProperty(\"sonar.auth.saml.loginUrl\", \"http://localhost:8080/auth/realms/sonarqube/protocol/saml\");\n settings.setPrope...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "boolean isEnabled() {\n return configuration.getBoolean(ENABLED).orElse(false) &&\n configuration.get(PROVIDER_ID).isPresent() &&\n configuration.get(APPLICATION_ID).isPresent() &&\n configuration.get(LOGIN_URL).isPresent() &&\n configuration.get(CERTIFICATE).isPresent() &&\n co...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_27
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n @UseDataProvider(\"settingsRequiredToEnablePlugin\")\n public void is_enabled_return_false_when_one_required_setting_is_missing(String setting) {\n initAllSettings();\n settings.setProperty(setting, (String) null);\n\n assertThat(underTest.isEnabled()).isFalse();\n }", "class_method_s...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "boolean isEnabled() {\n return configuration.getBoolean(ENABLED).orElse(false) &&\n configuration.get(PROVIDER_ID).isPresent() &&\n configuration.get(APPLICATION_ID).isPresent() &&\n configuration.get(LOGIN_URL).isPresent() &&\n configuration.get(CERTIFICATE).isPresent() &&\n co...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_31
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void fail_to_get_user_login_attribute_when_null() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"User login attribute is missing\");\n\n underTest.getUserLogin();\n }", "class_method_signature": "SamlSettingsTest.fail_to_get_use...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getUserLogin() {\n return configuration.get(USER_LOGIN_ATTRIBUTE).orElseThrow(() -> new IllegalArgumentException(\"User login attribute is missing\"));\n }", "class_method_signature": "SamlSettings.getUserLogin()", "constructor": false, "full_signature": " String getUserLogin()", "identi...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_7
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void fail_to_callback_when_login_is_missing() {\n setSettings(true);\n DumbCallbackContext callbackContext = new DumbCallbackContext(request, response, \"encoded_response_without_login.txt\", SQ_CALLBACK_URL);\n\n expectedException.expect(NullPointerException.class);\n expectedE...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public void callback(CallbackContext context) {\n //\n // Workaround for onelogin/java-saml validation not taking into account running a reverse proxy configuration. This change\n // makes the validation take into account 'X-Forwarded-Proto' and 'Host' headers set by the reverse proxy...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_11
{ "fields": [ { "declarator": "context = new MockContext()", "modifier": "private", "original_string": "private MockContext context = new MockContext();", "type": "MockContext", "var_name": "context" }, { "declarator": "underTest = new AuthSamlPlugin()", "modifier...
{ "body": "@Test\n public void test_extensions() {\n underTest.define(context);\n\n assertThat(context.getExtensions()).hasSize(12);\n }", "class_method_signature": "AuthSamlPluginTest.test_extensions()", "constructor": false, "full_signature": "@Test public void test_extensions()", "identifier": "tes...
{ "fields": [], "file": "sonar-auth-saml-plugin/src/main/java/org/sonarsource/auth/saml/AuthSamlPlugin.java", "identifier": "AuthSamlPlugin", "interfaces": "implements Plugin", "methods": [ { "class_method_signature": "AuthSamlPlugin.define(Context context)", "constructor": false, "full_...
{ "body": "@Override\n public void define(Context context) {\n context.addExtensions(\n SamlIdentityProvider.class,\n SamlSettings.class);\n context.addExtensions(SamlSettings.definitions());\n }", "class_method_signature": "AuthSamlPlugin.define(Context context)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_20
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_user_name_attribute() {\n settings.setProperty(\"sonar.auth.saml.user.name\", \"userName\");\n\n assertThat(underTest.getUserName()).isEqualTo(\"userName\");\n }", "class_method_signature": "SamlSettingsTest.return_user_name_attribute()", "constructor": false, "full...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getUserName() {\n return configuration.get(USER_NAME_ATTRIBUTE).orElseThrow(() -> new IllegalArgumentException(\"User name attribute is missing\"));\n }", "class_method_signature": "SamlSettings.getUserName()", "constructor": false, "full_signature": " String getUserName()", "identifier"...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_16
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_provider_id() {\n settings.setProperty(\"sonar.auth.saml.applicationId\", \"http://localhost:8080/auth/realms/sonarqube\");\n\n assertThat(underTest.getApplicationId()).isEqualTo(\"http://localhost:8080/auth/realms/sonarqube\");\n }", "class_method_signature": "SamlSett...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getApplicationId() {\n return configuration.get(APPLICATION_ID).orElseThrow(() -> new IllegalArgumentException(\"Application ID is missing\"));\n }", "class_method_signature": "SamlSettings.getApplicationId()", "constructor": false, "full_signature": " String getApplicationId()", "identi...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_0
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void provider_name_is_provided_by_setting() {\n // Default value\n assertThat(underTest.getName()).isEqualTo(\"SAML\");\n\n settings.setProperty(\"sonar.auth.saml.providerName\", \"My Provider\");\n assertThat(underTest.getName()).isEqualTo(\"My Provider\");\n }", "class_meth...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public String getName() {\n return samlSettings.getProviderName();\n }", "class_method_signature": "SamlIdentityProvider.getName()", "constructor": false, "full_signature": "@Override public String getName()", "identifier": "getName", "invocations": [ "getProviderName" ], ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_1
{ "fields": [ { "declarator": "SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\"", "modifier": "private static final", "original_string": "private static final String SQ_CALLBACK_URL = \"http://localhost:9000/oauth2/callback/saml\";", "type": "String", "var_name": "SQ_...
{ "body": "@Test\n public void is_enabled() {\n setSettings(true);\n assertThat(underTest.isEnabled()).isTrue();\n\n setSettings(false);\n assertThat(underTest.isEnabled()).isFalse();\n }", "class_method_signature": "SamlIdentityProviderTest.is_enabled()", "constructor": false, "full_signature": "...
{ "fields": [ { "declarator": "HTTPS_PATTERN = Pattern.compile(\"https?://\")", "modifier": "private static final", "original_string": "private static final Pattern HTTPS_PATTERN = Pattern.compile(\"https?://\");", "type": "Pattern", "var_name": "HTTPS_PATTERN" }, { "de...
{ "body": "@Override\n public boolean isEnabled() {\n return samlSettings.isEnabled();\n }", "class_method_signature": "SamlIdentityProvider.isEnabled()", "constructor": false, "full_signature": "@Override public boolean isEnabled()", "identifier": "isEnabled", "invocations": [ "isEnabled" ], "...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_17
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_login_url() {\n settings.setProperty(\"sonar.auth.saml.loginUrl\", \"http://localhost:8080/\");\n assertThat(underTest.getLoginUrl()).isEqualTo(\"http://localhost:8080/\");\n\n settings.setProperty(\"sonar.auth.saml.loginUrl\", \"http://localhost:8080\");\n assertTha...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "String getLoginUrl() {\n return configuration.get(LOGIN_URL).orElseThrow(() -> new IllegalArgumentException(\"Login URL is missing\"));\n }", "class_method_signature": "SamlSettings.getLoginUrl()", "constructor": false, "full_signature": " String getLoginUrl()", "identifier": "getLoginUrl", "...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
141267788_21
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, {...
{ "body": "@Test\n public void return_user_email_attribute() {\n settings.setProperty(\"sonar.auth.saml.user.email\", \"userEmail\");\n\n assertThat(underTest.getUserEmail().get()).isEqualTo(\"userEmail\");\n }", "class_method_signature": "SamlSettingsTest.return_user_email_attribute()", "constructor": fa...
{ "fields": [ { "declarator": "ENABLED = \"sonar.auth.saml.enabled\"", "modifier": "private static final", "original_string": "private static final String ENABLED = \"sonar.auth.saml.enabled\";", "type": "String", "var_name": "ENABLED" }, { "declarator": "PROVIDER_ID = ...
{ "body": "Optional<String> getUserEmail() {\n return configuration.get(USER_EMAIL_ATTRIBUTE);\n }", "class_method_signature": "SamlSettings.getUserEmail()", "constructor": false, "full_signature": " Optional<String> getUserEmail()", "identifier": "getUserEmail", "invocations": [ "get" ], "modif...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 141267788, "size": 160, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/SonarSource/sonar-auth-saml" }
315033_1
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test(expected = IllegalStateException.class)\n public void testTransitionFromSaveToSave() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service;\n serviceImpl.getActualStateAfterTransit...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "protected OpState getActualStateAfterTransition(OpState oldOpState, OpState currentOpState) {\n if (oldOpState == null) {\n if (currentOpState == null) {\n return null;\n }\n else {\n switch (currentOpState) {\n case UPDATE:\n case DELETE:\n thro...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_39
{ "fields": [ { "declarator": "propagtedIsolatedTransaction", "modifier": "private final", "original_string": "private final Method propagtedIsolatedTransaction;", "type": "Method", "var_name": "propagtedIsolatedTransaction" }, { "declarator": "propagtedNonIsolatedTrans...
{ "body": "@Test\n public void testNestedTransactionWithoutPropagationWithSuccess() throws Throwable {\n final MethodInvocation invocation = mockery.mock(MethodInvocation.class);\n mockery.checking(new Expectations() {\n\n {\n Sequence seq = mockery.sequence(\"newTx\");\n Transaction tx = mo...
{ "fields": [ { "declarator": "manager", "modifier": "@Inject\n private", "original_string": "@Inject\n private TransactionManager manager;", "type": "TransactionManager", "var_name": "manager" } ], "file": "code-generation/content-repo-dao-impl/src/main/java/com/smartiteng...
{ "body": "public Object invoke(MethodInvocation invocation) throws Throwable {\n final Method method = invocation.getMethod();\n if(method == null) {\n return null;\n }\n Transactional txa = method.getAnnotation(Transactional.class);\n if (txa == null) {\n return invocation.proceed();\n }...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_54
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testUpdate() {\n final DemoDomain dto = getWriteTestData().get(0);\n mockery.checking(new Expectations() {\n\n {\n exactly(2).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx));\n exa...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public void update(T... states) {\n if (states == null) {\n return;\n }\n if (isWithinTransaction()) {\n for (T state : states) {\n this.txService.update(getTxElement(state));\n }\n }\n else {\n this.writeDao.update(states);\n }\n }", "class_method_signature"...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_42
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testGetListDelegation() {\n final List<DemoDomain> result = new ArrayList<DemoDomain>();\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(readDao).getList(with(equal(PARAM_LIST)));\n will(returnValue(result));\n }\n });\n Assert.assertSa...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public List<T> getList(List<QueryParameter> query) {\n return this.readDao.getList(query);\n }", "class_method_signature": "CommonTxDao.getList(List<QueryParameter> query)", "constructor": false, "full_signature": "public List<T> getList(List<QueryParameter> query)", "identifier": "getList", ...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_15
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test(expected = IllegalStateException.class)\n public void testTransitionFromDeleteToNull() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service;\n serviceImpl.getActualStateAfterTrans...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "protected OpState getActualStateAfterTransition(OpState oldOpState, OpState currentOpState) {\n if (oldOpState == null) {\n if (currentOpState == null) {\n return null;\n }\n else {\n switch (currentOpState) {\n case UPDATE:\n case DELETE:\n thro...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_62
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testGetByIdWithTransactionIsolationFromCache() {\n mockery.checking(new Expectations() {\n\n {\n exactly(2).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx));\n exactly(1).of(tx).isIsol...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public T getById(String id) {\n if (isWithinTransaction()) {\n Transaction tx = txManager.getCurrentTransaction();\n T txDto = null;\n Pair<TransactionStoreKey, TransactionStoreValue> pair;\n if (tx.isIsolatedTransaction()) {\n pair = memCache.getValueForIsolatedTransaction(tx...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_35
{ "fields": [ { "declarator": "propagtedIsolatedTransaction", "modifier": "private final", "original_string": "private final Method propagtedIsolatedTransaction;", "type": "Method", "var_name": "propagtedIsolatedTransaction" }, { "declarator": "propagtedNonIsolatedTrans...
{ "body": "@Test\n public void testNullAnnotation() throws Throwable {\n final MethodInvocation invocation = mockery.mock(MethodInvocation.class);\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(invocation).getMethod();\n will(returnValue(nonTransaction));\n exactly(1).o...
{ "fields": [ { "declarator": "manager", "modifier": "@Inject\n private", "original_string": "@Inject\n private TransactionManager manager;", "type": "TransactionManager", "var_name": "manager" } ], "file": "code-generation/content-repo-dao-impl/src/main/java/com/smartiteng...
{ "body": "public Object invoke(MethodInvocation invocation) throws Throwable {\n final Method method = invocation.getMethod();\n if(method == null) {\n return null;\n }\n Transactional txa = method.getAnnotation(Transactional.class);\n if (txa == null) {\n return invocation.proceed();\n }...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_23
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test\n public void testHardRollbackWithEmptyDeque() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service;\n serviceImpl.rollback(new LinkedList<Pair<TransactionStoreKey, TransactionSto...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "public void rollback(String txId) {\n completeTx(txId);\n }", "class_method_signature": "TransactionServiceImpl.rollback(String txId)", "constructor": false, "full_signature": "public void rollback(String txId)", "identifier": "rollback", "invocations": [ "completeTx" ], "modifiers": ...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_58
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testDelete() {\n final DemoDomain dto = getWriteTestData().get(0);\n mockery.checking(new Expectations() {\n\n {\n exactly(2).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx));\n exa...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public void delete(T... states) {\n if (states == null) {\n return;\n }\n if (isWithinTransaction()) {\n for (T state : states) {\n this.txService.delete(getTxElement(state));\n }\n }\n else {\n this.writeDao.delete(states);\n }\n }", "class_method_signature"...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_19
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test\n public void testUpdate() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final CommonReadDao<DemoDomain, String> readDao = mockery.mock(CommonReadDao.class);\n final CommonWriteDao<DemoDomain> writeDao = mockery.mock(CommonWriteDao.class);\n fin...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "public <T extends AbstractRepositoryDomain> void update(TransactionElement<T> element) {\n populateCache(element, OpState.UPDATE);\n }", "class_method_signature": "TransactionServiceImpl.update(TransactionElement<T> element)", "constructor": false, "full_signature": "public void update(Transactio...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_18
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test\n public void testPopulateTransactionCacheWithExistingValue() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service;\n CommonReadDao<DemoDomain, String> readDao = mockery.mock(Comm...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "protected <T extends AbstractRepositoryDomain> void populateCache(TransactionElement<T> element,\n OpState currentOpState) {\n fillCacheIfNeeded(element);\n int nextOpIndex = getNextOpsIndex(element.getTxId());\n TransactionStoreKe...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_59
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testDeletes() {\n final List<DemoDomain> dtos = getWriteTestData();\n mockery.checking(new Expectations() {\n\n {\n exactly(dtos.size() + 1).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx)...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public void delete(T... states) {\n if (states == null) {\n return;\n }\n if (isWithinTransaction()) {\n for (T state : states) {\n this.txService.delete(getTxElement(state));\n }\n }\n else {\n this.writeDao.delete(states);\n }\n }", "class_method_signature"...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_22
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test\n public void testSaveWithoutId() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final CommonReadDao<DemoDomain, String> readDao = mockery.mock(CommonReadDao.class);\n final CommonWriteDao<DemoDomain> writeDao = mockery.mock(CommonWriteDao.class);\n...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "public <T extends AbstractRepositoryDomain> void save(TransactionElement<T> element) {\n String id = (String) element.getDto().getId();\n if (id == null) {\n id = UUID.randomUUID().toString();\n element.getDto().setId(id);\n }\n populateCache(element, OpState.SAVE);\n }", "class_me...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_34
{ "fields": [ { "declarator": "propagtedIsolatedTransaction", "modifier": "private final", "original_string": "private final Method propagtedIsolatedTransaction;", "type": "Method", "var_name": "propagtedIsolatedTransaction" }, { "declarator": "propagtedNonIsolatedTrans...
{ "body": "@Test\n public void testNullMethod() throws Throwable {\n final MethodInvocation invocation = mockery.mock(MethodInvocation.class);\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(invocation).getMethod();\n will(returnValue(null));\n }\n });\n interceptor....
{ "fields": [ { "declarator": "manager", "modifier": "@Inject\n private", "original_string": "@Inject\n private TransactionManager manager;", "type": "TransactionManager", "var_name": "manager" } ], "file": "code-generation/content-repo-dao-impl/src/main/java/com/smartiteng...
{ "body": "public Object invoke(MethodInvocation invocation) throws Throwable {\n final Method method = invocation.getMethod();\n if(method == null) {\n return null;\n }\n Transactional txa = method.getAnnotation(Transactional.class);\n if (txa == null) {\n return invocation.proceed();\n }...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_63
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testGetByIdWithTransactionIsolationFromCacheDeleteState() {\n mockery.checking(new Expectations() {\n\n {\n exactly(2).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx));\n exactly(1).of...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public T getById(String id) {\n if (isWithinTransaction()) {\n Transaction tx = txManager.getCurrentTransaction();\n T txDto = null;\n Pair<TransactionStoreKey, TransactionStoreValue> pair;\n if (tx.isIsolatedTransaction()) {\n pair = memCache.getValueForIsolatedTransaction(tx...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_14
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test(expected = IllegalStateException.class)\n public void testTransitionFromDeleteToDelete() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service;\n serviceImpl.getActualStateAfterTra...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "protected OpState getActualStateAfterTransition(OpState oldOpState, OpState currentOpState) {\n if (oldOpState == null) {\n if (currentOpState == null) {\n return null;\n }\n else {\n switch (currentOpState) {\n case UPDATE:\n case DELETE:\n thro...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_43
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testGetOtherDelegation() {\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(readDao).getOther(with(equal(PARAM_LIST)));\n will(returnValue(PARAM_ARRAY));\n }\n });\n Assert.assertSame(PARAM_ARRAY, this.services.readDao.<QueryParameter[]>get...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public <OtherTemplate> OtherTemplate getOther(List<QueryParameter> query) {\n return this.readDao.<OtherTemplate>getOther(query);\n }", "class_method_signature": "CommonTxDao.getOther(List<QueryParameter> query)", "constructor": false, "full_signature": "public OtherTemplate getOther(List<QueryPa...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_55
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testUpdates() {\n final List<DemoDomain> dtos = getWriteTestData();\n mockery.checking(new Expectations() {\n\n {\n exactly(dtos.size() + 1).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx)...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public void update(T... states) {\n if (states == null) {\n return;\n }\n if (isWithinTransaction()) {\n for (T state : states) {\n this.txService.update(getTxElement(state));\n }\n }\n else {\n this.writeDao.update(states);\n }\n }", "class_method_signature"...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_38
{ "fields": [ { "declarator": "propagtedIsolatedTransaction", "modifier": "private final", "original_string": "private final Method propagtedIsolatedTransaction;", "type": "Method", "var_name": "propagtedIsolatedTransaction" }, { "declarator": "propagtedNonIsolatedTrans...
{ "body": "@Test\n public void testNewNonIsolatedTransactionWithSuccess() throws Throwable {\n final MethodInvocation invocation = mockery.mock(MethodInvocation.class);\n mockery.checking(new Expectations() {\n\n {\n Sequence seq = mockery.sequence(\"newTx\");\n exactly(1).of(invocation).get...
{ "fields": [ { "declarator": "manager", "modifier": "@Inject\n private", "original_string": "@Inject\n private TransactionManager manager;", "type": "TransactionManager", "var_name": "manager" } ], "file": "code-generation/content-repo-dao-impl/src/main/java/com/smartiteng...
{ "body": "public Object invoke(MethodInvocation invocation) throws Throwable {\n final Method method = invocation.getMethod();\n if(method == null) {\n return null;\n }\n Transactional txa = method.getAnnotation(Transactional.class);\n if (txa == null) {\n return invocation.proceed();\n }...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_0
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test\n public void testConcurrentIdGeneration() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final Set<String> txIds = new ConcurrentSkipListSet<String>();\n final int threadCount = 10;\n final int loopCount = 100000;\n List<Thread> threads = new...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "public String getNextTransactionId() {\n return String.valueOf(uniqueIdGen.incrementAndGet());\n }", "class_method_signature": "TransactionServiceImpl.getNextTransactionId()", "constructor": false, "full_signature": "public String getNextTransactionId()", "identifier": "getNextTransactionId", ...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_64
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testGetByIdWithTransactionIsolationFromCacheWithNullState() {\n mockery.checking(new Expectations() {\n\n {\n exactly(2).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx));\n exactly(1)....
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public T getById(String id) {\n if (isWithinTransaction()) {\n Transaction tx = txManager.getCurrentTransaction();\n T txDto = null;\n Pair<TransactionStoreKey, TransactionStoreValue> pair;\n if (tx.isIsolatedTransaction()) {\n pair = memCache.getValueForIsolatedTransaction(tx...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_33
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "factory", "modifier": "private", "original_string": "private TransactionFactory factor...
{ "body": "@Test\n public void testBeginTransaction() {\n Injector injector = initializeInjector();\n final TransactionManager manager = injector.getInstance(TransactionManager.class);\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(factory).createTransaction(true);\n final ...
{ "fields": [ { "declarator": "transactions = new ThreadLocal<Deque<Transaction>>()", "modifier": "private final", "original_string": "private final ThreadLocal<Deque<Transaction>> transactions = new ThreadLocal<Deque<Transaction>>();", "type": "ThreadLocal<Deque<Transaction>>", "var...
{ "body": "public Transaction beginTransaction() {\n return beginTransaction(true);\n }", "class_method_signature": "TransactionManagerImpl.beginTransaction()", "constructor": false, "full_signature": "public Transaction beginTransaction()", "identifier": "beginTransaction", "invocations": [ "beginT...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_25
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test\n public void testCommitWithNullOrEmptyTransactionOps() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(mockMemCache).getTransactionParticipants(\"1\");\n will(returnValue(nu...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "public void commit(String txId) {\n if (StringUtils.isBlank(txId)) {\n return;\n }\n List<Pair<TransactionStoreKey, TransactionStoreValue>> list = memCache.getTransactionParticipants(txId);\n if (list == null || list.isEmpty()) {\n return;\n }\n //Sort\n Collections.sort(list...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_48
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testSaveWithNull() {\n this.services.writeDao.save((DemoDomain[]) null);\n mockery.assertIsSatisfied();\n }", "class_method_signature": "CommonTxDaoTest.testSaveWithNull()", "constructor": false, "full_signature": "@Test public void testSaveWithNull()", "identifier": "te...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public void save(T... states) {\n if (states == null) {\n return;\n }\n if (isWithinTransaction()) {\n for (T state : states) {\n this.txService.save(getTxElement(state));\n }\n }\n else {\n this.writeDao.save(states);\n }\n }", "class_method_signature": "Com...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_7
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test\n public void testTransitionFromNullToNull() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service;\n Assert.assertNull(serviceImpl.getActualStateAfterTransition(null, null));\n }...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "protected OpState getActualStateAfterTransition(OpState oldOpState, OpState currentOpState) {\n if (oldOpState == null) {\n if (currentOpState == null) {\n return null;\n }\n else {\n switch (currentOpState) {\n case UPDATE:\n case DELETE:\n thro...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_68
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testGetByIdWithTransactionNonIsolationFromCacheWithNullState() {\n mockery.checking(new Expectations() {\n\n {\n exactly(2).of(txManager).getCurrentTransaction();\n Transaction tx = mockery.mock(Transaction.class);\n will(returnValue(tx));\n exactly(...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public T getById(String id) {\n if (isWithinTransaction()) {\n Transaction tx = txManager.getCurrentTransaction();\n T txDto = null;\n Pair<TransactionStoreKey, TransactionStoreValue> pair;\n if (tx.isIsolatedTransaction()) {\n pair = memCache.getValueForIsolatedTransaction(tx...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_29
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "service", "modifier": "private", "original_string": "private TransactionService servic...
{ "body": "@Test(expected = TransactionException.class)\n public void testCommitWithException() {\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(service).getNextTransactionId();\n will(returnValue(\"1\"));\n exactly(1).of(service).commit(\"1\");\n will(throwExceptio...
{ "fields": [ { "declarator": "id", "modifier": "private final", "original_string": "private final String id;", "type": "String", "var_name": "id" }, { "declarator": "completed", "modifier": "private final", "original_string": "private final MutableBoolean c...
{ "body": "public void commit() throws TransactionException {\n boolean successful = false;\n try {\n this.service.commit(id);\n successful = true;\n }\n catch (RuntimeException ex) {\n throw ex;\n }\n finally {\n completeTransaction(TransactionCompletionEvent.CompletionEvent.COM...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_52
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testUpdateWithNull() {\n this.services.writeDao.update((DemoDomain[]) null);\n mockery.assertIsSatisfied();\n }", "class_method_signature": "CommonTxDaoTest.testUpdateWithNull()", "constructor": false, "full_signature": "@Test public void testUpdateWithNull()", "identifi...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public void update(T... states) {\n if (states == null) {\n return;\n }\n if (isWithinTransaction()) {\n for (T state : states) {\n this.txService.update(getTxElement(state));\n }\n }\n else {\n this.writeDao.update(states);\n }\n }", "class_method_signature"...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_44
{ "fields": [ { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", "type": "Mockery", "var_name": "mockery" }, { "declarator": "readDao", "modifier": "private", "original_string": "private CommonReadDao<DemoDomain,...
{ "body": "@Test\n public void testGetOtherListDelegation() {\n mockery.checking(new Expectations() {\n\n {\n exactly(1).of(readDao).getOtherList(with(equal(PARAM_LIST)));\n will(returnValue(Arrays.<QueryParameter[]>asList(PARAM_ARRAY, PARAM_ARRAY)));\n }\n });\n Assert.assertEquals(...
{ "fields": [ { "declarator": "readDao", "modifier": "private final", "original_string": "private final CommonReadDao<T, String> readDao;", "type": "CommonReadDao<T, String>", "var_name": "readDao" }, { "declarator": "writeDao", "modifier": "private final", ...
{ "body": "public <OtherTemplate> List<OtherTemplate> getOtherList(List<QueryParameter> query) {\n return this.readDao.<OtherTemplate>getOtherList(query);\n }", "class_method_signature": "CommonTxDao.getOtherList(List<QueryParameter> query)", "constructor": false, "full_signature": "public List<OtherTemplat...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }
315033_13
{ "fields": [ { "declarator": "injector", "modifier": "private", "original_string": "private Injector injector;", "type": "Injector", "var_name": "injector" }, { "declarator": "mockery", "modifier": "private", "original_string": "private Mockery mockery;", ...
{ "body": "@Test(expected = IllegalStateException.class)\n public void testTransitionFromDeleteToUpdate() {\n final TransactionService service = injector.getInstance(TransactionService.class);\n final TransactionServiceImpl serviceImpl = (TransactionServiceImpl) service;\n serviceImpl.getActualStateAfterTra...
{ "fields": [ { "declarator": "uniqueIdGen = new AtomicLong(Long.MIN_VALUE)", "modifier": "private final", "original_string": "private final AtomicLong uniqueIdGen = new AtomicLong(Long.MIN_VALUE);", "type": "AtomicLong", "var_name": "uniqueIdGen" }, { "declarator": "me...
{ "body": "protected OpState getActualStateAfterTransition(OpState oldOpState, OpState currentOpState) {\n if (oldOpState == null) {\n if (currentOpState == null) {\n return null;\n }\n else {\n switch (currentOpState) {\n case UPDATE:\n case DELETE:\n thro...
{ "created": null, "fork": null, "fork_count": 13, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 315033, "size": 2542, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/SmartITEngineering/smart-cms" }