id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
17278009_131 | {
"fields": [
{
"declarator": "httpNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private HTTPNetServiceDiscoveryComponent httpNetServiceDiscoveryComponent;",
"type": "HTTPNetServiceDiscoveryComponent",
"var_name": "httpNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testNotAValidPortNumberForManualProxyMode() {\n String configProxyPort = \"99999999\";\n try {\n configuration.setSimpleValue(PROXY_MODE, MANUAL.name());\n configuration.setSimpleValue(PROXY_HOST, \"www.proxy.net\");\n configuration.setS... | {
"fields": [],
"file": "modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceDiscoveryComponent.java",
"identifier": "HTTPNetServiceDiscoveryComponent",
"interfaces": "implements ResourceDiscoveryComponent, ManualAddFacet",
"methods": [
{
"class_method_signature": "HT... | {
"body": "@Override\n public DiscoveredResourceDetails discoverResource(Configuration config,\n ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException {\n // Get the component configuration. This call will also make configuration checks\n HTTPNetServiceC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_218 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/configuration/RawConfigurationTest.java",
"identifier": "RawConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void verifyEqualsWhenRawConfigurationArgHasNullContents() {\n RawConfiguration r1 = new RawConfiguration();\n setContentsAndSha256(r1, \"contents\");\n\n RawConfiguration r2 = new RawConfiguration();\n\n assertFalse(r1.equals(r2), \"equals() should return false... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "id",
"modifier": "@GeneratedValue(g... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof RawConfiguration) {\n RawConfiguration that = (RawConfiguration) obj;\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_189 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetCpu() throws Exception {\n assertTrue(procCpu == processInfo.getCpu());\n // Change procCpu\n procCpu = Mockito.mock(ProcCpu.class);\n when(sigarProxy.getProcCpu(PID)).thenReturn(procCpu);\n // Should not be same until refresh is called\n ... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "@Deprecated\n public ProcCpu getCpu() throws SystemInfoException {\n return priorSnaphot().getCpu();\n }",
"class_method_signature": "ProcessInfo.getCpu()",
"constructor": false,
"full_signature": "@Deprecated public ProcCpu getCpu()",
"identifier": "getCpu",
"invocations": [
"ge... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_35 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByChangeSetCriteriaWithCategoryFilter() throws Exception {\n MongoDBChangeSet c1 = new MongoDBChangeSet();\n c1.setCategory(COVERAGE);\n c1.setVersion(1);\n c1.setResourceId(1);\n c1.setDriftDefinitionId(1);\n dao.save(... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByChangeSetCritiera(DriftChangeSetCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n \n if (criteria.getFilterId() != null) {\n // There is no need to apply any additional filters if the id filter is specified\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_166 | {
"fields": [],
"file": "modules/core/plugin-api/src/test/java/org/rhq/core/pluginapi/content/JarContentDelegateTest.java",
"identifier": "JarContentDelegateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDiscoverDeployedPackages() throws Exception {\n //tell the method story as it happens: mock or create dependencies and configure\n //those dependencies to get the method under test to completion.\n File mockDirectory = mock(File.class);\n when(mockDire... | {
"fields": [
{
"declarator": "MIME_TYPE_JAR = \"application/java-archive\"",
"modifier": "private static final",
"original_string": "private static final String MIME_TYPE_JAR = \"application/java-archive\";",
"type": "String",
"var_name": "MIME_TYPE_JAR"
},
{
"declarat... | {
"body": "@Override\n public Set<ResourcePackageDetails> discoverDeployedPackages() {\n Set<ResourcePackageDetails> packages = new HashSet<ResourcePackageDetails>();\n\n File[] files = this.getDirectory().listFiles(new FileFilter() {\n public boolean accept(File pathname) {\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_7 | {
"fields": [],
"file": "modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/rest/helper/ResourceCriteriaHelperTest.java",
"identifier": "ResourceCriteriaHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = { BadArgumentException.class }, expectedExceptionsMessageRegExp = \".*is not valid.*\")\n public void testNumericParamInvalidValue() {\n MultivaluedMap<String, String> params = new MultivaluedMapImpl<String, String>();\n params.putSingle(\"id\", \"FOO\");\n ... | {
"fields": [
{
"declarator": "SPECIAL_PARAMS = Arrays.asList(\"page\", \"ps\", \"strict\")",
"modifier": "private static final",
"original_string": "private static final List<String> SPECIAL_PARAMS = Arrays.asList(\"page\", \"ps\", \"strict\");",
"type": "List<String>",
"var_name": ... | {
"body": "public static ResourceCriteria create(MultivaluedMap<String,String> params) {\n ResourceCriteria criteria = new ResourceCriteria();\n criteria.clearPaging();\n Method[] methods = ResourceCriteria.class.getMethods();\n for (Entry<String, List<String>> e : params.entrySet()) {\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_188 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetMemory() throws Exception {\n assertTrue(procMem == processInfo.getMemory());\n // Change procMem\n procMem = Mockito.mock(ProcMem.class);\n when(sigarProxy.getProcMem(PID)).thenReturn(procMem);\n // Should not be same until refresh is called... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "@Deprecated\n public ProcMem getMemory() throws SystemInfoException {\n return priorSnaphot().getMemory();\n }",
"class_method_signature": "ProcessInfo.getMemory()",
"constructor": false,
"full_signature": "@Deprecated public ProcMem getMemory()",
"identifier": "getMemory",
"invocati... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_34 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByChangeSetCriteriaWithDirectoryFilter() throws Exception {\n MongoDBChangeSet c1 = new MongoDBChangeSet();\n c1.setCategory(DRIFT);\n c1.setVersion(1);\n c1.setResourceId(1);\n c1.setDriftDefinitionId(1);\n\n MongoDBCh... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByChangeSetCritiera(DriftChangeSetCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n \n if (criteria.getFilterId() != null) {\n // There is no need to apply any additional filters if the id filter is specified\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_167 | {
"fields": [
{
"declarator": "ENABLED = true",
"modifier": "private static final",
"original_string": "private static final boolean ENABLED = true;",
"type": "boolean",
"var_name": "ENABLED"
}
],
"file": "modules/core/native-system/src/test/java/org/rhq/core/system/NativeSys... | {
"body": "@Test(enabled = ENABLED)\n public void testGetNetworkConnections() {\n SystemInfo sysinfo = SystemInfoFactory.createSystemInfo();\n\n if (!sysinfo.isNative()) {\n System.out.println(\"~~~ Native library is not available - skipping testGetNetworkConnections\");\n retur... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(NativeSystemInfo.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(NativeSystemInfo.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "sigar",
"mod... | {
"body": "public List<NetConnection> getNetworkConnections(String addressName, int port) {\n try {\n int flags = NetFlags.CONN_SERVER | NetFlags.CONN_CLIENT | NetFlags.CONN_TCP;\n NetConnection[] conns = sigar.getNetConnectionList(flags);\n\n InetAddress matchAddress = (addres... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_6 | {
"fields": [],
"file": "modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/rest/helper/ResourceCriteriaHelperTest.java",
"identifier": "ResourceCriteriaHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = { BadArgumentException.class }, expectedExceptionsMessageRegExp = \".*inventoryStatus is bad.*\")\n public void testEnumParamInvalidValue() {\n MultivaluedMap<String, String> params = new MultivaluedMapImpl<String, String>();\n params.putSingle(\"inventoryStatus\... | {
"fields": [
{
"declarator": "SPECIAL_PARAMS = Arrays.asList(\"page\", \"ps\", \"strict\")",
"modifier": "private static final",
"original_string": "private static final List<String> SPECIAL_PARAMS = Arrays.asList(\"page\", \"ps\", \"strict\");",
"type": "List<String>",
"var_name": ... | {
"body": "public static ResourceCriteria create(MultivaluedMap<String,String> params) {\n ResourceCriteria criteria = new ResourceCriteria();\n criteria.clearPaging();\n Method[] methods = ResourceCriteria.class.getMethods();\n for (Entry<String, List<String>> e : params.entrySet()) {\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_219 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/configuration/RawConfigurationTest.java",
"identifier": "RawConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void verifyEqualsIsReflexive() {\n RawConfiguration rawConfig = new RawConfiguration();\n\n assertTrue(rawConfig.equals(rawConfig), \"equals() should be reflexive.\");\n }",
"class_method_signature": "RawConfigurationTest.verifyEqualsIsReflexive()",
"constructor": fal... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "id",
"modifier": "@GeneratedValue(g... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof RawConfiguration) {\n RawConfiguration that = (RawConfiguration) obj;\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_63 | {
"fields": [],
"file": "modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java",
"identifier": "SnmpInfoTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldExposeAllParams() throws Exception {\n Configuration configuration = new Configuration();\n configuration.setSimpleValue(PARAM_HOST, \"pipo\");\n configuration.setSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, \"molo\");\n configuration.setSimpleValue(PA... | {
"fields": [
{
"declarator": "PARAM_HOST = \"host\"",
"modifier": "static final",
"original_string": "static final String PARAM_HOST = \"host\";",
"type": "String",
"var_name": "PARAM_HOST"
},
{
"declarator": "PARAM_PORT = \"port\"",
"modifier": "static final",
... | {
"body": "public static SnmpInfo load(Configuration configuration) {\n String host = configuration.getSimpleValue(PARAM_HOST, null); // required\n String port = configuration.getSimpleValue(PARAM_PORT, DEFAULT_PORT);\n String oid = configuration.getSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, null... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_130 | {
"fields": [
{
"declarator": "httpNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private HTTPNetServiceDiscoveryComponent httpNetServiceDiscoveryComponent;",
"type": "HTTPNetServiceDiscoveryComponent",
"var_name": "httpNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testNotANumberPortForManualProxyMode() {\n String configProxyPort = \"pipomolo\";\n try {\n configuration.setSimpleValue(PROXY_MODE, MANUAL.name());\n configuration.setSimpleValue(PROXY_HOST, \"www.proxy.net\");\n configuration.setSimple... | {
"fields": [],
"file": "modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceDiscoveryComponent.java",
"identifier": "HTTPNetServiceDiscoveryComponent",
"interfaces": "implements ResourceDiscoveryComponent, ManualAddFacet",
"methods": [
{
"class_method_signature": "HT... | {
"body": "@Override\n public DiscoveredResourceDetails discoverResource(Configuration config,\n ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException {\n // Get the component configuration. This call will also make configuration checks\n HTTPNetServiceC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_75 | {
"fields": [
{
"declarator": "TEST_PRECISION = Math.pow(10, -9)",
"modifier": "private static final",
"original_string": "private static final double TEST_PRECISION = Math.pow(10, -9);",
"type": "double",
"var_name": "TEST_PRECISION"
},
{
"declarator": "metricsServer",... | {
"body": "@Test(dataProvider = \"testDates\")\n public void find1HourDatCompositesForGroup(DateTime testNow) throws Exception {\n initServer(testNow);\n\n DateTime beginTime = testNow.minusDays(11);\n DateTime endTime = testNow;\n\n Buckets buckets = new Buckets(beginTime, endTime);\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MetricsServer.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(MetricsServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "RAW_DATA_AGE_LIMIT_MAX =... | {
"body": "public List<MeasurementDataNumericHighLowComposite> findDataForGroup(List<Integer> scheduleIds, long beginTime,\n long endTime, int numberOfBuckets) {\n if (log.isDebugEnabled()) {\n log.debug(\"Querying for metric data using parameters [scheduleIds: \" + scheduleIds + \", beingTim... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_126 | {
"fields": [
{
"declarator": "httpNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private HTTPNetServiceDiscoveryComponent httpNetServiceDiscoveryComponent;",
"type": "HTTPNetServiceDiscoveryComponent",
"var_name": "httpNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testSystemPropertiesProxyMode() {\n try {\n configuration.setSimpleValue(PROXY_MODE, SYS_PROPS.name());\n DiscoveredResourceDetails resourceDetails = httpNetServiceDiscoveryComponent.discoverResource(\n configuration, resourceDiscoveryConte... | {
"fields": [],
"file": "modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceDiscoveryComponent.java",
"identifier": "HTTPNetServiceDiscoveryComponent",
"interfaces": "implements ResourceDiscoveryComponent, ManualAddFacet",
"methods": [
{
"class_method_signature": "HT... | {
"body": "@Override\n public DiscoveredResourceDetails discoverResource(Configuration config,\n ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException {\n // Get the component configuration. This call will also make configuration checks\n HTTPNetServiceC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_258 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "structuredAndRawConfigManagement",
"modifier": "",
... | {
"body": "@Test\n public void nullStructuredShouldBeIgnored() throws Exception {\n Configuration config = null;\n\n Set<RawConfiguration> rawConfigs = toSet(createRawConfiguration(\"/tmp/foo.txt\"));\n\n addDefaultExpectationsForLoad(config, rawConfigs);\n\n Configuration loadedConfig ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StructuredAndRawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(StructuredAndRawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file":... | {
"body": "public Configuration executeLoad(int resourceId) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResouceConfiguratonFacet(resourceId);\n\n Configuration configuration = facet.loadStructuredConfiguration();\n Set<RawConfiguration> rawConfigs = facet.loadRawCon... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_22 | {
"fields": [
{
"declarator": "digestGenerator",
"modifier": "private",
"original_string": "private MessageDigestGenerator digestGenerator;",
"type": "MessageDigestGenerator",
"var_name": "digestGenerator"
},
{
"declarator": "random",
"modifier": "private",
... | {
"body": "@Test\n public void findChangeSetsByCriteriaAndFetchDrifts() throws Exception {\n String driftDefName = \"testdef\";\n int driftDefId = 1;\n int resourceId1 = 1;\n int resourceId2 = 2;\n\n MongoDBChangeSet changeSet1 = new MongoDBChangeSet();\n changeSet1.setDri... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MongoDBDriftServer.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(MongoDBDriftServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "connection",
"modifi... | {
"body": "@Override\n public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,\n DriftChangeSetCriteria criteria) {\n Mapper mapper = new Mapper();\n List<MongoDBChangeSet> changeSets = changeSetDAO.findByChangeSetCritiera(criteria);\n PageList<DriftC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_171 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetNameDefault() {\n assertEquals(processInfo.getName(), \"?\");\n }",
"class_method_signature": "ProcessInfoTest.testGetNameDefault()",
"constructor": false,
"full_signature": "@Test public void testGetNameDefault()",
"identifier": "testGetNameDefault",
"invo... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "public String getName() {\n return name;\n }",
"class_method_signature": "ProcessInfo.getName()",
"constructor": false,
"full_signature": "public String getName()",
"identifier": "getName",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signat... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_223 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/util/StringUtilsTest.java",
"identifier": "StringUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeCamelCase() {\n testDeCamelCase(\"RedGreenBlue\", \"Red Green Blue\");\n testDeCamelCase(\"redGreenBlue\", \"Red Green Blue\");\n testDeCamelCase(\"Red Green Blue\", \"Red Green Blue\");\n testDeCamelCase(\"red green blue\", \"Red Green Blue\");\n ... | {
"fields": [
{
"declarator": "LOWERCASE_WORDS = new HashSet<String>()",
"modifier": "private static final",
"original_string": "private static final Set<String> LOWERCASE_WORDS = new HashSet<String>();",
"type": "Set<String>",
"var_name": "LOWERCASE_WORDS"
}
],
"file": "modu... | {
"body": "public static String deCamelCase(String target) {\n if (target == null) {\n return null;\n }\n\n if (target.length() == 0) {\n return \"\";\n }\n\n StringBuilder result = new StringBuilder();\n\n if (target.startsWith(\"-\")) {\n ta... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_59 | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(SnmpSenderTest.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(SnmpSenderTest.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "TEST_TRA... | {
"body": "@Test\n public void shouldReturnSimpleFailureWhenErrorOccurs() {\n Configuration alertParameters = new Configuration();\n alertParameters.setSimpleValue(PARAM_HOST, TEST_HOST);\n alertParameters.setSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, TEST_VARIABLE_BINDING_PREFIX);\n al... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(SnmpSender.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(SnmpSender.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "resourceManager"... | {
"body": "@Override\n public SenderResult send(Alert alert) {\n\n SnmpInfo info = SnmpInfo.load(alertParameters, preferences);\n if (info.error != null) {\n return SenderResult.getSimpleFailure(info.error);\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Sending S... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_274 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "rawConfigMgmt",
"modifier": "",
"original_string": ... | {
"body": "@Test\n public void facetShouldBeCalledToUpdateASingleRaw() throws Exception {\n final RawConfiguration raw = createRawConfiguration(\"/tmp/raw.txt\");\n\n final Configuration config = new Configuration();\n config.addRawConfiguration(raw);\n\n addDefaultExpectationsForUpdate... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(RawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(RawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file": "modules/core/plugin-cont... | {
"body": "public void executeUpdate(int resourceId, Configuration configuration)\n throws PluginContainerException {\n\n ResourceConfigurationFacet facet = loadResourceConfigFacetWithWriteLock(resourceId);\n StringBuilder errors = new StringBuilder();\n\n for (RawConfiguration rawConfig :... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_262 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "structuredAndRawConfigManagement",
"modifier": "",
... | {
"body": "@Test(expectedExceptions = {ConfigurationUpdateException.class})\n public void exceptionShouldBeThrownWhenStructuredValidationFails() throws Exception {\n final RawConfiguration raw = createRawConfiguration(\"/tmp/raw.txt\");\n\n final Configuration config = new Configuration();\n c... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StructuredAndRawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(StructuredAndRawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file":... | {
"body": "public void executeUpdate(int resourceId, Configuration configuration) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResourceConfigFacetWithWriteLock(resourceId);\n\n StringBuilder errors = new StringBuilder();\n\n try {\n facet.validateStructure... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_18 | {
"fields": [
{
"declarator": "digestGenerator",
"modifier": "private",
"original_string": "private MessageDigestGenerator digestGenerator;",
"type": "MessageDigestGenerator",
"var_name": "digestGenerator"
},
{
"declarator": "random",
"modifier": "private",
... | {
"body": "@Test\n public void persistChangeSetWithSomeContentInDB() throws Exception {\n int driftDefId = 1;\n final String driftDefName = \"saveChangeSetWithSomeContentInDB\";\n final int resourceId = 1;\n\n final Headers headers = new Headers();\n headers.setBasedir(getBaseDir... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MongoDBDriftServer.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(MongoDBDriftServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "connection",
"modifi... | {
"body": "@Override\n public DriftChangeSetSummary saveChangeSet(final Subject subject, final int resourceId, final File changeSetZip)\n throws Exception {\n\n final DriftChangeSetSummary summary = new DriftChangeSetSummary();\n\n ZipUtil.walkZipFile(changeSetZip, new ZipUtil.ZipEntryVisi... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_235 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftDefinitionTest.java",
"identifier": "DriftDefinitionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getIncludes() {\n String path1 = \"lib\";\n String pattern1 = \"*.jar\";\n\n String path2 = \"conf\";\n String pattern2 = \"*.xml\";\n\n Configuration config = new Configuration();\n\n PropertyList includes = new PropertyList(\"includes\");\n... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "id",
"modifier": "@Column(name = \"... | {
"body": "public List<Filter> getIncludes() {\n return getFilters(DriftConfigurationDefinition.PROP_INCLUDES);\n }",
"class_method_signature": "DriftDefinition.getIncludes()",
"constructor": false,
"full_signature": "public List<Filter> getIncludes()",
"identifier": "getIncludes",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_38 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByChangeSetCriteriaAndSortByVersionAscending() throws Exception {\n MongoDBChangeSet c1 = new MongoDBChangeSet();\n c1.setCategory(COVERAGE);\n c1.setVersion(1);\n c1.setResourceId(1);\n c1.setDriftDefinitionId(1);\n da... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByChangeSetCritiera(DriftChangeSetCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n \n if (criteria.getFilterId() != null) {\n // There is no need to apply any additional filters if the id filter is specified\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_184 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetParentPid() {\n when(procState.getPpid()).thenReturn(Long.valueOf(10));\n assertEquals(processInfo.getParentPid(), 10);\n }",
"class_method_signature": "ProcessInfoTest.testGetParentPid()",
"constructor": false,
"full_signature": "@Test public void testG... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "@Deprecated\n public long getParentPid() throws SystemInfoException {\n return priorSnaphot().getParentPid();\n }",
"class_method_signature": "ProcessInfo.getParentPid()",
"constructor": false,
"full_signature": "@Deprecated public long getParentPid()",
"identifier": "getParentPid",
... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_242 | {
"fields": [
{
"declarator": "LEGACY_AMPS_VERSION = \"2.0\"",
"modifier": "static final",
"original_string": "static final String LEGACY_AMPS_VERSION = \"2.0\";",
"type": "String",
"var_name": "LEGACY_AMPS_VERSION"
},
{
"declarator": "NON_LEGACY_AMPS_VERSION = \"2.1\""... | {
"body": "@Test\n public void factoryShouldInitializeLegacyConfigMgmtWithConfigurationUtilityService() throws Exception {\n final boolean daemonOnly = true;\n final ResourceComponent resourceComponent = context.mock(ResourceComponent.class);\n\n context.checking(new Expectations() {\n ... | {
"fields": [
{
"declarator": "componentService",
"modifier": "private final",
"original_string": "private final ComponentService componentService;",
"type": "ComponentService",
"var_name": "componentService"
},
{
"declarator": "configUtilityService = new ConfigurationU... | {
"body": "public ConfigManagement getStrategy(int resourceId) throws PluginContainerException {\n ConfigManagement configManagement = createStrategy(resourceId);\n initStrategyDependencies(configManagement);\n\n return configManagement;\n }",
"class_method_signature": "ConfigManagementFacto... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_80 | {
"fields": [
{
"declarator": "TEST_PRECISION = Math.pow(10, -10)",
"modifier": "private static final",
"original_string": "private static final double TEST_PRECISION = Math.pow(10, -10);",
"type": "double",
"var_name": "TEST_PRECISION"
},
{
"declarator": "metricsConfig... | {
"body": "@Test\n public void noMinMaxDataTest() throws Exception {\n //generate random data\n Random random = new Random();\n List<AggregateNumericMetric> randomData = new ArrayList<AggregateNumericMetric>();\n\n for (int i = 0; i < 123; i++) {\n double value = random.nextD... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MetricsBaselineCalculator.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(MetricsBaselineCalculator.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "... | {
"body": "public Map<Integer, MeasurementBaseline> calculateBaselines(Set<Integer> scheduleIds, long startTime, long endTime) {\n Map<Integer, MeasurementBaseline> calculatedBaselines = new HashMap<Integer, MeasurementBaseline>();\n\n MeasurementBaseline measurementBaseline;\n for (Integer sched... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_215 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/configuration/RawConfigurationTest.java",
"identifier": "RawConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void verifyEqualsWhenObjectIsNull() {\n RawConfiguration rawConfig = new RawConfiguration();\n\n assertFalse(rawConfig.equals(null), \"equals() should return false when incoming object is null.\");\n }",
"class_method_signature": "RawConfigurationTest.verifyEqualsWhenOb... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "id",
"modifier": "@GeneratedValue(g... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof RawConfiguration) {\n RawConfiguration that = (RawConfiguration) obj;\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_79 | {
"fields": [
{
"declarator": "TEST_PRECISION = Math.pow(10, -10)",
"modifier": "private static final",
"original_string": "private static final double TEST_PRECISION = Math.pow(10, -10);",
"type": "double",
"var_name": "TEST_PRECISION"
},
{
"declarator": "metricsConfig... | {
"body": "@Test\n public void randomDataTest() throws Exception {\n //generate random data\n Random random = new Random();\n List<AggregateNumericMetric> randomData = new ArrayList<AggregateNumericMetric>();\n\n for (int i = 0; i < 123; i++) {\n randomData.add(new AggregateN... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MetricsBaselineCalculator.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(MetricsBaselineCalculator.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "... | {
"body": "public Map<Integer, MeasurementBaseline> calculateBaselines(Set<Integer> scheduleIds, long startTime, long endTime) {\n Map<Integer, MeasurementBaseline> calculatedBaselines = new HashMap<Integer, MeasurementBaseline>();\n\n MeasurementBaseline measurementBaseline;\n for (Integer sched... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_96 | {
"fields": [],
"file": "modules/plugins/wfly-10/src/test/java/org/rhq/modules/plugins/wildfly10/TemplatedComponentTest.java",
"identifier": "TemplatedComponentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n @Test\n public void updateResourceConfigurationWithType() throws Exception {\n //tell the method story as it happens: mock or create dependencies and configure\n //those dependencies to get the method under test to completion.\n ... | {
"fields": [
{
"declarator": "TYPE_CONFIGURATION = \"__type\"",
"modifier": "private final static",
"original_string": "private final static String TYPE_CONFIGURATION = \"__type\";",
"type": "String",
"var_name": "TYPE_CONFIGURATION"
},
{
"declarator": "NAME_CONFIGURAT... | {
"body": "@Override\n public void updateResourceConfiguration(ConfigurationUpdateReport report) {\n ConfigurationDefinition configDefCopy = context.getResourceType().getResourceConfigurationDefinition().copy();\n Map<String, PropertyDefinition> propDefs = configDefCopy.getPropertyDefinitions();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_203 | {
"fields": [],
"file": "modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java",
"identifier": "PluginTransformerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void pluginMtimeShouldBeSetToLastModificationTimeOfPluginJarFile() throws Exception {\n File jarFile = createPluginJARFile();\n\n PluginDescriptor pluginDescriptor = new PluginDescriptor();\n URL pluginURL = toURL(jarFile);\n\n PluginTransformer transformer = n... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(PluginTransformer.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(PluginTransformer.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file": "modules/core/c... | {
"body": "public Plugin toPlugin(PluginDescriptor pluginDescriptor, URL pluginURL) {\n try {\n Plugin plugin = new Plugin();\n plugin.setName(pluginDescriptor.getName());\n\n if (pluginDescriptor.getDisplayName() == null) {\n plugin.setDisplayName(pluginDescript... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_192 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetCredentialsName() throws Exception {\n assertTrue(procCredName == processInfo.getCredentialsName());\n // Change procCred\n procCredName = Mockito.mock(ProcCredName.class);\n when(sigarProxy.getProcCredName(PID)).thenReturn(procCredName);\n /... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "@Deprecated\n public ProcCredName getCredentialsName() throws SystemInfoException {\n return priorSnaphot().getCredentialsName();\n }",
"class_method_signature": "ProcessInfo.getCredentialsName()",
"constructor": false,
"full_signature": "@Deprecated public ProcCredName getCredentialsNam... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_254 | {
"fields": [
{
"declarator": "facet",
"modifier": "",
"original_string": "ConfigurationFacet facet;",
"type": "ConfigurationFacet",
"var_name": "facet"
},
{
"declarator": "configMgmt",
"modifier": "",
"original_string": "LegacyConfigManagement configMgmt;",... | {
"body": "@Test(expectedExceptions = ConfigurationUpdateException.class)\n public void exceptionShouldBeThrownWhenUpdateFails() throws Exception {\n final Configuration config = new Configuration();\n\n final ConfigurationUpdateReport updateReport = new ConfigurationUpdateReport(config);\n\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(LegacyConfigManagement.class)",
"modifier": "private static final",
"original_string": "private static final Log log = LogFactory.getLog(LegacyConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file": "modu... | {
"body": "public void executeUpdate(int resourceId, Configuration configuration)\n throws PluginContainerException {\n ConfigurationFacet facet = loadConfigurationFacet(resourceId, WRITE);\n ConfigurationUpdateReport report = new ConfigurationUpdateReport(configuration);\n\n facet.updateR... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_106 | {
"fields": [
{
"declarator": "basedir",
"modifier": "private",
"original_string": "private File basedir;",
"type": "File",
"var_name": "basedir"
},
{
"declarator": "cassandraYamlFile",
"modifier": "private",
"original_string": "private File cassandraYamlFil... | {
"body": "@Test\n public void updateValidConfig() throws Exception {\n createDefaultConfig();\n\n Configuration config = Configuration.builder()\n .addSimple(\"minHeapSize\", \"1024M\")\n .addSimple(\"maxHeapSize\", \"1024M\")\n .addSimple(\"heapNewSize\", \"256M\")\... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StorageNodeConfigDelegate.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(StorageNodeConfigDelegate.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "jvmOptsFile"... | {
"body": "@Override\n public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport) {\n updateResourceConfigurationAndRestartIfNecessary(configurationUpdateReport, false);\n }",
"class_method_signature": "StorageNodeConfigDelegate.updateResourceConfiguration(Configuratio... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_55 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByDriftCriteriaWithChangeSetIdFilter() throws Exception {\n MongoDBChangeSet c1 = createChangeSet(COVERAGE, 1, 1, 1);\n c1.add(new MongoDBChangeSetEntry(\"c1-1.txt\", FILE_ADDED));\n\n dao.save(c1);\n\n MongoDBChangeSet c2 = createCh... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByDriftCriteria(DriftCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n\n if (criteria.getFilterId() != null) {\n // TODO use the $slice operator\n // The slice operator will allow us to return only the requested ent... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_278 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "rawConfigMgmt",
"modifier": "",
"original_string": ... | {
"body": "@Test(expectedExceptions = {ConfigurationUpdateException.class})\n public void secondRawShouldStillGetUpdatedWhenFirstRawFailsValidation() throws Exception {\n final RawConfiguration raw1 = createRawConfiguration(\"/tmp/raw1.txt\");\n final RawConfiguration raw2 = createRawConfiguration(\"... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(RawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(RawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file": "modules/core/plugin-cont... | {
"body": "public void executeUpdate(int resourceId, Configuration configuration)\n throws PluginContainerException {\n\n ResourceConfigurationFacet facet = loadResourceConfigFacetWithWriteLock(resourceId);\n StringBuilder errors = new StringBuilder();\n\n for (RawConfiguration rawConfig :... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_147 | {
"fields": [
{
"declarator": "WEBAPP = \"coregui\"",
"modifier": "private static final",
"original_string": "private static final String WEBAPP = \"coregui\";",
"type": "String",
"var_name": "WEBAPP"
},
{
"declarator": "PATH_ATTRIBUTE = \"path\"",
"modifier": "pr... | {
"body": "@Test\n public void shouldNotFindResponseTimeFilterLogInManuallyAddedNotLocalStandaloneServer() throws Exception {\n when(parentResourceComponent.getPath()).thenReturn(PARENT_COMPONENT_PATH_IN_STANDALONE_SERVER);\n when(parentResourceComponent.getServerComponent()).thenReturn(standaloneASC... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(WebRuntimeDiscoveryComponent.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(WebRuntimeDiscoveryComponent.class);",
"type": "Log",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<BaseComponent<?>> context)\n throws Exception {\n Set<DiscoveredResourceDetails> discoveredResources = super.discoverResources(context);\n if (discoveredResources.isEmpty()) {\n r... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_14 | {
"fields": [],
"file": "modules/enterprise/server/data-migration/src/test/java/org/rhq/server/metrics/migrator/workers/RawDataMigratorTest.java",
"identifier": "RawDataMigratorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEstimateTask() throws Exception {\n //tell the method story as it happens: mock or create dependencies and configure\n //those dependencies to get the method under test to completion\n DatabaseType databaseType = DatabaseType.Oracle;\n DataMigratorConf... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(RawDataMigrator.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(RawDataMigrator.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "tablesNotProcessed =... | {
"body": "public long estimate() throws Exception {\n long recordCount = 0;\n for (String table : getRawDataTables()) {\n String countQuery = String.format(MigrationQuery.COUNT_RAW.toString(), table);\n long tableRecordCount = this.getRowCount(countQuery);\n\n log.debug... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_281 | {
"fields": [
{
"declarator": "configMgmt",
"modifier": "",
"original_string": "ConfigManagement configMgmt;",
"type": "ConfigManagement",
"var_name": "configMgmt"
},
{
"declarator": "configServerService",
"modifier": "",
"original_string": "ConfigurationSer... | {
"body": "@Test\n public void failureResponseShouldBeSentToServerWhenUnexpectedExceptionThrown() throws Exception {\n final Configuration config = createStructuredConfig();\n\n int configUpdateId = -1;\n\n ConfigurationUpdateRequest updateRequest = new ConfigurationUpdateRequest(configUpdateI... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(UpdateResourceConfigurationRunner.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(UpdateResourceConfigurationRunner.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "public ConfigurationUpdateResponse call() throws Exception {\n ConfigurationUpdateResponse response;\n int requestId = request.getConfigurationUpdateId();\n try {\n response = new ConfigurationUpdateResponse(requestId, request.getConfiguration(), SUCCESS, null);\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_110 | {
"fields": [
{
"declarator": "basedir",
"modifier": "private",
"original_string": "private File basedir;",
"type": "File",
"var_name": "basedir"
},
{
"declarator": "cassandraYamlFile",
"modifier": "private",
"original_string": "private File cassandraYamlFil... | {
"body": "@Test\n public void updateShouldFailWhenHeapNewSizeIsInvalid() throws Exception {\n createDefaultConfig();\n\n ConfigurationUpdateReport report = new ConfigurationUpdateReport(Configuration.builder()\n .addSimple(\"heapNewSize\", \"25^G\").build());\n\n configDelegate.upd... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StorageNodeConfigDelegate.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(StorageNodeConfigDelegate.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "jvmOptsFile"... | {
"body": "@Override\n public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport) {\n updateResourceConfigurationAndRestartIfNecessary(configurationUpdateReport, false);\n }",
"class_method_signature": "StorageNodeConfigDelegate.updateResourceConfiguration(Configuratio... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_43 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByDriftCriteriaWithCategoriesFilter() throws Exception {\n MongoDBChangeSet c1 = createChangeSet(COVERAGE, 1, 1, 1).add(new MongoDBChangeSetEntry(\"c1-1.txt\", FILE_ADDED));\n dao.save(c1);\n\n MongoDBChangeSet c2 = createChangeSet(DRIFT, 2... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByDriftCriteria(DriftCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n\n if (criteria.getFilterId() != null) {\n // TODO use the $slice operator\n // The slice operator will allow us to return only the requested ent... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_239 | {
"fields": [
{
"declarator": "TEST_GROUP_DEPS = \"integration.ejb3\"",
"modifier": "static final",
"original_string": "static final String TEST_GROUP_DEPS = \"integration.ejb3\";",
"type": "String",
"var_name": "TEST_GROUP_DEPS"
},
{
"declarator": "entityMgr",
"m... | {
"body": "@Test(groups = \"unitils\", dependsOnGroups = TEST_GROUP_DEPS)\n @SuppressWarnings(\"unchecked\")\n public void findDriftDefinitionTemplates() {\n ResourceType type = entityMgr.find(ResourceType.class, -8);\n\n assertEquals(type.getDriftDefinitionTemplates().size(), 2);\n }",
"clas... | {
"fields": [
{
"declarator": "serialVersionUID = 4L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 4L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "TABLE_NAME = \"RHQ_RESOURCE_TYPE\"",
... | {
"body": "public Set<DriftDefinitionTemplate> getDriftDefinitionTemplates() {\n if (driftDefinitionTemplates==null) {\n return Collections.emptySet();\n }\n return driftDefinitionTemplates;\n }",
"class_method_signature": "ResourceType.getDriftDefinitionTemplates()",
"construct... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_9 | {
"fields": [
{
"declarator": "subjectMgr",
"modifier": "",
"original_string": "SubjectManagerLocal subjectMgr;",
"type": "SubjectManagerLocal",
"var_name": "subjectMgr"
},
{
"declarator": "resourceTypeMgr",
"modifier": "",
"original_string": "ResourceTypeMa... | {
"body": "@Test\n public void rejectReportWithDeletedTypes() {\n ResourceType deletedServiceType = new ResourceTypeBuilder()\n .createServiceResourceType()\n .withName(\"TestService\")\n .withPlugin(\"TestPlugin\")\n .thatIsDeleted()\n .build();\n\n ... | {
"fields": [
{
"declarator": "subjectMgr",
"modifier": "private",
"original_string": "private SubjectManagerLocal subjectMgr;",
"type": "SubjectManagerLocal",
"var_name": "subjectMgr"
},
{
"declarator": "resourceTypeMgr",
"modifier": "private",
"original_st... | {
"body": "public Set<ResourceType> apply(InventoryReport report) {\n Set<ResourceType> resourceTypes = getResourceTypes(report.getAddedRoots());\n Set<ResourceType> staleTypes = new HashSet<ResourceType>();\n\n for (ResourceType type : resourceTypes) {\n // We check two things to dete... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_168 | {
"fields": [
{
"declarator": "ENABLED = true",
"modifier": "private static final",
"original_string": "private static final boolean ENABLED = true;",
"type": "boolean",
"var_name": "ENABLED"
}
],
"file": "modules/core/native-system/src/test/java/org/rhq/core/system/NativeSys... | {
"body": "@Test(enabled = ENABLED)\n public void testGetAllServices() throws Exception {\n final SystemInfo sysinfo = SystemInfoFactory.createSystemInfo();\n\n if (!sysinfo.isNative()) {\n System.out.println(\"~~~ Native library is not available - skipping testGetAllServices\");\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(NativeSystemInfo.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(NativeSystemInfo.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "sigar",
"mod... | {
"body": "public List<ServiceInfo> getAllServices() throws SystemInfoException {\n throw new UnsupportedOperationException(\"Cannot get services for this platform\");\n }",
"class_method_signature": "NativeSystemInfo.getAllServices()",
"constructor": false,
"full_signature": "public List<ServiceInfo>... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_187 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetTime() throws Exception {\n assertTrue(procTime == processInfo.getTime());\n // Change procTime\n procTime = Mockito.mock(ProcTime.class);\n when(sigarProxy.getProcTime(PID)).thenReturn(procTime);\n // Should not be same until refresh is call... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "@Deprecated\n public ProcTime getTime() throws SystemInfoException {\n return priorSnaphot().getTime();\n }",
"class_method_signature": "ProcessInfo.getTime()",
"constructor": false,
"full_signature": "@Deprecated public ProcTime getTime()",
"identifier": "getTime",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_241 | {
"fields": [
{
"declarator": "LEGACY_AMPS_VERSION = \"2.0\"",
"modifier": "static final",
"original_string": "static final String LEGACY_AMPS_VERSION = \"2.0\";",
"type": "String",
"var_name": "LEGACY_AMPS_VERSION"
},
{
"declarator": "NON_LEGACY_AMPS_VERSION = \"2.1\""... | {
"body": "@Test\n public void factoryShouldInitializeLegacyConfigMgmtWithComponentService() throws Exception {\n final boolean daemonOnly = true;\n final ResourceComponent resourceComponent = context.mock(ResourceComponent.class);\n\n context.checking(new Expectations() {\n {\n ... | {
"fields": [
{
"declarator": "componentService",
"modifier": "private final",
"original_string": "private final ComponentService componentService;",
"type": "ComponentService",
"var_name": "componentService"
},
{
"declarator": "configUtilityService = new ConfigurationU... | {
"body": "public ConfigManagement getStrategy(int resourceId) throws PluginContainerException {\n ConfigManagement configManagement = createStrategy(resourceId);\n initStrategyDependencies(configManagement);\n\n return configManagement;\n }",
"class_method_signature": "ConfigManagementFacto... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_83 | {
"fields": [
{
"declarator": "TEST_HANDLE = \"calanques\"",
"modifier": "private static final",
"original_string": "private static final String TEST_HANDLE = \"calanques\";",
"type": "String",
"var_name": "TEST_HANDLE"
},
{
"declarator": "contentUploader",
"modif... | {
"body": "@Test(expectedExceptions = { IllegalArgumentException.class })\n public void uploadByFileNameShouldThrowIAEWhenFilenameIsNull() throws Exception {\n contentUploader.upload((String) null);\n }",
"class_method_signature": "ContentUploaderTest.uploadByFileNameShouldThrowIAEWhenFilenameIsNull()"... | {
"fields": [
{
"declarator": "SIZE_32K = 1024 * 32",
"modifier": "private static final",
"original_string": "private static final int SIZE_32K = 1024 * 32;",
"type": "int",
"var_name": "SIZE_32K"
},
{
"declarator": "contentManager",
"modifier": "private",
"... | {
"body": "public String upload(String filename) {\n if (StringUtil.isBlank(filename)) {\n throw new IllegalArgumentException(\"Empty path\");\n }\n return upload(new File(filename));\n }",
"class_method_signature": "ContentUploader.upload(String filename)",
"constructor": false... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_216 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/configuration/RawConfigurationTest.java",
"identifier": "RawConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void verifyEqualsWhenObjectIsNotARawConfiguration() {\n RawConfiguration rawConfig = new RawConfiguration();\n\n assertFalse(rawConfig.equals(new Object()), \"equals() should return false when incoming object is not a \"\n + RawConfiguration.class.getSimpleName())... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "id",
"modifier": "@GeneratedValue(g... | {
"body": "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (obj == this) {\n return true;\n }\n\n if (obj instanceof RawConfiguration) {\n RawConfiguration that = (RawConfiguration) obj;\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_95 | {
"fields": [],
"file": "modules/plugins/wfly-10/src/test/java/org/rhq/modules/plugins/wildfly10/TemplatedComponentTest.java",
"identifier": "TemplatedComponentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n @Test\n public void loadResourceConfigurationWithName() throws Exception {\n //tell the method story as it happens: mock or create dependencies and configure\n //those dependencies to get the method under test to completion.\n ... | {
"fields": [
{
"declarator": "TYPE_CONFIGURATION = \"__type\"",
"modifier": "private final static",
"original_string": "private final static String TYPE_CONFIGURATION = \"__type\";",
"type": "String",
"var_name": "TYPE_CONFIGURATION"
},
{
"declarator": "NAME_CONFIGURAT... | {
"body": "@Override\n public Configuration loadResourceConfiguration() throws Exception {\n ConfigurationDefinition configDef = context.getResourceType().getResourceConfigurationDefinition();\n\n if (configDef.getDefaultTemplate().getConfiguration().get(TYPE_CONFIGURATION) != null) {\n //... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_129 | {
"fields": [
{
"declarator": "httpNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private HTTPNetServiceDiscoveryComponent httpNetServiceDiscoveryComponent;",
"type": "HTTPNetServiceDiscoveryComponent",
"var_name": "httpNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testMissingPortForManualProxyMode() {\n try {\n configuration.setSimpleValue(PROXY_MODE, MANUAL.name());\n configuration.setSimpleValue(PROXY_HOST, \"www.proxy.net\");\n httpNetServiceDiscoveryComponent.discoverResource(configuration, resourceD... | {
"fields": [],
"file": "modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceDiscoveryComponent.java",
"identifier": "HTTPNetServiceDiscoveryComponent",
"interfaces": "implements ResourceDiscoveryComponent, ManualAddFacet",
"methods": [
{
"class_method_signature": "HT... | {
"body": "@Override\n public DiscoveredResourceDetails discoverResource(Configuration config,\n ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException {\n // Get the component configuration. This call will also make configuration checks\n HTTPNetServiceC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_200 | {
"fields": [],
"file": "modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java",
"identifier": "PluginTransformerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void pluginDescriptionShouldBeSetToDescriptorDescription() throws Exception {\n PluginDescriptor pluginDescriptor = new PluginDescriptor();\n pluginDescriptor.setDescription(\"description\");\n\n PluginTransformer transformer = new PluginTransformer();\n\n Plug... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(PluginTransformer.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(PluginTransformer.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file": "modules/core/c... | {
"body": "public Plugin toPlugin(PluginDescriptor pluginDescriptor, URL pluginURL) {\n try {\n Plugin plugin = new Plugin();\n plugin.setName(pluginDescriptor.getName());\n\n if (pluginDescriptor.getDisplayName() == null) {\n plugin.setDisplayName(pluginDescript... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_191 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetCredentials() throws Exception {\n assertTrue(procCred == processInfo.getCredentials());\n // Change procCred\n procCred = Mockito.mock(ProcCred.class);\n when(sigarProxy.getProcCred(PID)).thenReturn(procCred);\n // Should not be same until r... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "@Deprecated\n public ProcCred getCredentials() throws SystemInfoException {\n return priorSnaphot().getCredentials();\n }",
"class_method_signature": "ProcessInfo.getCredentials()",
"constructor": false,
"full_signature": "@Deprecated public ProcCred getCredentials()",
"identifier": "g... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_257 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "structuredAndRawConfigManagement",
"modifier": "",
... | {
"body": "@Test\n public void theConfigNotesShouldGetSet() throws Exception {\n Configuration config = new Configuration();\n config.setNotes(null);\n\n addDefaultExpectationsForLoad(config, EMPTY_SET);\n\n Configuration loadedConfig = structuredAndRawConfigManagement.executeLoad(resou... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StructuredAndRawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(StructuredAndRawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file":... | {
"body": "public Configuration executeLoad(int resourceId) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResouceConfiguratonFacet(resourceId);\n\n Configuration configuration = facet.loadStructuredConfiguration();\n Set<RawConfiguration> rawConfigs = facet.loadRawCon... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_56 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void deleteChangeSets() throws Exception {\n MongoDBChangeSet c1 = new MongoDBChangeSet();\n c1.setCategory(DRIFT);\n c1.setVersion(1);\n c1.setResourceId(1);\n c1.setDriftDefinitionId(1);\n c1.setDriftDefinitionName(\"delete-te... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public void deleteChangeSets(int resourceId, String driftDefName) {\n deleteByQuery(createQuery()\n .field(\"resourceId\").equal(resourceId)\n .field(\"driftDefName\").equal(driftDefName));\n }",
"class_method_signature": "ChangeSetDAO.deleteChangeSets(int resource... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_105 | {
"fields": [
{
"declarator": "basedir",
"modifier": "private",
"original_string": "private File basedir;",
"type": "File",
"var_name": "basedir"
},
{
"declarator": "cassandraYamlFile",
"modifier": "private",
"original_string": "private File cassandraYamlFil... | {
"body": "@Test\n public void loadValidConfig() throws Exception {\n createDefaultConfig();\n\n Configuration config = configDelegate.loadResourceConfiguration();\n\n assertEquals(config.getSimpleValue(\"minHeapSize\"), \"512M\", \"Failed to load property [minHeapSize]\");\n assertEqua... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StorageNodeConfigDelegate.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(StorageNodeConfigDelegate.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "jvmOptsFile"... | {
"body": "@Override\n public Configuration loadResourceConfiguration() throws Exception {\n Properties properties = new Properties();\n properties.load(new FileInputStream(jvmOptsFile));\n\n Configuration config = new Configuration();\n\n String heapDumpOnOOMError = properties.getPrope... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_294 | {
"fields": [
{
"declarator": "componentInvocationContext = new ComponentInvocationContextImpl()",
"modifier": "private",
"original_string": "private ComponentInvocationContextImpl componentInvocationContext = new ComponentInvocationContextImpl();",
"type": "ComponentInvocationContextImpl"... | {
"body": "@Test(timeOut = 1000 * 30)\n public void newThreadsShouldSeeComponentInvocationContextInitialValue() throws Exception {\n InterruptedStatusRecorder recorder = new InterruptedStatusRecorder() {\n @Override\n public void run() {\n value = componentInvocationCont... | {
"fields": [
{
"declarator": "localContext = new ThreadLocal<LocalContext>() {\n @Override\n protected LocalContext initialValue() {\n return new LocalContext();\n }\n }",
"modifier": "private static final",
"original_string": "private static final ThreadLocal... | {
"body": "@Override\n public boolean isInterrupted() {\n return localContext.get().isInterrupted();\n }",
"class_method_signature": "ComponentInvocationContextImpl.isInterrupted()",
"constructor": false,
"full_signature": "@Override public boolean isInterrupted()",
"identifier": "isInterrupted",... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_17 | {
"fields": [
{
"declarator": "digestGenerator",
"modifier": "private",
"original_string": "private MessageDigestGenerator digestGenerator;",
"type": "MessageDigestGenerator",
"var_name": "digestGenerator"
},
{
"declarator": "random",
"modifier": "private",
... | {
"body": "@Test\n public void persistInitialChangeSetWithContentInDB() throws Exception {\n int driftDefId = 1;\n final String driftDefName = \"saveInitialChangeSetWithContentInDB\";\n final int resourceId = 1;\n\n final Headers headers = new Headers();\n headers.setBasedir(getB... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MongoDBDriftServer.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(MongoDBDriftServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "connection",
"modifi... | {
"body": "@Override\n public DriftChangeSetSummary saveChangeSet(final Subject subject, final int resourceId, final File changeSetZip)\n throws Exception {\n\n final DriftChangeSetSummary summary = new DriftChangeSetSummary();\n\n ZipUtil.walkZipFile(changeSetZip, new ZipUtil.ZipEntryVisi... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_282 | {
"fields": [
{
"declarator": "configMgmt",
"modifier": "",
"original_string": "ConfigManagement configMgmt;",
"type": "ConfigManagement",
"var_name": "configMgmt"
},
{
"declarator": "configServerService",
"modifier": "",
"original_string": "ConfigurationSer... | {
"body": "@Test\n public void failureResponseShouldBeReturnedWhenUnexpectedExceptionThrownInEmbeddedMode() throws Exception {\n final Configuration config = createStructuredConfig();\n\n int configUpdateId = -1;\n\n ConfigurationUpdateRequest updateRequest = new ConfigurationUpdateRequest(con... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(UpdateResourceConfigurationRunner.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(UpdateResourceConfigurationRunner.class);",
"type": "Log",
"var_name": "log"
},
{
... | {
"body": "public ConfigurationUpdateResponse call() throws Exception {\n ConfigurationUpdateResponse response;\n int requestId = request.getConfigurationUpdateId();\n try {\n response = new ConfigurationUpdateResponse(requestId, request.getConfiguration(), SUCCESS, null);\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_40 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByDriftCriteriaWithResourceIdFilter() throws Exception {\n MongoDBChangeSet c1 = new MongoDBChangeSet();\n c1.setCategory(DRIFT);\n c1.setVersion(1);\n c1.setResourceId(1);\n c1.setDriftDefinitionId(1);\n dao.save(c1);\... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByDriftCriteria(DriftCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n\n if (criteria.getFilterId() != null) {\n // TODO use the $slice operator\n // The slice operator will allow us to return only the requested ent... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_113 | {
"fields": [
{
"declarator": "ENABLE_TESTS = true",
"modifier": "private static final",
"original_string": "private static final boolean ENABLE_TESTS = true;",
"type": "boolean",
"var_name": "ENABLE_TESTS"
},
{
"declarator": "DEST_BASE_DIR_NAME = \"Root File System\"",... | {
"body": "@Test(enabled = ENABLE_TESTS)\n public void testAntBundle() throws Exception {\n ResourceType resourceType = new ResourceType(\"testSimpleBundle\", \"plugin\", ResourceCategory.SERVER, null);\n BundleType bundleType = new BundleType(\"testSimpleBundle\", resourceType);\n Repo repo =... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(AntBundlePluginComponent.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(AntBundlePluginComponent.class);",
"type": "Log",
"var_name": "LOG"
},
{
"de... | {
"body": "@Override\n public BundleDeployResult deployBundle(final BundleDeployRequest request) {\n BundleDeployResult result = new BundleDeployResult();\n try {\n BundleResourceDeployment resourceDeployment = request.getResourceDeployment();\n BundleDeployment bundleDeployment... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_164 | {
"fields": [
{
"declarator": "deploymentDirectory",
"modifier": "private",
"original_string": "private File deploymentDirectory;",
"type": "File",
"var_name": "deploymentDirectory"
},
{
"declarator": "resourceDataDirectory",
"modifier": "private",
"original... | {
"body": "@Test\n public void testGetShaExplodedWithoutManifest() throws Exception {\n //tell the method story as it happens: mock or create dependencies and configure\n //those dependencies to get the method under test to completion.\n File deploymentDirectory = new File(this.getClass().getR... | {
"fields": [
{
"declarator": "RHQ_SHA_256 = \"RHQ-Sha256\"",
"modifier": "private static final",
"original_string": "private static final String RHQ_SHA_256 = \"RHQ-Sha256\";",
"type": "String",
"var_name": "RHQ_SHA_256"
},
{
"declarator": "SHA256_FILE = \"application.... | {
"body": "public String retrieveDeploymentSHA(File deployment, File resourceDataDirectory) {\n String sha = null;\n\n if (deployment.isDirectory()) {\n File propertiesFile = new File(resourceDataDirectory, SHA256_FILE);\n\n if (propertiesFile.exists()) {\n FileInput... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_5 | {
"fields": [],
"file": "modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/rest/helper/ResourceCriteriaHelperTest.java",
"identifier": "ResourceCriteriaHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = { BadArgumentException.class }, expectedExceptionsMessageRegExp = \".*does not exist.*\")\n public void testInvalidParam() {\n MultivaluedMap<String, String> params = new MultivaluedMapImpl<String, String>();\n params.putSingle(\"foo\", \"bar\");\n Resourc... | {
"fields": [
{
"declarator": "SPECIAL_PARAMS = Arrays.asList(\"page\", \"ps\", \"strict\")",
"modifier": "private static final",
"original_string": "private static final List<String> SPECIAL_PARAMS = Arrays.asList(\"page\", \"ps\", \"strict\");",
"type": "List<String>",
"var_name": ... | {
"body": "public static ResourceCriteria create(MultivaluedMap<String,String> params) {\n ResourceCriteria criteria = new ResourceCriteria();\n criteria.clearPaging();\n Method[] methods = ResourceCriteria.class.getMethods();\n for (Entry<String, List<String>> e : params.entrySet()) {\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_37 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByChangeSetCriteriaAndDoNotFetchDrifts() throws Exception {\n MongoDBChangeSet c1 = new MongoDBChangeSet();\n c1.setCategory(COVERAGE);\n c1.setVersion(1);\n c1.setResourceId(1);\n c1.setDriftDefinitionId(1);\n c1.add(n... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByChangeSetCritiera(DriftChangeSetCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n \n if (criteria.getFilterId() != null) {\n // There is no need to apply any additional filters if the id filter is specified\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_133 | {
"fields": [
{
"declarator": "pingNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private PingNetServiceDiscoveryComponent pingNetServiceDiscoveryComponent;",
"type": "PingNetServiceDiscoveryComponent",
"var_name": "pingNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testValidComponentConfiguration() {\n try {\n DiscoveredResourceDetails resourceDetails = pingNetServiceDiscoveryComponent.discoverResource(\n configuration, resourceDiscoveryContext);\n assertEquals(resourceDetails.getResourceType(), resou... | {
"fields": [
{
"declarator": "RESOURCE_NAME_PREFIX = \"Ping \"",
"modifier": "private static final",
"original_string": "private static final String RESOURCE_NAME_PREFIX = \"Ping \";",
"type": "String",
"var_name": "RESOURCE_NAME_PREFIX"
}
],
"file": "modules/plugins/netserv... | {
"body": "@Override\n public DiscoveredResourceDetails discoverResource(Configuration config,\n ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException {\n InetAddress address = PingNetServiceComponent.createComponentConfiguration(config);\n DiscoveredRes... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_60 | {
"fields": [],
"file": "modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java",
"identifier": "SnmpInfoTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldDetectMissingParams() throws Exception {\n Configuration configuration = new Configuration();\n\n SnmpInfo snmpInfo = SnmpInfo.load(configuration);\n assertNotNull(snmpInfo.error, \"SnmpInfo#load should have detected an error\");\n assertEquals(snmpI... | {
"fields": [
{
"declarator": "PARAM_HOST = \"host\"",
"modifier": "static final",
"original_string": "static final String PARAM_HOST = \"host\";",
"type": "String",
"var_name": "PARAM_HOST"
},
{
"declarator": "PARAM_PORT = \"port\"",
"modifier": "static final",
... | {
"body": "public static SnmpInfo load(Configuration configuration) {\n String host = configuration.getSimpleValue(PARAM_HOST, null); // required\n String port = configuration.getSimpleValue(PARAM_PORT, DEFAULT_PORT);\n String oid = configuration.getSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, null... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_125 | {
"fields": [
{
"declarator": "httpNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private HTTPNetServiceDiscoveryComponent httpNetServiceDiscoveryComponent;",
"type": "HTTPNetServiceDiscoveryComponent",
"var_name": "httpNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testInvalidPatternSyntax() {\n String configValidateResponsePattern = \"(pipo\";\n try {\n configuration.setSimpleValue(VALIDATE_RESPONSE_PATTERN, configValidateResponsePattern);\n httpNetServiceDiscoveryComponent.discoverResource(configuration, re... | {
"fields": [],
"file": "modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceDiscoveryComponent.java",
"identifier": "HTTPNetServiceDiscoveryComponent",
"interfaces": "implements ResourceDiscoveryComponent, ManualAddFacet",
"methods": [
{
"class_method_signature": "HT... | {
"body": "@Override\n public DiscoveredResourceDetails discoverResource(Configuration config,\n ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException {\n // Get the component configuration. This call will also make configuration checks\n HTTPNetServiceC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_99 | {
"fields": [
{
"declarator": "WEBAPP = \"coregui\"",
"modifier": "private static final",
"original_string": "private static final String WEBAPP = \"coregui\";",
"type": "String",
"var_name": "WEBAPP"
},
{
"declarator": "PATH_ATTRIBUTE = \"path\"",
"modifier": "pr... | {
"body": "@Test\n public void shouldNotFindResponseTimeFilterLogInManuallyAddedNotLocalStandaloneServer() throws Exception {\n when(parentResourceComponent.getPath()).thenReturn(PARENT_COMPONENT_PATH_IN_STANDALONE_SERVER);\n when(parentResourceComponent.getServerComponent()).thenReturn(standaloneASC... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(WebRuntimeDiscoveryComponent.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(WebRuntimeDiscoveryComponent.class);",
"type": "Log",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<BaseComponent<?>> context)\n throws Exception {\n Set<DiscoveredResourceDetails> discoveredResources = super.discoverResources(context);\n if (discoveredResources.isEmpty()) {\n r... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_76 | {
"fields": [
{
"declarator": "TEST_PRECISION = Math.pow(10, -9)",
"modifier": "private static final",
"original_string": "private static final double TEST_PRECISION = Math.pow(10, -9);",
"type": "double",
"var_name": "TEST_PRECISION"
},
{
"declarator": "metricsServer",... | {
"body": "@Test(dataProvider = \"testDates\")\n public void find6HourDataComposites(DateTime testNow) throws Exception {\n initServer(testNow);\n\n DateTime beginTime = testNow.minusDays(20);\n DateTime endTime = testNow;\n\n Buckets buckets = new Buckets(beginTime, endTime);\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MetricsServer.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(MetricsServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "RAW_DATA_AGE_LIMIT_MAX =... | {
"body": "public Iterable<MeasurementDataNumericHighLowComposite> findDataForResource(int scheduleId, long beginTime,\n long endTime, int numberOfBuckets) {\n Stopwatch stopwatch = new Stopwatch().start();\n try {\n DateTime begin = new DateTime(beginTime);\n\n if (dateTime... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_172 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetNameFromArgs() throws Exception {\n // Force new test instance because this test case work with data\n // which is initialized at instance creation\n when(sigarProxy.getProcArgs(PID)).thenReturn(new String[] { \"onearg\", \"somearg\", \"otherarg\" });\n ... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "public String getName() {\n return name;\n }",
"class_method_signature": "ProcessInfo.getName()",
"constructor": false,
"full_signature": "public String getName()",
"identifier": "getName",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signat... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_21 | {
"fields": [
{
"declarator": "digestGenerator",
"modifier": "private",
"original_string": "private MessageDigestGenerator digestGenerator;",
"type": "MessageDigestGenerator",
"var_name": "digestGenerator"
},
{
"declarator": "random",
"modifier": "private",
... | {
"body": "@Test\n public void findChangeSetsByCriteriaAndDoNotFetchDrifts() throws Exception {\n String driftDefName = \"testdef\";\n int driftDefId = 1;\n int resourceId1 = 1;\n int resourceId2 = 2;\n \n MongoDBChangeSet changeSet1 = new MongoDBChangeSet();\n chan... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MongoDBDriftServer.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(MongoDBDriftServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "connection",
"modifi... | {
"body": "@Override\n public PageList<? extends DriftChangeSet<?>> findDriftChangeSetsByCriteria(Subject subject,\n DriftChangeSetCriteria criteria) {\n Mapper mapper = new Mapper();\n List<MongoDBChangeSet> changeSets = changeSetDAO.findByChangeSetCritiera(criteria);\n PageList<DriftC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_220 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/configuration/AbstractConfigurationUpdateTest.java",
"identifier": "AbstractConfigurationUpdateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void serializationShouldCopySubjectName() throws Exception {\n ResourceConfigurationUpdate update = new ResourceConfigurationUpdate(null, new Configuration(), \"rhqadmin\");\n\n ResourceConfigurationUpdate serializedUpdate = TestUtil.serializeAndDeserialize(update);\n\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "configuration",
"modifier": "@JoinC... | {
"body": "public String getSubjectName() {\n return subjectName;\n }",
"class_method_signature": "AbstractConfigurationUpdate.getSubjectName()",
"constructor": false,
"full_signature": "public String getSubjectName()",
"identifier": "getSubjectName",
"invocations": [],
"modifiers": "public",
... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_109 | {
"fields": [
{
"declarator": "basedir",
"modifier": "private",
"original_string": "private File basedir;",
"type": "File",
"var_name": "basedir"
},
{
"declarator": "cassandraYamlFile",
"modifier": "private",
"original_string": "private File cassandraYamlFil... | {
"body": "@Test\n public void updateShouldFailWhenMaxHeapSizeIsInvalid() throws Exception {\n createDefaultConfig();\n\n ConfigurationUpdateReport report = new ConfigurationUpdateReport(Configuration.builder()\n .addSimple(\"maxHeapSize\", \"256GB\").build());\n\n configDelegate.up... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StorageNodeConfigDelegate.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(StorageNodeConfigDelegate.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "jvmOptsFile"... | {
"body": "@Override\n public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport) {\n updateResourceConfigurationAndRestartIfNecessary(configurationUpdateReport, false);\n }",
"class_method_signature": "StorageNodeConfigDelegate.updateResourceConfiguration(Configuratio... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_277 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "rawConfigMgmt",
"modifier": "",
"original_string": ... | {
"body": "@Test\n public void facetShouldBeCalledToUpdateMultipleRaws() throws Exception {\n final RawConfiguration raw1 = createRawConfiguration(\"/tmp/raw1.txt\");\n final RawConfiguration raw2 = createRawConfiguration(\"/tmp/raw2.txt\");\n\n final Configuration config = new Configuration()... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(RawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(RawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file": "modules/core/plugin-cont... | {
"body": "public void executeUpdate(int resourceId, Configuration configuration)\n throws PluginContainerException {\n\n ResourceConfigurationFacet facet = loadResourceConfigFacetWithWriteLock(resourceId);\n StringBuilder errors = new StringBuilder();\n\n for (RawConfiguration rawConfig :... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_261 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "structuredAndRawConfigManagement",
"modifier": "",
... | {
"body": "@Test\n public void facetShouldBeCalledToUpdateStructuredAndRaw() throws Exception {\n final RawConfiguration raw1 = createRawConfiguration(\"/tmp/raw1.txt\");\n final RawConfiguration raw2 = createRawConfiguration(\"/tmp/raw2.txt\");\n\n final Configuration config = new Configurati... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StructuredAndRawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(StructuredAndRawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file":... | {
"body": "public void executeUpdate(int resourceId, Configuration configuration) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResourceConfigFacetWithWriteLock(resourceId);\n\n StringBuilder errors = new StringBuilder();\n\n try {\n facet.validateStructure... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_236 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftDefinitionTest.java",
"identifier": "DriftDefinitionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getExcludes() {\n String path1 = \"lib\";\n String pattern1 = \"*.jar\";\n\n String path2 = \"conf\";\n String pattern2 = \"*.xml\";\n\n Configuration config = new Configuration();\n\n PropertyList excludes = new PropertyList(\"excludes\");\n... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "id",
"modifier": "@Column(name = \"... | {
"body": "public List<Filter> getExcludes() {\n return getFilters(DriftConfigurationDefinition.PROP_EXCLUDES);\n }",
"class_method_signature": "DriftDefinition.getExcludes()",
"constructor": false,
"full_signature": "public List<Filter> getExcludes()",
"identifier": "getExcludes",
"invocations": ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_237 | {
"fields": [
{
"declarator": "TEST_GROUP_DEPS = \"integration.ejb3\"",
"modifier": "static final",
"original_string": "static final String TEST_GROUP_DEPS = \"integration.ejb3\";",
"type": "String",
"var_name": "TEST_GROUP_DEPS"
},
{
"declarator": "entityMgr",
"m... | {
"body": "@Test(groups = \"unitils\", dependsOnGroups = TEST_GROUP_DEPS)\n public void findByPlugin() {\n List<ResourceType> results = entityMgr.createNamedQuery(QUERY_FIND_BY_PLUGIN)\n .setParameter(\"plugin\", \"TestPlugin1\")\n .getResultList();\n\n assertEquals(results.size... | {
"fields": [
{
"declarator": "serialVersionUID = 4L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 4L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "TABLE_NAME = \"RHQ_RESOURCE_TYPE\"",
... | {
"body": "public int getId() {\n return this.id;\n }",
"class_method_signature": "ResourceType.getId()",
"constructor": false,
"full_signature": "public int getId()",
"identifier": "getId",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int ge... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_260 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "structuredAndRawConfigManagement",
"modifier": "",
... | {
"body": "@Test\n public void nullShouldBeReturnedWhenStructuredAndRawAreNull() throws Exception {\n context.checking(new Expectations() {{\n atLeast(1).of(componentService).getComponent(resourceId,\n ResourceConfigurationFacet.class,\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StructuredAndRawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(StructuredAndRawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file":... | {
"body": "public Configuration executeLoad(int resourceId) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResouceConfiguratonFacet(resourceId);\n\n Configuration configuration = facet.loadStructuredConfiguration();\n Set<RawConfiguration> rawConfigs = facet.loadRawCon... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_276 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "rawConfigMgmt",
"modifier": "",
"original_string": ... | {
"body": "@Test(expectedExceptions = {ConfigurationUpdateException.class})\n public void exceptionShouldBeThrownWhenUpdateFailsForSingleRaw() throws Exception {\n final RawConfiguration raw = createRawConfiguration(\"/tmp/raw.txt\");\n\n final Configuration config = new Configuration();\n con... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(RawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(RawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file": "modules/core/plugin-cont... | {
"body": "public void executeUpdate(int resourceId, Configuration configuration)\n throws PluginContainerException {\n\n ResourceConfigurationFacet facet = loadResourceConfigFacetWithWriteLock(resourceId);\n StringBuilder errors = new StringBuilder();\n\n for (RawConfiguration rawConfig :... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_108 | {
"fields": [
{
"declarator": "basedir",
"modifier": "private",
"original_string": "private File basedir;",
"type": "File",
"var_name": "basedir"
},
{
"declarator": "cassandraYamlFile",
"modifier": "private",
"original_string": "private File cassandraYamlFil... | {
"body": "@Test\n public void disableHeapDumps() throws Exception {\n createDefaultConfig();\n\n ConfigurationUpdateReport report = new ConfigurationUpdateReport(Configuration.builder()\n .addSimple(\"heapDumpOnOOMError\", false).build());\n\n configDelegate.updateResourceConfigura... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StorageNodeConfigDelegate.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(StorageNodeConfigDelegate.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "jvmOptsFile"... | {
"body": "@Override\n public void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport) {\n updateResourceConfigurationAndRestartIfNecessary(configurationUpdateReport, false);\n }",
"class_method_signature": "StorageNodeConfigDelegate.updateResourceConfiguration(Configuratio... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_221 | {
"fields": [],
"file": "modules/core/domain/src/test/java/org/rhq/core/domain/configuration/AbstractConfigurationUpdateTest.java",
"identifier": "AbstractConfigurationUpdateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void serializationShouldCopyCreatedTime() throws Exception {\n ResourceConfigurationUpdate update = new ResourceConfigurationUpdate();\n\n ResourceConfigurationUpdate serializedUpdate = TestUtil.serializeAndDeserialize(update);\n\n org.testng.Assert.assertEquals(\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "configuration",
"modifier": "@JoinC... | {
"body": "public long getCreatedTime() {\n return this.createdTime;\n }",
"class_method_signature": "AbstractConfigurationUpdate.getCreatedTime()",
"constructor": false,
"full_signature": "public long getCreatedTime()",
"identifier": "getCreatedTime",
"invocations": [],
"modifiers": "public",
... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_173 | {
"fields": [
{
"declarator": "PID = 15",
"modifier": "private static final",
"original_string": "private static final int PID = 15;",
"type": "int",
"var_name": "PID"
},
{
"declarator": "sigarProxy",
"modifier": "private",
"original_string": "private SigarP... | {
"body": "@Test\n public void testGetNameFromExe() throws Exception {\n // Force new test instance because this test case work with data\n // which is initialized at instance creation\n procExe = Mockito.mock(ProcExe.class);\n when(procExe.getName()).thenReturn(\"aprocname\");\n ... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(ProcessInfo.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(ProcessInfo.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "REFRESH_LOCK_A... | {
"body": "public String getName() {\n return name;\n }",
"class_method_signature": "ProcessInfo.getName()",
"constructor": false,
"full_signature": "public String getName()",
"identifier": "getName",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signat... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_20 | {
"fields": [
{
"declarator": "digestGenerator",
"modifier": "private",
"original_string": "private MessageDigestGenerator digestGenerator;",
"type": "MessageDigestGenerator",
"var_name": "digestGenerator"
},
{
"declarator": "random",
"modifier": "private",
... | {
"body": "@Test\n public void purgeOrphanedContent() throws Exception {\n int size = 1024;\n File file1 = createRandomFile(getBaseDir(), size);\n File file2 = createRandomFile(getBaseDir(), size);\n\n driftServer.saveChangeSetFiles(null, createChangeSetContentZipFile(file1, file2));\n\... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MongoDBDriftServer.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(MongoDBDriftServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "connection",
"modifi... | {
"body": "public void purgeOrphanedContent() {\n for (DBObject object : fileDAO.getFileListCursor()) {\n String id = (String) object.get(\"_id\");\n Query<MongoDBChangeSet> query = ds.createQuery(MongoDBChangeSet.class);\n query.or(query.criteria(\"files.newFileHash\").equal(i... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_124 | {
"fields": [
{
"declarator": "httpNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private HTTPNetServiceDiscoveryComponent httpNetServiceDiscoveryComponent;",
"type": "HTTPNetServiceDiscoveryComponent",
"var_name": "httpNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testUnableToValidateContentWithHeadRequest() {\n try {\n configuration.setSimpleValue(METHOD, HEAD.name());\n httpNetServiceDiscoveryComponent.discoverResource(configuration, resourceDiscoveryContext);\n fail(\"Component configuration should be... | {
"fields": [],
"file": "modules/plugins/netservices/src/main/java/org/rhq/plugins/netservices/HTTPNetServiceDiscoveryComponent.java",
"identifier": "HTTPNetServiceDiscoveryComponent",
"interfaces": "implements ResourceDiscoveryComponent, ManualAddFacet",
"methods": [
{
"class_method_signature": "HT... | {
"body": "@Override\n public DiscoveredResourceDetails discoverResource(Configuration config,\n ResourceDiscoveryContext resourceDiscoveryContext) throws InvalidPluginConfigurationException {\n // Get the component configuration. This call will also make configuration checks\n HTTPNetServiceC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_98 | {
"fields": [
{
"declarator": "WEBAPP = \"coregui\"",
"modifier": "private static final",
"original_string": "private static final String WEBAPP = \"coregui\";",
"type": "String",
"var_name": "WEBAPP"
},
{
"declarator": "PATH_ATTRIBUTE = \"path\"",
"modifier": "pr... | {
"body": "@Test\n public void shouldFindResponseTimeFilterLogInStandaloneServer() throws Exception {\n when(parentResourceComponent.getPath()).thenReturn(PARENT_COMPONENT_PATH_IN_STANDALONE_SERVER);\n when(parentResourceComponent.getServerComponent()).thenReturn(standaloneASComponent);\n when... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(WebRuntimeDiscoveryComponent.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(WebRuntimeDiscoveryComponent.class);",
"type": "Log",
"var_name": "LOG"
},
{
... | {
"body": "@Override\n public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<BaseComponent<?>> context)\n throws Exception {\n Set<DiscoveredResourceDetails> discoveredResources = super.discoverResources(context);\n if (discoveredResources.isEmpty()) {\n r... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_77 | {
"fields": [
{
"declarator": "TEST_PRECISION = Math.pow(10, -9)",
"modifier": "private static final",
"original_string": "private static final double TEST_PRECISION = Math.pow(10, -9);",
"type": "double",
"var_name": "TEST_PRECISION"
},
{
"declarator": "metricsServer",... | {
"body": "@Test(dataProvider = \"testDates\")\n public void find24HourDataComposites(DateTime testNow) throws Exception {\n initServer(testNow);\n\n DateTime beginTime = hour(0).minusDays(100);\n DateTime endTime = testNow;\n\n Buckets buckets = new Buckets(beginTime, endTime);\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MetricsServer.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(MetricsServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "RAW_DATA_AGE_LIMIT_MAX =... | {
"body": "public Iterable<MeasurementDataNumericHighLowComposite> findDataForResource(int scheduleId, long beginTime,\n long endTime, int numberOfBuckets) {\n Stopwatch stopwatch = new Stopwatch().start();\n try {\n DateTime begin = new DateTime(beginTime);\n\n if (dateTime... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_132 | {
"fields": [
{
"declarator": "pingNetServiceDiscoveryComponent",
"modifier": "private",
"original_string": "private PingNetServiceDiscoveryComponent pingNetServiceDiscoveryComponent;",
"type": "PingNetServiceDiscoveryComponent",
"var_name": "pingNetServiceDiscoveryComponent"
},
... | {
"body": "@Test\n public void testDiscoverResources() throws Exception {\n // Manual add only, should always return empty set\n assertEquals(0, pingNetServiceDiscoveryComponent.discoverResources(null).size());\n }",
"class_method_signature": "PingNetServiceDiscoveryComponentTest.testDiscoverRes... | {
"fields": [
{
"declarator": "RESOURCE_NAME_PREFIX = \"Ping \"",
"modifier": "private static final",
"original_string": "private static final String RESOURCE_NAME_PREFIX = \"Ping \";",
"type": "String",
"var_name": "RESOURCE_NAME_PREFIX"
}
],
"file": "modules/plugins/netserv... | {
"body": "@Override\n public Set discoverResources(ResourceDiscoveryContext resourceDiscoveryContext)\n throws InvalidPluginConfigurationException, Exception {\n // We don't support auto-discovery.\n return Collections.emptySet();\n }",
"class_method_signature": "PingNetServiceDiscoveryC... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_61 | {
"fields": [],
"file": "modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java",
"identifier": "SnmpInfoTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldAssumeDefaultValues() throws Exception {\n Configuration configuration = new Configuration();\n configuration.setSimpleValue(PARAM_HOST, \"pipo\");\n configuration.setSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, \"molo\");\n\n SnmpInfo snmpInfo = SnmpI... | {
"fields": [
{
"declarator": "PARAM_HOST = \"host\"",
"modifier": "static final",
"original_string": "static final String PARAM_HOST = \"host\";",
"type": "String",
"var_name": "PARAM_HOST"
},
{
"declarator": "PARAM_PORT = \"port\"",
"modifier": "static final",
... | {
"body": "public static SnmpInfo load(Configuration configuration) {\n String host = configuration.getSimpleValue(PARAM_HOST, null); // required\n String port = configuration.getSimpleValue(PARAM_PORT, DEFAULT_PORT);\n String oid = configuration.getSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, null... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_165 | {
"fields": [
{
"declarator": "deploymentDirectory",
"modifier": "private",
"original_string": "private File deploymentDirectory;",
"type": "File",
"var_name": "deploymentDirectory"
},
{
"declarator": "resourceDataDirectory",
"modifier": "private",
"original... | {
"body": "@Test\n public void testGetShaZipped() throws Exception {\n //tell the method story as it happens: mock or create dependencies and configure\n //those dependencies to get the method under test to completion.\n File sampleWithoutManifestWar = new File(this.getClass().getResource(\"/s... | {
"fields": [
{
"declarator": "RHQ_SHA_256 = \"RHQ-Sha256\"",
"modifier": "private static final",
"original_string": "private static final String RHQ_SHA_256 = \"RHQ-Sha256\";",
"type": "String",
"var_name": "RHQ_SHA_256"
},
{
"declarator": "SHA256_FILE = \"application.... | {
"body": "public String retrieveDeploymentSHA(File deployment, File resourceDataDirectory) {\n String sha = null;\n\n if (deployment.isDirectory()) {\n File propertiesFile = new File(resourceDataDirectory, SHA256_FILE);\n\n if (propertiesFile.exists()) {\n FileInput... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_4 | {
"fields": [
{
"declarator": "nf = NumberFormat.getInstance()",
"modifier": "",
"original_string": "NumberFormat nf = NumberFormat.getInstance();",
"type": "NumberFormat",
"var_name": "nf"
}
],
"file": "modules/enterprise/gui/portal-war/src/test/java/org/rhq/enterprise/gui/l... | {
"body": "@Test\n public void testFormatBitMetrics() {\n List<MetricDisplaySummary> metricDisplaySummaries = new ArrayList<MetricDisplaySummary>();\n Locale locale = Locale.US;\n MessageResources messageResources = createMessageResources();\n\n // test bits\n MetricDisplaySummar... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MonitorUtils.class)",
"modifier": "private static",
"original_string": "private static Log log = LogFactory.getLog(MonitorUtils.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "RO = \"ro\"",
"mod... | {
"body": "public static Integer formatMetrics(List<MetricDisplaySummary> metricDisplaySummaries, Locale userLocale,\n MessageResources msgs) {\n Integer resourceCount = null;\n try {\n for (MetricDisplaySummary metricDisplaySummary : metricDisplaySummaries) {\n if (Doub... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_36 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByChangeSetCriteriaWithDriftCategoryFilter() throws Exception {\n MongoDBChangeSet c1 = new MongoDBChangeSet();\n c1.setCategory(COVERAGE);\n c1.setVersion(1);\n c1.setResourceId(1);\n c1.setDriftDefinitionId(1);\n c1.a... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByChangeSetCritiera(DriftChangeSetCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n \n if (criteria.getFilterId() != null) {\n // There is no need to apply any additional filters if the id filter is specified\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_41 | {
"fields": [
{
"declarator": "dao",
"modifier": "",
"original_string": "ChangeSetDAO dao;",
"type": "ChangeSetDAO",
"var_name": "dao"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT... | {
"body": "@Test(enabled = ENABLED)\n public void findByDriftCriteriaWithResourceIdsFilter() throws Exception {\n MongoDBChangeSet c1 = createChangeSet(COVERAGE, 1, 1, 1);\n dao.save(c1);\n\n MongoDBChangeSet c2 = createChangeSet(COVERAGE, 1, 2, 2);\n dao.save(c2);\n\n MongoDBCha... | {
"fields": [
{
"declarator": "morphia",
"modifier": "private",
"original_string": "private Morphia morphia;",
"type": "Morphia",
"var_name": "morphia"
}
],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/... | {
"body": "public List<MongoDBChangeSet> findByDriftCriteria(DriftCriteria criteria) {\n Query<MongoDBChangeSet> query = createQuery();\n\n if (criteria.getFilterId() != null) {\n // TODO use the $slice operator\n // The slice operator will allow us to return only the requested ent... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_112 | {
"fields": [
{
"declarator": "ENABLE_TESTS = true",
"modifier": "private static final",
"original_string": "private static final boolean ENABLE_TESTS = true;",
"type": "boolean",
"var_name": "ENABLE_TESTS"
},
{
"declarator": "DEST_BASE_DIR_NAME = \"Root File System\"",... | {
"body": "@Test(enabled = ENABLE_TESTS)\n public void testAntBundleRevert() throws Exception {\n // install then upgrade a bundle first\n testAntBundleUpgrade();\n cleanPluginDirs(); // clean everything but the dest dir - we want to keep the metadata\n prepareBeforeTestMethod(); // pre... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(AntBundlePluginComponent.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(AntBundlePluginComponent.class);",
"type": "Log",
"var_name": "LOG"
},
{
"de... | {
"body": "@Override\n public BundleDeployResult deployBundle(final BundleDeployRequest request) {\n BundleDeployResult result = new BundleDeployResult();\n try {\n BundleResourceDeployment resourceDeployment = request.getResourceDeployment();\n BundleDeployment bundleDeployment... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_283 | {
"fields": [
{
"declarator": "LEGACY_AMPS_VERSION = \"2.0\"",
"modifier": "static final",
"original_string": "static final String LEGACY_AMPS_VERSION = \"2.0\";",
"type": "String",
"var_name": "LEGACY_AMPS_VERSION"
},
{
"declarator": "NON_LEGACY_AMPS_VERSION = \"2.1\""... | {
"body": "@Test\n public void strategyShouldBeCalledToLoadConfig() throws Exception {\n final Configuration expectedConfig = new Configuration();\n\n final ConfigManagement loadConfig = context.mock(ConfigManagement.class);\n\n context.checking(new Expectations() {\n {\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(ConfigurationManager.class)",
"modifier": "private static final",
"original_string": "private static final Log log = LogFactory.getLog(ConfigurationManager.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator... | {
"body": "public Configuration loadResourceConfiguration(int resourceId) throws PluginContainerException {\n\n ConfigManagement loadConfig = configMgmtFactory.getStrategy(resourceId);\n Configuration configuration;\n\n try {\n configuration = loadConfig.executeLoad(resourceId);\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_16 | {
"fields": [
{
"declarator": "digestGenerator",
"modifier": "private",
"original_string": "private MessageDigestGenerator digestGenerator;",
"type": "MessageDigestGenerator",
"var_name": "digestGenerator"
},
{
"declarator": "random",
"modifier": "private",
... | {
"body": "@Test\n public void persistInitialChangeSetWithContentNotInDB() throws Exception {\n int driftDefId = 1;\n final String driftDefName = \"saveInitialChangeSetWithContentNotInDB\";\n final int resourceId = 1;\n\n final Headers headers = new Headers();\n headers.setBasedi... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(MongoDBDriftServer.class)",
"modifier": "private",
"original_string": "private Log log = LogFactory.getLog(MongoDBDriftServer.class);",
"type": "Log",
"var_name": "log"
},
{
"declarator": "connection",
"modifi... | {
"body": "@Override\n public DriftChangeSetSummary saveChangeSet(final Subject subject, final int resourceId, final File changeSetZip)\n throws Exception {\n\n final DriftChangeSetSummary summary = new DriftChangeSetSummary();\n\n ZipUtil.walkZipFile(changeSetZip, new ZipUtil.ZipEntryVisi... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_295 | {
"fields": [
{
"declarator": "componentInvocationContext = new ComponentInvocationContextImpl()",
"modifier": "private",
"original_string": "private ComponentInvocationContextImpl componentInvocationContext = new ComponentInvocationContextImpl();",
"type": "ComponentInvocationContextImpl"... | {
"body": "@Test(expectedExceptions = { IllegalArgumentException.class })\n public void localContextCannotBeNull() {\n componentInvocationContext.setLocalContext(null);\n }",
"class_method_signature": "ComponentInvocationContextImplTest.localContextCannotBeNull()",
"constructor": false,
"full_signa... | {
"fields": [
{
"declarator": "localContext = new ThreadLocal<LocalContext>() {\n @Override\n protected LocalContext initialValue() {\n return new LocalContext();\n }\n }",
"modifier": "private static final",
"original_string": "private static final ThreadLocal... | {
"body": "public void setLocalContext(LocalContext localContext) {\n if (localContext == null) {\n throw new IllegalArgumentException(\"localContext is null\");\n }\n ComponentInvocationContextImpl.localContext.set(localContext);\n }",
"class_method_signature": "ComponentInvocati... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_153 | {
"fields": [],
"file": "modules/core/util/src/test/java/org/rhq/core/util/file/FileUtilTest.java",
"identifier": "FileUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void visitEachFileInDir() throws Exception {\n File dir = new File(toFile(getClass().getResource(\".\")), \"visit-each-file-in-dir\");\n deleteDirectory(dir);\n dir.mkdirs();\n\n File file1 = new File(dir, \"file-1\");\n touch(file1);\n File file2... | {
"fields": [
{
"declarator": "invalidChars = null",
"modifier": "private static",
"original_string": "private static IntHashMap invalidChars = null;",
"type": "IntHashMap",
"var_name": "invalidChars"
}
],
"file": "modules/core/util/src/main/java/org/rhq/core/util/file/FileUt... | {
"body": "public static void forEachFile(File directory, FileVisitor visitor) {\n Deque<File> directories = new LinkedList<File>();\n directories.push(directory);\n\n while (!directories.isEmpty()) {\n File dir = directories.pop();\n File[] files = dir.listFiles();\n ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_57 | {
"fields": [],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/MapperTest.java",
"identifier": "MapperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void mapChangeSetToDTO() {\n MongoDBChangeSet changeSet = new MongoDBChangeSet();\n changeSet.setId(new ObjectId());\n changeSet.setCategory(DRIFT);\n changeSet.setDriftDefinitionId(1);\n changeSet.setDriftDefinitionName(\"testdef\");\n changeSet.... | {
"fields": [],
"file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/Mapper.java",
"identifier": "Mapper",
"interfaces": "",
"methods": [
{
"class_method_signature": "Mapper.toDTO(MongoDBChangeSet changeSet)",
"constructor": fal... | {
"body": "public DriftChangeSetDTO toDTO(MongoDBChangeSet changeSet) {\n DriftChangeSetDTO dto = new DriftChangeSetDTO();\n dto.setId(changeSet.getId());\n dto.setResourceId(changeSet.getResourceId());\n dto.setDriftDefinitionId(changeSet.getDriftDefinitionId());\n dto.setDriftHand... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_104 | {
"fields": [],
"file": "modules/plugins/wfly-10/src/test/java/org/rhq/modules/plugins/wildfly10/TemplatedSubResourcesComponentTest.java",
"identifier": "TemplatedSubResourcesComponentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@SuppressWarnings({ \"unchecked\" })\n @Test\n public void createResourceWithName() throws Exception {\n //tell the method story as it happens: mock or create dependencies and configure\n //those dependencies to get the method under test to completion.\n CreateResourceReport mock... | {
"fields": [
{
"declarator": "TYPE_CONFIGURATION = \"__type\"",
"modifier": "private final static",
"original_string": "private final static String TYPE_CONFIGURATION = \"__type\";",
"type": "String",
"var_name": "TYPE_CONFIGURATION"
},
{
"declarator": "NAME_CONFIGURAT... | {
"body": "@Override\n public CreateResourceReport createResource(CreateResourceReport report) {\n if (report.getResourceConfiguration().get(TYPE_CONFIGURATION) != null) {\n //Need to munge the report and configuration definition for with type in configuration:\n //1) Remove type from ... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
17278009_256 | {
"fields": [
{
"declarator": "configFacet",
"modifier": "",
"original_string": "ResourceConfigurationFacet configFacet;",
"type": "ResourceConfigurationFacet",
"var_name": "configFacet"
},
{
"declarator": "structuredAndRawConfigManagement",
"modifier": "",
... | {
"body": "@Test\n public void structuredConfigShouldGetLoaded() throws Exception {\n Configuration config = new Configuration();\n config.put(new PropertySimple(\"x\", \"1\"));\n config.put(new PropertySimple(\"y\", \"2\"));\n\n addDefaultExpectationsForLoad(config, EMPTY_SET);\n\n ... | {
"fields": [
{
"declarator": "log = LogFactory.getLog(StructuredAndRawConfigManagement.class)",
"modifier": "private final",
"original_string": "private final Log log = LogFactory.getLog(StructuredAndRawConfigManagement.class);",
"type": "Log",
"var_name": "log"
}
],
"file":... | {
"body": "public Configuration executeLoad(int resourceId) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResouceConfiguratonFacet(resourceId);\n\n Configuration configuration = facet.loadStructuredConfiguration();\n Set<RawConfiguration> rawConfigs = facet.loadRawCon... | {
"created": null,
"fork": null,
"fork_count": 85,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17278009,
"size": 138394,
"stargazer_count": 150,
"stars": null,
"updates": null,
"url": "https://github.com/rhq-project/rhq"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.