id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
34411308_1
{ "fields": [ { "declarator": "customerPersister", "modifier": "private", "original_string": "private CustomerPersister customerPersister;", "type": "CustomerPersister", "var_name": "customerPersister" }, { "declarator": "session", "modifier": "private", "or...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testDeserialize() throws Exception {\n session.clear();\n Collection<Customer> allData = getAllData();\n marshallingService.serialize(allData, fileOutputStream);\n FileInputStream fileInputStream = new FileInputStream(...
{ "fields": [ { "declarator": "marshallerFactory", "modifier": "private final", "original_string": "private final MarshallerFactory marshallerFactory;", "type": "MarshallerFactory", "var_name": "marshallerFactory" }, { "declarator": "configuration", "modifier": "p...
{ "body": "public <T extends Object> T deserialize(InputStream inputStream, Class<T> type) throws Exception {\n Unmarshaller unmarshaller = createUnmarshaller();\n unmarshaller.start(Marshalling.createByteInput(inputStream));\n try {\n return type.cast(unmarshaller.readObject());\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 34411308, "size": 151, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/fharms/java-examples" }
34411308_0
{ "fields": [ { "declarator": "customerPersister", "modifier": "private", "original_string": "private CustomerPersister customerPersister;", "type": "CustomerPersister", "var_name": "customerPersister" }, { "declarator": "session", "modifier": "private", "or...
{ "body": "@Test\n public void testSerialize() throws IOException {\n Collection<Customer> allData = getAllData();\n marshallingService.serialize(allData, fileOutputStream);\n }", "class_method_signature": "MarshallingServiceTest.testSerialize()", "constructor": false, "full_signature": "@Te...
{ "fields": [ { "declarator": "marshallerFactory", "modifier": "private final", "original_string": "private final MarshallerFactory marshallerFactory;", "type": "MarshallerFactory", "var_name": "marshallerFactory" }, { "declarator": "configuration", "modifier": "p...
{ "body": "public void serialize(Object object, OutputStream outputStream) throws IOException {\n Marshaller marshaller = createMarshaller();\n marshaller.start(Marshalling.createByteOutput(outputStream));\n try {\n marshaller.writeObject(object);\n } finally {\n mars...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 34411308, "size": 151, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/fharms/java-examples" }
137085185_13
{ "fields": [ { "declarator": "PARTITION_KEY = \"TRADE_DT\"", "modifier": "public static final", "original_string": "public static final String PARTITION_KEY = \"TRADE_DT\";", "type": "String", "var_name": "PARTITION_KEY" }, { "declarator": "dataMgmtSvc", "modifie...
{ "body": "@Test\n\tpublic void testCreateProcessBiggerDataSet() throws ApiException {\n\t\tBusinessObjectDataSearchResult businessObjectDataSearchResult = new BusinessObjectDataSearchResult();\n\t\tbusinessObjectDataSearchResult.setBusinessObjectDataElements( businessObjectDataBiggerDataSet() );\n\t\twhen( dataMgmtS...
{ "fields": [ { "declarator": "pageSize", "modifier": "@Value( \"${PAGE_SIZE}\" )", "original_string": "@Value( \"${PAGE_SIZE}\" )\n\tint pageSize;", "type": "int", "var_name": "pageSize" }, { "declarator": "reqChunkSize", "modifier": "@Value( \"${CHUNK_SIZE}\" )"...
{ "body": "@Override\n\tpublic boolean process( JobDefinition od, String clusterID, String workerID ) {\n\t\tlog.info( \"Back Load Process called with: {}\", od );\n errorBuffer.setLength( 0 );\n\t\ttry {\n\t\t\tBusinessObjectFormat dmFormat = dataMgmtSvc.getDMFormat( od );\n\t\t\tJobSubmitterInfo jsi = JobSub...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_8
{ "fields": [ { "declarator": "template", "modifier": "@Resource", "original_string": "@Resource\n JdbcTemplate template;", "type": "JdbcTemplate", "var_name": "template" }, { "declarator": "jp = new JobPicker()", "modifier": "", "original_string": "JobPi...
{ "body": "@Test\n @Transactional\n public void testFindJobWithRetry() throws IOException\n {\n String sql = new String(Files.readAllBytes(Paths.get(\"src/test/resources/dbunit/DM_NOTIFICATION_DATASET.sql\")));\n String[] sqlStatements = sql.split(\";\");\n template.batchUpdate(sqlStatem...
{ "fields": [ { "declarator": "logger = Logger.getLogger( \"JobPicker\" )", "modifier": "", "original_string": "Logger logger = Logger.getLogger( \"JobPicker\" );", "type": "Logger", "var_name": "logger" }, { "declarator": "FIND_UNLOCKED_JOB_QUERY = \"SELECT n.*, CASE W...
{ "body": "List<JobDefinition> findJob( String clusterID, String workerID ) {\n\t\tList<JobDefinition> jobs = new ArrayList<JobDefinition>();\n\n\t\ttry {\n\t\t\tdeleteNotProcessingNotifications();\n\t\t\tdeleteExpiredLocks();\n List<JobDefinition> result ;\n logger.info(\"Get Stats: \" + analyz...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_4
{ "fields": [ { "declarator": "template", "modifier": "@Resource", "original_string": "@Resource\n JdbcTemplate template;", "type": "JdbcTemplate", "var_name": "template" }, { "declarator": "jp = new JobPicker()", "modifier": "", "original_string": "JobPi...
{ "body": "@Test\n @Transactional\n public void testLockSawCompactionObj()\n {\n String correlation = \"{\\n\" +\n \" \\\"businessObject\\\": {\\n\" +\n \" \\\"late_reporting_for\\\":\\\"ABC\\\"\\n\" +\n \" }\\n\" +\n \"}\";\n ass...
{ "fields": [ { "declarator": "logger = Logger.getLogger( \"JobPicker\" )", "modifier": "", "original_string": "Logger logger = Logger.getLogger( \"JobPicker\" );", "type": "Logger", "var_name": "logger" }, { "declarator": "FIND_UNLOCKED_JOB_QUERY = \"SELECT n.*, CASE W...
{ "body": "public boolean lockObj( JobDefinition jd, String clusterID, String threadID ) {\n\t\tString objectName = jd.getActualObjectName();\n\n\t\tObjectDefinition od = jd.getObjectDefinition();\n\t\tif ( template.queryForList( FIND_LOCK, od.getNameSpace(), objectName,\n\t\t\t\tod.getUsageCode(), od.getFileType(), ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_5
{ "fields": [ { "declarator": "template", "modifier": "@Resource", "original_string": "@Resource\n JdbcTemplate template;", "type": "JdbcTemplate", "var_name": "template" }, { "declarator": "jp = new JobPicker()", "modifier": "", "original_string": "JobPi...
{ "body": "@Test\n @Transactional\n public void testDeleteExpiredLock() throws IOException\n {\n String sql = new String(Files.readAllBytes(Paths.get(\"src/test/resources/dbunit/object_lock_dataset.sql\")));\n\n template.update(sql);\n\n assertEquals(3, template.queryForList(\"select * f...
{ "fields": [ { "declarator": "logger = Logger.getLogger( \"JobPicker\" )", "modifier": "", "original_string": "Logger logger = Logger.getLogger( \"JobPicker\" );", "type": "Logger", "var_name": "logger" }, { "declarator": "FIND_UNLOCKED_JOB_QUERY = \"SELECT n.*, CASE W...
{ "body": "void deleteExpiredLocks() {\n\t\tint numberOfRowsDeleted = template.update( DELETE_EXPIRED_LOCKS );\n\t\tlogger.info( \"Number of Locks Deleted = \" + numberOfRowsDeleted );\n\t}", "class_method_signature": "JobPicker.deleteExpiredLocks()", "constructor": false, "full_signature": " void deleteExpired...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_9
{ "fields": [], "file": "metastor/managedObjectLoader/src/test/java/org/finra/herd/metastore/managed/NotificationSenderTest.java", "identifier": "NotificationSenderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEmailFormat() throws Exception\n {\n NotificationSender sender = new NotificationSender();\n\n ColumnDef old = ColumnDef.builder().index(1)\n .name(\"old\").type(\"varchar\").build();\n\n ColumnDef newC = ColumnDef.builder().index(1)\n ...
{ "fields": [ { "declarator": "mailingList", "modifier": "@Value( \"${MAILING_LIST}\" )\n\tprivate", "original_string": "@Value( \"${MAILING_LIST}\" )\n\tprivate String mailingList;", "type": "String", "var_name": "mailingList" }, { "declarator": "env", "modifier"...
{ "body": "protected String getFormatChangeMsg( FormatChange change, int version, JobDefinition job,\n\t\t\t\t\t\t\t\t\t\t HiveTableSchema existing, HiveTableSchema newColumns )\n\t\t\tthrows PebbleException, IOException {\n\t\tPebbleTemplate template = engine.getTemplate( \"templates/formatChangeNotificationTemplate...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_12
{ "fields": [ { "declarator": "PARTITION_KEY = \"TRADE_DT\"", "modifier": "public static final", "original_string": "public static final String PARTITION_KEY = \"TRADE_DT\";", "type": "String", "var_name": "PARTITION_KEY" }, { "declarator": "dataMgmtSvc", "modifie...
{ "body": "@Test\n\tpublic void testProcessForSubpartitions() throws ApiException {\n\t\tBusinessObjectDataSearchResult businessObjectDataSearchResult = new BusinessObjectDataSearchResult();\n\t\tbusinessObjectDataSearchResult.setBusinessObjectDataElements( buildBOStatues() );\n\t\twhen( dataMgmtSvc.searchBOData( any...
{ "fields": [ { "declarator": "pageSize", "modifier": "@Value( \"${PAGE_SIZE}\" )", "original_string": "@Value( \"${PAGE_SIZE}\" )\n\tint pageSize;", "type": "int", "var_name": "pageSize" }, { "declarator": "reqChunkSize", "modifier": "@Value( \"${CHUNK_SIZE}\" )"...
{ "body": "@Override\n\tpublic boolean process( JobDefinition od, String clusterID, String workerID ) {\n\t\tlog.info( \"Back Load Process called with: {}\", od );\n errorBuffer.setLength( 0 );\n\t\ttry {\n\t\t\tBusinessObjectFormat dmFormat = dataMgmtSvc.getDMFormat( od );\n\t\t\tJobSubmitterInfo jsi = JobSub...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_19
{ "fields": [ { "declarator": "DM_DDL = \"CREATE EXTERNAL TABLE IF NOT EXISTS `string` (\\n\" +\n \" `REC_UNIQUE_ID` BIGINT,\\n\" +\n \" `ORGNL_TRADE_DT` DATE,\\n\" +\n \" `MKT_CNTR_ID` VARCHAR(1),\\n\" +\n \" `MBR_ID` VARCHAR(4),\\n\" ...
{ "body": "@Test\n public void testDetectDiff() throws Exception\n {\n HiveHqlGenerator hiveHqlGenerator = new HiveHqlGenerator();\n HiveTableSchema hiveTableSchema = HiveClientTest.getTestHiveTableSchema();\n HiveClient hiveClient = Mockito.mock(HiveClient.class);\n hiveHqlGenerator...
{ "fields": [ { "declarator": "SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\"", "modifier": "public static final", "original_string": "public static final String SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\";", "type": "String", "var_name": "SUBMITTED_BY_JO...
{ "body": "@VisibleForTesting\n FormatChange detectSchemaChange(JobDefinition jd,\n HiveTableSchema hiveTableSchema,\n BusinessObjectFormat format, String ddl) throws ApiException {\n\n List<Pair<ColumnDef, ColumnDef>> nameChanges = L...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_2
{ "fields": [ { "declarator": "template", "modifier": "@Resource", "original_string": "@Resource\n JdbcTemplate template;", "type": "JdbcTemplate", "var_name": "template" }, { "declarator": "dmApiClient", "modifier": "@Autowired", "original_string": "@Aut...
{ "body": "@Test\n public void testScheduler() throws Exception\n {\n ClusterManager clusterManager = new ClusterManager();\n clusterManager.setupClusterAutoscaleSchedule();\n }", "class_method_signature": "ClusterManagerTest.testScheduler()", "constructor": false, "full_signature": "@Tes...
{ "fields": [ { "declarator": "CLUSTER_NM_DELIMITER = \"_\"", "modifier": "public static final", "original_string": "public static final String CLUSTER_NM_DELIMITER = \"_\";", "type": "String", "var_name": "CLUSTER_NM_DELIMITER" }, { "declarator": "REMOVE_CLUSTER = \"DE...
{ "body": "void setupClusterAutoscaleSchedule() {\n\t\tRunnable task = () -> clusterAutoScale();\n\t\tes.scheduleWithFixedDelay(task, 0, autoScaleIntervalInMin, TimeUnit.MINUTES);\n }", "class_method_signature": "ClusterManager.setupClusterAutoscaleSchedule()", "constructor": false, "full_signature": " void ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_15
{ "fields": [], "file": "metastor/managedObjectLoader/src/test/java/org/finra/herd/metastore/managed/jobProcessor/ManagedJobProcessorTest.java", "identifier": "ManagedJobProcessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetProcessBuilder()\n {\n ManagedJobProcessor jobProcessor = new ManagedJobProcessor();\n jobProcessor.hiveHqlGenerator = Mockito.mock(HiveHqlGenerator.class);\n ProcessBuilder pb = jobProcessor.createProcessBuilder(new JobDefinition(1L, \"test\", \"obj\",...
{ "fields": [ { "declarator": "hiveClient", "modifier": "@Autowired", "original_string": "@Autowired\n\tHiveClient hiveClient;", "type": "HiveClient", "var_name": "hiveClient" }, { "declarator": "hiveHqlGenerator", "modifier": "@Autowired", "original_string"...
{ "body": "@Override\n\tpublic ProcessBuilder createProcessBuilder( JobDefinition od ) {\n\t\tObjects.requireNonNull( od.getPartitionKey(), \"PartitionKey is null\" );\n\n\t\tList<String> partitionVal = Lists.newArrayList();\n\n\t\tString partitionValue = od.getPartitionValue();\n\t\tif ( partitionValue.contains( Job...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_14
{ "fields": [ { "declarator": "PARTITION_KEY = \"TRADE_DT\"", "modifier": "public static final", "original_string": "public static final String PARTITION_KEY = \"TRADE_DT\";", "type": "String", "var_name": "PARTITION_KEY" }, { "declarator": "dataMgmtSvc", "modifie...
{ "body": "@Test\n\tpublic void testCreateProcessBiggerDataSetNonDates() throws ApiException {\n\t\tBusinessObjectDataSearchResult businessObjectDataSearchResult = new BusinessObjectDataSearchResult();\n\t\tbusinessObjectDataSearchResult.setBusinessObjectDataElements( buildBOBiggerDatSetNonDate() );\n\t\twhen( dataMg...
{ "fields": [ { "declarator": "pageSize", "modifier": "@Value( \"${PAGE_SIZE}\" )", "original_string": "@Value( \"${PAGE_SIZE}\" )\n\tint pageSize;", "type": "int", "var_name": "pageSize" }, { "declarator": "reqChunkSize", "modifier": "@Value( \"${CHUNK_SIZE}\" )"...
{ "body": "@Override\n\tpublic boolean process( JobDefinition od, String clusterID, String workerID ) {\n\t\tlog.info( \"Back Load Process called with: {}\", od );\n errorBuffer.setLength( 0 );\n\t\ttry {\n\t\t\tBusinessObjectFormat dmFormat = dataMgmtSvc.getDMFormat( od );\n\t\t\tJobSubmitterInfo jsi = JobSub...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_3
{ "fields": [ { "declarator": "template", "modifier": "@Resource", "original_string": "@Resource\n JdbcTemplate template;", "type": "JdbcTemplate", "var_name": "template" }, { "declarator": "jp = new JobPicker()", "modifier": "", "original_string": "JobPi...
{ "body": "@Test\n @Transactional\n public void testLockObjNewLock()\n {\n String workerID = String.valueOf(Thread.currentThread().getId());\n assertTrue(jp.lockObj(new JobDefinition(1L,\"A\",\"B\",\"C\",\"D\", \"\",\"\",\"\",\"\"), \"C111\", workerID));\n assertTrue(jp.lockObj(new JobDe...
{ "fields": [ { "declarator": "logger = Logger.getLogger( \"JobPicker\" )", "modifier": "", "original_string": "Logger logger = Logger.getLogger( \"JobPicker\" );", "type": "Logger", "var_name": "logger" }, { "declarator": "FIND_UNLOCKED_JOB_QUERY = \"SELECT n.*, CASE W...
{ "body": "public boolean lockObj( JobDefinition jd, String clusterID, String threadID ) {\n\t\tString objectName = jd.getActualObjectName();\n\n\t\tObjectDefinition od = jd.getObjectDefinition();\n\t\tif ( template.queryForList( FIND_LOCK, od.getNameSpace(), objectName,\n\t\t\t\tod.getUsageCode(), od.getFileType(), ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_18
{ "fields": [ { "declarator": "DM_DDL = \"CREATE EXTERNAL TABLE IF NOT EXISTS `string` (\\n\" +\n \" `REC_UNIQUE_ID` BIGINT,\\n\" +\n \" `ORGNL_TRADE_DT` DATE,\\n\" +\n \" `MKT_CNTR_ID` VARCHAR(1),\\n\" +\n \" `MBR_ID` VARCHAR(4),\\n\" ...
{ "body": "@Test public void testSchemaSqlChange() throws SQLException, ApiException, IOException {\n HiveClient hiveClient = Mockito.mock(HiveClient.class);\n\n List columnList= Lists.newArrayList(new ColumnDef(\"REC_UNIQUE_ID\", \"BIGINT\",0),\n new ColumnDef(\"ORGNL_TRADE_DT\", \"DATE\...
{ "fields": [ { "declarator": "SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\"", "modifier": "public static final", "original_string": "public static final String SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\";", "type": "String", "var_name": "SUBMITTED_BY_JO...
{ "body": "public List<String> schemaSql(boolean schemaExists, JobDefinition jd) throws ApiException, SQLException {\n\n String tableName = jd.getTableName();\n\n List<String> list = Lists.newArrayList();\n\n if (schemaExists) {\n if(jd.getWfType() == ObjectProcessor.WF_TYPE_SINGLETON ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_0
{ "fields": [], "file": "metastor/managedObjectLoader/src/test/java/org/finra/herd/metastore/managed/hive/ColumnDefTest.java", "identifier": "ColumnDefTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void decimalColTest() {\n\t\tColumnDef def1 = ColumnDef.builder().type( \"DECIMAL\" ).build();\n\t\tColumnDef def2 = ColumnDef.builder().type( \"DECIMAL\" ).build();\n\n\t\tassertThat( \"DECIMAL=DECIMAL\", def1.isSameType( def2 ) );\n\t\tdef2.setType( (\"DECIMAL(10)\") );\n\t\tassertThat( \...
{ "fields": [ { "declarator": "name", "modifier": "private", "original_string": "private String name;", "type": "String", "var_name": "name" }, { "declarator": "type", "modifier": "private", "original_string": "private String type;", "type": "String", ...
{ "body": "public boolean isSameType(ColumnDef columnDef) {\n if (type.equalsIgnoreCase(columnDef.getType())) {\n return true;\n }\n else if (type.toUpperCase().startsWith(\"DECIMAL\") && columnDef.getType().toUpperCase().startsWith(\"DECIMAL\"))\n {\n int[] p1 = pars...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_17
{ "fields": [ { "declarator": "DM_DDL = \"CREATE EXTERNAL TABLE IF NOT EXISTS `string` (\\n\" +\n \" `REC_UNIQUE_ID` BIGINT,\\n\" +\n \" `ORGNL_TRADE_DT` DATE,\\n\" +\n \" `MKT_CNTR_ID` VARCHAR(1),\\n\" +\n \" `MBR_ID` VARCHAR(4),\\n\" ...
{ "body": "@Test public void testSchemaSqlNoChange() throws SQLException, ApiException, IOException {\n HiveClient hiveClient = Mockito.mock(HiveClient.class);\n List columnList= Lists.newArrayList(new ColumnDef(\"REC_UNIQUE_ID\", \"BIGINT\",0),\n new ColumnDef(\"ORGNL_TRADE_DT\", \"DATE\...
{ "fields": [ { "declarator": "SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\"", "modifier": "public static final", "original_string": "public static final String SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\";", "type": "String", "var_name": "SUBMITTED_BY_JO...
{ "body": "public List<String> schemaSql(boolean schemaExists, JobDefinition jd) throws ApiException, SQLException {\n\n String tableName = jd.getTableName();\n\n List<String> list = Lists.newArrayList();\n\n if (schemaExists) {\n if(jd.getWfType() == ObjectProcessor.WF_TYPE_SINGLETON ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_16
{ "fields": [], "file": "metastor/managedObjectLoader/src/test/java/org/finra/herd/metastore/managed/jobProcessor/ManagedJobProcessorTest.java", "identifier": "ManagedJobProcessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = NullPointerException.class)\n public void testNullPartitionKey()\n {\n ManagedJobProcessor jobProcessor = new ManagedJobProcessor();\n jobProcessor.hiveHqlGenerator = Mockito.mock(HiveHqlGenerator.class);\n ProcessBuilder pb = jobProcessor.createProcessBuilder(ne...
{ "fields": [ { "declarator": "hiveClient", "modifier": "@Autowired", "original_string": "@Autowired\n\tHiveClient hiveClient;", "type": "HiveClient", "var_name": "hiveClient" }, { "declarator": "hiveHqlGenerator", "modifier": "@Autowired", "original_string"...
{ "body": "@Override\n\tpublic ProcessBuilder createProcessBuilder( JobDefinition od ) {\n\t\tObjects.requireNonNull( od.getPartitionKey(), \"PartitionKey is null\" );\n\n\t\tList<String> partitionVal = Lists.newArrayList();\n\n\t\tString partitionValue = od.getPartitionValue();\n\t\tif ( partitionValue.contains( Job...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_20
{ "fields": [ { "declarator": "DM_DDL = \"CREATE EXTERNAL TABLE IF NOT EXISTS `string` (\\n\" +\n \" `REC_UNIQUE_ID` BIGINT,\\n\" +\n \" `ORGNL_TRADE_DT` DATE,\\n\" +\n \" `MKT_CNTR_ID` VARCHAR(1),\\n\" +\n \" `MBR_ID` VARCHAR(4),\\n\" ...
{ "body": "@Test\n public void testPartitionColChange() throws Exception\n {\n HiveHqlGenerator hiveHqlGenerator = new HiveHqlGenerator();\n\n HiveTableSchema hiveTableSchema = HiveClientTest.getTestHiveTableSchema();\n\n String ddl = \"CREATE EXTERNAL TABLE IF NOT EXISTS `string` (\\n\" +\...
{ "fields": [ { "declarator": "SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\"", "modifier": "public static final", "original_string": "public static final String SUBMITTED_BY_JOB_PROCESSOR = \"SUBMITTED_BY_JOB_PROCESSOR\";", "type": "String", "var_name": "SUBMITTED_BY_JO...
{ "body": "@VisibleForTesting\n FormatChange detectSchemaChange(JobDefinition jd,\n HiveTableSchema hiveTableSchema,\n BusinessObjectFormat format, String ddl) throws ApiException {\n\n List<Pair<ColumnDef, ColumnDef>> nameChanges = L...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_1
{ "fields": [], "file": "metastor/managedObjectLoader/src/test/java/org/finra/herd/metastore/managed/hive/ColumnDefTest.java", "identifier": "ColumnDefTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIsSameTypeDecimal() {\n\t\tColumnDef d1 = ColumnDef.builder().index( 0 ).name( \"n1\" ).type( \"decimal(18,0)\" ).build();\n\t\tColumnDef d2 = ColumnDef.builder().index( 0 ).name( \"n1\" ).type( \"DECIMAL(18)\" ).build();\n\n\t\tassertTrue( d1.isSameType( d2 ) );\n\n\t\td2 = Column...
{ "fields": [ { "declarator": "name", "modifier": "private", "original_string": "private String name;", "type": "String", "var_name": "name" }, { "declarator": "type", "modifier": "private", "original_string": "private String type;", "type": "String", ...
{ "body": "public boolean isSameType(ColumnDef columnDef) {\n if (type.equalsIgnoreCase(columnDef.getType())) {\n return true;\n }\n else if (type.toUpperCase().startsWith(\"DECIMAL\") && columnDef.getType().toUpperCase().startsWith(\"DECIMAL\"))\n {\n int[] p1 = pars...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_11
{ "fields": [ { "declarator": "PARTITION_KEY = \"TRADE_DT\"", "modifier": "public static final", "original_string": "public static final String PARTITION_KEY = \"TRADE_DT\";", "type": "String", "var_name": "PARTITION_KEY" }, { "declarator": "dataMgmtSvc", "modifie...
{ "body": "@Test\n\tpublic void testProcessForSmallerDataSet() throws ApiException {\n\t\tBusinessObjectDataSearchResult businessObjectDataSearchResult = new BusinessObjectDataSearchResult();\n\t\tbusinessObjectDataSearchResult.setBusinessObjectDataElements( buildBOStatues() );\n\t\twhen( dataMgmtSvc.searchBOData( an...
{ "fields": [ { "declarator": "pageSize", "modifier": "@Value( \"${PAGE_SIZE}\" )", "original_string": "@Value( \"${PAGE_SIZE}\" )\n\tint pageSize;", "type": "int", "var_name": "pageSize" }, { "declarator": "reqChunkSize", "modifier": "@Value( \"${CHUNK_SIZE}\" )"...
{ "body": "@Override\n\tpublic boolean process( JobDefinition od, String clusterID, String workerID ) {\n\t\tlog.info( \"Back Load Process called with: {}\", od );\n errorBuffer.setLength( 0 );\n\t\ttry {\n\t\t\tBusinessObjectFormat dmFormat = dataMgmtSvc.getDMFormat( od );\n\t\t\tJobSubmitterInfo jsi = JobSub...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_6
{ "fields": [ { "declarator": "template", "modifier": "@Resource", "original_string": "@Resource\n JdbcTemplate template;", "type": "JdbcTemplate", "var_name": "template" }, { "declarator": "jp = new JobPicker()", "modifier": "", "original_string": "JobPi...
{ "body": "@Test\n @Transactional\n public void testExtendLock() throws IOException\n {\n String sql = new String(Files.readAllBytes(Paths.get(\"src/test/resources/dbunit/object_lock_dataset.sql\")));\n\n template.update(sql);\n\n Date originalExpiration = template.queryForObject(\"selec...
{ "fields": [ { "declarator": "logger = Logger.getLogger( \"JobPicker\" )", "modifier": "", "original_string": "Logger logger = Logger.getLogger( \"JobPicker\" );", "type": "Logger", "var_name": "logger" }, { "declarator": "FIND_UNLOCKED_JOB_QUERY = \"SELECT n.*, CASE W...
{ "body": "public boolean extendLock( JobDefinition jd, String clusterID, String workerID ) {\n\t\tObjectDefinition od = jd.getObjectDefinition();\n\t\tString objectName = jd.getActualObjectName();\n\n\t\tint updated = template.update( UPDATE_LOCK_EXPIRATION, od.getNameSpace(), objectName, od.getUsageCode(),\n\t\t\t\...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_7
{ "fields": [ { "declarator": "template", "modifier": "@Resource", "original_string": "@Resource\n JdbcTemplate template;", "type": "JdbcTemplate", "var_name": "template" }, { "declarator": "jp = new JobPicker()", "modifier": "", "original_string": "JobPi...
{ "body": "@Test\n @Transactional\n public void testFindJob() throws IOException\n {\n String sql = new String(Files.readAllBytes(Paths.get(\"src/test/resources/dbunit/job_picker_dataset.sql\")));\n\n template.update(sql);\n\n String sql1 = new String(Files.readAllBytes(Paths.get(\"src/t...
{ "fields": [ { "declarator": "logger = Logger.getLogger( \"JobPicker\" )", "modifier": "", "original_string": "Logger logger = Logger.getLogger( \"JobPicker\" );", "type": "Logger", "var_name": "logger" }, { "declarator": "FIND_UNLOCKED_JOB_QUERY = \"SELECT n.*, CASE W...
{ "body": "List<JobDefinition> findJob( String clusterID, String workerID ) {\n\t\tList<JobDefinition> jobs = new ArrayList<JobDefinition>();\n\n\t\ttry {\n\t\t\tdeleteNotProcessingNotifications();\n\t\t\tdeleteExpiredLocks();\n List<JobDefinition> result ;\n logger.info(\"Get Stats: \" + analyz...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
137085185_10
{ "fields": [ { "declarator": "PARTITION_KEY = \"test\"", "modifier": "public static final", "original_string": "public static final String PARTITION_KEY = \"test\";", "type": "String", "var_name": "PARTITION_KEY" } ], "file": "metastor/managedObjectLoader/src/test/java/org/f...
{ "body": "@Test\n public void testStats()\n {\n JobProcessor jp = new JobProcessor() {\n @Override\n protected ProcessBuilder createProcessBuilder(JobDefinition od) {\n return null;\n }\n };\n\n String correlation = \"{\\\"processing\\\": { \...
{ "fields": [ { "declarator": "jobPicker", "modifier": "@Autowired", "original_string": "@Autowired\n\tJobPicker jobPicker;", "type": "JobPicker", "var_name": "jobPicker" }, { "declarator": "dataMgmtSvc", "modifier": "@Autowired", "original_string": "@Autowi...
{ "body": "boolean collectStats( JobDefinition od ) {\n\t\tboolean collectStats = true; //default to true\n\t\tString correlation = od.getCorrelation();\n\t\tif ( !StringUtils.isEmpty( correlation ) && !correlation.equals( \"null\" ) ) {\n\t\t\tJsonReader reader = Json.createReader( new StringReader( correlation ) );...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 137085185, "size": 3264, "stargazer_count": 12, "stars": null, "updates": null, "url": "https://github.com/FINRAOS/herd-mdl" }
62535317_12
{ "fields": [ { "declarator": "soItem = null", "modifier": "", "original_string": "SalesOrderItem soItem = null;", "type": "SalesOrderItem", "var_name": "soItem" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/SalesOrderItemTest.java", "identifier": "SalesOrde...
{ "body": "@Test\n\tpublic void testExisitingSalesOrderItemSearchFind() {\n\t\tEntityManager em = emf.createEntityManager();\n\t\tString soId = \"99999\";\n\t\tTestFactory tf = new TestFactory();\n\t\tSalesOrderItem soItemAct = null;\n\t\ttry {\n\t\t\t// Add Sales Order Item\n\t\t\tassertTrue(\"Sales order item not c...
{ "fields": [ { "declarator": "TAX_AMOUNT_FACTOR = new BigDecimal(\"0.19\")", "modifier": "private static final", "original_string": "private static final BigDecimal TAX_AMOUNT_FACTOR = new BigDecimal(\"0.19\");", "type": "BigDecimal", "var_name": "TAX_AMOUNT_FACTOR" }, { ...
{ "body": "public String getCurrencyCode() {\n\t\treturn this.currencyCode;\n\t}", "class_method_signature": "SalesOrderItem.getCurrencyCode()", "constructor": false, "full_signature": "public String getCurrencyCode()", "identifier": "getCurrencyCode", "invocations": [], "modifiers": "public", "paramete...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_1
{ "fields": [ { "declarator": "bupa = null", "modifier": "", "original_string": "Customer bupa = null;", "type": "Customer", "var_name": "bupa" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/CustomerTest.java", "identifier": "CustomerTest", "interfaces": ""...
{ "body": "@Test\n\tpublic void testExistingCustomerSearchTyped() {\n\t\tCustomer bupaAct = null;\n\t\tString bupaId = \"11111\";\n\t\tEntityManager em = emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Business Partner\n\t\t\tassertTrue(\"...
{ "fields": [ { "declarator": "customerId", "modifier": "@TableGenerator(name = \"CustomerGenerator\", table = \"ESPM_ID_GENERATOR\", pkColumnName = \"GENERATOR_NAME\", valueColumnName = \"GENERATOR_VALUE\", pkColumnValue = \"Customer\", initialValue = 100000000, allocationSize = 100)\n\t@Id\n\t@Gener...
{ "body": "public String getCustomerId() {\n\t\treturn this.customerId;\n\t}", "class_method_signature": "Customer.getCustomerId()", "constructor": false, "full_signature": "public String getCustomerId()", "identifier": "getCustomerId", "invocations": [], "modifiers": "public", "parameters": "()", "re...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_0
{ "fields": [ { "declarator": "bupa = null", "modifier": "", "original_string": "Customer bupa = null;", "type": "Customer", "var_name": "bupa" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/CustomerTest.java", "identifier": "CustomerTest", "interfaces": ""...
{ "body": "@Test\n\tpublic void testExistingCustomerSearchFind() {\n\t\tString bupaId = \"99999\";\n\t\tCustomer bupaAct = null;\n\t\tEntityManager em = emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Business Partner\n\t\t\tassertTrue(\"B...
{ "fields": [ { "declarator": "customerId", "modifier": "@TableGenerator(name = \"CustomerGenerator\", table = \"ESPM_ID_GENERATOR\", pkColumnName = \"GENERATOR_NAME\", valueColumnName = \"GENERATOR_VALUE\", pkColumnValue = \"Customer\", initialValue = 100000000, allocationSize = 100)\n\t@Id\n\t@Gener...
{ "body": "public String getCustomerId() {\n\t\treturn this.customerId;\n\t}", "class_method_signature": "Customer.getCustomerId()", "constructor": false, "full_signature": "public String getCustomerId()", "identifier": "getCustomerId", "invocations": [], "modifiers": "public", "parameters": "()", "re...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_13
{ "fields": [ { "declarator": "soItem = null", "modifier": "", "original_string": "SalesOrderItem soItem = null;", "type": "SalesOrderItem", "var_name": "soItem" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/SalesOrderItemTest.java", "identifier": "SalesOrde...
{ "body": "@Test\n\tpublic void testExisitingSalesOrderItemSearchTyped() {\n\t\tEntityManager em = emf.createEntityManager();\n\t\tString soId = \"11111\";\n\t\tTestFactory tf = new TestFactory();\n\t\tSalesOrderItem soItemAct = null;\n\t\ttry {\n\t\t\t// Add Sales Order Item\n\t\t\tassertTrue(\"Sales Order Item\", t...
{ "fields": [ { "declarator": "TAX_AMOUNT_FACTOR = new BigDecimal(\"0.19\")", "modifier": "private static final", "original_string": "private static final BigDecimal TAX_AMOUNT_FACTOR = new BigDecimal(\"0.19\");", "type": "BigDecimal", "var_name": "TAX_AMOUNT_FACTOR" }, { ...
{ "body": "public BigDecimal getGrossAmount() {\n\t\treturn this.grossAmount;\n\t}", "class_method_signature": "SalesOrderItem.getGrossAmount()", "constructor": false, "full_signature": "public BigDecimal getGrossAmount()", "identifier": "getGrossAmount", "invocations": [], "modifiers": "public", "param...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_7
{ "fields": [ { "declarator": "soHeader = null", "modifier": "", "original_string": "SalesOrderHeader soHeader = null;", "type": "SalesOrderHeader", "var_name": "soHeader" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/SalesOrderHeaderTest.java", "identifier"...
{ "body": "@Test\n\tpublic void testExisitingSalesOrderHeaderSearchTyped() {\n\t\tEntityManager em = emf.createEntityManager();\n\t\tString soHeadId = \"11111\";\n\t\tTestFactory tf = new TestFactory();\n\t\tSalesOrderHeader soHeaderAct = null;\n\t\ttry {\n\t\t\t// Add Sales Order Header\n\t\t\tassertTrue(\"Sales Ord...
{ "fields": [ { "declarator": "salesOrderId", "modifier": "@TableGenerator(name = \"SalesOrderGenerator\", table = \"ESPM_ID_GENERATOR\", pkColumnName = \"GENERATOR_NAME\", valueColumnName = \"GENERATOR_VALUE\", pkColumnValue = \"SalesOrder\", initialValue = 500000000, allocationSize = 100)\n\t@Id\n\t...
{ "body": "public String getSalesOrderId() {\n\t\treturn this.salesOrderId;\n\t}", "class_method_signature": "SalesOrderHeader.getSalesOrderId()", "constructor": false, "full_signature": "public String getSalesOrderId()", "identifier": "getSalesOrderId", "invocations": [], "modifiers": "public", "parame...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_6
{ "fields": [ { "declarator": "soHeader = null", "modifier": "", "original_string": "SalesOrderHeader soHeader = null;", "type": "SalesOrderHeader", "var_name": "soHeader" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/SalesOrderHeaderTest.java", "identifier"...
{ "body": "@Test\n\tpublic void testExisitingSalesOrderHeaderSearchFind() {\n\t\tString soHeadId = \"99999\";\n\t\tEntityManager em = emf.createEntityManager();\n\t\tTestFactory tf = new TestFactory();\n\t\tSalesOrderHeader soHeaderAct = new SalesOrderHeader();\n\t\ttry {\n\t\t\t// Add Sales Order Header\n\t\t\tasser...
{ "fields": [ { "declarator": "salesOrderId", "modifier": "@TableGenerator(name = \"SalesOrderGenerator\", table = \"ESPM_ID_GENERATOR\", pkColumnName = \"GENERATOR_NAME\", valueColumnName = \"GENERATOR_VALUE\", pkColumnValue = \"SalesOrder\", initialValue = 500000000, allocationSize = 100)\n\t@Id\n\t...
{ "body": "public String getCurrencyCode() {\n\t\treturn this.currencyCode;\n\t}", "class_method_signature": "SalesOrderHeader.getCurrencyCode()", "constructor": false, "full_signature": "public String getCurrencyCode()", "identifier": "getCurrencyCode", "invocations": [], "modifiers": "public", "parame...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_5
{ "fields": [ { "declarator": "stock = null", "modifier": "", "original_string": "Stock stock = null;", "type": "Stock", "var_name": "stock" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/StockTest.java", "identifier": "StockTest", "interfaces": "", "supe...
{ "body": "@Test\n\tpublic void testExistingStockSearchTyped() {\n\t\tStock productAct = null;\n\t\tString productId = \"HY-1001\";\n\t\tEntityManager em = emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Stock\n\t\t\tassertTrue(\"Stock not...
{ "fields": [ { "declarator": "productId", "modifier": "@Id\n\t@Column(name = \"PRODUCT_ID\")\n\tprivate", "original_string": "@Id\n\t@Column(name = \"PRODUCT_ID\")\n\tprivate String productId;", "type": "String", "var_name": "productId" }, { "declarator": "quantity", ...
{ "body": "public String getProductId() {\n\t\treturn productId;\n\t}", "class_method_signature": "Stock.getProductId()", "constructor": false, "full_signature": "public String getProductId()", "identifier": "getProductId", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Strin...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_9
{ "fields": [ { "declarator": "supplier = null", "modifier": "", "original_string": "Supplier supplier = null;", "type": "Supplier", "var_name": "supplier" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/SupplierTest.java", "identifier": "SupplierTest", "int...
{ "body": "@Test\n\tpublic void testExistingSupplierSearchTyped() {\n\t\tSupplier supplierAct = null;\n\t\tString supplierId = \"11111\";\n\t\tEntityManager em = emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Supplier\n\t\t\tassertTrue(\"...
{ "fields": [ { "declarator": "supplierId", "modifier": "@TableGenerator(name = \"SupplierGenerator\", table = \"ESPM_ID_GENERATOR\", pkColumnName = \"GENERATOR_NAME\", valueColumnName = \"GENERATOR_VALUE\", pkColumnValue = \"Customer\", initialValue = 100000000, allocationSize = 100)\n\t@Id\n\t@Gener...
{ "body": "public String getSupplierId() {\n\t\treturn supplierId;\n\t}", "class_method_signature": "Supplier.getSupplierId()", "constructor": false, "full_signature": "public String getSupplierId()", "identifier": "getSupplierId", "invocations": [], "modifiers": "public", "parameters": "()", "return"...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_8
{ "fields": [ { "declarator": "supplier = null", "modifier": "", "original_string": "Supplier supplier = null;", "type": "Supplier", "var_name": "supplier" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/SupplierTest.java", "identifier": "SupplierTest", "int...
{ "body": "@Test\n\tpublic void testExistingSupplierSearchFind() {\n\t\tString supplierId = \"99999\";\n\t\tSupplier supplierAct = null;\n\t\tEntityManager em = emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Supplier\n\t\t\tassertTrue(\"S...
{ "fields": [ { "declarator": "supplierId", "modifier": "@TableGenerator(name = \"SupplierGenerator\", table = \"ESPM_ID_GENERATOR\", pkColumnName = \"GENERATOR_NAME\", valueColumnName = \"GENERATOR_VALUE\", pkColumnValue = \"Customer\", initialValue = 100000000, allocationSize = 100)\n\t@Id\n\t@Gener...
{ "body": "public String getSupplierId() {\n\t\treturn supplierId;\n\t}", "class_method_signature": "Supplier.getSupplierId()", "constructor": false, "full_signature": "public String getSupplierId()", "identifier": "getSupplierId", "invocations": [], "modifiers": "public", "parameters": "()", "return"...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_4
{ "fields": [ { "declarator": "stock = null", "modifier": "", "original_string": "Stock stock = null;", "type": "Stock", "var_name": "stock" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/StockTest.java", "identifier": "StockTest", "interfaces": "", "supe...
{ "body": "@Test\n\tpublic void testExistingStockSearchFind() {\n\t\tString productId = \"HY-1000\";\n\t\tStock productAct = null;\n\t\tEntityManager em = emf.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Stock\n\t\t\tassertTrue(\"Stock not ...
{ "fields": [ { "declarator": "productId", "modifier": "@Id\n\t@Column(name = \"PRODUCT_ID\")\n\tprivate", "original_string": "@Id\n\t@Column(name = \"PRODUCT_ID\")\n\tprivate String productId;", "type": "String", "var_name": "productId" }, { "declarator": "quantity", ...
{ "body": "public String getProductId() {\n\t\treturn productId;\n\t}", "class_method_signature": "Stock.getProductId()", "constructor": false, "full_signature": "public String getProductId()", "identifier": "getProductId", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Strin...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_10
{ "fields": [ { "declarator": "prod = null", "modifier": "", "original_string": "Product prod = null;", "type": "Product", "var_name": "prod" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/ProductCategoryTest.java", "identifier": "ProductCategoryTest", "int...
{ "body": "@Test\n\tpublic void testExistingProductCategorySearchFind() {\n\t\tProductCategory prodCatAct = null;\n\t\tString prodCategory = \"LED\";\n\t\tEntityManager em = emf.createEntityManager();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Product Category\n\t\t\tassertTrue(\"Product catego...
{ "fields": [ { "declarator": "category", "modifier": "@Id\n\t@Column(length = 40)\n\tprivate", "original_string": "@Id\n\t@Column(length = 40)\n\tprivate String category;", "type": "String", "var_name": "category" }, { "declarator": "categoryName", "modifier": "@...
{ "body": "public String getCategory() {\n\t\treturn this.category;\n\t}", "class_method_signature": "ProductCategory.getCategory()", "constructor": false, "full_signature": "public String getCategory()", "identifier": "getCategory", "invocations": [], "modifiers": "public", "parameters": "()", "retur...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_3
{ "fields": [ { "declarator": "prod = null", "modifier": "", "original_string": "Product prod = null;", "type": "Product", "var_name": "prod" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/ProductTest.java", "identifier": "ProductTest", "interfaces": "", ...
{ "body": "@Test\n\tpublic void testExistingProductSearchTyped() {\n\t\tProduct prodResult = null;\n\t\tString prodId = \"HT-9001\";\n\t\tEntityManager em = emf.createEntityManager();\n\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Product\n\t\t\tassertTrue(\"Product not created\", tf.createProduc...
{ "fields": [ { "declarator": "prices = null", "modifier": "transient private static", "original_string": "transient private static Map<String, BigDecimal> prices = null;", "type": "Map<String, BigDecimal>", "var_name": "prices" }, { "declarator": "productId", "mo...
{ "body": "public String getProductId() {\n\t\treturn this.productId;\n\t}", "class_method_signature": "Product.getProductId()", "constructor": false, "full_signature": "public String getProductId()", "identifier": "getProductId", "invocations": [], "modifiers": "public", "parameters": "()", "return":...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_2
{ "fields": [ { "declarator": "prod = null", "modifier": "", "original_string": "Product prod = null;", "type": "Product", "var_name": "prod" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/ProductTest.java", "identifier": "ProductTest", "interfaces": "", ...
{ "body": "@Test\n\tpublic void testExistingProductSearchFind() {\n\t\tProduct prodAct = null;\n\t\tString prodId = \"HT-9000\";\n\t\tEntityManager em = emf.createEntityManager();\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Product\n\t\t\tassertTrue(\"Product not created\", tf.createProduct(em, ...
{ "fields": [ { "declarator": "prices = null", "modifier": "transient private static", "original_string": "transient private static Map<String, BigDecimal> prices = null;", "type": "Map<String, BigDecimal>", "var_name": "prices" }, { "declarator": "productId", "mo...
{ "body": "public String getProductId() {\n\t\treturn this.productId;\n\t}", "class_method_signature": "Product.getProductId()", "constructor": false, "full_signature": "public String getProductId()", "identifier": "getProductId", "invocations": [], "modifiers": "public", "parameters": "()", "return":...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
62535317_11
{ "fields": [ { "declarator": "prod = null", "modifier": "", "original_string": "Product prod = null;", "type": "Product", "var_name": "prod" } ], "file": "espm-cloud-jpa/src/test/java/com/sap/espm/model/ProductCategoryTest.java", "identifier": "ProductCategoryTest", "int...
{ "body": "@Test\n\tpublic void testExistingProductcategorySearchTyped() {\n\t\tProductCategory prodCatResult = null;\n\t\tString prodCategory = \"Phablets\";\n\t\tEntityManager em = emf.createEntityManager();\n\n\t\tTestFactory tf = new TestFactory();\n\t\ttry {\n\t\t\t// Add Product\n\t\t\tassertTrue(\"Product cate...
{ "fields": [ { "declarator": "category", "modifier": "@Id\n\t@Column(length = 40)\n\tprivate", "original_string": "@Id\n\t@Column(length = 40)\n\tprivate String category;", "type": "String", "var_name": "category" }, { "declarator": "categoryName", "modifier": "@...
{ "body": "public String getCategory() {\n\t\treturn this.category;\n\t}", "class_method_signature": "ProductCategory.getCategory()", "constructor": false, "full_signature": "public String getCategory()", "identifier": "getCategory", "invocations": [], "modifiers": "public", "parameters": "()", "retur...
{ "created": null, "fork": null, "fork_count": 80, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 62535317, "size": 39241, "stargazer_count": 98, "stars": null, "updates": null, "url": "https://github.com/SAP-samples/cloud-espm-v2" }
15698466_915
{ "fields": [ { "declarator": "converterForUbuntu = new ImageToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(\n OsFamily.UBUNTU, ImmutableMap.of(\"lucid\", \"10.04\", \"maverick\", \"10.10\", \"natty\", \"11.04\", \"oneiric\",\n \"11.10\")))", "modifier...
{ "body": "@Test\n public void testWindowsServer2008R2x64() {\n String name = \"Windows Server 2008 R2 x64\";\n\n Image imageToConvert = Image.builder().id(\"id-\" + name).name(name).build();\n\n Map<OsFamily, Map<String, String>> osFamilyMap = Maps.newHashMap();\n osFamilyMap.put(OsFamily.WINDO...
{ "fields": [ { "declarator": "DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\")", "modifier": "public static final", "original_string": "public static final Pattern DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\");", "type": "Pattern", "var_name": "DEFAULT...
{ "body": "public OperatingSystem apply(final Image from) {\n OsFamily osFamily = null;\n String osVersion = null;\n\n String imageName = MoreObjects.firstNonNull(from.getName(), \"unspecified\");\n\n boolean is64Bit = true;\n\n if (imageName.indexOf(\"Windows\") != -1) {\n osFamily =...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_503
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testUseProxyForSockets() throws Exception {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.HTTP, hostAndPort, creds);\n ProxyForURI proxy = new ProxyForURI(config);\n URI uri = new URI(\"socket://ssh.example.com:22\");\n assertEquals(proxy.apply(...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_714
{ "fields": [], "file": "compute/src/test/java/org/jclouds/compute/extensions/internal/DelegatingImageExtensionTest.java", "identifier": "DelegatingImageExtensionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createImageDoesNotRegisterInCacheWhenFailed() {\n ImageCacheSupplier imageCache = createMock(ImageCacheSupplier.class);\n ImageExtension delegate = createMock(ImageExtension.class);\n AddDefaultCredentialsToImage credsToImage = createMock(AddDefaultCredentialsToImage.cl...
{ "fields": [ { "declarator": "logger = Logger.NULL", "modifier": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected", "original_string": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected Logger logger = Logger.NULL;", "type": "Logger", ...
{ "body": "public ListenableFuture<Image> createImage(final ImageTemplate template) {\n ListenableFuture<Image> future = delegate.createImage(template);\n\n // Populate the default image credentials, if missing\n future = Futures.transform(future, new Function<Image, Image>() {\n @Override\n ...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_919
{ "fields": [ { "declarator": "converterForUbuntu = new ImageToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(\n OsFamily.UBUNTU, ImmutableMap.of(\"lucid\", \"10.04\", \"maverick\", \"10.10\", \"natty\", \"11.04\", \"oneiric\",\n \"11.10\")))", "modifier...
{ "body": "@Test\n public void testTryStackOneric() {\n \n String name = \"oneiric-server-cloudimg-amd64\";\n\n Image imageToConvert = Image.builder().id(\"id-\" + name).name(name).build();\n \n OperatingSystem convertedOs = converterForUbuntu.apply(imageToConvert);\n\n assertEquals(co...
{ "fields": [ { "declarator": "DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\")", "modifier": "public static final", "original_string": "public static final Pattern DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\");", "type": "Pattern", "var_name": "DEFAULT...
{ "body": "public OperatingSystem apply(final Image from) {\n OsFamily osFamily = null;\n String osVersion = null;\n\n String imageName = MoreObjects.firstNonNull(from.getName(), \"unspecified\");\n\n boolean is64Bit = true;\n\n if (imageName.indexOf(\"Windows\") != -1) {\n osFamily =...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_718
{ "fields": [], "file": "compute/src/test/java/org/jclouds/compute/extensions/internal/DelegatingImageExtensionTest.java", "identifier": "DelegatingImageExtensionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createByCloningDoesNothingIfImageHasCredentials() throws InterruptedException, ExecutionException {\n LoginCredentials credentials = LoginCredentials.builder().user(\"jclouds\").password(\"pass\").build();\n\n ImageCacheSupplier imageCache = createMock(ImageCacheSupplier.cla...
{ "fields": [ { "declarator": "logger = Logger.NULL", "modifier": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected", "original_string": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected Logger logger = Logger.NULL;", "type": "Logger", ...
{ "body": "public ListenableFuture<Image> createImage(final ImageTemplate template) {\n ListenableFuture<Image> future = delegate.createImage(template);\n\n // Populate the default image credentials, if missing\n future = Futures.transform(future, new Function<Image, Image>() {\n @Override\n ...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_719
{ "fields": [], "file": "compute/src/test/java/org/jclouds/compute/extensions/internal/DelegatingImageExtensionTest.java", "identifier": "DelegatingImageExtensionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createByCloningAddsNodeCredentials() throws InterruptedException, ExecutionException {\n Credentials credentials = LoginCredentials.builder().user(\"jclouds\").password(\"pass\").build();\n\n ImageCacheSupplier imageCache = createMock(ImageCacheSupplier.class);\n ImageE...
{ "fields": [ { "declarator": "logger = Logger.NULL", "modifier": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected", "original_string": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected Logger logger = Logger.NULL;", "type": "Logger", ...
{ "body": "public ListenableFuture<Image> createImage(final ImageTemplate template) {\n ListenableFuture<Image> future = delegate.createImage(template);\n\n // Populate the default image credentials, if missing\n future = Futures.transform(future, new Function<Image, Image>() {\n @Override\n ...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_918
{ "fields": [ { "declarator": "converterForUbuntu = new ImageToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(\n OsFamily.UBUNTU, ImmutableMap.of(\"lucid\", \"10.04\", \"maverick\", \"10.10\", \"natty\", \"11.04\", \"oneiric\",\n \"11.10\")))", "modifier...
{ "body": "@Test\n public void testOEL() {\n String name = \"Oracle EL\";\n\n Image imageToConvert = Image.builder().id(\"id-\" + name).name(name).build();\n\n ImageToOperatingSystem converter = new ImageToOperatingSystem(\n new HashMap<OsFamily, Map<String, String>>());\n\n Operating...
{ "fields": [ { "declarator": "DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\")", "modifier": "public static final", "original_string": "public static final Pattern DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\");", "type": "Pattern", "var_name": "DEFAULT...
{ "body": "public OperatingSystem apply(final Image from) {\n OsFamily osFamily = null;\n String osVersion = null;\n\n String imageName = MoreObjects.firstNonNull(from.getName(), \"unspecified\");\n\n boolean is64Bit = true;\n\n if (imageName.indexOf(\"Windows\") != -1) {\n osFamily =...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_1197
{ "fields": [ { "declarator": "utils = null", "modifier": "", "original_string": "AWSUtils utils = null;", "type": "AWSUtils", "var_name": "utils" }, { "declarator": "command", "modifier": "private", "original_string": "private HttpCommand command;", "...
{ "body": "@Test\n public void testNoExceptionWhenNoPayload() {\n HttpResponse response = HttpResponse.builder().statusCode(BAD_REQUEST.getStatusCode()).build();\n assertNull(utils.parseAWSErrorFromContent(command.getCurrentRequest(), response));\n }", "class_method_signature": "AWSUtilsTest.testNoExc...
{ "fields": [ { "declarator": "signer", "modifier": "private final", "original_string": "private final RequestSigner signer;", "type": "RequestSigner", "var_name": "signer" }, { "declarator": "factory", "modifier": "private final", "original_string": "privat...
{ "body": "public AWSError parseAWSErrorFromContent(HttpRequest request, HttpResponse response) {\n byte[] actualPayload = response.getPayload() != null ? closeClientButKeepContentStream(response) : null;\n if (actualPayload == null || actualPayload.length == 0)\n return null;\n if (\"text/plai...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_715
{ "fields": [], "file": "compute/src/test/java/org/jclouds/compute/extensions/internal/DelegatingImageExtensionTest.java", "identifier": "DelegatingImageExtensionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createImageDoesNotRegisterInCacheWhenCancelled() {\n ImageCacheSupplier imageCache = createMock(ImageCacheSupplier.class);\n ImageExtension delegate = createMock(ImageExtension.class);\n AddDefaultCredentialsToImage credsToImage = createMock(AddDefaultCredentialsToImage...
{ "fields": [ { "declarator": "logger = Logger.NULL", "modifier": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected", "original_string": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected Logger logger = Logger.NULL;", "type": "Logger", ...
{ "body": "public ListenableFuture<Image> createImage(final ImageTemplate template) {\n ListenableFuture<Image> future = delegate.createImage(template);\n\n // Populate the default image credentials, if missing\n future = Futures.transform(future, new Function<Image, Image>() {\n @Override\n ...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_914
{ "fields": [ { "declarator": "converterForUbuntu = new ImageToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(\n OsFamily.UBUNTU, ImmutableMap.of(\"lucid\", \"10.04\", \"maverick\", \"10.10\", \"natty\", \"11.04\", \"oneiric\",\n \"11.10\")))", "modifier...
{ "body": "@Test(dataProvider = \"getOsFamilyValues\")\n public void testOsFamilyValues(OsFamily family) {\n\n Image imageToConvert = Image.builder().id(\"id-\" + family.name()).name(family.name()).build();\n\n ImageToOperatingSystem converter = new ImageToOperatingSystem(\n new HashMap<OsFamil...
{ "fields": [ { "declarator": "DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\")", "modifier": "public static final", "original_string": "public static final Pattern DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\");", "type": "Pattern", "var_name": "DEFAULT...
{ "body": "public OperatingSystem apply(final Image from) {\n OsFamily osFamily = null;\n String osVersion = null;\n\n String imageName = MoreObjects.firstNonNull(from.getName(), \"unspecified\");\n\n boolean is64Bit = true;\n\n if (imageName.indexOf(\"Windows\") != -1) {\n osFamily =...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_502
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testDontUseProxyForSockets() throws Exception {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.HTTP, hostAndPort, creds);\n ProxyForURI proxy = new ProxyForURI(config);\n Field useProxyForSockets = proxy.getClass().getDeclaredField(\"useProxyForSocket...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_509
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testHTTPThroughHTTPProxy() throws URISyntaxException {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.HTTP, hostAndPort, creds);\n URI uri = new URI(\"http://example.com/file\");\n assertEquals(new ProxyForURI(config).apply(uri), new Proxy(Proxy.Type....
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_505
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testHTTPDirect() throws URISyntaxException {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.DIRECT, noHostAndPort, noCreds);\n URI uri = new URI(\"http://example.com/file\");\n assertEquals(new ProxyForURI(config).apply(uri), Proxy.NO_PROXY);\n }", ...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_513
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testJvmProxyAlwaysPreferredOverSystem() throws URISyntaxException {\n ProxyConfig test = new MyProxyConfig(true, true, Proxy.Type.HTTP, noHostAndPort, noCreds);\n ProxyConfig jvm = new MyProxyConfig(false, true, Proxy.Type.HTTP, noHostAndPort, noCreds);\n URI uri = new ...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_713
{ "fields": [], "file": "compute/src/test/java/org/jclouds/compute/extensions/internal/DelegatingImageExtensionTest.java", "identifier": "DelegatingImageExtensionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createImageRegistersInCacheAndAddsCredentials() {\n ImageCacheSupplier imageCache = createMock(ImageCacheSupplier.class);\n ImageExtension delegate = createMock(ImageExtension.class);\n AddDefaultCredentialsToImage credsToImage = createMock(AddDefaultCredentialsToImage...
{ "fields": [ { "declarator": "logger = Logger.NULL", "modifier": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected", "original_string": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected Logger logger = Logger.NULL;", "type": "Logger", ...
{ "body": "public ListenableFuture<Image> createImage(final ImageTemplate template) {\n ListenableFuture<Image> future = delegate.createImage(template);\n\n // Populate the default image credentials, if missing\n future = Futures.transform(future, new Function<Image, Image>() {\n @Override\n ...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_512
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testJcloudsProxyHostsPreferredOverJvmProxy() throws URISyntaxException {\n ProxyConfig test = new MyProxyConfig(true, true, Proxy.Type.HTTP, hostAndPort, noCreds);\n ProxyConfig jclouds = new MyProxyConfig(false, false, Proxy.Type.HTTP, hostAndPort, noCreds);\n ProxyCon...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_504
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testUseProxyForSocketsSettingShouldntAffectHTTP() throws Exception {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.HTTP, hostAndPort, creds);\n ProxyForURI proxy = new ProxyForURI(config);\n Field useProxyForSockets = proxy.getClass().getDeclaredFiel...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_0
{ "fields": [ { "declarator": "CONTAINER_NAME = \"container\"", "modifier": "private static final", "original_string": "private static final String CONTAINER_NAME = \"container\";", "type": "String", "var_name": "CONTAINER_NAME" }, { "declarator": "blobStore", "mo...
{ "body": "@Test\n public void testRetainsOriginalOrder() {\n blobStore.createContainerInLocation(null, CONTAINER_NAME);\n for (int blobIndex = 0; blobIndex < 20; blobIndex++) {\n final Blob blob = blobStore.blobBuilder(\"prefix-\" + blobIndex).payload(\"\").build();\n blobStore.putBlob(CO...
{ "fields": [ { "declarator": "retryHandler", "modifier": "protected final", "original_string": "protected final BackoffLimitedRetryHandler retryHandler;", "type": "BackoffLimitedRetryHandler", "var_name": "retryHandler" }, { "declarator": "blobstore", "modifier":...
{ "body": "public PageSet<? extends StorageMetadata> apply(PageSet<? extends StorageMetadata> in) {\n checkState(container != null, \"container name should be initialized\");\n\n if (in == null) {\n return new PageSetImpl<>(Collections.<StorageMetadata>emptyList(), null);\n }\n\n Map<Strin...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_1200
{ "fields": [ { "declarator": "utils = null", "modifier": "", "original_string": "AWSUtils utils = null;", "type": "AWSUtils", "var_name": "utils" }, { "declarator": "command", "modifier": "private", "original_string": "private HttpCommand command;", "...
{ "body": "@Test\n public void testParseAWSErrorFromContentHttpCommandHttpResponseInputStream() {\n AWSError error = utils.parseAWSErrorFromContent(command.getCurrentRequest(), response(getClass()\n .getResourceAsStream(\"/error.xml\")));\n assertEquals(error.getCode(), \"NoSuchKey\");\n a...
{ "fields": [ { "declarator": "signer", "modifier": "private final", "original_string": "private final RequestSigner signer;", "type": "RequestSigner", "var_name": "signer" }, { "declarator": "factory", "modifier": "private final", "original_string": "privat...
{ "body": "public AWSError parseAWSErrorFromContent(HttpRequest request, HttpResponse response) {\n byte[] actualPayload = response.getPayload() != null ? closeClientButKeepContentStream(response) : null;\n if (actualPayload == null || actualPayload.length == 0)\n return null;\n if (\"text/plai...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_508
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testSocketDirect() throws URISyntaxException {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.DIRECT, noHostAndPort, noCreds);\n URI uri = new URI(\"socket://ssh.example.com:22\");\n assertEquals(new ProxyForURI(config).apply(uri), Proxy.NO_PROXY);\n ...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_589
{ "fields": [ { "declarator": "LINE_SEPARATOR = System.getProperty(\"line.separator\")", "modifier": "private static final", "original_string": "private static final String LINE_SEPARATOR = System.getProperty(\"line.separator\");", "type": "String", "var_name": "LINE_SEPARATOR" }...
{ "body": "@Test\n public void testShutdownOnClose() throws IOException {\n Injector i = Guice.createInjector();\n\n Closer closer = i.getInstance(Closer.class);\n ListeningExecutorService executor = createMock(ListeningExecutorService.class);\n ExecutorServiceModule.shutdownOnClose(executor, cl...
{ "fields": [ { "declarator": "userExecutorFromConstructor", "modifier": "final", "original_string": "final ListeningExecutorService userExecutorFromConstructor;", "type": "ListeningExecutorService", "var_name": "userExecutorFromConstructor" } ], "file": "core/src/main/java/o...
{ "body": "static <T extends ListeningExecutorService> T shutdownOnClose(final T service, Closer closer) {\n closer.addToClose(new ShutdownExecutorOnClose(service));\n return service;\n }", "class_method_signature": "ExecutorServiceModule.shutdownOnClose(final T service, Closer closer)", "constructor"...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_511
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testThroughSystemProxy() throws URISyntaxException {\n ProxyConfig config = new MyProxyConfig(true, false, Proxy.Type.HTTP, noHostAndPort, noCreds);\n URI uri = new URI(\"http://example.com/file\");\n // could return a proxy, could return NO_PROXY, depends on the tester...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_507
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testFTPDirect() throws URISyntaxException {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.DIRECT, noHostAndPort, noCreds);\n URI uri = new URI(\"ftp://ftp.example.com/file\");\n assertEquals(new ProxyForURI(config).apply(uri), Proxy.NO_PROXY);\n }"...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_506
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testHTTPSDirect() throws URISyntaxException {\n ProxyConfig config = new MyProxyConfig(false, false, Proxy.Type.DIRECT, noHostAndPort, noCreds);\n URI uri = new URI(\"https://example.com/file\");\n assertEquals(new ProxyForURI(config).apply(uri), Proxy.NO_PROXY);\n }"...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_510
{ "fields": [ { "declarator": "noHostAndPort = Optional.absent()", "modifier": "private", "original_string": "private Optional<HostAndPort> noHostAndPort = Optional.absent();", "type": "Optional<HostAndPort>", "var_name": "noHostAndPort" }, { "declarator": "noCreds = Op...
{ "body": "@Test\n public void testThroughJvmProxy() throws URISyntaxException {\n ProxyConfig config = new MyProxyConfig(false, true, Proxy.Type.HTTP, noHostAndPort, noCreds);\n URI uri = new URI(\"http://example.com/file\");\n // could return a proxy, could return NO_PROXY, depends on the tester's ...
{ "fields": [ { "declarator": "config", "modifier": "private final", "original_string": "private final ProxyConfig config;", "type": "ProxyConfig", "var_name": "config" }, { "declarator": "useProxyForSockets = true", "modifier": "@Inject(optional = true)\n @Name...
{ "body": "@Override\n public Proxy apply(URI endpoint) {\n if (!useProxyForSockets && \"socket\".equals(endpoint.getScheme())) {\n return Proxy.NO_PROXY;\n }\n if (config.getProxy().isPresent()) {\n SocketAddress addr = new InetSocketAddress(config.getProxy().get().getHost(), config....
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_917
{ "fields": [ { "declarator": "converterForUbuntu = new ImageToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(\n OsFamily.UBUNTU, ImmutableMap.of(\"lucid\", \"10.04\", \"maverick\", \"10.10\", \"natty\", \"11.04\", \"oneiric\",\n \"11.10\")))", "modifier...
{ "body": "@Test\n public void testRHEL() {\n String name = \"Red Hat EL\";\n\n Image imageToConvert = Image.builder().id(\"id-\" + name).name(name).build();\n\n ImageToOperatingSystem converter = new ImageToOperatingSystem(\n new HashMap<OsFamily, Map<String, String>>());\n\n Operati...
{ "fields": [ { "declarator": "DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\")", "modifier": "public static final", "original_string": "public static final Pattern DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\");", "type": "Pattern", "var_name": "DEFAULT...
{ "body": "public OperatingSystem apply(final Image from) {\n OsFamily osFamily = null;\n String osVersion = null;\n\n String imageName = MoreObjects.firstNonNull(from.getName(), \"unspecified\");\n\n boolean is64Bit = true;\n\n if (imageName.indexOf(\"Windows\") != -1) {\n osFamily =...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_1198
{ "fields": [ { "declarator": "utils = null", "modifier": "", "original_string": "AWSUtils utils = null;", "type": "AWSUtils", "var_name": "utils" }, { "declarator": "command", "modifier": "private", "original_string": "private HttpCommand command;", "...
{ "body": "@Test\n public void testNoExceptionParsingTextPlain() {\n HttpResponse response = HttpResponse.builder().statusCode(BAD_REQUEST.getStatusCode()).payload(\"foo bar\").build();\n response.getPayload().getContentMetadata().setContentType(TEXT_PLAIN);\n assertNull(utils.parseAWSErrorFromConten...
{ "fields": [ { "declarator": "signer", "modifier": "private final", "original_string": "private final RequestSigner signer;", "type": "RequestSigner", "var_name": "signer" }, { "declarator": "factory", "modifier": "private final", "original_string": "privat...
{ "body": "public AWSError parseAWSErrorFromContent(HttpRequest request, HttpResponse response) {\n byte[] actualPayload = response.getPayload() != null ? closeClientButKeepContentStream(response) : null;\n if (actualPayload == null || actualPayload.length == 0)\n return null;\n if (\"text/plai...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_720
{ "fields": [], "file": "compute/src/test/java/org/jclouds/compute/extensions/internal/DelegatingImageExtensionTest.java", "identifier": "DelegatingImageExtensionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createByCloningAddsDefaultImageCredentials() throws InterruptedException, ExecutionException {\n LoginCredentials credentials = LoginCredentials.builder().user(\"jclouds\").password(\"pass\").build();\n\n ImageCacheSupplier imageCache = createMock(ImageCacheSupplier.class);\...
{ "fields": [ { "declarator": "logger = Logger.NULL", "modifier": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected", "original_string": "@Resource\n @Named(ComputeServiceConstants.COMPUTE_LOGGER)\n protected Logger logger = Logger.NULL;", "type": "Logger", ...
{ "body": "public ListenableFuture<Image> createImage(final ImageTemplate template) {\n ListenableFuture<Image> future = delegate.createImage(template);\n\n // Populate the default image credentials, if missing\n future = Futures.transform(future, new Function<Image, Image>() {\n @Override\n ...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_920
{ "fields": [ { "declarator": "converterForUbuntu = new ImageToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(\n OsFamily.UBUNTU, ImmutableMap.of(\"lucid\", \"10.04\", \"maverick\", \"10.10\", \"natty\", \"11.04\", \"oneiric\",\n \"11.10\")))", "modifier...
{ "body": "@Test\n public void testTryStackNatty() {\n \n String name = \"natty-server-cloudimg-amd64\";\n\n Image imageToConvert = Image.builder().id(\"id-\" + name).name(name).build();\n \n OperatingSystem convertedOs = converterForUbuntu.apply(imageToConvert);\n\n assertEquals(conve...
{ "fields": [ { "declarator": "DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\")", "modifier": "public static final", "original_string": "public static final Pattern DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\");", "type": "Pattern", "var_name": "DEFAULT...
{ "body": "public OperatingSystem apply(final Image from) {\n OsFamily osFamily = null;\n String osVersion = null;\n\n String imageName = MoreObjects.firstNonNull(from.getName(), \"unspecified\");\n\n boolean is64Bit = true;\n\n if (imageName.indexOf(\"Windows\") != -1) {\n osFamily =...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_1199
{ "fields": [ { "declarator": "utils = null", "modifier": "", "original_string": "AWSUtils utils = null;", "type": "AWSUtils", "var_name": "utils" }, { "declarator": "command", "modifier": "private", "original_string": "private HttpCommand command;", "...
{ "body": "@Test\n public void testNoExceptionEmptyPayload() {\n RequestSigner requestSigner = createMock(RequestSigner.class);\n ParseSax.Factory factory = createMock(ParseSax.Factory.class);\n Provider provider = createMock(Provider.class);\n // these all will throw UnexpectedInvocationEx if t...
{ "fields": [ { "declarator": "signer", "modifier": "private final", "original_string": "private final RequestSigner signer;", "type": "RequestSigner", "var_name": "signer" }, { "declarator": "factory", "modifier": "private final", "original_string": "privat...
{ "body": "public AWSError parseAWSErrorFromContent(HttpRequest request, HttpResponse response) {\n byte[] actualPayload = response.getPayload() != null ? closeClientButKeepContentStream(response) : null;\n if (actualPayload == null || actualPayload.length == 0)\n return null;\n if (\"text/plai...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
15698466_916
{ "fields": [ { "declarator": "converterForUbuntu = new ImageToOperatingSystem(ImmutableMap.<OsFamily, Map<String, String>> of(\n OsFamily.UBUNTU, ImmutableMap.of(\"lucid\", \"10.04\", \"maverick\", \"10.10\", \"natty\", \"11.04\", \"oneiric\",\n \"11.10\")))", "modifier...
{ "body": "@Test\n public void testWindows98x86() {\n String name = \"Windows 98 x86\";\n\n Image imageToConvert = Image.builder().id(\"id-\" + name).name(name).build();\n\n Map<OsFamily, Map<String, String>> osFamilyMap = Maps.newHashMap();\n osFamilyMap.put(OsFamily.WINDOWS, ImmutableMap.of(\"...
{ "fields": [ { "declarator": "DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\")", "modifier": "public static final", "original_string": "public static final Pattern DEFAULT_PATTERN = Pattern.compile(\"(([^ ]*) ([0-9.]+) ?.*)\");", "type": "Pattern", "var_name": "DEFAULT...
{ "body": "public OperatingSystem apply(final Image from) {\n OsFamily osFamily = null;\n String osVersion = null;\n\n String imageName = MoreObjects.firstNonNull(from.getName(), \"unspecified\");\n\n boolean is64Bit = true;\n\n if (imageName.indexOf(\"Windows\") != -1) {\n osFamily =...
{ "created": "1/7/2014 8:00:06 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 15698466, "size": null, "stargazer_count": null, "stars": 67, "updates": "2020-01-24T14:35:12+00:00", "url": "https://github.com/apache/jclouds" }
51621524_1
{ "fields": [], "file": "app/src/test/java/com/jaeckel/etherwallet/EtherFormatterTest.java", "identifier": "EtherFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFormatEtherFraction() throws Exception {\n assertThat(EtherFormatter.formatWeiAsEther(2110000000000000000L), is(\"2.11ETH\"));\n }", "class_method_signature": "EtherFormatterTest.testFormatEtherFraction()", "constructor": false, "full_signature": "@Test public voi...
{ "fields": [], "file": "app/src/main/java/com/jaeckel/etherwallet/EtherFormatter.java", "identifier": "EtherFormatter", "interfaces": "", "methods": [ { "class_method_signature": "EtherFormatter.formatWeiAsEther(long wei)", "constructor": false, "full_signature": "public static String f...
{ "body": "public static String formatWeiAsEther(long wei) {\n double ether = (double) wei / 1000000000000000000L;\n\n return String.format(Locale.getDefault(), \"%.2f\" + \"ETH\", ether);\n }", "class_method_signature": "EtherFormatter.formatWeiAsEther(long wei)", "constructor": false, "full_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 51621524, "size": 190655, "stargazer_count": 13, "stars": null, "updates": null, "url": "https://github.com/biafra23/EtherWallet" }
51621524_0
{ "fields": [], "file": "app/src/test/java/com/jaeckel/etherwallet/EtherFormatterTest.java", "identifier": "EtherFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFormatEther() throws Exception {\n assertThat(EtherFormatter.formatWeiAsEther(2000000000000000000L), is(\"2.00ETH\"));\n }", "class_method_signature": "EtherFormatterTest.testFormatEther()", "constructor": false, "full_signature": "@Test public void testFormatEthe...
{ "fields": [], "file": "app/src/main/java/com/jaeckel/etherwallet/EtherFormatter.java", "identifier": "EtherFormatter", "interfaces": "", "methods": [ { "class_method_signature": "EtherFormatter.formatWeiAsEther(long wei)", "constructor": false, "full_signature": "public static String f...
{ "body": "public static String formatWeiAsEther(long wei) {\n double ether = (double) wei / 1000000000000000000L;\n\n return String.format(Locale.getDefault(), \"%.2f\" + \"ETH\", ether);\n }", "class_method_signature": "EtherFormatter.formatWeiAsEther(long wei)", "constructor": false, "full_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 51621524, "size": 190655, "stargazer_count": 13, "stars": null, "updates": null, "url": "https://github.com/biafra23/EtherWallet" }
51621524_2
{ "fields": [], "file": "app/src/test/java/com/jaeckel/etherwallet/EtherFormatterTest.java", "identifier": "EtherFormatterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFormatEtherFraction2() throws Exception {\n assertThat(EtherFormatter.formatWeiAsEther(2119000000000000000L), is(\"2.12ETH\"));\n }", "class_method_signature": "EtherFormatterTest.testFormatEtherFraction2()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [], "file": "app/src/main/java/com/jaeckel/etherwallet/EtherFormatter.java", "identifier": "EtherFormatter", "interfaces": "", "methods": [ { "class_method_signature": "EtherFormatter.formatWeiAsEther(long wei)", "constructor": false, "full_signature": "public static String f...
{ "body": "public static String formatWeiAsEther(long wei) {\n double ether = (double) wei / 1000000000000000000L;\n\n return String.format(Locale.getDefault(), \"%.2f\" + \"ETH\", ether);\n }", "class_method_signature": "EtherFormatter.formatWeiAsEther(long wei)", "constructor": false, "full_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 51621524, "size": 190655, "stargazer_count": 13, "stars": null, "updates": null, "url": "https://github.com/biafra23/EtherWallet" }
1933490_8
{ "fields": [ { "declarator": "service", "modifier": "@Autowired\n\tprotected", "original_string": "@Autowired\n\tprotected MyService service;", "type": "MyService", "var_name": "service" } ], "file": "SPR-11775/src/test/java/org/springframework/issues/MyServiceTest.java", ...
{ "body": "@Test(expected = ConstraintViolationException.class)\n\tpublic void exceptionWhenBeanIsNullAsync() {\n\t\tthis.service.doSomethingAsync(null);\n\t}", "class_method_signature": "MyServiceTest.exceptionWhenBeanIsNullAsync()", "constructor": false, "full_signature": "@Test(expected = ConstraintViolation...
{ "fields": [], "file": "SPR-11775/src/main/java/org/springframework/issues/MyService.java", "identifier": "MyService", "interfaces": "", "methods": [ { "class_method_signature": "MyService.doSomething(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "public v...
{ "body": "@Async\n\tpublic void doSomethingAsync(@NotNull @Valid final MyBean bean) {\n\t\tSystem.out.println(\"do something async\");\n\t}", "class_method_signature": "MyService.doSomethingAsync(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "@Async public void doSomethingAsync(@...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_4
{ "fields": [ { "declarator": "template", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate Neo4jTemplate template;", "type": "Neo4jTemplate", "var_name": "template" } ], "file": "SPR-8824/src/test/java/org/springframework/data/neo4j/examples/hell...
{ "body": "@Test\n public void shouldHaveNullNameUsingDefaultConstructor()\n {\n World w = new World();\n assertNull(w.getName());\n }", "class_method_signature": "WorldTest.shouldHaveNullNameUsingDefaultConstructor()", "constructor": false, "full_signature": "@Test public void shouldHave...
{ "fields": [ { "declarator": "name", "modifier": "@Indexed\n private", "original_string": "@Indexed\n private String name;", "type": "String", "var_name": "name" }, { "declarator": "moons", "modifier": "@Indexed(indexName = \"moon-index\")\n private", ...
{ "body": "public String getName()\n {\n return name;\n }", "class_method_signature": "World.getName()", "constructor": false, "full_signature": "public String getName()", "identifier": "getName", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "signatu...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_5
{ "fields": [ { "declarator": "template", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private Neo4jTemplate template;", "type": "Neo4jTemplate", "var_name": "template" } ], "file": "SPR-8824/src/test/java/org/springframework/data/neo4j/examples/...
{ "body": "@Test\n public void testCountMoons() throws Exception {\n WorldCounter counter = new WorldCounter();\n Map<String,Integer> result = counter.countMoons(asList(new World(\"earth\", 1)));\n assertEquals(\"earth has one moon\",(Integer)1,result.get(\"earth\"));\n }", "class_method_...
{ "fields": [], "file": "SPR-8824/src/main/java/org/springframework/data/neo4j/examples/hellograph/WorldCounter.java", "identifier": "WorldCounter", "interfaces": "", "methods": [ { "class_method_signature": "WorldCounter.countMoons(Iterable<World> worlds)", "constructor": false, "full_s...
{ "body": "public Map<String, Integer> countMoons(Iterable<World> worlds) {\n Map<String, Integer> moons = new HashMap<String, Integer>();\n for (World world : worlds) {\n moons.put(world.getName(), world.getMoons());\n }\n return moons;\n }", "class_method_signature": "Wor...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_9
{ "fields": [ { "declarator": "service", "modifier": "@Autowired\n\tprotected", "original_string": "@Autowired\n\tprotected MyService service;", "type": "MyService", "var_name": "service" } ], "file": "SPR-11775/src/test/java/org/springframework/issues/MyServiceTest.java", ...
{ "body": "@Test(expected = ConstraintViolationException.class)\n\tpublic void exceptionWhenBeanIsInvalidAsync() {\n\t\tthis.service.doSomethingAsync(new MyBean());\n\t}", "class_method_signature": "MyServiceTest.exceptionWhenBeanIsInvalidAsync()", "constructor": false, "full_signature": "@Test(expected = Const...
{ "fields": [], "file": "SPR-11775/src/main/java/org/springframework/issues/MyService.java", "identifier": "MyService", "interfaces": "", "methods": [ { "class_method_signature": "MyService.doSomething(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "public v...
{ "body": "@Async\n\tpublic void doSomethingAsync(@NotNull @Valid final MyBean bean) {\n\t\tSystem.out.println(\"do something async\");\n\t}", "class_method_signature": "MyService.doSomethingAsync(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "@Async public void doSomethingAsync(@...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_2
{ "fields": [ { "declarator": "logger = LogManager.getLogger(TestDefaultController.class)", "modifier": "private static", "original_string": "private static Logger logger = LogManager.getLogger(TestDefaultController.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@Test\n public void testMyinfo() throws Exception {\n MvcResult mvcResult = mockMvc.perform(post(\"/user/myinfo\").principal(new TestingAuthenticationToken(\"admin\", null)))\n .andExpect(request().asyncStarted()).andExpect(request().asyncResult(is(not(isEmptyOrNullString())))).and...
{ "fields": [ { "declarator": "logger = LogManager.getLogger(DefaultController.class)", "modifier": "private static", "original_string": "private static Logger logger = LogManager.getLogger(DefaultController.class);", "type": "Logger", "var_name": "logger" }, { "declara...
{ "body": "@RequestMapping(\"/user/myinfo\")\n public Callable<String> myinfo(final HttpServletRequest request, final Principal principal) {\n\n return new Callable<String>() {\n @Override\n public String call() throws Exception {\n request.setAttribute(\"member\", membe...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_3
{ "fields": [ { "declarator": "logger = LogManager.getLogger(TestDefaultController.class)", "modifier": "private static", "original_string": "private static Logger logger = LogManager.getLogger(TestDefaultController.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@Test\n public void testUserInfo() throws Exception {\n MvcResult mvcResult = mockMvc.perform(post(\"/admin/user/{account}\", \"admin\"))\n .andExpect(request().asyncStarted()).andExpect(request().asyncResult(is(not(isEmptyOrNullString())))).andReturn();\n mvcResult = mockMv...
{ "fields": [ { "declarator": "logger = LogManager.getLogger(DefaultController.class)", "modifier": "private static", "original_string": "private static Logger logger = LogManager.getLogger(DefaultController.class);", "type": "Logger", "var_name": "logger" }, { "declara...
{ "body": "@RequestMapping(\"/admin/user/{account}\")\n public Callable<String> userinfo(final @PathVariable Member account, final HttpServletRequest request) {\n return new Callable<String>() {\n @Override\n public String call() throws Exception {\n if (account != null)...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_0
{ "fields": [ { "declarator": "client", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private WebTestClient client;", "type": "WebTestClient", "var_name": "client" } ], "file": "SPR-15701/src/test/java/org/springframework/issues/errorhandling/Hell...
{ "body": "@Test\n public void testHello() {\n\n final String response = client.get().uri(\"hello\").exchange().expectBody(String.class).returnResult().getResponseBody();\n assertEquals(HelloController.ERROR_MSG, response);\n }", "class_method_signature": "HelloControllerTest.testHello()", "co...
{ "fields": [ { "declarator": "ERROR_MSG = \"An error occurred!\"", "modifier": "public static final", "original_string": "public static final String ERROR_MSG = \"An error occurred!\";", "type": "String", "var_name": "ERROR_MSG" } ], "file": "SPR-15701/src/main/java/org/spri...
{ "body": "@RequestMapping(\"/hello\")\n public String hello() {\n final NestedException nested = new NestedException(\"nested\");\n throw new CustomException(\"outer\", nested);\n }", "class_method_signature": "HelloController.hello()", "constructor": false, "full_signature": "@RequestMappi...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_1
{ "fields": [ { "declarator": "logger = LogManager.getLogger(TestDefaultController.class)", "modifier": "private static", "original_string": "private static Logger logger = LogManager.getLogger(TestDefaultController.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@Test\n public void testListuser() throws Exception {\n String ql = new StringBuilder(\"SELECT COUNT(\").append(memberManager.getAliasName()).append(\") FROM \")\n .append(memberManager.getEntityName()).append(\" AS \").append(memberManager.getAliasName())\n .append(...
{ "fields": [ { "declarator": "logger = LogManager.getLogger(DefaultController.class)", "modifier": "private static", "original_string": "private static Logger logger = LogManager.getLogger(DefaultController.class);", "type": "Logger", "var_name": "logger" }, { "declara...
{ "body": "@RequestMapping(value = \"/admin/users\", method = RequestMethod.POST, produces = \"application/json;charset=UTF-8\")\n @ResponseBody\n public Callable<String> listuser() {\n return new Callable<String>() {\n @Override\n public String call() throws Exception {\n ...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_6
{ "fields": [ { "declarator": "service", "modifier": "@Autowired\n\tprotected", "original_string": "@Autowired\n\tprotected MyService service;", "type": "MyService", "var_name": "service" } ], "file": "SPR-11775/src/test/java/org/springframework/issues/MyServiceTest.java", ...
{ "body": "@Test(expected = ConstraintViolationException.class)\n\tpublic void exceptionWhenBeanIsNull() {\n\t\tthis.service.doSomething(null);\n\t}", "class_method_signature": "MyServiceTest.exceptionWhenBeanIsNull()", "constructor": false, "full_signature": "@Test(expected = ConstraintViolationException.class...
{ "fields": [], "file": "SPR-11775/src/main/java/org/springframework/issues/MyService.java", "identifier": "MyService", "interfaces": "", "methods": [ { "class_method_signature": "MyService.doSomething(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "public v...
{ "body": "public void doSomething(@NotNull @Valid final MyBean bean) {\n\t\tSystem.out.println(\"do something\");\n\t}", "class_method_signature": "MyService.doSomething(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "public void doSomething(@NotNull @Valid final MyBean bean)", ...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
1933490_7
{ "fields": [ { "declarator": "service", "modifier": "@Autowired\n\tprotected", "original_string": "@Autowired\n\tprotected MyService service;", "type": "MyService", "var_name": "service" } ], "file": "SPR-11775/src/test/java/org/springframework/issues/MyServiceTest.java", ...
{ "body": "@Test(expected = ConstraintViolationException.class)\n\tpublic void exceptionWhenBeanIsInvalid() {\n\t\tthis.service.doSomething(new MyBean());\n\t}", "class_method_signature": "MyServiceTest.exceptionWhenBeanIsInvalid()", "constructor": false, "full_signature": "@Test(expected = ConstraintViolationE...
{ "fields": [], "file": "SPR-11775/src/main/java/org/springframework/issues/MyService.java", "identifier": "MyService", "interfaces": "", "methods": [ { "class_method_signature": "MyService.doSomething(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "public v...
{ "body": "public void doSomething(@NotNull @Valid final MyBean bean) {\n\t\tSystem.out.println(\"do something\");\n\t}", "class_method_signature": "MyService.doSomething(@NotNull @Valid final MyBean bean)", "constructor": false, "full_signature": "public void doSomething(@NotNull @Valid final MyBean bean)", ...
{ "created": null, "fork": null, "fork_count": 177, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1933490, "size": 4414, "stargazer_count": 79, "stars": null, "updates": null, "url": "https://github.com/spring-projects/spring-framework-issues" }
129699491_23
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/BeanDefinitionsTest.java", "identifier": "BeanDefinitionsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void extract_class_throws_when_beanclass_is_not_in_classpath() {\n RootBeanDefinition beanDefinition = new RootBeanDefinition();\n beanDefinition.setBeanClassName(\"missing.Someclass\");\n\n assertThatExceptionOfType(IllegalStateException.class)\n .isThrownBy(() -...
{ "fields": [ { "declarator": "BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader()", "modifier": "private static final", "original_string": "private static final ClassLoader BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader();", "type": "ClassLoader", "var_name": "BEAN_CLASS_LO...
{ "body": "public static Class<?> extractClass(AbstractBeanDefinition beanDefinition) {\n AbstractBeanDefinition abd = beanDefinition;\n try {\n Class<?> beanClazz = abd.resolveBeanClass(BEAN_CLASS_LOADER);\n MethodMetadata factoryMetadata = getMethodMetadata(beanDefinition);\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_19
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/AnnotationsTest.java", "identifier": "AnnotationsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void search_annotated_annotations() {\n Set<Annotations.AnnotatedAnnotation<MarkingAnnotation>> annotationSet = Annotations.getAnnotationsAnnotatedWith(SampleAnnotatedClass.class, MarkingAnnotation.class);\n\n assertThat(annotationSet)\n .as(\"Annotated annotations\")\n ...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Annotations.java", "identifier": "Annotations", "interfaces": "", "methods": [ { "class_method_signature": "Annotations.Annotations()", "constructor": true, "full_signature": "private Annotation...
{ "body": "public static <A extends Annotation> Set<AnnotatedAnnotation<A>> getAnnotationsAnnotatedWith(AnnotatedElement annotatedElement, Class<A> annotationType) {\n return getAnnotationsAnnotatedWith(annotatedElement, annotationType, new LinkedHashSet<>());\n }", "class_method_signature": "Annotations....
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_3
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/api/tools/BeanLocatorTest.java", "identifier": "BeanLocatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void getBeanByPartialName_returns_when_one_bean_matches() {\n ApplicationContext applicationContext = mock(ApplicationContext.class);\n BeanLocator beanLocator = new BeanLocator(applicationContext);\n\n when(applicationContext.getBeansOfType(String.class))\n .then...
{ "fields": [ { "declarator": "applicationContext", "modifier": "private final", "original_string": "private final ApplicationContext applicationContext;", "type": "ApplicationContext", "var_name": "applicationContext" } ], "file": "spring-automocker/src/main/java/com/github/...
{ "body": "public <T> T getBeanByPartialName(String partialName, Class<T> beanClass) {\n Map<String, T> matchingBeansByName = applicationContext.getBeansOfType(beanClass)\n .entrySet()\n .stream()\n .filter(beanAndName -> beanAndName.getKey().contains(partialName))\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_15
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/ClassesTest.java", "identifier": "ClassesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void forName_returns_class_object_when_present_on_classpath() {\n assertThat(Classes.forName(\"java.lang.String\")).isEqualTo(String.class);\n }", "class_method_signature": "ClassesTest.forName_returns_class_object_when_present_on_classpath()", "constructor": false, "full_signatu...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Classes.java", "identifier": "Classes", "interfaces": "", "methods": [ { "class_method_signature": "Classes.Classes()", "constructor": true, "full_signature": "private Classes()", "identif...
{ "body": "public static Class<?> forName(String className) {\n try {\n return Class.forName(className);\n } catch (ClassNotFoundException e) {\n throw new IllegalStateException(\"Cannot load class \" + className);\n }\n }", "class_method_signature": "Classes.forName(St...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_2
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/api/tools/BeanLocatorTest.java", "identifier": "BeanLocatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void getBean_throws_when_more_than_one_bean_matches() {\n ApplicationContext applicationContext = mock(ApplicationContext.class);\n BeanLocator beanLocator = new BeanLocator(applicationContext);\n\n when(applicationContext.getBeansOfType(String.class))\n .thenRetu...
{ "fields": [ { "declarator": "applicationContext", "modifier": "private final", "original_string": "private final ApplicationContext applicationContext;", "type": "ApplicationContext", "var_name": "applicationContext" } ], "file": "spring-automocker/src/main/java/com/github/...
{ "body": "public <T> T getBean(Class<T> beanClass) throws IllegalArgumentException {\n Map<String, T> matchingBeansByName = applicationContext.getBeansOfType(beanClass);\n return getOnlyOneOrThrow(beanClass.getSimpleName(), matchingBeansByName);\n }", "class_method_signature": "BeanLocator.getBean...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_14
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/ClassesTest.java", "identifier": "ClassesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void isPresent_returns_false_when_class_is_not_on_classpath() {\n assertThat(Classes.isPresent(\"missing.Someclass\")).isFalse();\n }", "class_method_signature": "ClassesTest.isPresent_returns_false_when_class_is_not_on_classpath()", "constructor": false, "full_signature": "@Test...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Classes.java", "identifier": "Classes", "interfaces": "", "methods": [ { "class_method_signature": "Classes.Classes()", "constructor": true, "full_signature": "private Classes()", "identif...
{ "body": "public static boolean isPresent(String className) {\n try {\n Class.forName(className);\n return true;\n } catch (ClassNotFoundException | NoClassDefFoundError e) {\n return false;\n }\n }", "class_method_signature": "Classes.isPresent(String class...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_18
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/ClassesTest.java", "identifier": "ClassesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void getValueFromProtectedField_when_field_does_not_exist() {\n Object object = new Instanciable();\n assertThatExceptionOfType(IllegalStateException.class)\n .isThrownBy(() -> Classes.getValueFromProtectedField(object, \"missingField\"))\n .withMessage(\"Cann...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Classes.java", "identifier": "Classes", "interfaces": "", "methods": [ { "class_method_signature": "Classes.Classes()", "constructor": true, "full_signature": "private Classes()", "identif...
{ "body": "public static <T> T getValueFromProtectedField(Object object, String fieldName) {\n Class<?> clazz = object.getClass();\n try {\n Field field = clazz.getDeclaredField(fieldName);\n if (!field.isAccessible()) {\n field.setAccessible(true);\n }\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_22
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/BeanDefinitionsTest.java", "identifier": "BeanDefinitionsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void extract_class_throws_when_beanclass_is_not_set() {\n RootBeanDefinition beanDefinition = new RootBeanDefinition();\n\n assertThatExceptionOfType(IllegalStateException.class)\n .isThrownBy(() -> BeanDefinitions.extractClass(beanDefinition))\n .withMessageC...
{ "fields": [ { "declarator": "BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader()", "modifier": "private static final", "original_string": "private static final ClassLoader BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader();", "type": "ClassLoader", "var_name": "BEAN_CLASS_LO...
{ "body": "public static Class<?> extractClass(AbstractBeanDefinition beanDefinition) {\n AbstractBeanDefinition abd = beanDefinition;\n try {\n Class<?> beanClazz = abd.resolveBeanClass(BEAN_CLASS_LOADER);\n MethodMetadata factoryMetadata = getMethodMetadata(beanDefinition);\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_5
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/api/tools/BeanLocatorTest.java", "identifier": "BeanLocatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void getBeanByPartialName_throws_when_more_than_one_bean_matches() {\n ApplicationContext applicationContext = mock(ApplicationContext.class);\n BeanLocator beanLocator = new BeanLocator(applicationContext);\n\n when(applicationContext.getBeansOfType(String.class))\n ...
{ "fields": [ { "declarator": "applicationContext", "modifier": "private final", "original_string": "private final ApplicationContext applicationContext;", "type": "ApplicationContext", "var_name": "applicationContext" } ], "file": "spring-automocker/src/main/java/com/github/...
{ "body": "public <T> T getBeanByPartialName(String partialName, Class<T> beanClass) {\n Map<String, T> matchingBeansByName = applicationContext.getBeansOfType(beanClass)\n .entrySet()\n .stream()\n .filter(beanAndName -> beanAndName.getKey().contains(partialName))\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_13
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/ClassesTest.java", "identifier": "ClassesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void isPresent_returns_true_when_class_is_on_classpath() {\n assertThat(Classes.isPresent(\"java.lang.String\")).isTrue();\n }", "class_method_signature": "ClassesTest.isPresent_returns_true_when_class_is_on_classpath()", "constructor": false, "full_signature": "@Test void isPres...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Classes.java", "identifier": "Classes", "interfaces": "", "methods": [ { "class_method_signature": "Classes.Classes()", "constructor": true, "full_signature": "private Classes()", "identif...
{ "body": "public static boolean isPresent(String className) {\n try {\n Class.forName(className);\n return true;\n } catch (ClassNotFoundException | NoClassDefFoundError e) {\n return false;\n }\n }", "class_method_signature": "Classes.isPresent(String class...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_25
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/BeanDefinitionsTest.java", "identifier": "BeanDefinitionsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void extractQualifier_for_scanned_quality_qualifier() {\n ApplicationContext context = new AnnotationConfigApplicationContext(TestConfiguration.class);\n\n BeanDefinition beanDefinition = ((AnnotationConfigApplicationContext) context).getBeanDefinition(\"test2_serializable\");\n\n ...
{ "fields": [ { "declarator": "BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader()", "modifier": "private static final", "original_string": "private static final ClassLoader BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader();", "type": "ClassLoader", "var_name": "BEAN_CLASS_LO...
{ "body": "public static Map<String, Object> extractQualifiers(BeanDefinition beanDefinition) {\n Map<String, Object> qualifiers = new LinkedHashMap<>();\n if (beanDefinition instanceof AnnotatedBeanDefinition) {\n MethodMetadata factoryMethodMetadata = ((AnnotatedBeanDefinition) beanDefiniti...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_9
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/context/ExtendedBeanDefinitionRegistryImplTest.java", "identifier": "ExtendedBeanDefinitionRegistryImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void register_linked_bean_definition_delegates() {\n AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ExtendedBeanDefinitionRegistryImplTest.TestConfiguration.class);\n ExtendedBeanDefinitionRegistry extendedRegistry = new ExtendedBeanDefinitionRe...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final BeanDefinitionRegistry registry;", "type": "BeanDefinitionRegistry", "var_name": "registry" } ], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/con...
{ "body": "@Override\n public Set<BeanDefinitionMetadata> getBeanDefinitionsForClass(Class<?> clazz) {\n Set<BeanDefinitionMetadata> result = new HashSet<>();\n\n for (String beanName : registry.getBeanDefinitionNames()) {\n BeanDefinition beanDefinition = registry.getBeanDefinition(beanNa...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_8
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/context/ExtendedBeanDefinitionRegistryImplTest.java", "identifier": "ExtendedBeanDefinitionRegistryImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void register_bean_definition_delegates() {\n BeanDefinitionRegistry delegate = mock(BeanDefinitionRegistry.class);\n ExtendedBeanDefinitionRegistry extendedRegistry = new ExtendedBeanDefinitionRegistryImpl(delegate);\n\n extendedRegistry.registerBeanDefinition(\"test\", nul...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final BeanDefinitionRegistry registry;", "type": "BeanDefinitionRegistry", "var_name": "registry" } ], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/con...
{ "body": "@Override\n public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) {\n registry.registerBeanDefinition(beanName, beanDefinition);\n }", "class_method_signature": "ExtendedBeanDefinitionRegistryImpl.registerBeanDefinition(String beanName, BeanDefinition beanDefinit...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_24
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/BeanDefinitionsTest.java", "identifier": "BeanDefinitionsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void extractQualifier_for_simple_qualifier() {\n ApplicationContext context = new AnnotationConfigApplicationContext(TestConfiguration.class);\n\n BeanDefinition beanDefinition = ((AnnotationConfigApplicationContext) context).getBeanDefinition(\"test1_serializable\");\n\n Ma...
{ "fields": [ { "declarator": "BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader()", "modifier": "private static final", "original_string": "private static final ClassLoader BEAN_CLASS_LOADER = ClassUtils.getDefaultClassLoader();", "type": "ClassLoader", "var_name": "BEAN_CLASS_LO...
{ "body": "public static Map<String, Object> extractQualifiers(BeanDefinition beanDefinition) {\n Map<String, Object> qualifiers = new LinkedHashMap<>();\n if (beanDefinition instanceof AnnotatedBeanDefinition) {\n MethodMetadata factoryMethodMetadata = ((AnnotatedBeanDefinition) beanDefiniti...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_4
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/api/tools/BeanLocatorTest.java", "identifier": "BeanLocatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void getBeanByPartialName_throws_when_no_bean_matches() {\n ApplicationContext applicationContext = mock(ApplicationContext.class);\n BeanLocator beanLocator = new BeanLocator(applicationContext);\n\n when(applicationContext.getBeansOfType(String.class))\n .thenRe...
{ "fields": [ { "declarator": "applicationContext", "modifier": "private final", "original_string": "private final ApplicationContext applicationContext;", "type": "ApplicationContext", "var_name": "applicationContext" } ], "file": "spring-automocker/src/main/java/com/github/...
{ "body": "public <T> T getBeanByPartialName(String partialName, Class<T> beanClass) {\n Map<String, T> matchingBeansByName = applicationContext.getBeansOfType(beanClass)\n .entrySet()\n .stream()\n .filter(beanAndName -> beanAndName.getKey().contains(partialName))\n ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_12
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/ClassesTest.java", "identifier": "ClassesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void failed_instanciation() {\n assertThatExceptionOfType(IllegalStateException.class)\n .isThrownBy(() -> Classes.instanciate(Uninstanciable.class))\n .withMessage(\"Cannot instanciate class \" +\n Uninstanciable.class.getName() +\n \":...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Classes.java", "identifier": "Classes", "interfaces": "", "methods": [ { "class_method_signature": "Classes.Classes()", "constructor": true, "full_signature": "private Classes()", "identif...
{ "body": "public static <T> T instanciate(Class<? extends T> clazz) {\n try {\n return clazz.newInstance();\n } catch (InstantiationException | IllegalAccessException e) {\n throw new IllegalStateException(\"Cannot instanciate class \" + clazz.getName() + \": \" + e.getMessage(), ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_28
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/MapsTest.java", "identifier": "MapsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void odd_number_of_key_and_values() {\n assertThatExceptionOfType(IllegalArgumentException.class)\n .isThrownBy(() -> Maps.build(String.class, \"key1\"))\n .withMessage(\"keysAndValues array must be even\");\n }", "class_method_signature": "MapsTest.odd_number_o...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Maps.java", "identifier": "Maps", "interfaces": "", "methods": [ { "class_method_signature": "Maps.build(Class<K> keyClas, Object... keysAndValues)", "constructor": false, "full_signature": "@Sup...
{ "body": "@SuppressWarnings(\"unchecked\")\n public static <K, V> Map<K, V> build(Class<K> keyClas, Object... keysAndValues) {\n if (keysAndValues.length % 2 != 0) {\n throw new IllegalArgumentException(\"keysAndValues array must be even\");\n }\n Map<K, V> map = new HashMap<>();\n...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_7
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/context/ExtendedBeanDefinitionRegistryImplTest.java", "identifier": "ExtendedBeanDefinitionRegistryImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void list_bean_definitions_by_type() {\n AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ExtendedBeanDefinitionRegistryImplTest.TestConfiguration.class);\n ExtendedBeanDefinitionRegistry extendedRegistry = new ExtendedBeanDefinitionRegistryImpl(c...
{ "fields": [ { "declarator": "registry", "modifier": "private final", "original_string": "private final BeanDefinitionRegistry registry;", "type": "BeanDefinitionRegistry", "var_name": "registry" } ], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/con...
{ "body": "@Override\n public Set<BeanDefinitionMetadata> getBeanDefinitionsForClass(Class<?> clazz) {\n Set<BeanDefinitionMetadata> result = new HashSet<>();\n\n for (String beanName : registry.getBeanDefinitionNames()) {\n BeanDefinition beanDefinition = registry.getBeanDefinition(beanNa...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }
129699491_11
{ "fields": [], "file": "spring-automocker/src/test/java/com/github/fridujo/automocker/utils/ClassesTest.java", "identifier": "ClassesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void successful_instanciation() {\n Instanciable instance = Classes.instanciate(Instanciable.class);\n\n assertThat(instance).isExactlyInstanceOf(Instanciable.class);\n }", "class_method_signature": "ClassesTest.successful_instanciation()", "constructor": false, "full_sign...
{ "fields": [], "file": "spring-automocker/src/main/java/com/github/fridujo/automocker/utils/Classes.java", "identifier": "Classes", "interfaces": "", "methods": [ { "class_method_signature": "Classes.Classes()", "constructor": true, "full_signature": "private Classes()", "identif...
{ "body": "public static <T> T instanciate(Class<? extends T> clazz) {\n try {\n return clazz.newInstance();\n } catch (InstantiationException | IllegalAccessException e) {\n throw new IllegalStateException(\"Cannot instanciate class \" + clazz.getName() + \": \" + e.getMessage(), ...
{ "created": null, "fork": null, "fork_count": 3, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 129699491, "size": 185, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/fridujo/spring-automocker" }