id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
208221849_33
{ "fields": [ { "declarator": "userService", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate UserService userService;", "type": "UserService", "var_name": "userService" }, { "declarator": "clientPlatformRepository", "modifier": "@Mock\n\tpriva...
{ "body": "@Test\n\tpublic void given_OneUserAdminWithClientPlatforms_When_AllClientPlatformsAreRequested_Then_AllTheClientPlatformOfTheUserAreReturned() {\n\t\tString userId = \"userId\";\n\t\tString clientIdentification = \"clientIdentification\";\n\n\t\tRole role = new Role();\n\t\trole.setId(Role.Type.ROLE_ADMINI...
{ "fields": [ { "declarator": "clientPlatformRepository", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate ClientPlatformRepository clientPlatformRepository;", "type": "ClientPlatformRepository", "var_name": "clientPlatformRepository" }, { ...
{ "body": "@Override\n\tpublic List<ClientPlatform> getAllClientPlatformByCriteria(String userId, String identification,\n\t\t\tString[] ontologies) {\n\t\tfinal List<ClientPlatform> clients = getClientPlatform(userId, identification);\n\n\t\tif (ontologies != null && ontologies.length > 0) {\n\n\t\t\tfinal List<Clie...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_25
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyBusinessServiceImpl service;", "type": "OntologyBusinessServiceImpl", "var_name": "service" }, { "declarator": "ontologyService", "modifier": "@Mock\n\...
{ "body": "@Test()\n\tpublic void given_OntologyDataAndUser_When_OntologyWithKafkaTopicFailsCreatingTheOntologyInPersistence_Then_TheAnExceptionIsThrown() {\n\t\tOntology ontology = new Ontology();\n\t\tontology.setAllowsCreateTopic(true);\n\t\tString userId = \"me\";\n\n\t\twhen(ontologyService.isIdValid(any())).the...
{ "fields": [ { "declarator": "ontologyService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyService ontologyService;", "type": "OntologyService", "var_name": "ontologyService" }, { "declarator": "ontologyLogicService", "...
{ "body": "@Override\n\tpublic void createOntology(Ontology ontology, String userId, OntologyConfiguration config)\n\t\t\tthrows OntologyBusinessServiceException {\n\n\t\tif (!ontologyService.isIdValid(ontology.getIdentification())) {\n\t\t\tthrow new OntologyBusinessServiceException(OntologyBusinessServiceException....
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_24
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyBusinessServiceImpl service;", "type": "OntologyBusinessServiceImpl", "var_name": "service" }, { "declarator": "ontologyService", "modifier": "@Mock\n\...
{ "body": "@Test()\n\tpublic void given_OntologyDataAndUser_When_OntologyWithKafkaTopicFailsCreatingTheOntologyAndThenItFailsCleaningTheTopic_Then_TheAnExceptionIsThrown() {\n\t\tOntology ontology = new Ontology();\n\t\tontology.setAllowsCreateTopic(true);\n\t\tString userId = \"me\";\n\n\t\twhen(ontologyService.isId...
{ "fields": [ { "declarator": "ontologyService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyService ontologyService;", "type": "OntologyService", "var_name": "ontologyService" }, { "declarator": "ontologyLogicService", "...
{ "body": "@Override\n\tpublic void createOntology(Ontology ontology, String userId, OntologyConfiguration config)\n\t\t\tthrows OntologyBusinessServiceException {\n\n\t\tif (!ontologyService.isIdValid(ontology.getIdentification())) {\n\t\t\tthrow new OntologyBusinessServiceException(OntologyBusinessServiceException....
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_32
{ "fields": [ { "declarator": "server = new GreenMailRule(new ServerSetup(2525, \"localhost\", \"smtp\"))", "modifier": "@Rule\n public", "original_string": "@Rule\n public GreenMailRule server = new GreenMailRule(new ServerSetup(2525, \"localhost\", \"smtp\"));", "type": "GreenMailR...
{ "body": "@Test\n public void testSendMailArrayOK() {\n try {\n String[] to = new String[1];\n to[0] = TEST_MAIL;\n mailServiceImpl.sendMail(to, \"Subject\",\"Text\");\n \n MimeMessage[] receivedMessages = server.getReceivedMessages();\n as...
{ "fields": [ { "declarator": "emailSender", "modifier": "@Autowired\n\tpublic", "original_string": "@Autowired\n\tpublic JavaMailSender emailSender;", "type": "JavaMailSender", "var_name": "emailSender" } ], "file": "sources/services/mail-services/src/main/java/com/minsait/o...
{ "body": "@Override\n\tpublic void sendMail(String[] to, String subject, String text) {\n\n\t\ttry {\n\t\t\t// emailSender.\n\t\t\tfinal SimpleMailMessage message = new SimpleMailMessage();\n\t\t\tmessage.setTo(to);\n\t\t\tmessage.setSubject(subject);\n\t\t\tmessage.setText(text);\n\t\t\temailSender.send(message);\n...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_49
{ "fields": [], "file": "sources/services/config-services/src/test/java/com/minsait/onesait/platform/config/services/templates/SqlComparatorTest.java", "identifier": "SqlComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void given_OneTimeSeriesQuery_When_ItIsMatched_Then_AllTheParametersAreObtained() throws JSQLParserException {\n String query =\n \"SELECT * \"\n + \"FROM timeseries(AssetTestArray2,'d') \"\n + \"WHERE Test1.temperature.timestamp >= '2017-01...
{ "fields": [], "file": "sources/services/config-services/src/main/java/com/minsait/onesait/platform/config/services/templates/SqlComparator.java", "identifier": "SqlComparator", "interfaces": "", "methods": [ { "class_method_signature": "SqlComparator.SqlComparator()", "constructor": true, ...
{ "body": "public static MatchResult match(String query1, String query2) throws JSQLParserException {\n\t\tfinal Statement stmt1 = CCJSqlParserUtil.parse(query1);\n\t\tfinal Statement stmt2 = CCJSqlParserUtil.parse(query2);\n\t\treturn matchStatement(stmt1, stmt2);\n\t}", "class_method_signature": "SqlComparator.ma...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_6
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_event_completeEvent_user_is_null() {\n\t\tApiManagerAuditEvent event = ApiManagerAuditEvent.builder().build();\n\n\t\tfinal Map<String, Object> retVal = new HashMap<>();\n\t\tretVal.put(Constants.USER, null);\n\n\t\tevent = apiManagerAuditProcessor.completeEvent(event);\n\t\tasse...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public ApiManagerAuditEvent completeEvent(ApiManagerAuditEvent event) {\n\t\tif (event != null && (event.getUser() == null || \"\".equals(event.getUser()))) {\n\t\t\tlog.debug(\"the user is null so set user to anonymous\");\n\t\t\tevent.setUser(AuditConst.ANONYMOUS_USER);\n\t\t}\n\t\treturn event;\n\t}", ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_28
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyBusinessServiceImpl service;", "type": "OntologyBusinessServiceImpl", "var_name": "service" }, { "declarator": "ontologyService", "modifier": "@Mock\n\...
{ "body": "@Test()\n\tpublic void given_OntologyDataAndUser_When_OntologyWithExternalTableFailsCreatingTheOntologyAndThenItFailsCleaningTheExternalTable_Then_TheAnExceptionIsThrown() {\n\t\tOntology ontology = new Ontology();\n\t\tontology.setRtdbDatasource(RtdbDatasource.VIRTUAL);\n\t\tontology.setIdentification(\"t...
{ "fields": [ { "declarator": "ontologyService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyService ontologyService;", "type": "OntologyService", "var_name": "ontologyService" }, { "declarator": "ontologyLogicService", "...
{ "body": "@Override\n\tpublic void createOntology(Ontology ontology, String userId, OntologyConfiguration config)\n\t\t\tthrows OntologyBusinessServiceException {\n\n\t\tif (!ontologyService.isIdValid(ontology.getIdentification())) {\n\t\t\tthrow new OntologyBusinessServiceException(OntologyBusinessServiceException....
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_45
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks\n\tprivate", "original_string": "@InjectMocks\n\tprivate QueryTemplateServiceImpl service;", "type": "QueryTemplateServiceImpl", "var_name": "service" } ], "file": "sources/services/config-services/src/test/ja...
{ "body": "@Test\n\tpublic void given_AQueryTemplate_When_TheQueryTemplateIsProcessed_Then_TheJavascriptCodeIsInterpreted()\n\t\t\tthrows NoSuchMethodException, ScriptException {\n\n\t\tString query = \"var query = \\\"db.AssetTestArray2.find({})\\\";\\n\" + \"\\n\" + \"return query;\";\n\n\t\tString expectedQuery = ...
{ "fields": [ { "declarator": "queryTemplateRepository", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate QueryTemplateRepository queryTemplateRepository;", "type": "QueryTemplateRepository", "var_name": "queryTemplateRepository" }, { "decl...
{ "body": "private String processQuery(QueryTemplate template, MatchResult result)\n\t\t\tthrows NoSuchMethodException, ScriptException {\n\t\tString query = replaceVariables(template.getQueryGenerator(), result.getVariables());\n\t\tquery = processQuery(query, template.getName());\n\t\treturn query;\n\t}", "class_...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_12
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_getAuditOperationFromMethod_with_put_method() {\n\t\tfinal OperationType operationType = apiManagerAuditProcessor\n\t\t\t\t.getAuditOperationFromMethod(ApiOperation.Type.PUT.name());\n\t\tassertEquals(OperationType.UPDATE, operationType);\n\t}", "class_method_signature": "ApiMa...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public OperationType getAuditOperationFromMethod(String method) {\n\t\tOperationType operationType = null;\n\t\tif (method != null) {\n\t\t\tif (method.equalsIgnoreCase(ApiOperation.Type.GET.name())) {\n\t\t\t\toperationType = OperationType.QUERY;\n\t\t\t} else if (method.equalsIgnoreCase(ApiOperation.Type...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_53
{ "fields": [ { "declarator": "USER_A = \"admin\"", "modifier": "private static final", "original_string": "private static final String USER_A = \"admin\";", "type": "String", "var_name": "USER_A" }, { "declarator": "PASSWORD_A = \"admin-secret\"", "modifier": "pr...
{ "body": "@Test(expected = SaslAuthenticationException.class)\n\tpublic void authorizatonIdNotEqualsAuthenticationId() throws Exception {\n\t\tsaslServer.evaluateResponse(saslMessage(USER_B, USER_A, PASSWORD_A));\n\t}", "class_method_signature": "PlainSaslServerTest.authorizatonIdNotEqualsAuthenticationId()", "c...
{ "fields": [ { "declarator": "log = Logger.getLogger(PlainSaslServer.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(PlainSaslServer.class.getName());", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Override\n\tpublic byte[] evaluateResponse(byte[] response) throws SaslException {\n\t\t/*\n\t\t * Message format (from https://tools.ietf.org/html/rfc4616):\n\t\t *\n\t\t * message = [authzid] UTF8NUL authcid UTF8NUL passwd authcid = 1*SAFE ; MUST\n\t\t * accept up to 255 octets authzid = 1*SAFE ; MUST a...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_5
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_event_getErrorEvent() {\n\n\t\tfinal Map<String, Object> data = new HashMap<>();\n\t\tfinal Exception ex = new Exception();\n\n\t\tfinal OPAuditError event = apiManagerAuditProcessor.getErrorEvent(data, ex);\n\n\t\tassertEquals(EventType.ERROR, event.getType());\n\t\tAssert.asser...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public OPAuditError getErrorEvent(Map<String, Object> data, Exception ex) {\n\t\tfinal String remoteAddress = (String) data.get(Constants.REMOTE_ADDRESS);\n\t\tfinal Ontology ontology = (Ontology) data.get(Constants.ONTOLOGY);\n\t\tfinal String method = (String) data.get(Constants.METHOD);\n\t\tfinal User ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_46
{ "fields": [], "file": "sources/services/config-services/src/test/java/com/minsait/onesait/platform/config/services/templates/SqlComparatorTest.java", "identifier": "SqlComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void given_twoIdenticalQueries_When_TheyAreCompared_Then_TheResultIsTrue() throws JSQLParserException {\n String query1 =\n \"SELECT * \"\n + \"FROM AssetTestArray2 \"\n + \"WHERE Test1.temperature.timestamp >= '2017-01-01T00:00:00.000Z' AND...
{ "fields": [], "file": "sources/services/config-services/src/main/java/com/minsait/onesait/platform/config/services/templates/SqlComparator.java", "identifier": "SqlComparator", "interfaces": "", "methods": [ { "class_method_signature": "SqlComparator.SqlComparator()", "constructor": true, ...
{ "body": "public static MatchResult match(String query1, String query2) throws JSQLParserException {\n\t\tfinal Statement stmt1 = CCJSqlParserUtil.parse(query1);\n\t\tfinal Statement stmt2 = CCJSqlParserUtil.parse(query2);\n\t\treturn matchStatement(stmt1, stmt2);\n\t}", "class_method_signature": "SqlComparator.ma...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_11
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_getAuditOperationFromMethod_with_post_method() {\n\t\tfinal OperationType operationType = apiManagerAuditProcessor\n\t\t\t\t.getAuditOperationFromMethod(ApiOperation.Type.POST.name());\n\t\tassertEquals(OperationType.INSERT, operationType);\n\t}", "class_method_signature": "Api...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public OperationType getAuditOperationFromMethod(String method) {\n\t\tOperationType operationType = null;\n\t\tif (method != null) {\n\t\t\tif (method.equalsIgnoreCase(ApiOperation.Type.GET.name())) {\n\t\t\t\toperationType = OperationType.QUERY;\n\t\t\t} else if (method.equalsIgnoreCase(ApiOperation.Type...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_50
{ "fields": [ { "declarator": "plainServerCallbackHandler", "modifier": "private", "original_string": "private PlainServerCallbackHandler plainServerCallbackHandler;", "type": "PlainServerCallbackHandler", "var_name": "plainServerCallbackHandler" } ], "file": "sources/librari...
{ "body": "@Test\n\tpublic void getUserToken() throws Exception {\n\t\tString token = \"\";\n\t\tString deviceId = \"\";\n\t\tboolean authenticate = plainServerCallbackHandler.authenticate(deviceId, token.toCharArray());\n\t\tassertTrue(authenticate);\n\t}", "class_method_signature": "PlainServerCallbackHandlerTest...
{ "fields": [ { "declarator": "log = Logger.getLogger(PlainServerCallbackHandler.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(PlainServerCallbackHandler.class.getName());", "type": "Logger", "var_name": ...
{ "body": "boolean authenticate(String username, char[] pass) throws IOException {\n\t\tif (username == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tboolean ret = false;\n\n\t\t\tlog.info(\"GET OPERATION \" + username + \":\" + new String(pass));\n\t\t\t\t\n\t\t\tString sessionKey = \"\";\n\t\t\tif (username.equ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_27
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyBusinessServiceImpl service;", "type": "OntologyBusinessServiceImpl", "var_name": "service" }, { "declarator": "ontologyService", "modifier": "@Mock\n\...
{ "body": "@Test()\n\tpublic void given_OntologyDataAndUser_When_OntologyWithExternalTableFailsCreationgTable_Then_TheAnExceptionIsThrown() {\n\t\tOntology ontology = new Ontology();\n\t\tontology.setRtdbDatasource(RtdbDatasource.VIRTUAL);\n\t\tontology.setIdentification(\"test\");\n\t\tOntologyConfiguration config =...
{ "fields": [ { "declarator": "ontologyService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyService ontologyService;", "type": "OntologyService", "var_name": "ontologyService" }, { "declarator": "ontologyLogicService", "...
{ "body": "@Override\n\tpublic void createOntology(Ontology ontology, String userId, OntologyConfiguration config)\n\t\t\tthrows OntologyBusinessServiceException {\n\n\t\tif (!ontologyService.isIdValid(ontology.getIdentification())) {\n\t\t\tthrow new OntologyBusinessServiceException(OntologyBusinessServiceException....
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_9
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_getAuditOperationFromMethod_with_null_method() {\n\t\tfinal OperationType operationType = apiManagerAuditProcessor.getAuditOperationFromMethod(null);\n\t\tAssert.assertNull(operationType);\n\t}", "class_method_signature": "ApiManagerAuditProcessorTest.given_getAuditOperationFro...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public OperationType getAuditOperationFromMethod(String method) {\n\t\tOperationType operationType = null;\n\t\tif (method != null) {\n\t\t\tif (method.equalsIgnoreCase(ApiOperation.Type.GET.name())) {\n\t\t\t\toperationType = OperationType.QUERY;\n\t\t\t} else if (method.equalsIgnoreCase(ApiOperation.Type...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_31
{ "fields": [ { "declarator": "server = new GreenMailRule(new ServerSetup(2525, \"localhost\", \"smtp\"))", "modifier": "@Rule\n public", "original_string": "@Rule\n public GreenMailRule server = new GreenMailRule(new ServerSetup(2525, \"localhost\", \"smtp\"));", "type": "GreenMailR...
{ "body": "@Test\n\tpublic void testSendMailWithAttachment() {\n\t\ttry {\n\t\t\tString htmlMail = \"<html><body>Here is application.yml<body></html>\";\n\t\t\tString base64data = \"Q1AAAAiGsAAABAXAMAAIC4BgAAAHENAAAA4hoAAAAQ1wAAADAn/w8VUKiZ/Tt/9QAAAABJRU5ErkJggg==\";\n\t\t\tmailServiceImpl.sendHtmlMailWithFile(\"supp...
{ "fields": [ { "declarator": "emailSender", "modifier": "@Autowired\n\tpublic", "original_string": "@Autowired\n\tpublic JavaMailSender emailSender;", "type": "JavaMailSender", "var_name": "emailSender" } ], "file": "sources/services/mail-services/src/main/java/com/minsait/o...
{ "body": "@Override\n\tpublic void sendHtmlMailWithFile(String[] to, String subject, String htmlText, String attachName, String attachment,\n\t\t\tboolean htmlenable) throws MessagingException {\n\t\tMimeMessageHelper helper = null;\n\t\ttry {\n\t\t\tfinal MimeMessage message = emailSender.createMimeMessage();\n\t\t...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_30
{ "fields": [ { "declarator": "server = new GreenMailRule(new ServerSetup(2525, \"localhost\", \"smtp\"))", "modifier": "@Rule\n public", "original_string": "@Rule\n public GreenMailRule server = new GreenMailRule(new ServerSetup(2525, \"localhost\", \"smtp\"));", "type": "GreenMailR...
{ "body": "@Test\n\tpublic void testSendMailWithNoTo() {\n\t\ttry {\n\t\t String to = null;\n\t\t\tmailServiceImpl.sendMail(to, \"Subject\",\"Text\");\n\t\t\tassertTrue(\"OK testSendMailWithNoTo\", true);\n\t\t} catch (final Exception e) {\n\t\t\tlog.error(\"Error testSendMailWithNoTo\", e);\n\t\t\tlog.error(\"If...
{ "fields": [ { "declarator": "emailSender", "modifier": "@Autowired\n\tpublic", "original_string": "@Autowired\n\tpublic JavaMailSender emailSender;", "type": "JavaMailSender", "var_name": "emailSender" } ], "file": "sources/services/mail-services/src/main/java/com/minsait/o...
{ "body": "@Override\n\tpublic void sendMail(String[] to, String subject, String text) {\n\n\t\ttry {\n\t\t\t// emailSender.\n\t\t\tfinal SimpleMailMessage message = new SimpleMailMessage();\n\t\t\tmessage.setTo(to);\n\t\t\tmessage.setSubject(subject);\n\t\t\tmessage.setText(text);\n\t\t\temailSender.send(message);\n...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_8
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_getAuditOperationFromMethod_with_an_unexisting_method() {\n\t\tfinal OperationType operationType = apiManagerAuditProcessor.getAuditOperationFromMethod(\"\");\n\t\tAssert.assertNull(operationType);\n\t}", "class_method_signature": "ApiManagerAuditProcessorTest.given_getAuditOpe...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public OperationType getAuditOperationFromMethod(String method) {\n\t\tOperationType operationType = null;\n\t\tif (method != null) {\n\t\t\tif (method.equalsIgnoreCase(ApiOperation.Type.GET.name())) {\n\t\t\t\toperationType = OperationType.QUERY;\n\t\t\t} else if (method.equalsIgnoreCase(ApiOperation.Type...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_26
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyBusinessServiceImpl service;", "type": "OntologyBusinessServiceImpl", "var_name": "service" }, { "declarator": "ontologyService", "modifier": "@Mock\n\...
{ "body": "@Test()\n\tpublic void given_OntologyDataAndUser_When_OntologyWithKafkaTopicFailsCreatingTheOntologyInPersistenceAndThenItFailsCleaningTheTopic_Then_TheAnExceptionIsThrown() {\n\t\tOntology ontology = new Ontology();\n\t\tontology.setAllowsCreateTopic(true);\n\t\tString userId = \"me\";\n\n\t\twhen(ontolog...
{ "fields": [ { "declarator": "ontologyService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyService ontologyService;", "type": "OntologyService", "var_name": "ontologyService" }, { "declarator": "ontologyLogicService", "...
{ "body": "@Override\n\tpublic void createOntology(Ontology ontology, String userId, OntologyConfiguration config)\n\t\t\tthrows OntologyBusinessServiceException {\n\n\t\tif (!ontologyService.isIdValid(ontology.getIdentification())) {\n\t\t\tthrow new OntologyBusinessServiceException(OntologyBusinessServiceException....
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_51
{ "fields": [ { "declarator": "USER_A = \"admin\"", "modifier": "private static final", "original_string": "private static final String USER_A = \"admin\";", "type": "String", "var_name": "USER_A" }, { "declarator": "PASSWORD_A = \"admin-secret\"", "modifier": "pr...
{ "body": "@Test\n\tpublic void noAuthorizationIdSpecified() throws Exception {\n\t\tbyte[] nextChallenge = saslServer.evaluateResponse(saslMessage(\"\", USER_A, PASSWORD_A));\n\t\tassertEquals(0, nextChallenge.length);\n\t}", "class_method_signature": "PlainSaslServerTest.noAuthorizationIdSpecified()", "construc...
{ "fields": [ { "declarator": "log = Logger.getLogger(PlainSaslServer.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(PlainSaslServer.class.getName());", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Override\n\tpublic byte[] evaluateResponse(byte[] response) throws SaslException {\n\t\t/*\n\t\t * Message format (from https://tools.ietf.org/html/rfc4616):\n\t\t *\n\t\t * message = [authzid] UTF8NUL authcid UTF8NUL passwd authcid = 1*SAFE ; MUST\n\t\t * accept up to 255 octets authzid = 1*SAFE ; MUST a...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_10
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_getAuditOperationFromMethod_with_get_method() {\n\t\tfinal OperationType operationType = apiManagerAuditProcessor\n\t\t\t\t.getAuditOperationFromMethod(ApiOperation.Type.GET.name());\n\t\tassertEquals(OperationType.QUERY, operationType);\n\t}", "class_method_signature": "ApiMan...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public OperationType getAuditOperationFromMethod(String method) {\n\t\tOperationType operationType = null;\n\t\tif (method != null) {\n\t\t\tif (method.equalsIgnoreCase(ApiOperation.Type.GET.name())) {\n\t\t\t\toperationType = OperationType.QUERY;\n\t\t\t} else if (method.equalsIgnoreCase(ApiOperation.Type...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_47
{ "fields": [], "file": "sources/services/config-services/src/test/java/com/minsait/onesait/platform/config/services/templates/SqlComparatorTest.java", "identifier": "SqlComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void given_OneQueryAndOneTemplateWithTheSameStructure_When_TheTemplateUsesParametersAndTheQuerySpecificValuesAndAreCompared_Then_TheResultIsTrue() throws JSQLParserException {\n String query =\n \"SELECT * \"\n + \"FROM AssetTestArray2 \"\n ...
{ "fields": [], "file": "sources/services/config-services/src/main/java/com/minsait/onesait/platform/config/services/templates/SqlComparator.java", "identifier": "SqlComparator", "interfaces": "", "methods": [ { "class_method_signature": "SqlComparator.SqlComparator()", "constructor": true, ...
{ "body": "public static MatchResult match(String query1, String query2) throws JSQLParserException {\n\t\tfinal Statement stmt1 = CCJSqlParserUtil.parse(query1);\n\t\tfinal Statement stmt2 = CCJSqlParserUtil.parse(query2);\n\t\treturn matchStatement(stmt1, stmt2);\n\t}", "class_method_signature": "SqlComparator.ma...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_4
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_insert_event_getEvent() {\n\n\t\tfinal Map<String, Object> data = new HashMap<>();\n\n\t\tfinal String body = \"{'test':'test'}\";\n\n\t\tdata.put(Constants.REMOTE_ADDRESS, REMOTE_ADDRESS);\n\t\tdata.put(Constants.ONTOLOGY, getOntologyTest());\n\t\tdata.put(Constants.METHOD, ApiO...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public ApiManagerAuditEvent getEvent(Map<String, Object> data) {\n\t\tfinal String remoteAddress = (String) data.get(Constants.REMOTE_ADDRESS);\n\t\tfinal Ontology ontology = (Ontology) data.get(Constants.ONTOLOGY);\n\t\tfinal String method = (String) data.get(Constants.METHOD);\n\t\tfinal String query = (...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_21
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyBusinessServiceImpl service;", "type": "OntologyBusinessServiceImpl", "var_name": "service" }, { "declarator": "ontologyService", "modifier": "@Mock\n\...
{ "body": "@Test()\n\tpublic void given_OntologyDataAndUser_When_OntologySchemaIsNotValid_Then_TheAnExceptionIsThrown() {\n\t\tOntology ontology = new Ontology();\n\t\tontology.setJsonSchema(\"{bad json schema}\");\n\t\tString userId = \"me\";\n\n\t\twhen(ontologyService.isIdValid(any())).thenReturn(true);\n\t\tdoThr...
{ "fields": [ { "declarator": "ontologyService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyService ontologyService;", "type": "OntologyService", "var_name": "ontologyService" }, { "declarator": "ontologyLogicService", "...
{ "body": "@Override\n\tpublic void createOntology(Ontology ontology, String userId, OntologyConfiguration config)\n\t\t\tthrows OntologyBusinessServiceException {\n\n\t\tif (!ontologyService.isIdValid(ontology.getIdentification())) {\n\t\t\tthrow new OntologyBusinessServiceException(OntologyBusinessServiceException....
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_60
{ "fields": [ { "declarator": "kuduTableGenerator", "modifier": "@InjectMocks\n\tprivate", "original_string": "@InjectMocks\n\tprivate KuduTableGenerator kuduTableGenerator;", "type": "KuduTableGenerator", "var_name": "kuduTableGenerator" }, { "declarator": "ONTOLOGY_NA...
{ "body": "@Test\n\tpublic void given_primitive_types__without_root_field_builTable() throws IOException {\n\n\t\tString schema = FileUtil.getFileContent(FOLDER_PATH + \"kudutable_primitive_types_without_root_schema.json\");\n\n\t\tKuduTable table = kuduTableGenerator.builTable(ONTOLOGY_NAME, schema, null);\n\n\t\tLi...
{ "fields": [ { "declarator": "numReplicas", "modifier": "@Value(\"${onesaitplatform.database.kudu.numreplicas:1}\")\n\tprivate", "original_string": "@Value(\"${onesaitplatform.database.kudu.numreplicas:1}\")\n\tprivate int numReplicas;", "type": "int", "var_name": "numReplicas" ...
{ "body": "public KuduTable builTable(String ontologyName, String schema, Map<String, String> config) {\n\n\t\tlog.debug(\"generate kudu table for ontology \" + ontologyName);\n\n\t\tfinal JSONObject schemaObj = new JSONObject(schema);\n\n\t\tfinal JSONObject props = getProperties(schemaObj);\n\t\tfinal List<String> ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_37
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyDataServiceImpl service;", "type": "OntologyDataServiceImpl", "var_name": "service" }, { "declarator": "ontologyRepository", "modifier": "@Mock\n\tpriv...
{ "body": "@Test(expected = DataSchemaValidationException.class)\n\tpublic void given_OneValidJsonSchemaAndOneIncorrectJson_When_TheJsonIsValidated_Then_ItReturnsFalse()\n\t\t\tthrows DataSchemaValidationException {\n\t\tservice.checkJsonCompliantWithSchema(TestResources.DATA_FOR_BAD_JSON, TestResources.GOOD_JSON_SCH...
{ "fields": [ { "declarator": "ontologyRepository", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyRepository ontologyRepository;", "type": "OntologyRepository", "var_name": "ontologyRepository" }, { "declarator": "objectMapper = ...
{ "body": "void checkJsonCompliantWithSchema(final JsonNode data, final JsonNode schemaJson) throws ProcessingException {\n\t\tfinal JsonSchemaFactory factoryJson = JsonSchemaFactory.byDefault();\n\t\tfinal JsonSchema schema = factoryJson.getJsonSchema(schemaJson);\n\t\ttry {\n\t\t\tfinal ProcessingReport report = sc...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_3
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_getStoppedEvent_stop_status() {\n\t\tfinal Map<String, Object> data = new HashMap<>();\n\t\tdata.put(Constants.STATUS, ChainProcessingStatus.STOP);\n\n\t\tdata.put(Constants.REASON, REASON);\n\n\t\tdata.put(Constants.REMOTE_ADDRESS, REMOTE_ADDRESS);\n\t\tdata.put(Constants.ONTOLO...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public ApiManagerAuditEvent getStoppedEvent(Map<String, Object> data) {\n\t\tApiManagerAuditEvent event = null;\n\t\ttry {\n\t\t\tif (ChainProcessingStatus.STOP.equals(data.get(Constants.STATUS))) {\n\t\t\t\tfinal String reason = (String) data.get(Constants.REASON);\n\n\t\t\t\tfinal String remoteAddress = ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_40
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyDataServiceImpl service;", "type": "OntologyDataServiceImpl", "var_name": "service" }, { "declarator": "ontologyRepository", "modifier": "@Mock\n\tpriv...
{ "body": "@Test\n\tpublic void given_OneOntologyThatAllowsEncryption_When_ArrayIsUsedToDecrypt_Then_TheHoleArrayIsDecrypt() throws IOException {\n\t final String ontologyName = \"one\";\n final Ontology ontology = new Ontology();\n ontology.setId(\"1\");\n ontology.setIdentification(ontologyN...
{ "fields": [ { "declarator": "ontologyRepository", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyRepository ontologyRepository;", "type": "OntologyRepository", "var_name": "ontologyRepository" }, { "declarator": "objectMapper = ...
{ "body": "String encryptionOperationAllowingArrays(String data, Ontology ontology, EncryptionOperations operation)\n\t\t\tthrows IOException {\n\t\tif (ontology.isAllowsCypherFields()) {\n\t\t\tfinal JsonNode jsonData = objectMapper.readTree(data);\n\t\t\tif (jsonData.isArray()) {\n\t\t\t\tArrayNode newArray = mappe...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_17
{ "fields": [ { "declarator": "flowEngineAuditProcessor", "modifier": "@InjectMocks\n\tprivate", "original_string": "@InjectMocks\n\tprivate FlowEngineAuditProcessor flowEngineAuditProcessor;", "type": "FlowEngineAuditProcessor", "var_name": "flowEngineAuditProcessor" }, { ...
{ "body": "@Test\n\tpublic void given_get_error_event() {\n\t\tException ex = new Exception();\n\t\tString methodName = \"dummyMethod\";\n\t\tFlowEngineDomain domain = FlowEngineDomain.builder().domain(DOMAIN_ID).build();\n\n\t\tFlowDomain flowDomain = new FlowDomain();\n\t\tflowDomain.setUser(getTestUser());\n\n\t\t...
{ "fields": [ { "declarator": "domainService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate FlowDomainService domainService;", "type": "FlowDomainService", "var_name": "domainService" } ], "file": "sources/modules/flow-engine/src/main/java/co...
{ "body": "public OPAuditError getErrorEvent(String methodName, FlowEngineDomain domain, Exception ex) {\n\n\t\tlog.debug(\"getEventError for operation \" + methodName);\n\t\tString userId = getUserId(domain);\n\t\tString messageOperation = \"Exception Detected while executing \" + methodName + \" for domain : \"\n\t...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_56
{ "fields": [ { "declarator": "generatorOps = new SQLGeneratorOpsImpl()", "modifier": "private", "original_string": "private SQLGeneratorOps generatorOps = new SQLGeneratorOpsImpl();", "type": "SQLGeneratorOps", "var_name": "generatorOps" }, { "declarator": "columnsMap ...
{ "body": "@Test\n\tpublic void testOracle11LimitOffset() {\n\t\tfinal String oracleQueryLimit = \"SELECT t.* FROM (SELECT column_1, column_2, column_3, column_4 FROM table WHERE column_1 < 123 AND column_2 = 'string' AND column_3 = true AND column_4 = {ts '2019-01-19 03:14:07.0'} ORDER BY column_1 DESC, column_4) t ...
{ "fields": [ { "declarator": "sqlHelper = new SQLHelperImpl()", "modifier": "private", "original_string": "private SQLHelperImpl sqlHelper = new SQLHelperImpl();", "type": "SQLHelperImpl", "var_name": "sqlHelper" }, { "declarator": "postgresSQLHelper = new PostgreSQLHe...
{ "body": "@Override\n public PreparedStatement getStandardSelect(final SelectStatement selectStatement, final VirtualDatasourceType dsType,\n final Map<String, Integer> tableColumnTypes, boolean withParams) {\n \n \n Map<String, Object> jdbcParams = new HashMap<>();\n \n ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_57
{ "fields": [ { "declarator": "generatorOps = new SQLGeneratorOpsImpl()", "modifier": "private", "original_string": "private SQLGeneratorOps generatorOps = new SQLGeneratorOpsImpl();", "type": "SQLGeneratorOps", "var_name": "generatorOps" }, { "declarator": "columnsMap ...
{ "body": "@Test\n\tpublic void testStandardDelete() {\n\t\tfinal List<WhereStatement> where = Arrays.asList(\n\t\t\t\tnew WhereStatement(\"column_1\",\"<\",\"123\"),\n\t\t\t\tnew WhereStatement(\"column_2\",\"=\",\"string\"),\n\t\t\t\tnew WhereStatement(\"column_3\",\"=\",\"true\"),\n\t\t\t\tnew WhereStatement(\"col...
{ "fields": [ { "declarator": "sqlHelper = new SQLHelperImpl()", "modifier": "private", "original_string": "private SQLHelperImpl sqlHelper = new SQLHelperImpl();", "type": "SQLHelperImpl", "var_name": "sqlHelper" }, { "declarator": "postgresSQLHelper = new PostgreSQLHe...
{ "body": "@Override\n public PreparedStatement getStandardDelete(final DeleteStatement deleteStatement, boolean withParams) {\n \n Map<String, Object> jdbcParams = new HashMap<>();\n \n final Delete delete = new Delete();\n delete.setTable(new Table(deleteStatement.getOntology()...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_16
{ "fields": [ { "declarator": "flowEngineAuditProcessor", "modifier": "@InjectMocks\n\tprivate", "original_string": "@InjectMocks\n\tprivate FlowEngineAuditProcessor flowEngineAuditProcessor;", "type": "FlowEngineAuditProcessor", "var_name": "flowEngineAuditProcessor" }, { ...
{ "body": "@Test\n\tpublic void given_get_error_event_incorrect_credentials() {\n\n\t\twhen(domainService.getFlowDomainById(DOMAIN_ID)).thenThrow(new NotAuthorizedException(\"\"));\n\n\t\tOPAuditError error = flowEngineAuditProcessor.getErrorEvent(\"\", DOMAIN_ID, new Exception());\n\n\t\tAssert.assertNull(error);\n\...
{ "fields": [ { "declarator": "domainService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate FlowDomainService domainService;", "type": "FlowDomainService", "var_name": "domainService" } ], "file": "sources/modules/flow-engine/src/main/java/co...
{ "body": "public OPAuditError getErrorEvent(String methodName, FlowEngineDomain domain, Exception ex) {\n\n\t\tlog.debug(\"getEventError for operation \" + methodName);\n\t\tString userId = getUserId(domain);\n\t\tString messageOperation = \"Exception Detected while executing \" + methodName + \" for domain : \"\n\t...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_41
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyDataServiceImpl service;", "type": "OntologyDataServiceImpl", "var_name": "service" }, { "declarator": "ontologyRepository", "modifier": "@Mock\n\tpriv...
{ "body": "@Test\n\tpublic void given_OneOntologyThatDoesAllowEncryptionWithRefsInTheSchema_When_AnInsertIsPerformed_Then_CorrectDataIsEncripted()\n\t\t\tthrows JsonProcessingException, IOException, GenericOPException {\n\n\t\tfinal String ontologyName = \"one\";\n\t\tfinal Ontology ontology = new Ontology();\n\t\ton...
{ "fields": [ { "declarator": "ontologyRepository", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyRepository ontologyRepository;", "type": "OntologyRepository", "var_name": "ontologyRepository" }, { "declarator": "objectMapper = ...
{ "body": "String encryptionOperationAllowingArrays(String data, Ontology ontology, EncryptionOperations operation)\n\t\t\tthrows IOException {\n\t\tif (ontology.isAllowsCypherFields()) {\n\t\t\tfinal JsonNode jsonData = objectMapper.readTree(data);\n\t\t\tif (jsonData.isArray()) {\n\t\t\t\tArrayNode newArray = mappe...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_2
{ "fields": [ { "declarator": "apiManagerAuditProcessor", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tApiManagerAuditProcessor apiManagerAuditProcessor;", "type": "ApiManagerAuditProcessor", "var_name": "apiManagerAuditProcessor" }, { "declarator": "...
{ "body": "@Test\n\tpublic void given_getStoppedEvent_no_stop_status() {\n\t\tfinal Map<String, Object> data = new HashMap<>();\n\t\tdata.put(Constants.STATUS, ChainProcessingStatus.FOLLOW);\n\t\tfinal ApiManagerAuditEvent event = apiManagerAuditProcessor.getStoppedEvent(data);\n\t\tAssert.assertNull(event);\n\t}", ...
{ "fields": [], "file": "sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/audit/aop/ApiManagerAuditProcessor.java", "identifier": "ApiManagerAuditProcessor", "interfaces": "", "methods": [ { "class_method_signature": "ApiManagerAuditProcessor.getStoppedEvent(Map<String, Obj...
{ "body": "public ApiManagerAuditEvent getStoppedEvent(Map<String, Object> data) {\n\t\tApiManagerAuditEvent event = null;\n\t\ttry {\n\t\t\tif (ChainProcessingStatus.STOP.equals(data.get(Constants.STATUS))) {\n\t\t\t\tfinal String reason = (String) data.get(Constants.REASON);\n\n\t\t\t\tfinal String remoteAddress = ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_36
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyDataServiceImpl service;", "type": "OntologyDataServiceImpl", "var_name": "service" }, { "declarator": "ontologyRepository", "modifier": "@Mock\n\tpriv...
{ "body": "@Test(expected = DataSchemaValidationException.class)\n\tpublic void given_OneValidJsonSchemaAndOneNotCompliantJson_When_TheJsonIsValidated_Then_ItReturnsFalse()\n\t\t\tthrows DataSchemaValidationException {\n\t\tservice.checkJsonCompliantWithSchema(TestResources.DATA_FOR_NONVALID_JSON, TestResources.GOOD_...
{ "fields": [ { "declarator": "ontologyRepository", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyRepository ontologyRepository;", "type": "OntologyRepository", "var_name": "ontologyRepository" }, { "declarator": "objectMapper = ...
{ "body": "void checkJsonCompliantWithSchema(final JsonNode data, final JsonNode schemaJson) throws ProcessingException {\n\t\tfinal JsonSchemaFactory factoryJson = JsonSchemaFactory.byDefault();\n\t\tfinal JsonSchema schema = factoryJson.getJsonSchema(schemaJson);\n\t\ttry {\n\t\t\tfinal ProcessingReport report = sc...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_61
{ "fields": [ { "declarator": "kuduTableGenerator", "modifier": "@InjectMocks\n\tprivate", "original_string": "@InjectMocks\n\tprivate KuduTableGenerator kuduTableGenerator;", "type": "KuduTableGenerator", "var_name": "kuduTableGenerator" }, { "declarator": "ONTOLOGY_NA...
{ "body": "@Test\n\tpublic void given_complex_types_builTable() throws IOException {\n\n\t\tString schema = FileUtil.getFileContent(FOLDER_PATH + \"kudutable_complex_types_schema.json\");\n\n\t\tKuduTable table = kuduTableGenerator.builTable(ONTOLOGY_NAME, schema, null);\n\n\t\tList<HiveColumn> columns = table.getCol...
{ "fields": [ { "declarator": "numReplicas", "modifier": "@Value(\"${onesaitplatform.database.kudu.numreplicas:1}\")\n\tprivate", "original_string": "@Value(\"${onesaitplatform.database.kudu.numreplicas:1}\")\n\tprivate int numReplicas;", "type": "int", "var_name": "numReplicas" ...
{ "body": "public KuduTable builTable(String ontologyName, String schema, Map<String, String> config) {\n\n\t\tlog.debug(\"generate kudu table for ontology \" + ontologyName);\n\n\t\tfinal JSONObject schemaObj = new JSONObject(schema);\n\n\t\tfinal JSONObject props = getProperties(schemaObj);\n\t\tfinal List<String> ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
208221849_20
{ "fields": [ { "declarator": "service", "modifier": "@InjectMocks", "original_string": "@InjectMocks\n\tOntologyBusinessServiceImpl service;", "type": "OntologyBusinessServiceImpl", "var_name": "service" }, { "declarator": "ontologyService", "modifier": "@Mock\n\...
{ "body": "@Test()\n\tpublic void given_OntologyDataAndUser_When_OntologyIdentificationIsNotValid_Then_TheAnExceptionIsThrown() {\n\t\twhen(ontologyService.isIdValid(any())).thenReturn(false);\n\t\tOntology ontology = new Ontology();\n\t\tString userId = \"me\";\n\t\ttry {\n\t\t\tservice.createOntology(ontology, user...
{ "fields": [ { "declarator": "ontologyService", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate OntologyService ontologyService;", "type": "OntologyService", "var_name": "ontologyService" }, { "declarator": "ontologyLogicService", "...
{ "body": "@Override\n\tpublic void createOntology(Ontology ontology, String userId, OntologyConfiguration config)\n\t\t\tthrows OntologyBusinessServiceException {\n\n\t\tif (!ontologyService.isIdValid(ontology.getIdentification())) {\n\t\t\tthrow new OntologyBusinessServiceException(OntologyBusinessServiceException....
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 208221849, "size": 143433, "stargazer_count": 15, "stars": null, "updates": null, "url": "https://github.com/onesaitplatform/onesaitplatform-cloud" }
1367811_33
{ "fields": [], "file": "hudson-core/src/test/java/hudson/util/DeepEqualsTest.java", "identifier": "DeepEqualsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeepEquals() {\n Node n0 = new Node(1, new Node(2));\n Node n1 = new Node(1, new Node(2, new Node(3)));\n Node n2 = new Node(1, new Node(2, new Node(3)));\n Node n3 = new Node(1, new Node(2, new Node(4)));\n Node n4 = new Node(1, new Node(2, new...
{ "fields": [ { "declarator": "_customEquals = new ConcurrentHashMap<Class, Boolean>()", "modifier": "private static final", "original_string": "private static final Map<Class, Boolean> _customEquals = new ConcurrentHashMap<Class, Boolean>();", "type": "Map<Class, Boolean>", "var_nam...
{ "body": "public static boolean deepEquals(Object a, Object b)\n {\n Set visited = new HashSet<DualKey>();\n LinkedList<DualKey> stack = new LinkedList<DualKey>();\n stack.addFirst(new DualKey(a, b));\n\n while (!stack.isEmpty())\n { \n DualKey dualKey = st...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_64
{ "fields": [ { "declarator": "property", "modifier": "private", "original_string": "private CopyOnWriteListProjectProperty property;", "type": "CopyOnWriteListProjectProperty", "var_name": "property" } ], "file": "hudson-core/src/test/java/org/hudsonci/model/project/property...
{ "body": "@Test\n public void testClearOriginalValue() {\n //Overridden flag should be cleared to false. Pre-set true value\n property.setOverridden(true);\n assertTrue(property.isOverridden());\n CopyOnWriteList originalValue = new CopyOnWriteList(Arrays.asList(new Object()));\n ...
{ "fields": [], "file": "hudson-core/src/main/java/org/hudsonci/model/project/property/CopyOnWriteListProjectProperty.java", "identifier": "CopyOnWriteListProjectProperty", "interfaces": "", "methods": [ { "class_method_signature": "CopyOnWriteListProjectProperty.CopyOnWriteListProjectProperty(ICasc...
{ "body": "@Override\n protected void clearOriginalValue(CopyOnWriteList originalValue) {\n setOriginalValue(originalValue, false);\n }", "class_method_signature": "CopyOnWriteListProjectProperty.clearOriginalValue(CopyOnWriteList originalValue)", "constructor": false, "full_signature": "@Override ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_128
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = NullPointerException.class)\n public void findBuildProjectNameNullName() {\n getInst().findBuild((String) null, 1);\n }", "class_method_signature": "BuildServiceImplTest.findBuildProjectNameNullName()", "constructor": false, "full_signature": "@Test(expected = NullPointe...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> findBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.findProject(projectName);\n return project != null ? findBuild(project, buildNum...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_72
{ "fields": [ { "declarator": "propertyKey = \"propertyKey\"", "modifier": "private final", "original_string": "private final String propertyKey = \"propertyKey\";", "type": "String", "var_name": "propertyKey" }, { "declarator": "property", "modifier": "private", ...
{ "body": "@Test\n public void testAllowOverrideValue() {\n assertFalse(property.allowOverrideValue(null, null));\n assertTrue(property.allowOverrideValue(new Object(), null));\n assertTrue(property.allowOverrideValue(null, new Object()));\n //Test properties that don't have correct equ...
{ "fields": [ { "declarator": "INVALID_JOB_EXCEPTION = \"Project property should have not null job\"", "modifier": "static final", "original_string": "static final String INVALID_JOB_EXCEPTION = \"Project property should have not null job\";", "type": "String", "var_name": "INVALID_J...
{ "body": "public boolean allowOverrideValue(T cascadingValue, T candidateValue) {\n return ObjectUtils.notEqual(cascadingValue, candidateValue)\n && !DeepEquals.deepEquals(cascadingValue, candidateValue);\n }", "class_method_signature": "BaseProjectProperty.allowOverrideValue(T cascadingValue,...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_25
{ "fields": [], "file": "hudson-core/src/test/java/hudson/util/CascadingUtilTest.java", "identifier": "CascadingUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenameCascadingParentLinksEmptyNames() {\n CascadingUtil.renameCascadingParentLinks(\"\", \"\");\n }", "class_method_signature": "CascadingUtilTest.testRenameCascadingParentLinksEmptyNames()", "constructor": false, "full_signature": "@Test public void testRenameCa...
{ "fields": [], "file": "hudson-core/src/main/java/hudson/util/CascadingUtil.java", "identifier": "CascadingUtil", "interfaces": "", "methods": [ { "class_method_signature": "CascadingUtil.getProjectProperty(Job currentJob, String key)", "constructor": false, "full_signature": "public st...
{ "body": "public static void renameCascadingParentLinks(final String oldName, final String newName) {\n if (StringUtils.isBlank(newName) || StringUtils.isBlank(oldName)) {\n return;\n }\n for (Job job : Hudson.getInstance().getAllItems(Job.class)) {\n if (oldName.equals(job...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_104
{ "fields": [ { "declarator": "securityService", "modifier": "@Mock\n private", "original_string": "@Mock\n private SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" }, { "declarator": "project", "modifier": "@Suppre...
{ "body": "@Test(expected = NullPointerException.class)\n public void projectExistsNullArg() {\n getInst().projectExists(null);\n }", "class_method_signature": "ProjectServiceImplTest.projectExistsNullArg()", "constructor": false, "full_signature": "@Test(expected = NullPointerException.class) publ...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public boolean projectExists(final String projectName) {\n checkProjectName(projectName);\n // This only checks names that are readable by the current context (has Item.READ perms)\n return getProjectNames().contains(projectName);\n }", "class_method_signature": "ProjectServiceImp...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_9
{ "fields": [ { "declarator": "axes = new AxisList(\n new Axis(\"a\",\"X\",\"x\"),\n new Axis(\"b\",\"Y\",\"y\"))", "modifier": "", "original_string": "AxisList axes = new AxisList(\n new Axis(\"a\",\"X\",\"x\"),\n new Axis(\"b\",\"Y\",\"y\"));", ...
{ "body": "@Test\n @SuppressWarnings({\"RedundantStringConstructorCall\"})\n public void testEval() {\n Map<String,String> r = new HashMap<String, String>();\n r.put(\"a\",\"X\");\n r.put(\"b\",new String(\"Y\")); // make sure this 'Y' is not the same object as literal \"Y\".\n Combi...
{ "fields": [ { "declarator": "DELIM = \",\"", "modifier": "protected static final", "original_string": "protected static final String DELIM = \",\";", "type": "String", "var_name": "DELIM" } ], "file": "hudson-core/src/main/java/hudson/matrix/Combination.java", "identifier...
{ "body": "@Override\n public String put(String key, String value) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "Combination.put(String key, String value)", "constructor": false, "full_signature": "@Override public String put(String key, String value)", "identifi...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_153
{ "fields": [ { "declarator": "hudson", "modifier": "private", "original_string": "private Hudson hudson;", "type": "Hudson", "var_name": "hudson" }, { "declarator": "security", "modifier": "@Mock\n private", "original_string": "@Mock\n private Securit...
{ "body": "@Test\n public void findNodeNotFound() {\n assertThat(getInst().findNode(\"nodeName\"), nullValue());\n }", "class_method_signature": "NodeServiceImplTest.findNodeNotFound()", "constructor": false, "full_signature": "@Test public void findNodeNotFound()", "identifier": "findNodeNotFoun...
{ "fields": [ { "declarator": "security", "modifier": "private final", "original_string": "private final SecurityService security;", "type": "SecurityService", "var_name": "security" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/NodeServiceImpl.java...
{ "body": "public Node findNode(final String nodeName) {\n log.debug(\"findNode(\\\"{}\\\")\", nodeName);\n checkNodeName(nodeName);\n Node node;\n // Provide the master node, if the name is \"\"\n if (\"\".equals(nodeName)) {\n node = getHudson();\n } else {\n ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_145
{ "fields": [], "file": "hudson-service/src/test/java/org/hudsonci/service/internal/DescriptorServiceImplTest.java", "identifier": "DescriptorServiceImplTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n @Test(expected = NullPointerException.class)\n public void getDescriptorOrDieByTypeNullArg() {\n getInst().getDescriptorOrDie((Class) null);\n }", "class_method_signature": "DescriptorServiceImplTest.getDescriptorOrDieByTypeNullArg()", ...
{ "fields": [], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/DescriptorServiceImpl.java", "identifier": "DescriptorServiceImpl", "interfaces": "implements DescriptorService", "methods": [ { "class_method_signature": "DescriptorServiceImpl.DescriptorServiceImpl()", "const...
{ "body": "public Descriptor getDescriptorOrDie(Class<? extends Describable> type) {\n checkNotNull(type, \"type\");\n return getHudson().getDescriptorOrDie(type);\n }", "class_method_signature": "DescriptorServiceImpl.getDescriptorOrDie(Class<? extends Describable> type)", "constructor": false, ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_112
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void keepBuildZeroBuildNumber() {\n getInst().keepBuild(project, 0, true);\n }", "class_method_signature": "BuildServiceImplTest.keepBuildZeroBuildNumber()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumen...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public void keepBuild(final AbstractProject<?, ?> project, final int buildNumber, final boolean release) {\n AbstractBuild<?, ?> build = getBuild(project, buildNumber);\n this.security.checkPermission(build, Run.UPDATE);\n log.debug(\"{} build: {} #{}\", $(release ? \"Releasing\" : \"K...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_48
{ "fields": [ { "declarator": "USER = \"admin\"", "modifier": "private static final", "original_string": "private static final String USER = \"admin\";", "type": "String", "var_name": "USER" }, { "declarator": "TEMPLATE_NAME = \"project_template\"", "modifier": "p...
{ "body": "@Test\n @PrepareForTest(User.class)\n public void testIsAuthorUserIdNull() throws Exception {\n mockStatic(User.class);\n User user = createMock(User.class);\n expect(user.getId()).andReturn(null);\n expect(User.current()).andReturn(user);\n Job job = createMock(Fre...
{ "fields": [ { "declarator": "globalIota = 0", "modifier": "private static volatile", "original_string": "private static volatile int globalIota = 0;", "type": "int", "var_name": "globalIota" }, { "declarator": "iota", "modifier": "private", "original_strin...
{ "body": "public static boolean isAuthor(Job job) {\n User user = User.current();\n return !(user == null || job == null || job.getCreatedBy() == null) && job.getCreatedBy().equals(user.getId());\n }", "class_method_signature": "Functions.isAuthor(Job job)", "constructor": false, "full_signatu...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_87
{ "fields": [ { "declarator": "securityService", "modifier": "@Mock\n private", "original_string": "@Mock\n private SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" }, { "declarator": "project", "modifier": "@Suppre...
{ "body": "@Test(expected = NullPointerException.class)\n public void getProjectByFullnameNullArg() {\n getInst().getProjectByFullName(null);\n }", "class_method_signature": "ProjectServiceImplTest.getProjectByFullnameNullArg()", "constructor": false, "full_signature": "@Test(expected = NullPointer...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public AbstractProject<?, ?> getProjectByFullName(final String projectName) {\n AbstractProject<?, ?> p = findProjectByFullName(projectName);\n if (p == null) {\n throw new ProjectNotFoundException(String.format(\"Project %s not found.\", projectName));\n }\n return p...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_68
{ "fields": [ { "declarator": "propertyKey = \"propertyKey\"", "modifier": "private final", "original_string": "private final String propertyKey = \"propertyKey\";", "type": "String", "var_name": "propertyKey" }, { "declarator": "property", "modifier": "private", ...
{ "body": "@Test\n public void testConstructor() {\n try {\n new BaseProjectProperty(null);\n fail(\"Null should be handled by BaseProjectProperty constructor.\");\n } catch (Exception e) {\n assertEquals(BaseProjectProperty.INVALID_JOB_EXCEPTION, e.getMessage());\n ...
{ "fields": [ { "declarator": "INVALID_JOB_EXCEPTION = \"Project property should have not null job\"", "modifier": "static final", "original_string": "static final String INVALID_JOB_EXCEPTION = \"Project property should have not null job\";", "type": "String", "var_name": "INVALID_J...
{ "body": "final ICascadingJob getJob() {\n return job;\n }", "class_method_signature": "BaseProjectProperty.getJob()", "constructor": false, "full_signature": "final ICascadingJob getJob()", "identifier": "getJob", "invocations": [], "modifiers": "final", "parameters": "()", "return": "ICas...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_132
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test\n public void findBuildByProjectNameReturnNull() {\n assertNull(getInst().findBuild(\"projectName\", 1));\n }", "class_method_signature": "BuildServiceImplTest.findBuildByProjectNameReturnNull()", "constructor": false, "full_signature": "@Test public void findBuildByProjectNameRetu...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> findBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.findProject(projectName);\n return project != null ? findBuild(project, buildNum...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_91
{ "fields": [ { "declarator": "securityService", "modifier": "@Mock\n private", "original_string": "@Mock\n private SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" }, { "declarator": "project", "modifier": "@Suppre...
{ "body": "@Test(expected = NullPointerException.class)\n public void getProjectByProjectNameNullArg() {\n getInst().getProject((String) null);\n }", "class_method_signature": "ProjectServiceImplTest.getProjectByProjectNameNullArg()", "constructor": false, "full_signature": "@Test(expected = NullPo...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public AbstractProject<?, ?> getProject(final UUID id) {\n AbstractProject<?, ?> project = findProject(id);\n if (project == null) {\n throw new ProjectNotFoundException(String.format(\"No project with UUID '%s' found.\", id));\n }\n return project;\n }", "class_...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_124
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void findBuildByProjectBuildNumber() {\n getInst().findBuild(project, -1);\n }", "class_method_signature": "BuildServiceImplTest.findBuildByProjectBuildNumber()", "constructor": false, "full_signature": "@Test(expected = IllegalAr...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> findBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.findProject(projectName);\n return project != null ? findBuild(project, buildNum...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_29
{ "fields": [], "file": "hudson-core/src/test/java/hudson/util/CascadingUtilTest.java", "identifier": "CascadingUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @PrepareForTest({Hudson.class, StaplerRequest.class})\n public void testBuildExternalProperties() throws Exception {\n Job job = new FreeStyleProjectMock(\"job\");\n StaplerRequest req = createMock(StaplerRequest.class);\n String javadocArchiverKey = \"hudson-tasks-Javado...
{ "fields": [], "file": "hudson-core/src/main/java/hudson/util/CascadingUtil.java", "identifier": "CascadingUtil", "interfaces": "", "methods": [ { "class_method_signature": "CascadingUtil.getProjectProperty(Job currentJob, String key)", "constructor": false, "full_signature": "public st...
{ "body": "@SuppressWarnings(\"unchecked\")\n public static <T extends Describable<T>> void buildExternalProperties(StaplerRequest req, JSONObject json,\n List<Descriptor<T>> descriptors, Job owner)\n throws Descriptor.FormException {\...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_52
{ "fields": [ { "declarator": "USER = \"admin\"", "modifier": "private static final", "original_string": "private static final String USER = \"admin\";", "type": "String", "var_name": "USER" }, { "declarator": "TEMPLATE_NAME = \"project_template\"", "modifier": "p...
{ "body": "@Test\n public void testGetTemplatePresentTemplate(){\n FreeStyleProject parentProject = new FreeStyleProject(null, TEMPLATE_NAME);\n List<FreeStyleProject> items = new ArrayList<FreeStyleProject>();\n items.add(parentProject);\n FreeStyleProject project = Functions.getItemBy...
{ "fields": [ { "declarator": "globalIota = 0", "modifier": "private static volatile", "original_string": "private static volatile int globalIota = 0;", "type": "int", "var_name": "globalIota" }, { "declarator": "iota", "modifier": "private", "original_strin...
{ "body": "public static <T extends Item> T getItemByName(List<T> items, final String name) {\n if (StringUtils.isBlank(name)) {\n return null;\n }\n Iterable<T> templates = Iterables.filter(items, new Predicate<T>() {\n public boolean apply(T item) {\n return...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_5
{ "fields": [], "file": "hudson-utils/src/test/java/org/hudsonci/utils/common/VersionFormatterTest.java", "identifier": "VersionFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void rawVersionShouldContainSnapshotWhenVersionIsSnapshot()\n {\n assertThat( VersionFormatter.asRawVersion( \"1.0-SNAPSHOT\", \"201009291818\", \"1\" ), \n containsString( \"SNAPSHOT\" ) );\n }", "class_method_signature": "VersionFormatterTest.rawVersion...
{ "fields": [], "file": "hudson-utils/src/main/java/org/hudsonci/utils/common/VersionFormatter.java", "identifier": "VersionFormatter", "interfaces": "", "methods": [ { "class_method_signature": "VersionFormatter.asRawVersion( String version, String timestamp, String sequence )", "constructor"...
{ "body": "public static String asRawVersion( String version, String timestamp, String sequence )\n {\n StringBuilder buff = new StringBuilder();\n\n if ( version == null )\n {\n version = VersionSupport.UNKNOWN;\n }\n buff.append( version );\n\n if ( timestamp ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_108
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void deleteBuildNegativeBuildNumber() {\n getInst().deleteBuild(project, -1);\n }", "class_method_signature": "BuildServiceImplTest.deleteBuildNegativeBuildNumber()", "constructor": false, "full_signature": "@Test(expected = Illeg...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public void deleteBuild(final AbstractProject<?, ?> project, final int buildNumber) {\n AbstractBuild<?, ?> build = getBuild(project, buildNumber);\n this.security.checkPermission(build, Run.DELETE);\n log.debug(\"Deleting build: {} #{}\", project.getName(), buildNumber);\n try ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_13
{ "fields": [], "file": "hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java", "identifier": "MatrixProjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTouchStoneCombinationNull() throws IOException {\n MatrixProject childProject1 = new MatrixProjectMock(\"child1\");\n assertNull(childProject1.getTouchStoneCombinationFilter());\n }", "class_method_signature": "MatrixProjectTest.testGetTouchStoneCombinationN...
{ "fields": [ { "declarator": "HAS_COMBINATION_FILTER_PARAM = \"hasCombinationFilter\"", "modifier": "public static final", "original_string": "public static final String HAS_COMBINATION_FILTER_PARAM = \"hasCombinationFilter\";", "type": "String", "var_name": "HAS_COMBINATION_FILTER_...
{ "body": "public String getTouchStoneCombinationFilter() {\n return CascadingUtil.getStringProjectProperty(this, TOUCH_STONE_COMBINATION_FILTER_PROPERTY_NAME).getValue();\n }", "class_method_signature": "MatrixProject.getTouchStoneCombinationFilter()", "constructor": false, "full_signature": "public ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_149
{ "fields": [ { "declarator": "hudson", "modifier": "private", "original_string": "private Hudson hudson;", "type": "Hudson", "var_name": "hudson" }, { "declarator": "security", "modifier": "@Mock\n private", "original_string": "@Mock\n private Securit...
{ "body": "@Test(expected=NullPointerException.class)\n public void getNodeNullArg() {\n getInst().getNode(null);\n }", "class_method_signature": "NodeServiceImplTest.getNodeNullArg()", "constructor": false, "full_signature": "@Test(expected=NullPointerException.class) public void getNodeNullArg()"...
{ "fields": [ { "declarator": "security", "modifier": "private final", "original_string": "private final SecurityService security;", "type": "SecurityService", "var_name": "security" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/NodeServiceImpl.java...
{ "body": "public Node getNode(String nodeName) {\n Node node = findNode(nodeName);\n if (node == null) {\n throw new NodeNotFoundException(String.format(\"Node %s not found.\", nodeName));\n }\n return node;\n }", "class_method_signature": "NodeServiceImpl.getNode(String n...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_44
{ "fields": [ { "declarator": "scm1", "modifier": "private", "original_string": "private SCM scm1;", "type": "SCM", "var_name": "scm1" }, { "declarator": "scm2", "modifier": "private", "original_string": "private SCM scm2;", "type": "SCM", "var_n...
{ "body": "@Test\n public void testHashCode() {\n assertEquals(expectedResult, scm1.hashCode() == (scm2 == null? 0: scm2).hashCode());\n }", "class_method_signature": "NullScmTest.testHashCode()", "constructor": false, "full_signature": "@Test public void testHashCode()", "identifier": "testHashC...
{ "fields": [], "file": "hudson-core/src/main/java/hudson/scm/NullSCM.java", "identifier": "NullSCM", "interfaces": "", "methods": [ { "class_method_signature": "NullSCM.calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener)", "constructor": false, "f...
{ "body": "@Override\n public int hashCode() {\n return 56;\n }", "class_method_signature": "NullSCM.hashCode()", "constructor": false, "full_signature": "@Override public int hashCode()", "identifier": "hashCode", "invocations": [], "modifiers": "@Override public", "parameters": "()", "r...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_45
{ "fields": [ { "declarator": "USER = \"admin\"", "modifier": "private static final", "original_string": "private static final String USER = \"admin\";", "type": "String", "var_name": "USER" }, { "declarator": "TEMPLATE_NAME = \"project_template\"", "modifier": "p...
{ "body": "@Test\n @PrepareForTest(User.class)\n public void testIsAuthorTrue() throws Exception {\n mockStatic(User.class);\n User user = createMock(User.class);\n expect(user.getId()).andReturn(USER);\n expect(User.current()).andReturn(user);\n Job job = createMock(FreeStyle...
{ "fields": [ { "declarator": "globalIota = 0", "modifier": "private static volatile", "original_string": "private static volatile int globalIota = 0;", "type": "int", "var_name": "globalIota" }, { "declarator": "iota", "modifier": "private", "original_strin...
{ "body": "public static boolean isAuthor(Job job) {\n User user = User.current();\n return !(user == null || job == null || job.getCreatedBy() == null) && job.getCreatedBy().equals(user.getId());\n }", "class_method_signature": "Functions.isAuthor(Job job)", "constructor": false, "full_signatu...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_148
{ "fields": [ { "declarator": "hudson", "modifier": "private", "original_string": "private Hudson hudson;", "type": "Hudson", "var_name": "hudson" }, { "declarator": "security", "modifier": "@Mock\n private", "original_string": "@Mock\n private Securit...
{ "body": "@Test\n public void getNodesSecurity() {\n\n List<Node> nodes = new ArrayList<Node>();\n nodes.add(node);\n\n NodeService inst = spy(getInst());\n\n doReturn(nodes).when(hudson).getNodes();\n doReturn(true).when(security).hasPermission(node, Permission.READ);\n\n ...
{ "fields": [ { "declarator": "security", "modifier": "private final", "original_string": "private final SecurityService security;", "type": "SecurityService", "var_name": "security" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/NodeServiceImpl.java...
{ "body": "public List<Node> getNodes() {\n List<Node> nodesToCheck = getHudson().getNodes();\n List<Node> nodesToReturn = new ArrayList<Node>(nodesToCheck.size());\n\n for (hudson.model.Node node : nodesToCheck) {\n if (this.security.hasPermission(node, Permission.READ)) {\n ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_12
{ "fields": [], "file": "hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java", "identifier": "MatrixProjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetCombinationFilterNull() throws IOException {\n MatrixProject childProject1 = new MatrixProjectMock(\"child1\");\n assertNull(childProject1.getCombinationFilter());\n }", "class_method_signature": "MatrixProjectTest.testSetCombinationFilterNull()", "constru...
{ "fields": [ { "declarator": "HAS_COMBINATION_FILTER_PARAM = \"hasCombinationFilter\"", "modifier": "public static final", "original_string": "public static final String HAS_COMBINATION_FILTER_PARAM = \"hasCombinationFilter\";", "type": "String", "var_name": "HAS_COMBINATION_FILTER_...
{ "body": "public String getCombinationFilter() {\n return CascadingUtil.getStringProjectProperty(this, COMBINATION_FILTER_PROPERTY_NAME).getValue();\n }", "class_method_signature": "MatrixProject.getCombinationFilter()", "constructor": false, "full_signature": "public String getCombinationFilter()", ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_4
{ "fields": [], "file": "hudson-utils/src/test/java/org/hudsonci/utils/id/OIDTest.java", "identifier": "OIDTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetNull() {\n OID oid = OID.get(null);\n assertEquals(OID.NULL, oid);\n }", "class_method_signature": "OIDTest.testGetNull()", "constructor": false, "full_signature": "@Test public void testGetNull()", "identifier": "testGetNull", "invocations": [ "...
{ "fields": [ { "declarator": "NULL = new OID()", "modifier": "public static final", "original_string": "public static final OID NULL = new OID();", "type": "OID", "var_name": "NULL" }, { "declarator": "type", "modifier": "@XStreamAsAttribute\n private final", ...
{ "body": "public static OID get(final Object obj) {\n if (obj == null) {\n return NULL;\n }\n return new OID(obj.getClass().getName(), System.identityHashCode(obj));\n }", "class_method_signature": "OID.get(final Object obj)", "constructor": false, "full_signature": "public s...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_109
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void deleteBuildZeroBuildNumber() {\n getInst().deleteBuild(project, 0);\n }", "class_method_signature": "BuildServiceImplTest.deleteBuildZeroBuildNumber()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumen...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public void deleteBuild(final AbstractProject<?, ?> project, final int buildNumber) {\n AbstractBuild<?, ?> build = getBuild(project, buildNumber);\n this.security.checkPermission(build, Run.DELETE);\n log.debug(\"Deleting build: {} #{}\", project.getName(), buildNumber);\n try ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_53
{ "fields": [ { "declarator": "project", "modifier": "private", "original_string": "private FreeStyleProjectMock project;", "type": "FreeStyleProjectMock", "var_name": "project" }, { "declarator": "parent", "modifier": "private", "original_string": "private ...
{ "body": "@Test\n public void testGetDefaultValue() {\n DescribableList defaultValue = property.getDefaultValue();\n assertNotNull(defaultValue);\n //Default value should be initialized and stored as original value\n assertTrue(property.getOriginalValue() == defaultValue);\n ass...
{ "fields": [], "file": "hudson-core/src/main/java/org/hudsonci/model/project/property/DescribableListProjectProperty.java", "identifier": "DescribableListProjectProperty", "interfaces": "", "methods": [ { "class_method_signature": "DescribableListProjectProperty.DescribableListProjectProperty(ICasc...
{ "body": "@Override\n public DescribableList getDefaultValue() {\n DescribableList result = new DescribableList(getJob());\n setOriginalValue(result, false);\n return result;\n }", "class_method_signature": "DescribableListProjectProperty.getDefaultValue()", "constructor": false, "fu...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_28
{ "fields": [], "file": "hudson-core/src/test/java/hudson/util/CascadingUtilTest.java", "identifier": "CascadingUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @PrepareForTest(Hudson.class)\n public void testHasCyclicCascadingLink() throws Exception {\n FreeStyleProject project1 = new FreeStyleProjectMock(\"p1\");\n FreeStyleProjectMock project2 = new FreeStyleProjectMock(\"p2\");\n FreeStyleProjectMock project3 = new FreeStyleP...
{ "fields": [], "file": "hudson-core/src/main/java/hudson/util/CascadingUtil.java", "identifier": "CascadingUtil", "interfaces": "", "methods": [ { "class_method_signature": "CascadingUtil.getProjectProperty(Job currentJob, String key)", "constructor": false, "full_signature": "public st...
{ "body": "@SuppressWarnings(\"unchecked\")\n public static boolean hasCyclicCascadingLink(Job cascadingCandidate, Set<String> cascadingChildren) {\n if (null != cascadingCandidate && CollectionUtils.isNotEmpty(cascadingChildren)) {\n if (cascadingChildren.contains(cascadingCandidate.getName())) ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_125
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void findBuildByProjectZeroBuildNumber() {\n getInst().findBuild(project, 0);\n }", "class_method_signature": "BuildServiceImplTest.findBuildByProjectZeroBuildNumber()", "constructor": false, "full_signature": "@Test(expected = Il...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> findBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.findProject(projectName);\n return project != null ? findBuild(project, buildNum...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_90
{ "fields": [ { "declarator": "securityService", "modifier": "@Mock\n private", "original_string": "@Mock\n private SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" }, { "declarator": "project", "modifier": "@Suppre...
{ "body": "@Test(expected = ProjectNotFoundException.class)\n public void getProjectByProjectNameProjectNotFoundException() {\n getInst().getProject(\"projectName\");\n }", "class_method_signature": "ProjectServiceImplTest.getProjectByProjectNameProjectNotFoundException()", "constructor": false, "f...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public AbstractProject<?, ?> getProject(final UUID id) {\n AbstractProject<?, ?> project = findProject(id);\n if (project == null) {\n throw new ProjectNotFoundException(String.format(\"No project with UUID '%s' found.\", id));\n }\n return project;\n }", "class_...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_133
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = NullPointerException.class)\n public void stopBuildByProjectNameNullName() {\n getInst().stopBuild(null, 1);\n }", "class_method_signature": "BuildServiceImplTest.stopBuildByProjectNameNullName()", "constructor": false, "full_signature": "@Test(expected = NullPointerExce...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public void stopBuild(final AbstractProject<?, ?> project, final int buildNumber){\n AbstractBuild<?, ?> build = getBuild(project, buildNumber);\n log.debug(\"Stopping build: {} #{}\", project.getName(), buildNumber);\n try {\n // Security: doStop eventually checks to see if...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_86
{ "fields": [ { "declarator": "securityService", "modifier": "@Mock\n private", "original_string": "@Mock\n private SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" }, { "declarator": "project", "modifier": "@Suppre...
{ "body": "@Test(expected = NullPointerException.class)\n public void getProjectByUUIDNullArg() {\n getInst().getProject((UUID) null);\n }", "class_method_signature": "ProjectServiceImplTest.getProjectByUUIDNullArg()", "constructor": false, "full_signature": "@Test(expected = NullPointerException.c...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public AbstractProject<?, ?> getProject(final UUID id) {\n AbstractProject<?, ?> project = findProject(id);\n if (project == null) {\n throw new ProjectNotFoundException(String.format(\"No project with UUID '%s' found.\", id));\n }\n return project;\n }", "class_...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_69
{ "fields": [ { "declarator": "propertyKey = \"propertyKey\"", "modifier": "private final", "original_string": "private final String propertyKey = \"propertyKey\";", "type": "String", "var_name": "propertyKey" }, { "declarator": "property", "modifier": "private", ...
{ "body": "@Test\n public void testSetJob() {\n try {\n property.setJob(null);\n fail(\"Null is not allowed.\");\n } catch (Exception e) {\n assertEquals(BaseProjectProperty.INVALID_JOB_EXCEPTION, e.getMessage());\n }\n assertNotNull(property.getJob());\...
{ "fields": [ { "declarator": "INVALID_JOB_EXCEPTION = \"Project property should have not null job\"", "modifier": "static final", "original_string": "static final String INVALID_JOB_EXCEPTION = \"Project property should have not null job\";", "type": "String", "var_name": "INVALID_J...
{ "body": "public void setJob(ICascadingJob job) {\n if (null == job) {\n throw new IllegalArgumentException(INVALID_JOB_EXCEPTION);\n }\n this.job = job;\n }", "class_method_signature": "BaseProjectProperty.setJob(ICascadingJob job)", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_49
{ "fields": [ { "declarator": "USER = \"admin\"", "modifier": "private static final", "original_string": "private static final String USER = \"admin\";", "type": "String", "var_name": "USER" }, { "declarator": "TEMPLATE_NAME = \"project_template\"", "modifier": "p...
{ "body": "@Test\n @PrepareForTest(User.class)\n public void testIsAuthorUserNull() throws Exception {\n mockStatic(User.class);\n expect(User.current()).andReturn(null);\n Job job = createMock(FreeStyleProject.class);\n replay(User.class, job);\n boolean result = Functions.is...
{ "fields": [ { "declarator": "globalIota = 0", "modifier": "private static volatile", "original_string": "private static volatile int globalIota = 0;", "type": "int", "var_name": "globalIota" }, { "declarator": "iota", "modifier": "private", "original_strin...
{ "body": "public static boolean isAuthor(Job job) {\n User user = User.current();\n return !(user == null || job == null || job.getCreatedBy() == null) && job.getCreatedBy().equals(user.getId());\n }", "class_method_signature": "Functions.isAuthor(Job job)", "constructor": false, "full_signatu...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_113
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = NullPointerException.class)\n public void getBuildProjectNullProject() {\n getInst().getBuild((AbstractProject<?, ?>) null, 1);\n\n }", "class_method_signature": "BuildServiceImplTest.getBuildProjectNullProject()", "constructor": false, "full_signature": "@Test(expected ...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> getBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.getProject(projectName);\n return getBuild(project, buildNumber);\n }", "cla...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_144
{ "fields": [], "file": "hudson-service/src/test/java/org/hudsonci/service/internal/DescriptorServiceImplTest.java", "identifier": "DescriptorServiceImplTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n @Test(expected = NullPointerException.class)\n public void getDescriptorByTypeNullArg() {\n getInst().getDescriptor((Class) null);\n }", "class_method_signature": "DescriptorServiceImplTest.getDescriptorByTypeNullArg()", "constructor"...
{ "fields": [], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/DescriptorServiceImpl.java", "identifier": "DescriptorServiceImpl", "interfaces": "implements DescriptorService", "methods": [ { "class_method_signature": "DescriptorServiceImpl.DescriptorServiceImpl()", "const...
{ "body": "public Descriptor getDescriptor(final String className) {\n checkNotNull(className, \"class name\");\n return getHudson().getDescriptor(className);\n }", "class_method_signature": "DescriptorServiceImpl.getDescriptor(final String className)", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_152
{ "fields": [ { "declarator": "hudson", "modifier": "private", "original_string": "private Hudson hudson;", "type": "Hudson", "var_name": "hudson" }, { "declarator": "security", "modifier": "@Mock\n private", "original_string": "@Mock\n private Securit...
{ "body": "@Test(expected=NullPointerException.class)\n public void findNodeNullArg() {\n getInst().findNode(null);\n }", "class_method_signature": "NodeServiceImplTest.findNodeNullArg()", "constructor": false, "full_signature": "@Test(expected=NullPointerException.class) public void findNodeNullAr...
{ "fields": [ { "declarator": "security", "modifier": "private final", "original_string": "private final SecurityService security;", "type": "SecurityService", "var_name": "security" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/NodeServiceImpl.java...
{ "body": "public Node findNode(final String nodeName) {\n log.debug(\"findNode(\\\"{}\\\")\", nodeName);\n checkNodeName(nodeName);\n Node node;\n // Provide the master node, if the name is \"\"\n if (\"\".equals(nodeName)) {\n node = getHudson();\n } else {\n ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_105
{ "fields": [ { "declarator": "listener", "modifier": "@Mock private", "original_string": "@Mock private TaskListener listener;", "type": "TaskListener", "var_name": "listener" }, { "declarator": "build", "modifier": "@Mock private", "original_string": "@Moc...
{ "body": "@Test(expected=NullPointerException.class)\n public void triggerDependentsNullArg1() {\n getInst().triggerDependents(null, listener);\n }", "class_method_signature": "DependencyGraphServiceImplTest.triggerDependentsNullArg1()", "constructor": false, "full_signature": "@Test(expected=Null...
{ "fields": [], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/DependencyGraphServiceImpl.java", "identifier": "DependencyGraphServiceImpl", "interfaces": "implements DependencyGraphService", "methods": [ { "class_method_signature": "DependencyGraphServiceImpl.getGraph()", ...
{ "body": "public void triggerDependents(final AbstractBuild<?, ?> build, final TaskListener listener) {\n checkNotNull(build, \"build\");\n checkNotNull(listener, \"listener\");\n\n if (log.isDebugEnabled()) {\n log.debug(\"Maybe triggering dependents of build: {}\", build.getFullDisp...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_8
{ "fields": [], "file": "hudson-utils/src/test/java/org/hudsonci/utils/common/VersionFormatterTest.java", "identifier": "VersionFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void canonicalVersionShouldOnlyContainVersionNumberWhenVersionIsRelease()\n {\n assertThat( VersionFormatter.asCanonicalVersion( \"1.0\", \"201009291818\", \"1\" ), \n equalTo( \"1.0\" ) );\n }", "class_method_signature": "VersionFormatterTest.canonicalVe...
{ "fields": [], "file": "hudson-utils/src/main/java/org/hudsonci/utils/common/VersionFormatter.java", "identifier": "VersionFormatter", "interfaces": "", "methods": [ { "class_method_signature": "VersionFormatter.asRawVersion( String version, String timestamp, String sequence )", "constructor"...
{ "body": "public static String asCanonicalVersion( String version, String timestamp, String sequence )\n {\n String derivedVersion = version;\n if ( derivedVersion == null )\n {\n derivedVersion = VersionSupport.UNKNOWN;\n }\n\n String snapshot = \"-SNAPSHOT\";\n ...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_24
{ "fields": [], "file": "hudson-core/src/test/java/hudson/util/CascadingUtilTest.java", "identifier": "CascadingUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenameCascadingParentLinksNullNames() {\n CascadingUtil.renameCascadingParentLinks(null, null);\n }", "class_method_signature": "CascadingUtilTest.testRenameCascadingParentLinksNullNames()", "constructor": false, "full_signature": "@Test public void testRenameCasc...
{ "fields": [], "file": "hudson-core/src/main/java/hudson/util/CascadingUtil.java", "identifier": "CascadingUtil", "interfaces": "", "methods": [ { "class_method_signature": "CascadingUtil.getProjectProperty(Job currentJob, String key)", "constructor": false, "full_signature": "public st...
{ "body": "public static void renameCascadingParentLinks(final String oldName, final String newName) {\n if (StringUtils.isBlank(newName) || StringUtils.isBlank(oldName)) {\n return;\n }\n for (Job job : Hudson.getInstance().getAllItems(Job.class)) {\n if (oldName.equals(job...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_73
{ "fields": [ { "declarator": "propertyKey = \"propertyKey\"", "modifier": "private final", "original_string": "private final String propertyKey = \"propertyKey\";", "type": "String", "var_name": "propertyKey" }, { "declarator": "property", "modifier": "private", ...
{ "body": "@Test\n public void testGetCascadingValue() {\n parentProperty.setValue(null);\n //If project doesn't have cascading project - default value is used as cascading value.\n assertEquals(property.getDefaultValue(), property.getCascadingValue());\n\n project.setCascadingProject(p...
{ "fields": [ { "declarator": "INVALID_JOB_EXCEPTION = \"Project property should have not null job\"", "modifier": "static final", "original_string": "static final String INVALID_JOB_EXCEPTION = \"Project property should have not null job\";", "type": "String", "var_name": "INVALID_J...
{ "body": "@SuppressWarnings(\"unchecked\")\n public T getCascadingValue() {\n if (null == getKey()) {\n throw new IllegalArgumentException(INVALID_PROPERTY_KEY_EXCEPTION);\n }\n return getJob().hasCascadingProject() ?\n (T) getJob().getCascadingProject().getProperty(prop...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_129
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void findBuildProjectNameNegativeBuildNumber() {\n getInst().findBuild(\"projectName\", -1);\n }", "class_method_signature": "BuildServiceImplTest.findBuildProjectNameNegativeBuildNumber()", "constructor": false, "full_signature":...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> findBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.findProject(projectName);\n return project != null ? findBuild(project, buildNum...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_65
{ "fields": [ { "declarator": "property", "modifier": "private", "original_string": "private ExternalProjectProperty property;", "type": "ExternalProjectProperty", "var_name": "property" }, { "declarator": "project", "modifier": "private", "original_string":...
{ "body": "@Test\n public void testUpdateOriginalValue() {\n //If property is not modified, than it shouldn't be updated.\n assertFalse(property.isModified());\n assertFalse(property.updateOriginalValue(new Object(), new Object()));\n\n //If property is modified, than BaseProjectPropert...
{ "fields": [ { "declarator": "modified", "modifier": "private", "original_string": "private boolean modified;", "type": "boolean", "var_name": "modified" } ], "file": "hudson-core/src/main/java/org/hudsonci/model/project/property/ExternalProjectProperty.java", "identifier"...
{ "body": "@Override\n protected boolean updateOriginalValue(T value, T cascadingValue) {\n return isModified() && super.updateOriginalValue(value, cascadingValue);\n }", "class_method_signature": "ExternalProjectProperty.updateOriginalValue(T value, T cascadingValue)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_32
{ "fields": [], "file": "hudson-core/src/test/java/hudson/util/DeepEqualsTest.java", "identifier": "DeepEqualsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeepEqualsSimple() {\n\n Pet pet1 = new Pet(\"petName\");\n Pet pet2 = new Pet(\"petName\");\n Pet pet3 = new Pet(\"petName1\");\n\n Person person1 = new Person(\"name\", pet1);\n Person person2 = new Person(\"name\", pet2);\n Person pers...
{ "fields": [ { "declarator": "_customEquals = new ConcurrentHashMap<Class, Boolean>()", "modifier": "private static final", "original_string": "private static final Map<Class, Boolean> _customEquals = new ConcurrentHashMap<Class, Boolean>();", "type": "Map<Class, Boolean>", "var_nam...
{ "body": "public static boolean deepEquals(Object a, Object b)\n {\n Set visited = new HashSet<DualKey>();\n LinkedList<DualKey> stack = new LinkedList<DualKey>();\n stack.addFirst(new DualKey(a, b));\n\n while (!stack.isEmpty())\n { \n DualKey dualKey = st...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_39
{ "fields": [ { "declarator": "enabled", "modifier": "private", "original_string": "private boolean enabled;", "type": "boolean", "var_name": "enabled" } ], "file": "hudson-core/src/test/java/hudson/tasks/_ant/AntTargetNoteTest.java", "identifier": "AntTargetNoteTest", "i...
{ "body": "@Test\n public void testAnnotateTargetContainingColon() {\n // See HUDSON-7026.\n assertEquals(\"<b class=ant-target>TEST:TARGET</b>:\", annotate(\"TEST:TARGET:\"));\n }", "class_method_signature": "AntTargetNoteTest.testAnnotateTargetContainingColon()", "constructor": false, "ful...
{ "fields": [ { "declarator": "ENABLED = !Boolean.getBoolean(AntTargetNote.class.getName()+\".disabled\")", "modifier": "public static", "original_string": "public static boolean ENABLED = !Boolean.getBoolean(AntTargetNote.class.getName()+\".disabled\");", "type": "boolean", "var_nam...
{ "body": "@Override\n public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) {\n // still under development. too early to put into production\n if (!ENABLED) return null;\n\n MarkupText.SubText t = text.findToken(Pattern.compile(\".*(?=:)\"));\n if (t!=null)\n...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_163
{ "fields": [ { "declarator": "hudson", "modifier": "private", "original_string": "private Hudson hudson;", "type": "Hudson", "var_name": "hudson" }, { "declarator": "system", "modifier": "private", "original_string": "private SystemServiceImpl system;", ...
{ "body": "@Test\n public void getWorkingDirectory() {\n File file = new File(\"/foo/biz/bat\");\n when(hudson.getRootDir()).thenReturn(file);\n assertEquals(file, system.getWorkingDirectory());\n }", "class_method_signature": "SystemServiceImplTest.getWorkingDirectory()", "constructor"...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public File getWorkingDirectory() {\n //securityService.checkPermission(Hudson.ADMINISTER);\n return getHudson().getRootDir();\n }", "class_method_signature": "SystemServiceImpl.getWorkingDirectory()", "constructor": false, "full_signature": "public File getWorkingDirectory()", "id...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_81
{ "fields": [ { "declarator": "propertyKey = \"propertyKey\"", "modifier": "private final", "original_string": "private final String propertyKey = \"propertyKey\";", "type": "String", "var_name": "propertyKey" }, { "declarator": "property", "modifier": "private", ...
{ "body": "@Test\n public void testGetValue() {\n property.setValue(parentPropertyValue);\n //if value is not null - return it\n assertEquals(parentPropertyValue, property.getValue());\n property.setValue(null);\n assertNull(property.getValue());\n\n parentProperty.setValu...
{ "fields": [ { "declarator": "INVALID_JOB_EXCEPTION = \"Project property should have not null job\"", "modifier": "static final", "original_string": "static final String INVALID_JOB_EXCEPTION = \"Project property should have not null job\";", "type": "String", "var_name": "INVALID_J...
{ "body": "public T getValue() {\n if (returnOriginalValue()) {\n return getOriginalValue();\n }\n return getCascadingValue();\n }", "class_method_signature": "BaseProjectProperty.getValue()", "constructor": false, "full_signature": "public T getValue()", "identifier": "getV...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_134
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void stopBuildByProjectNameNegativeBuildNumber() {\n getInst().stopBuild(project, -1);\n }", "class_method_signature": "BuildServiceImplTest.stopBuildByProjectNameNegativeBuildNumber()", "constructor": false, "full_signature": "@T...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public void stopBuild(final AbstractProject<?, ?> project, final int buildNumber){\n AbstractBuild<?, ?> build = getBuild(project, buildNumber);\n log.debug(\"Stopping build: {} #{}\", project.getName(), buildNumber);\n try {\n // Security: doStop eventually checks to see if...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_97
{ "fields": [ { "declarator": "securityService", "modifier": "@Mock\n private", "original_string": "@Mock\n private SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" }, { "declarator": "project", "modifier": "@Suppre...
{ "body": "@Test\n public void findProjectByFullnameNotFound() {\n assertThat(getInst().findProjectByFullName(\"fullname\"), nullValue());\n }", "class_method_signature": "ProjectServiceImplTest.findProjectByFullnameNotFound()", "constructor": false, "full_signature": "@Test public void findProject...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public AbstractProject<?, ?> findProjectByFullName(final String projectName) {\n checkProjectName(projectName);\n AbstractProject<?, ?> p = getHudson().getItemByFullName(projectName, AbstractProject.class);\n if (p != null) {\n this.securityService.checkPermission(p, Item.RE...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_78
{ "fields": [ { "declarator": "propertyKey = \"propertyKey\"", "modifier": "private final", "original_string": "private final String propertyKey = \"propertyKey\";", "type": "String", "var_name": "propertyKey" }, { "declarator": "property", "modifier": "private", ...
{ "body": "@Test\n public void testSetOriginalValue() {\n Object originalValue = new Object();\n //Prepare property original value and mark it as overridden\n property.setOriginalValue(originalValue, true);\n assertEquals(originalValue, property.getOriginalValue());\n assertTrue(...
{ "fields": [ { "declarator": "INVALID_JOB_EXCEPTION = \"Project property should have not null job\"", "modifier": "static final", "original_string": "static final String INVALID_JOB_EXCEPTION = \"Project property should have not null job\";", "type": "String", "var_name": "INVALID_J...
{ "body": "protected void setOriginalValue(T originalValue, boolean overridden) {\n this.originalValue = originalValue;\n setOverridden(overridden);\n }", "class_method_signature": "BaseProjectProperty.setOriginalValue(T originalValue, boolean overridden)", "constructor": false, "full_signature...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_122
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = BuildNotFoundException.class)\n public void getBuildByProjectNameBuildNotFoundException() throws IOException {\n doReturn(project).when(projectService).getProject(\"projectName\");\n // spy so that we can call real methods\n getInst().getBuild(\"projectName\", 1);\n...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> getBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.getProject(projectName);\n return getBuild(project, buildNumber);\n }", "cla...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_54
{ "fields": [ { "declarator": "project", "modifier": "private", "original_string": "private FreeStyleProjectMock project;", "type": "FreeStyleProjectMock", "var_name": "project" }, { "declarator": "parent", "modifier": "private", "original_string": "private ...
{ "body": "@Test\n public void testGetOriginalValue() {\n //Original value is not initialized. Default value will be used instead. Shouldn't be null\n DescribableList originalValue = property.getOriginalValue();\n assertNotNull(originalValue);\n //Value was set, so return it without mod...
{ "fields": [], "file": "hudson-core/src/main/java/org/hudsonci/model/project/property/DescribableListProjectProperty.java", "identifier": "DescribableListProjectProperty", "interfaces": "", "methods": [ { "class_method_signature": "DescribableListProjectProperty.DescribableListProjectProperty(ICasc...
{ "body": "@Override\n public DescribableList getOriginalValue() {\n DescribableList result = super.getOriginalValue();\n return null != result ? result : getDefaultValue();\n }", "class_method_signature": "DescribableListProjectProperty.getOriginalValue()", "constructor": false, "full_signa...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_3
{ "fields": [], "file": "hudson-utils/src/test/java/org/hudsonci/utils/id/OIDTest.java", "identifier": "OIDTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParse() {\n Object obj = new Object();\n String spec = obj.toString();\n OID oid = OID.parse(spec);\n assertEquals(obj.getClass().getName(), oid.getType());\n assertEquals(obj.hashCode(), oid.getHash());\n assertEquals(spec, oid.toString(...
{ "fields": [ { "declarator": "NULL = new OID()", "modifier": "public static final", "original_string": "public static final OID NULL = new OID();", "type": "OID", "var_name": "NULL" }, { "declarator": "type", "modifier": "@XStreamAsAttribute\n private final", ...
{ "body": "public static OID parse(final String spec) {\n assert spec != null;\n String[] items = spec.split(\"@\");\n if (items.length != 2) {\n throw new IllegalArgumentException();\n }\n return new OID(items[0], Integer.parseInt(items[1], 16));\n }", "class_method...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_159
{ "fields": [ { "declarator": "hudson", "modifier": "private", "original_string": "private Hudson hudson;", "type": "Hudson", "var_name": "hudson" }, { "declarator": "system", "modifier": "private", "original_string": "private SystemServiceImpl system;", ...
{ "body": "@Test\n public void getUrlFromHudson() {\n when(system.getUrl()).thenReturn(\"http://www.foobar.com:8070\");\n assertEquals(\"http://www.foobar.com:8070\", system.getUrl());\n }", "class_method_signature": "SystemServiceImplTest.getUrlFromHudson()", "constructor": false, "full_sig...
{ "fields": [ { "declarator": "securityService", "modifier": "private final", "original_string": "private final SecurityService securityService;", "type": "SecurityService", "var_name": "securityService" } ], "file": "hudson-service/src/main/java/org/hudsonci/service/internal...
{ "body": "public String getUrl()\n {\n String url = getHudson().getRootUrl();\n\n if (url == null) {\n log.warn(\"Underlying Hudson root url is null; using DEFAULT_URL\");\n url = DEFAULT_URL;\n }\n else if (url.endsWith(\"/\")) {\n url = url.substring(...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_15
{ "fields": [], "file": "hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java", "identifier": "MatrixProjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetCustomWorkspaceNull() throws IOException {\n MatrixProject childProject1 = new MatrixProjectMock(\"child1\");\n assertNull(childProject1.getCustomWorkspace());\n }", "class_method_signature": "MatrixProjectTest.testGetCustomWorkspaceNull()", "constructor":...
{ "fields": [ { "declarator": "HAS_COMBINATION_FILTER_PARAM = \"hasCombinationFilter\"", "modifier": "public static final", "original_string": "public static final String HAS_COMBINATION_FILTER_PARAM = \"hasCombinationFilter\";", "type": "String", "var_name": "HAS_COMBINATION_FILTER_...
{ "body": "public String getCustomWorkspace() {\n return CascadingUtil.getStringProjectProperty(this, CUSTOM_WORKSPACE_PROPERTY_NAME).getValue();\n }", "class_method_signature": "MatrixProject.getCustomWorkspace()", "constructor": false, "full_signature": "public String getCustomWorkspace()", "ident...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_42
{ "fields": [ { "declarator": "publisher = new ArtifactArchiver(null, null, false, null, false)", "modifier": "private static", "original_string": "private static ArtifactArchiver publisher = new ArtifactArchiver(null, null, false, null, false);", "type": "ArtifactArchiver", "var_nam...
{ "body": "@Bug(4505)\n @Test\n public void testNeedsToRunAborted(){\n assertEquals(expectedResult, publisher.needsToRun(buildResult));\n }", "class_method_signature": "ArtifactArchiverTest.testNeedsToRunAborted()", "constructor": false, "full_signature": "@Bug(4505) @Test public void testNeedsT...
{ "fields": [ { "declarator": "artifacts", "modifier": "private final", "original_string": "private final String artifacts;", "type": "String", "var_name": "artifacts" }, { "declarator": "excludes", "modifier": "private final", "original_string": "private fi...
{ "body": "@Override\n public boolean needsToRun(Result buildResult) {\n //TODO it seems we shouldn't archive if build result is worse than SUCCESS, investigate this\n return buildResult.isBetterThan(Result.ABORTED);\n }", "class_method_signature": "ArtifactArchiver.needsToRun(Result buildResult...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_118
{ "fields": [ { "declarator": "projectService", "modifier": "@Mock\n private", "original_string": "@Mock\n private ProjectService projectService;", "type": "ProjectService", "var_name": "projectService" }, { "declarator": "securityService", "modifier": "@Moc...
{ "body": "@Test(expected = NullPointerException.class)\n public void getBuildProjectNameNullName() {\n getInst().getBuild((String) null, 1);\n\n }", "class_method_signature": "BuildServiceImplTest.getBuildProjectNameNullName()", "constructor": false, "full_signature": "@Test(expected = NullPointer...
{ "fields": [ { "declarator": "projects", "modifier": "private final", "original_string": "private final ProjectService projects;", "type": "ProjectService", "var_name": "projects" }, { "declarator": "security", "modifier": "private final", "original_string"...
{ "body": "public AbstractBuild<?, ?> getBuild(final String projectName, final int buildNumber) {\n checkProjectName(projectName);\n checkBuildNumber(buildNumber);\n\n AbstractProject<?, ?> project = projects.getProject(projectName);\n return getBuild(project, buildNumber);\n }", "cla...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_35
{ "fields": [], "file": "hudson-core/src/test/java/hudson/util/DeepEqualsTest.java", "identifier": "DeepEqualsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeepEqualsLists() {\n List<Node> list1 = Arrays.asList(new Node(1, new Node(3)), new Node(2, new Node(4)));\n List<Node> list2 = Arrays.asList(new Node(1, new Node(3)), new Node(2, new Node(4)));\n List<Node> list3 = Arrays.asList(new Node(1, new Node(3)), ne...
{ "fields": [ { "declarator": "_customEquals = new ConcurrentHashMap<Class, Boolean>()", "modifier": "private static final", "original_string": "private static final Map<Class, Boolean> _customEquals = new ConcurrentHashMap<Class, Boolean>();", "type": "Map<Class, Boolean>", "var_nam...
{ "body": "public static boolean deepEquals(Object a, Object b)\n {\n Set visited = new HashSet<DualKey>();\n LinkedList<DualKey> stack = new LinkedList<DualKey>();\n stack.addFirst(new DualKey(a, b));\n\n while (!stack.isEmpty())\n { \n DualKey dualKey = st...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_138
{ "fields": [ { "declarator": "ac", "modifier": "@Mock private", "original_string": "@Mock private AccessControlled ac;", "type": "AccessControlled", "var_name": "ac" }, { "declarator": "securityService", "modifier": "private", "original_string": "private Se...
{ "body": "@Test(expected=NullPointerException.class)\n public void checkPermissionAccessControlledNullArg2(){\n assertNotNull(securityService);\n assertNotNull(ac);\n securityService.checkPermission(ac, null);\n }", "class_method_signature": "SecurityServiceImplTest.checkPermissionAccessCon...
{ "fields": [], "file": "hudson-service/src/main/java/org/hudsonci/service/internal/SecurityServiceImpl.java", "identifier": "SecurityServiceImpl", "interfaces": "implements SecurityService", "methods": [ { "class_method_signature": "SecurityServiceImpl.SecurityServiceImpl()", "constructor": t...
{ "body": "public void checkPermission(final Permission permission) {\n getHudson().checkPermission(permission);\n }", "class_method_signature": "SecurityServiceImpl.checkPermission(final Permission permission)", "constructor": false, "full_signature": "public void checkPermission(final Permission per...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }
1367811_62
{ "fields": [ { "declarator": "property", "modifier": "private", "original_string": "private CopyOnWriteListProjectProperty property;", "type": "CopyOnWriteListProjectProperty", "var_name": "property" } ], "file": "hudson-core/src/test/java/org/hudsonci/model/project/property...
{ "body": "@Test\n public void testGetOriginalValue() {\n //Original value is not initialized. Default value will be used instead. Shouldn't be null\n CopyOnWriteList originalValue = property.getOriginalValue();\n assertNotNull(originalValue);\n //Value was set, so return it without mod...
{ "fields": [], "file": "hudson-core/src/main/java/org/hudsonci/model/project/property/CopyOnWriteListProjectProperty.java", "identifier": "CopyOnWriteListProjectProperty", "interfaces": "", "methods": [ { "class_method_signature": "CopyOnWriteListProjectProperty.CopyOnWriteListProjectProperty(ICasc...
{ "body": "@Override\n public CopyOnWriteList getOriginalValue() {\n CopyOnWriteList result = super.getOriginalValue();\n return null != result ? result : getDefaultValue();\n }", "class_method_signature": "CopyOnWriteListProjectProperty.getOriginalValue()", "constructor": false, "full_signa...
{ "created": null, "fork": null, "fork_count": 50, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1367811, "size": 56250, "stargazer_count": 142, "stars": null, "updates": null, "url": "https://github.com/hudson/hudson-2.x" }