id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
31202652_43 | {
"fields": [
{
"declarator": "restoreSystemProperties = new RestoreSystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();",
"type": "RestoreSystemProperties",
... | {
"body": "@Test\n public void testInitWithoutSufficientFunds() {\n InitAction action = mock(InitAction.class);\n when(action.getFunds()).thenReturn(10.0);\n when(action.getMaxPotentialCost(\"RTO-24\")).thenReturn(50.0);\n\n PeakInvestigatorInitProvider provider = factory.createInitProvider(action);\n ... | {
"fields": [
{
"declarator": "DEFAULT_RTO = \"RTO-24\"",
"modifier": "private final static",
"original_string": "private final static String DEFAULT_RTO = \"RTO-24\";",
"type": "String",
"var_name": "DEFAULT_RTO"
}
],
"file": "msdk-spectra-peakinvestigator/src/main/java/io/g... | {
"body": "@Override\n public PeakInvestigatorInitProvider createInitProvider(InitAction action) {\n final Status status = action.getMaxPotentialCost(DEFAULT_RTO) <= action.getFunds()\n ? Status.ACCEPT : Status.CANCEL;\n return new PeakInvestigatorInitProvider() {\n\n @Override\n public Status... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_14 | {
"fields": [
{
"declarator": "TEST_DATA_PATH = \"src/test/resources/\"",
"modifier": "private static final",
"original_string": "private static final String TEST_DATA_PATH = \"src/test/resources/\";",
"type": "String",
"var_name": "TEST_DATA_PATH"
}
],
"file": "msdk-io-filet... | {
"body": "@Test\n public void testMzDB() throws MSDKException, IOException {\n File fileName = new File(TEST_DATA_PATH + \"OVEMB150205_12.raw.0.9.8_truncated.mzDB\");\n FileType fileType = FileTypeDetectionAlgorithm.detectDataFileType(fileName);\n Assert.assertEquals(FileType.MZDB, fileType);\n }",
"cla... | {
"fields": [
{
"declarator": "CDF_HEADER = \"CDF\"",
"modifier": "private static final",
"original_string": "private static final String CDF_HEADER = \"CDF\";",
"type": "String",
"var_name": "CDF_HEADER"
},
{
"declarator": "MZML_HEADER = \"<mzML\"",
"modifier": "... | {
"body": "public static @Nullable FileType detectDataFileType(@Nonnull File fileName) throws IOException {\n\n // Parameter check\n Preconditions.checkNotNull(fileName);\n\n if (fileName.isDirectory()) {\n // To check for Waters .raw directory, we look for _FUNC[0-9]{3}.DAT\n for (File f : fileNam... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_63 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCentroided10() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"centroided10.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawD... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_34 | {
"fields": [
{
"declarator": "mzValues1 = {100.0, 200.0}",
"modifier": "private static final",
"original_string": "private static final double[] mzValues1 = {100.0, 200.0};",
"type": "double[]",
"var_name": "mzValues1"
},
{
"declarator": "intensityValues1 = {10.0f, 20.... | {
"body": "@Test\n public void testExportSpectrum() throws IOException {\n File file = folder.newFile();\n MsSpectrum spectrum = mockSpectrum(mzValues1, intensityValues1);\n\n TxtExportAlgorithm.exportSpectrum(file, spectrum);\n\n List<String> lines = Files.readAllLines(file.toPath(), Charset.defaultChar... | {
"fields": [],
"file": "msdk-io-txt/src/main/java/io/github/msdk/io/txt/TxtExportAlgorithm.java",
"identifier": "TxtExportAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "TxtExportAlgorithm.exportSpectrum(@Nonnull File exportFile, @Nonnull MsSpectrum spectrum)",
"constr... | {
"body": "public static void exportSpectrum(@Nonnull File exportFile, @Nonnull MsSpectrum spectrum)\n throws IOException {\n exportSpectra(exportFile, Collections.singleton(spectrum));\n }",
"class_method_signature": "TxtExportAlgorithm.exportSpectrum(@Nonnull File exportFile, @Nonnull MsSpectrum spectrum... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_22 | {
"fields": [],
"file": "msdk-isotopes-isotopepattern/src/test/java/io/github/msdk/isotopes/isotopepattern/IsotopePatternGeneratorAlgorithmTest.java",
"identifier": "IsotopePatternGeneratorAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Ignore // Test ignored because it fails when executed on Travis - see\n // https://github.com/cdk/cdk/pull/196 for details\n @Test\n public void testC20H30Fe2P2S4Cl4() throws MSDKException {\n\n String formula = \"C20H30Fe2P2S4Cl4\";\n\n MsSpectrum pattern =\n IsotopePatternGenerat... | {
"fields": [
{
"declarator": "ELECTRON_MASS = 5.4857990943E-4",
"modifier": "private static final",
"original_string": "private static final double ELECTRON_MASS = 5.4857990943E-4;",
"type": "double",
"var_name": "ELECTRON_MASS"
},
{
"declarator": "formulaPattern =\n ... | {
"body": "public static @Nonnull MsSpectrum generateIsotopes(@Nonnull String chemicalFormula,\n @Nonnull Double minAbundance, @Nonnull Float intensityScale, @Nonnull Double mzTolerance) {\n\n Matcher m = formulaPattern.matcher(chemicalFormula);\n if (!m.matches())\n throw new IllegalArgumentException... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_75 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProfile6() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"profile6.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawDataFile ... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_59 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCentroided6() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"centroided6.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawDat... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_18 | {
"fields": [
{
"declarator": "msFunction = \"MS\"",
"modifier": "private static @Nonnull",
"original_string": "private static @Nonnull String msFunction = \"MS\";",
"type": "String",
"var_name": "msFunction"
},
{
"declarator": "msScan1 = new SimpleMsScan(123, msFunctio... | {
"body": "@Test\n public void testSetRawDataFile() throws MSDKException {\n RawDataFile rdf = new SimpleRawDataFile(\"test\", null, FileType.UNKNOWN);\n SimpleMsScan scan = new SimpleMsScan(1);\n scan.setRawDataFile(rdf);\n Assert.assertEquals(rdf, scan.getRawDataFile());\n }",
"class_method_signatur... | {
"fields": [
{
"declarator": "dataFile",
"modifier": "private @Nullable",
"original_string": "private @Nullable RawDataFile dataFile;",
"type": "RawDataFile",
"var_name": "dataFile"
},
{
"declarator": "scanNumber",
"modifier": "private @Nonnull",
"original_... | {
"body": "public void setRawDataFile(@Nonnull RawDataFile newRawDataFile) {\n if ((this.dataFile != null) && (this.dataFile != newRawDataFile)) {\n throw new MSDKRuntimeException(\n \"Cannot set the raw data file reference to this scan, because it has already been set\");\n }\n this.dataFile =... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_19 | {
"fields": [
{
"declarator": "msFunction = \"MS\"",
"modifier": "private static @Nonnull",
"original_string": "private static @Nonnull String msFunction = \"MS\";",
"type": "String",
"var_name": "msFunction"
},
{
"declarator": "msScan1 = new SimpleMsScan(123, msFunctio... | {
"body": "@Test(expected = MSDKRuntimeException.class)\n public void testSetRawDataFileFail() throws MSDKException {\n RawDataFile rdf = new SimpleRawDataFile(\"test\", null, FileType.UNKNOWN);\n RawDataFile rdf2 = new SimpleRawDataFile(\"test2\", null, FileType.UNKNOWN);\n SimpleMsScan scan = new SimpleMs... | {
"fields": [
{
"declarator": "dataFile",
"modifier": "private @Nullable",
"original_string": "private @Nullable RawDataFile dataFile;",
"type": "RawDataFile",
"var_name": "dataFile"
},
{
"declarator": "scanNumber",
"modifier": "private @Nonnull",
"original_... | {
"body": "public void setRawDataFile(@Nonnull RawDataFile newRawDataFile) {\n if ((this.dataFile != null) && (this.dataFile != newRawDataFile)) {\n throw new MSDKRuntimeException(\n \"Cannot set the raw data file reference to this scan, because it has already been set\");\n }\n this.dataFile =... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_58 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCentroided5() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"centroided5.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawDat... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_74 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProfile5() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"profile5.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawDataFile ... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_23 | {
"fields": [],
"file": "msdk-isotopes-isotopepattern/src/test/java/io/github/msdk/isotopes/isotopepattern/IsotopePatternGeneratorAlgorithmTest.java",
"identifier": "IsotopePatternGeneratorAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testF1000() throws MSDKException {\n\n String formula = \"F1000\";\n\n MsSpectrum pattern =\n IsotopePatternGeneratorAlgorithm.generateIsotopes(formula, 0.001, 1000.0f, 0.001);\n\n Assert.assertEquals(new Integer(1), pattern.getNumberOfDataPoints());\n Assert.assertE... | {
"fields": [
{
"declarator": "ELECTRON_MASS = 5.4857990943E-4",
"modifier": "private static final",
"original_string": "private static final double ELECTRON_MASS = 5.4857990943E-4;",
"type": "double",
"var_name": "ELECTRON_MASS"
},
{
"declarator": "formulaPattern =\n ... | {
"body": "public static @Nonnull MsSpectrum generateIsotopes(@Nonnull String chemicalFormula,\n @Nonnull Double minAbundance, @Nonnull Float intensityScale, @Nonnull Double mzTolerance) {\n\n Matcher m = formulaPattern.matcher(chemicalFormula);\n if (!m.matches())\n throw new IllegalArgumentException... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_35 | {
"fields": [
{
"declarator": "mzValues1 = {100.0, 200.0}",
"modifier": "private static final",
"original_string": "private static final double[] mzValues1 = {100.0, 200.0};",
"type": "double[]",
"var_name": "mzValues1"
},
{
"declarator": "intensityValues1 = {10.0f, 20.... | {
"body": "@Test\n public void testExportSpectra() throws IOException {\n File file = folder.newFile();\n Collection<MsSpectrum> spectra = new ArrayList<>();\n\n spectra.add(mockSpectrum(mzValues1, intensityValues1));\n spectra.add(mockSpectrum(mzValues2, intensityValues2));\n\n TxtExportAlgorithm.exp... | {
"fields": [],
"file": "msdk-io-txt/src/main/java/io/github/msdk/io/txt/TxtExportAlgorithm.java",
"identifier": "TxtExportAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "TxtExportAlgorithm.exportSpectrum(@Nonnull File exportFile, @Nonnull MsSpectrum spectrum)",
"constr... | {
"body": "public static void exportSpectra(@Nonnull File exportFile,\n @Nonnull Collection<MsSpectrum> spectra) throws IOException {\n exportSpectra(exportFile, spectra, \" \");\n }",
"class_method_signature": "TxtExportAlgorithm.exportSpectra(@Nonnull File exportFile,\n @Nonnull Collection<MsSpectru... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_62 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCentroided9() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"centroided9.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawDat... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_15 | {
"fields": [
{
"declarator": "chromatogram1 = new SimpleChromatogram()",
"modifier": "private static @Nonnull",
"original_string": "private static @Nonnull SimpleChromatogram chromatogram1 = new SimpleChromatogram();",
"type": "SimpleChromatogram",
"var_name": "chromatogram1"
}
... | {
"body": "@Test\n public void testIsolationInfo() throws MSDKException {\n // Verify isolation info\n Assert.assertEquals(new LinkedList<>(), chromatogram1.getIsolations());\n\n // Change isolation info\n final @Nonnull List<IsolationInfo> newIsolations = chromatogram1.getIsolations();\n newIsolation... | {
"fields": [
{
"declarator": "dataFile",
"modifier": "private @Nullable",
"original_string": "private @Nullable RawDataFile dataFile;",
"type": "RawDataFile",
"var_name": "dataFile"
},
{
"declarator": "chromatogramNumber",
"modifier": "private @Nonnull",
"o... | {
"body": "@Override\n @Nonnull\n public List<IsolationInfo> getIsolations() {\n return isolations;\n }",
"class_method_signature": "SimpleChromatogram.getIsolations()",
"constructor": false,
"full_signature": "@Override @Nonnull public List<IsolationInfo> getIsolations()",
"identifier": "getIsolations"... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_42 | {
"fields": [
{
"declarator": "restoreSystemProperties = new RestoreSystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();",
"type": "RestoreSystemProperties",
... | {
"body": "@Test\n public void testInitWithSufficientFunds() {\n InitAction action = mock(InitAction.class);\n when(action.getFunds()).thenReturn(100.0);\n when(action.getMaxPotentialCost(\"RTO-24\")).thenReturn(50.0);\n\n PeakInvestigatorInitProvider provider = factory.createInitProvider(action);\n a... | {
"fields": [
{
"declarator": "DEFAULT_RTO = \"RTO-24\"",
"modifier": "private final static",
"original_string": "private final static String DEFAULT_RTO = \"RTO-24\";",
"type": "String",
"var_name": "DEFAULT_RTO"
}
],
"file": "msdk-spectra-peakinvestigator/src/main/java/io/g... | {
"body": "@Override\n public PeakInvestigatorInitProvider createInitProvider(InitAction action) {\n final Status status = action.getMaxPotentialCost(DEFAULT_RTO) <= action.getFunds()\n ? Status.ACCEPT : Status.CANCEL;\n return new PeakInvestigatorInitProvider() {\n\n @Override\n public Status... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_54 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCentroided1() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"centroided1.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawDat... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_7 | {
"fields": [
{
"declarator": "TEST_DATA_PATH = \"src/test/resources/\"",
"modifier": "private static final",
"original_string": "private static final String TEST_DATA_PATH = \"src/test/resources/\";",
"type": "String",
"var_name": "TEST_DATA_PATH"
}
],
"file": "msdk-io-filet... | {
"body": "@Test\n public void testNetCDF() throws MSDKException, IOException {\n File fileName = new File(TEST_DATA_PATH + \"wt15.CDF\");\n FileType fileType = FileTypeDetectionAlgorithm.detectDataFileType(fileName);\n Assert.assertEquals(FileType.NETCDF, fileType);\n }",
"class_method_signature": "File... | {
"fields": [
{
"declarator": "CDF_HEADER = \"CDF\"",
"modifier": "private static final",
"original_string": "private static final String CDF_HEADER = \"CDF\";",
"type": "String",
"var_name": "CDF_HEADER"
},
{
"declarator": "MZML_HEADER = \"<mzML\"",
"modifier": "... | {
"body": "public static @Nullable FileType detectDataFileType(@Nonnull File fileName) throws IOException {\n\n // Parameter check\n Preconditions.checkNotNull(fileName);\n\n if (fileName.isDirectory()) {\n // To check for Waters .raw directory, we look for _FUNC[0-9]{3}.DAT\n for (File f : fileNam... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_78 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testProfile9() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"profile9.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawDataFile ... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_39 | {
"fields": [
{
"declarator": "restoreSystemProperties = new RestoreSystemProperties()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();",
"type": "RestoreSystemProperties",
... | {
"body": "@Test\n public void testProjectInfoAvailable() {\n System.setProperty(\"peakinvestigator.username\", \"joe\");\n System.setProperty(\"peakinvestigator.password\", \"badpassword\");\n System.setProperty(\"peakinvestigator.project\", \"1234\");\n\n PeakInvestigatorProjectProvider provider = fact... | {
"fields": [
{
"declarator": "DEFAULT_RTO = \"RTO-24\"",
"modifier": "private final static",
"original_string": "private final static String DEFAULT_RTO = \"RTO-24\";",
"type": "String",
"var_name": "DEFAULT_RTO"
}
],
"file": "msdk-spectra-peakinvestigator/src/main/java/io/g... | {
"body": "@Override\n public PeakInvestigatorProjectProvider createProjectProvider() {\n return new PeakInvestigatorProjectProvider() {\n\n @Override\n public Status show() {\n if (System.getProperty(\"peakinvestigator.username\") == null\n || System.getProperty(\"peakinvestigator.pas... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
31202652_81 | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/test/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithmTest.java",
"identifier": "SpectrumTypeDetectionAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testThresholded2() throws Exception {\n\n File inputFile =\n new File(this.getClass().getClassLoader().getResource(\"thresholded2.mzML\").toURI());\n Assert.assertTrue(inputFile.canRead());\n MzMLFileImportMethod importer = new MzMLFileImportMethod(inputFile);\n RawD... | {
"fields": [],
"file": "msdk-spectra-centroidprofiledetection/src/main/java/io/github/msdk/spectra/centroidprofiledetection/SpectrumTypeDetectionAlgorithm.java",
"identifier": "SpectrumTypeDetectionAlgorithm",
"interfaces": "",
"methods": [
{
"class_method_signature": "SpectrumTypeDetectionAlgorith... | {
"body": "public static MsSpectrumType detectSpectrumType(@Nonnull MsSpectrum msSpectrum) {\n double mzValues[] = msSpectrum.getMzValues();\n float intensityValues[] = msSpectrum.getIntensityValues();\n Integer size = msSpectrum.getNumberOfDataPoints();\n return detectSpectrumType(mzValues, intensityValu... | {
"created": null,
"fork": null,
"fork_count": 40,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31202652,
"size": 213452,
"stargazer_count": 26,
"stars": null,
"updates": null,
"url": "https://github.com/msdk/msdk"
} |
175559661_32 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void deleteRoleExample() throws Exception {\n WormholeRole role = createRole();\n roleRepository.save(role);\n this.mockMvc.perform(delete(\"/v1/auth/role/\"+role.getId()+\"\").content(\"{\\\"id\\\":\\\"\" + role.getId() + \"\\\"}\"))\n .andExpect(status().is... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/role\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createRole(@RequestBody WormholeRole role) {\n if (roleRepository.findOneByRoleName(role.getRoleName()) != null) {\n String messa... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_4 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void sensorQuerySettingByIDExample() throws Exception {\n SensorSetting sensorsetting = createSensorSetting();\n sensorSettingRepository.save(sensorsetting);\n this.mockMvc\n .perform(get(\"/v1/sensors/setting/\"+sensorsetting.getId())\n .content... | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private SensorSettingRepository repository;",
"type": "SensorSettingRepository",
"var_name": "repository"
}
],
"file": "flowgate-api/src/main/java/com/vmware/f... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value=\"/setting\",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createSensorSetting(@RequestBody SensorSetting sensorSetting) {\n if (!repository.findAllByType(sensorSetting.getType()).isEmpty()) {\n ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_24 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void updateUserExample1() throws Exception {\n WormholeUserDetails userdetail = new WormholeUserDetails();\n String userId = UUID.randomUUID().toString();\n userdetail.setUserId(userId);\n List<String> rolenames = new ArrayList<String>();\n rolenames.add(\"admin\")... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_8 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void deleteServerMappingExample() throws Exception {\n ServerMapping mapping = createServerMapping();\n ServerMapping returnMapping = serverMappingRepository.save(mapping);\n\n this.mockMvc.perform(delete(\"/v1/assets/mapping/\" + returnMapping.getId()))\n .andExp... | {
"fields": [
{
"declarator": "assetRepository",
"modifier": "@Autowired",
"original_string": "@Autowired\n AssetRepository assetRepository;",
"type": "AssetRepository",
"var_name": "assetRepository"
},
{
"declarator": "facilityRepository",
"modifier": "@Autowir... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n assetRepository.deleteById(id);\n }",
"class_method_signature": "AssetController.delete(@PathVariable String id)",
"constructor": false,
"ful... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_28 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void readUsersByPageExample() throws Exception {\n WormholeUser user1 = createUser();\n userRepository.save(user1);\n this.mockMvc.perform(get(\"/v1/auth/user\").content(\"{\\\"currentPage\\\":\\\"1\\\",\\\"pageSize\\\":\\\"5\\\"}\")\n .param(\"currentPage\",... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_12 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void facilitySoftwareDeleteExample() throws Exception {\n FacilitySoftwareConfig facilitySoftware = createFacilitySoftware();\n facilitySoftware = facilitySoftwareRepository.save(facilitySoftware);\n this.mockMvc\n .perform(delete(\"/v1/facilitysoftware/\" + facil... | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private FacilitySoftwareConfigRepository repository;",
"type": "FacilitySoftwareConfigRepository",
"var_name": "repository"
},
{
"declarator": "serverVal... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n repository.deleteById(id);\n }",
"class_method_signature": "FacilitySoftwareController.delete(@PathVariable String id)",
"constructor": false,
... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_13 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void sDDCSoftwareDeleteVcenterExample() throws Exception {\n SDDCSoftwareConfig sddc = createSDDCSoftwareConfig(SoftwareType.VCENTER);\n sddcRepository.save(sddc);\n ServerMapping serverMapping1 = createServerMapping(SoftwareType.VCENTER, sddc.getId());\n serverMappingR... | {
"fields": [
{
"declarator": "sddcRepository",
"modifier": "@Autowired\n protected",
"original_string": "@Autowired\n protected SDDCSoftwareRepository sddcRepository;",
"type": "SDDCSoftwareRepository",
"var_name": "sddcRepository"
},
{
"declarator": "serverValidat... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n\n\t Optional<SDDCSoftwareConfig> sddcOptional = sddcRepository.findById(id);\n\t SDDCSoftwareConfig server = new SDDCSoftwareConfig();\n\t try {\n\t\t ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_29 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void createRoleExample() throws Exception {\n WormholeRole role = createRole();\n this.mockMvc.perform(post(\"/v1/auth/role\").contentType(MediaType.APPLICATION_JSON)\n .content(objectMapper.writeValueAsString(role)))\n .andExpect(status().isCreated())... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/role\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createRole(@RequestBody WormholeRole role) {\n if (roleRepository.findOneByRoleName(role.getRoleName()) != null) {\n String messa... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_9 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void assetDeleteExample() throws Exception {\n Asset asset = createAsset();\n asset = assetRepository.save(asset);\n this.mockMvc\n .perform(delete(\"/v1/assets/\" + asset.getId())\n .content(\"{\\\"id\\\":\\\"\" + asset.getId() + \"\\\"}\"))\n ... | {
"fields": [
{
"declarator": "assetRepository",
"modifier": "@Autowired",
"original_string": "@Autowired\n AssetRepository assetRepository;",
"type": "AssetRepository",
"var_name": "assetRepository"
},
{
"declarator": "facilityRepository",
"modifier": "@Autowir... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n assetRepository.deleteById(id);\n }",
"class_method_signature": "AssetController.delete(@PathVariable String id)",
"constructor": false,
"ful... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_25 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void readOneUserByIdExample() throws Exception {\n WormholeUserDetails userdetail = new WormholeUserDetails();\n String userId = UUID.randomUUID().toString();\n userdetail.setUserId(userId);\n List<String> rolenames = new ArrayList<String>();\n rolenames.add(\"admi... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_5 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void deleteFacilityAdapterExample() throws Exception {\n SetOperations<String, String> setop = Mockito.mock(SetOperations.class);\n when(redis.opsForSet()).thenReturn(setop);\n when(setop.isMember(anyString(), anyString())).thenReturn(true);\n when(setop.remove(anyStrin... | {
"fields": [
{
"declarator": "facilityAdapterRepo",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private FacilityAdapterRepository facilityAdapterRepo;",
"type": "FacilityAdapterRepository",
"var_name": "facilityAdapterRepo"
},
{
"declarator... | {
"body": "@RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void remove(@PathVariable String id) {\n facilityAdapterService.deleteAdapter(id);\n }",
"class_method_signature": "FacilityAdapterController.remove(@PathVariable String id)",
"constructor": false,
"full_signature": "... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_33 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void updateRoleExample() throws Exception {\n\n WormholeRole role = createRole();\n roleRepository.save(role);\n role.setRoleName(\"sddcuser\");\n\n this.mockMvc.perform(put(\"/v1/auth/role\").contentType(MediaType.APPLICATION_JSON_VALUE)\n .content(obj... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/role\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createRole(@RequestBody WormholeRole role) {\n if (roleRepository.findOneByRoleName(role.getRoleName()) != null) {\n String messa... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_14 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void sDDCSoftwareDeleteVroAndVropsMpExample() throws Exception {\n SDDCSoftwareConfig sddc = createSDDCSoftwareConfig(SoftwareType.VRO);\n sddcRepository.save(sddc);\n ServerMapping serverMapping1 = createServerMapping(SoftwareType.VRO, sddc.getId());\n serverMappingRep... | {
"fields": [
{
"declarator": "sddcRepository",
"modifier": "@Autowired\n protected",
"original_string": "@Autowired\n protected SDDCSoftwareRepository sddcRepository;",
"type": "SDDCSoftwareRepository",
"var_name": "sddcRepository"
},
{
"declarator": "serverValidat... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n\n\t Optional<SDDCSoftwareConfig> sddcOptional = sddcRepository.findById(id);\n\t SDDCSoftwareConfig server = new SDDCSoftwareConfig();\n\t try {\n\t\t ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_2 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void udapteAnSensorSetting() throws JsonProcessingException, Exception {\n SensorSetting sensorsetting = createSensorSetting();\n sensorSettingRepository.save(sensorsetting);\n sensorsetting.setMaxNum(25);\n this.mockMvc\n .perform(put(\"/v1/sensors/setting\... | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private SensorSettingRepository repository;",
"type": "SensorSettingRepository",
"var_name": "repository"
}
],
"file": "flowgate-api/src/main/java/com/vmware/f... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value=\"/setting\",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createSensorSetting(@RequestBody SensorSetting sensorSetting) {\n if (!repository.findAllByType(sensorSetting.getType()).isEmpty()) {\n ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_22 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void deleteUserExample() throws Exception {\n WormholeUser user = createUser();\n userRepository.save(user);\n\n this.mockMvc.perform(delete(\"/v1/auth/user/\"+user.getId()+\"\").content(\"{\\\"id\\\":\\\"\" + user.getId() + \"\\\"}\"))\n .andExpect(status().... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_18 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void testRefreshToken() throws Exception {\n ValueOperations<String, String> valueOperations = Mockito.mock(ValueOperations.class);\n Mockito.doReturn(valueOperations).when(template).opsForValue();\n WormholeUser wormholeuser = createUser();\n String userId = UUID.rando... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@RequestMapping(value = \"/token/refresh\", method = RequestMethod.GET)\n public AuthToken refreshToken(HttpServletRequest request, HttpServletResponse response) {\n String authToken = accessTokenService.getToken(request);\n if (authToken == null || \"\".equals(authToken)) {\n return nu... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_19 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void testRefreshToken1() throws Exception {\n AuthToken token = new AuthToken();\n Mockito.doReturn(token).when(tokenService).refreshToken(any());\n this.mockMvc.perform(get(\"/v1/auth/token/refresh\"))\n .andExpect(status().isOk())\n .andReturn();\n }",
"class... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@RequestMapping(value = \"/token/refresh\", method = RequestMethod.GET)\n public AuthToken refreshToken(HttpServletRequest request, HttpServletResponse response) {\n String authToken = accessTokenService.getToken(request);\n if (authToken == null || \"\".equals(authToken)) {\n return nu... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_23 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void updateUserExample() throws Exception {\n WormholeUserDetails userdetail = new WormholeUserDetails();\n String userId = UUID.randomUUID().toString();\n userdetail.setUserId(userId);\n List<String> rolenames = new ArrayList<String>();\n rolenames.add(\"admin\");... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_3 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void sensorSettingQueryByPageExample() throws Exception {\n SensorSetting sensorsetting = createSensorSetting();\n sensorSettingRepository.save(sensorsetting);\n int pageNumber = 1;\n int pageSize = 5;\n this.mockMvc\n .perform(get(\"/v1/sensors/setting... | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private SensorSettingRepository repository;",
"type": "SensorSettingRepository",
"var_name": "repository"
}
],
"file": "flowgate-api/src/main/java/com/vmware/f... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value=\"/setting\",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createSensorSetting(@RequestBody SensorSetting sensorSetting) {\n if (!repository.findAllByType(sensorSetting.getType()).isEmpty()) {\n ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_15 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void sDDCSoftwareDeleteOtherExample() throws Exception {\n SDDCSoftwareConfig sddc = createSDDCSoftwareConfig(SoftwareType.OTHERS);\n sddcRepository.save(sddc);\n this.mockMvc\n .perform(\n delete(\"/v1/sddc/\" + sddc.getId()))\n .andEx... | {
"fields": [
{
"declarator": "sddcRepository",
"modifier": "@Autowired\n protected",
"original_string": "@Autowired\n protected SDDCSoftwareRepository sddcRepository;",
"type": "SDDCSoftwareRepository",
"var_name": "sddcRepository"
},
{
"declarator": "serverValidat... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n\n\t Optional<SDDCSoftwareConfig> sddcOptional = sddcRepository.findById(id);\n\t SDDCSoftwareConfig server = new SDDCSoftwareConfig();\n\t try {\n\t\t ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_16 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void sDDCSoftwareDeleteExceptionExample() throws Exception {\n\n\t MvcResult result = this.mockMvc\n .perform(\n delete(\"/v1/sddc/\" + \"10\"))\n .andExpect(status().isNotFound()).andReturn();\n\t TestCase.assertEquals(\"Failed to find sddc with ... | {
"fields": [
{
"declarator": "sddcRepository",
"modifier": "@Autowired\n protected",
"original_string": "@Autowired\n protected SDDCSoftwareRepository sddcRepository;",
"type": "SDDCSoftwareRepository",
"var_name": "sddcRepository"
},
{
"declarator": "serverValidat... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n\n\t Optional<SDDCSoftwareConfig> sddcOptional = sddcRepository.findById(id);\n\t SDDCSoftwareConfig server = new SDDCSoftwareConfig();\n\t try {\n\t\t ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_20 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void testLogout() throws Exception {\n ValueOperations<String, String> valueOperations = Mockito.mock(ValueOperations.class);\n Mockito.doReturn(valueOperations).when(template).opsForValue();\n this.mockMvc.perform(get(\"/v1/auth/logout\").header(\"Authorization\", \"Bearer ... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/logout\", method = RequestMethod.GET)\n public void logout(HttpServletRequest request, HttpServletResponse response) {\n String authToken = accessTokenService.getToken(request);\n if (authToken != null && !\"\".equals(authToken)) {\n... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_0 | {
"fields": [],
"file": "flowgate-api/src/test/java/com/vmware/flowgate/util/FlowgateKeystoreTest.java",
"identifier": "FlowgateKeystoreTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGuardStore() {\n Assert.assertTrue(FlowgateKeystore.getEncryptKey().length() == 16);\n }",
"class_method_signature": "FlowgateKeystoreTest.testGuardStore()",
"constructor": false,
"full_signature": "@Test public void testGuardStore()",
"identifier": "testGuardStore"... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(FlowgateKeystore.class)",
"modifier": "private static",
"original_string": "private static Logger logger = LoggerFactory.getLogger(FlowgateKeystore.class);",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public static String getEncryptKey() {\n try {\n KeyStore.PasswordProtection keyStorePP =\n new KeyStore.PasswordProtection(guardStorePass.toCharArray());\n KeyStore.SecretKeyEntry ske =\n (KeyStore.SecretKeyEntry) keyStore.getEntry(guardKeyAlias, keyStorePP... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_1 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void createAnSensorSetting() throws JsonProcessingException, Exception {\n SensorSetting sensorsetting = createSensorSetting();\n this.mockMvc\n .perform(post(\"/v1/sensors/setting\").contentType(MediaType.APPLICATION_JSON)\n .content(objectMapper.wri... | {
"fields": [
{
"declarator": "repository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private SensorSettingRepository repository;",
"type": "SensorSettingRepository",
"var_name": "repository"
}
],
"file": "flowgate-api/src/main/java/com/vmware/f... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value=\"/setting\",method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createSensorSetting(@RequestBody SensorSetting sensorSetting) {\n if (!repository.findAllByType(sensorSetting.getType()).isEmpty()) {\n ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_21 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void createUserExample() throws Exception {\n WormholeUser user = createUser();\n this.mockMvc.perform(post(\"/v1/auth/user\").contentType(MediaType.APPLICATION_JSON)\n .content(objectMapper.writeValueAsString(user)))\n .andExpect(status().isCreated())... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_17 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void testCreateToken() throws Exception {\n ValueOperations<String, String> valueOperations = Mockito.mock(ValueOperations.class);\n Mockito.doReturn(valueOperations).when(template).opsForValue();\n WormholeUser wormholeuser = createUser();\n wormholeuser.setUserName(\"... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_26 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void readOneUserByNameExample() throws Exception {\n WormholeUserDetails userdetail = new WormholeUserDetails();\n String userId = UUID.randomUUID().toString();\n userdetail.setUserId(userId);\n List<String> rolenames = new ArrayList<String>();\n rolenames.add(\"ad... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_6 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void removeRealTimeData() throws Exception {\n RealTimeData realTimeData = new RealTimeData();\n realTimeData.setId(UUID.randomUUID().toString());\n realTimeData.setAssetID(\"5b7d208d55368540fcba1692\");\n realTimeData.setTime(14235666666l);\n realtimeDataRepositor... | {
"fields": [
{
"declarator": "assetRepository",
"modifier": "@Autowired",
"original_string": "@Autowired\n AssetRepository assetRepository;",
"type": "AssetRepository",
"var_name": "assetRepository"
},
{
"declarator": "facilityRepository",
"modifier": "@Autowir... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/realtimedata/{expiredtimerange}\", method = RequestMethod.DELETE)\n public void removeRealTimeData(@PathVariable(\"expiredtimerange\") Long expiredtimerange) {\n long currentTime = System.currentTimeMillis();\n if(expiredtimerange < ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_30 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void readOneRoleByIdExample() throws Exception {\n WormholeRole role = createRole();\n roleRepository.save(role);\n this.mockMvc.perform(get(\"/v1/auth/role/\"+role.getId()+\"\"))\n .andExpect(status().isOk())\n .andDo(document(\"AuthController-r... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/role\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createRole(@RequestBody WormholeRole role) {\n if (roleRepository.findOneByRoleName(role.getRoleName()) != null) {\n String messa... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_10 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void getExpiredTimeRangeTest() {\n ValueOperations<String, String> valueOperations = Mockito.mock(ValueOperations.class);\n Mockito.doReturn(valueOperations).when(template).opsForValue();\n try {\n this.mockMvc.perform(get(\"/v1/setting/datapersistenttime\"))\n ... | {
"fields": [
{
"declarator": "template",
"modifier": "@Autowired",
"original_string": "@Autowired\n StringRedisTemplate template;",
"type": "StringRedisTemplate",
"var_name": "template"
}
],
"file": "flowgate-api/src/main/java/com/vmware/flowgate/controller/SystemSettingCo... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/datapersistenttime\", method = RequestMethod.GET)\n public Long getExpiredTimeRange() {\n long expiredTimeRange = 0l;\n String expiredTimeRangeValue = template.opsForValue().get(EventMessageUtil.EXPIREDTIMERANGE);\n if(expiredTi... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_11 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void updateExpiredTimeRangeTest() throws Exception{\n ValueOperations<String, String> valueOperations = Mockito.mock(ValueOperations.class);\n Mockito.doReturn(valueOperations).when(template).opsForValue();\n this.mockMvc.perform(put(\"/v1/setting/datapersistenttime/89000000... | {
"fields": [
{
"declarator": "template",
"modifier": "@Autowired",
"original_string": "@Autowired\n StringRedisTemplate template;",
"type": "StringRedisTemplate",
"var_name": "template"
}
],
"file": "flowgate-api/src/main/java/com/vmware/flowgate/controller/SystemSettingCo... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/datapersistenttime/{time}\", method = RequestMethod.PUT)\n public void updateExpiredTimeRange(@PathVariable(\"time\") Long time) {\n if(time < FlowgateConstant.DEFAULTEXPIREDTIMERANGE) {\n throw new WormholeRequestException(\"Expi... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_31 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void readRoleByPageExample() throws Exception {\n WormholeRole role = createRole();\n roleRepository.save(role);\n this.mockMvc.perform(get(\"/v1/auth/role\").content(\"{\\\"currentPage\\\":\\\"1\\\",\\\"pageSize\\\":\\\"5\\\"}\")\n .param(\"currentPage\", \... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/role\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createRole(@RequestBody WormholeRole role) {\n if (roleRepository.findOneByRoleName(role.getRoleName()) != null) {\n String messa... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_7 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void deleteAssetIPAndNameMappingExample() throws Exception {\n AssetIPMapping assetipmapping = createAssetIPMapping();\n assetipmapping.setAssetname(\"cloud-server\");\n assetipmapping = assetIPMappingRepository.save(assetipmapping);\n this.mockMvc.perform(delete(\"/v1/... | {
"fields": [
{
"declarator": "assetRepository",
"modifier": "@Autowired",
"original_string": "@Autowired\n AssetRepository assetRepository;",
"type": "AssetRepository",
"var_name": "assetRepository"
},
{
"declarator": "facilityRepository",
"modifier": "@Autowir... | {
"body": "@ResponseStatus(HttpStatus.OK)\n @RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n public void delete(@PathVariable String id) {\n assetRepository.deleteById(id);\n }",
"class_method_signature": "AssetController.delete(@PathVariable String id)",
"constructor": false,
"ful... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
175559661_27 | {
"fields": [
{
"declarator": "restDocumentation =\n new JUnitRestDocumentation(\"target/generated-snippets\")",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final JUnitRestDocumentation restDocumentation =\n new JUnitRestDocumentation(\"target/gener... | {
"body": "@Test\n public void readOneUserByUserNameExample2() throws Exception {\n expectedEx.expect(WormholeRequestException.class);\n expectedEx.expectMessage(\"Forbidden\");\n String userId = UUID.randomUUID().toString();\n WormholeUserDetails userdetail = new WormholeUserDetails();\n u... | {
"fields": [
{
"declarator": "userRepository",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private UserRepository userRepository;",
"type": "UserRepository",
"var_name": "userRepository"
},
{
"declarator": "roleRepository",
"modifier"... | {
"body": "@ResponseStatus(HttpStatus.CREATED)\n @RequestMapping(value = \"/user\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n public void createUser(@RequestBody WormholeUser user, HttpServletResponse response) {\n if (userRepository.findOneByUserName(user.getUserName()) != ... | {
"created": "3/14/2019 6:12:36 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 175559661,
"size": null,
"stargazer_count": null,
"stars": 39,
"updates": "2020-01-18T00:02:51+00:00",
"url": "https://github.com/vmware/flowgate"... |
35841129_6 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testHostOnlyNoTrailingSlash() {\n\t\t\n\t\tString serviceEndpoint = \"http://\" + Config.DEFAULT_HOST + \":\" + Config.BLAZEGRAPH_HTTP_PORT;\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryUrl,... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_7 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testWithNamespaceNoSparql() {\n\t\t\n\t\tString serviceEndpoint = Config.DEFAULT_ENDPOINT + \"/namespace/NAMESPACE\";\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryNamespaceUrl, normalizedSer... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_10 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testWithNamespaceSparqlTrailingSlash() {\n\t\t\n\t\tString serviceEndpoint = Config.DEFAULT_ENDPOINT + \"/namespace/NAMESPACE/sparql/\";\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryNamespac... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_0 | {
"fields": [
{
"declarator": "con",
"modifier": "private",
"original_string": "private BigdataSailRemoteRepositoryConnection con;",
"type": "BigdataSailRemoteRepositoryConnection",
"var_name": "con"
},
{
"declarator": "remote",
"modifier": "private",
"origi... | {
"body": "@Test\n\tpublic void testGetStatements() throws RepositoryException {\n\t\tfinal RepositoryResult<Statement> stmts = con.getStatements(s, p, o, includeInferred, c);\n\t\ttry {\n\t\t\tassertEquals(EncodeDecodeValue.encodeValue(s), remote.data.opts.getRequestParam(\"s\"));\n\t\t\tassertEquals(EncodeDecodeVal... | {
"fields": [
{
"declarator": "log = Logger\n .getLogger(BigdataSailRemoteRepositoryConnection.class)",
"modifier": "private static final transient",
"original_string": "private static final transient Logger log = Logger\n .getLogger(BigdataSailRemoteRepositoryConnection.class);"... | {
"body": "@Override\n\tpublic RepositoryResult<Statement> getStatements(final Resource s,\n final URI p, final Value o, final boolean includeInferred,\n final Resource... c) throws RepositoryException {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tfinal RemoteRepository remote = repo.getRemoteRepository();\... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_1 | {
"fields": [
{
"declarator": "con",
"modifier": "private",
"original_string": "private BigdataSailRemoteRepositoryConnection con;",
"type": "BigdataSailRemoteRepositoryConnection",
"var_name": "con"
},
{
"declarator": "remote",
"modifier": "private",
"origi... | {
"body": "@Test\n\tpublic void testExport() throws RepositoryException, RDFHandlerException {\n\t\tfinal RDFHandler handler = new RDFHandlerBase();\n\t\tcon.exportStatements(s, p, o, includeInferred, handler, c);\n\t\tassertEquals(EncodeDecodeValue.encodeValue(s), remote.data.opts.getRequestParam(\"s\"));\n\t\tasser... | {
"fields": [
{
"declarator": "log = Logger\n .getLogger(BigdataSailRemoteRepositoryConnection.class)",
"modifier": "private static final transient",
"original_string": "private static final transient Logger log = Logger\n .getLogger(BigdataSailRemoteRepositoryConnection.class);"... | {
"body": "@Override\n\tpublic void export(final RDFHandler handler, final Resource... c)\n\t\t\tthrows RepositoryException, RDFHandlerException {\n\n\t\texportStatements(null, null, null, true, handler, c);\n\t\t\n\t}",
"class_method_signature": "BigdataSailRemoteRepositoryConnection.export(final RDFHandler handle... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_2 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testWithSparql() {\n\t\t\n\t\tString serviceEndpoint = Config.DEFAULT_ENDPOINT + \"/sparql\";\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryUrl,normalizedServiceURL);\n\t}",
"class_method_s... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_3 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testWithoutSparql() {\n\t\t\n\t\tString serviceEndpoint = Config.DEFAULT_ENDPOINT + \"/\";\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryUrl,normalizedServiceURL);\n\t}",
"class_method_sign... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_4 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testWithoutSparqlAndNoTrailingSlash() {\n\t\t\n\t\tString serviceEndpoint = Config.DEFAULT_ENDPOINT;\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryUrl,normalizedServiceURL);\n\t}",
"class_... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_8 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testWithNamespaceNoSparqlWithTrailingSlash() {\n\t\t\n\t\tString serviceEndpoint = Config.DEFAULT_ENDPOINT + \"/namespace/NAMESPACE/\";\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryNamespace... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_9 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testWithNamespaceSparql() {\n\t\t\n\t\tString serviceEndpoint = Config.DEFAULT_ENDPOINT + \"/namespace/NAMESPACE/sparql\";\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryNamespaceUrl, normaliz... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
35841129_5 | {
"fields": [
{
"declarator": "remoteRepositoryUrl = Config.DEFAULT_ENDPOINT",
"modifier": "protected static final",
"original_string": "protected static final String remoteRepositoryUrl = Config.DEFAULT_ENDPOINT;",
"type": "String",
"var_name": "remoteRepositoryUrl"
},
{
... | {
"body": "@Test\n\tpublic void testHostOnly() {\n\t\t\n\t\tString serviceEndpoint = \"http://\" + Config.DEFAULT_HOST + \":\" + Config.BLAZEGRAPH_HTTP_PORT + \"/\";\n\t\tString normalizedServiceURL = \n\t\t\t\tBigdataSailFactory.testServiceEndpointUrl(serviceEndpoint);\n\n\t\tassertEquals(remoteRepositoryUrl,normali... | {
"fields": [
{
"declarator": "BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\"",
"modifier": "public static final",
"original_string": "public static final String BIGDATA_SAIL_INSTANCE = \"com.bigdata.rdf.sail.BigdataSail\";",
"type": "String",
"var_name": "BIGDATA_SAIL_... | {
"body": "@Deprecated // We are getting rid of this, right?\n\tpublic static String testServiceEndpointUrl(final String serviceEndpoint)\n\t{\n\t\treturn normalizeEndpoint(serviceEndpoint);\n\t}",
"class_method_signature": "BigdataSailFactory.testServiceEndpointUrl(final String serviceEndpoint)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35841129,
"size": 200584,
"stargazer_count": 12,
"stars": null,
"updates": null,
"url": "https://github.com/wikimedia/wikidata-query-blazegraph"
} |
222136267_87 | {
"fields": [
{
"declarator": "EXTENDED_BIT = 0x40",
"modifier": "private static final",
"original_string": "private static final int EXTENDED_BIT = 0x40;",
"type": "int",
"var_name": "EXTENDED_BIT"
},
{
"declarator": "SPLASH_BIT = 0x4000",
"modifier": "private st... | {
"body": "@Test\n public void setSplash() {\n Potion potion = new Potion(PotionType.POISON);\n assertFalse(potion.isSplash());\n potion.setSplash(true);\n assertTrue(potion.isSplash());\n assertTrue((potion.toDamageValue() & SPLASH_BIT) != 0);\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "extended = false",
"modifier": "private",
"original_string": "private boolean extended = false;",
"type": "boolean",
"var_name": "extended"
},
{
"declarator": "splash = false",
"modifier": "private",
"original_string": "private... | {
"body": "public void setSplash(boolean isSplash) {\n splash = isSplash;\n }",
"class_method_signature": "Potion.setSplash(boolean isSplash)",
"constructor": false,
"full_signature": "public void setSplash(boolean isSplash)",
"identifier": "setSplash",
"invocations": [],
"modifiers": "public",
... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_91 | {
"fields": [
{
"declarator": "EXTENDED_BIT = 0x40",
"modifier": "private static final",
"original_string": "private static final int EXTENDED_BIT = 0x40;",
"type": "int",
"var_name": "EXTENDED_BIT"
},
{
"declarator": "SPLASH_BIT = 0x4000",
"modifier": "private st... | {
"body": "@Test(expected=IllegalArgumentException.class)\n public void nullEntity() {\n Potion potion = new Potion(PotionType.POISON);\n potion.apply((LivingEntity) null);\n }",
"class_method_signature": "PotionTest.nullEntity()",
"constructor": false,
"full_signature": "@Test(expected=Ille... | {
"fields": [
{
"declarator": "extended = false",
"modifier": "private",
"original_string": "private boolean extended = false;",
"type": "boolean",
"var_name": "extended"
},
{
"declarator": "splash = false",
"modifier": "private",
"original_string": "private... | {
"body": "public void apply(ItemStack to) {\n Validate.notNull(to, \"itemstack cannot be null\");\n Validate.isTrue(to.getType() == Material.POTION, \"given itemstack is not a potion\");\n to.setDurability(toDamageValue());\n }",
"class_method_signature": "Potion.apply(ItemStack to)",
"co... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_90 | {
"fields": [
{
"declarator": "EXTENDED_BIT = 0x40",
"modifier": "private static final",
"original_string": "private static final int EXTENDED_BIT = 0x40;",
"type": "int",
"var_name": "EXTENDED_BIT"
},
{
"declarator": "SPLASH_BIT = 0x4000",
"modifier": "private st... | {
"body": "@Test(expected=IllegalArgumentException.class)\n public void nullStack() {\n Potion potion = new Potion(PotionType.POISON);\n potion.apply((ItemStack) null);\n }",
"class_method_signature": "PotionTest.nullStack()",
"constructor": false,
"full_signature": "@Test(expected=IllegalAr... | {
"fields": [
{
"declarator": "extended = false",
"modifier": "private",
"original_string": "private boolean extended = false;",
"type": "boolean",
"var_name": "extended"
},
{
"declarator": "splash = false",
"modifier": "private",
"original_string": "private... | {
"body": "public void apply(ItemStack to) {\n Validate.notNull(to, \"itemstack cannot be null\");\n Validate.isTrue(to.getType() == Material.POTION, \"given itemstack is not a potion\");\n to.setDurability(toDamageValue());\n }",
"class_method_signature": "Potion.apply(ItemStack to)",
"co... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_86 | {
"fields": [
{
"declarator": "EXTENDED_BIT = 0x40",
"modifier": "private static final",
"original_string": "private static final int EXTENDED_BIT = 0x40;",
"type": "int",
"var_name": "EXTENDED_BIT"
},
{
"declarator": "SPLASH_BIT = 0x4000",
"modifier": "private st... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void illegalApplyToItemStack() {\n Potion potion = new Potion(PotionType.POISON);\n potion.apply(new ItemStack(Material.AIR, 1));\n }",
"class_method_signature": "PotionTest.illegalApplyToItemStack()",
"constructor": false,
... | {
"fields": [
{
"declarator": "extended = false",
"modifier": "private",
"original_string": "private boolean extended = false;",
"type": "boolean",
"var_name": "extended"
},
{
"declarator": "splash = false",
"modifier": "private",
"original_string": "private... | {
"body": "public void apply(ItemStack to) {\n Validate.notNull(to, \"itemstack cannot be null\");\n Validate.isTrue(to.getType() == Material.POTION, \"given itemstack is not a potion\");\n to.setDurability(toDamageValue());\n }",
"class_method_signature": "Potion.apply(ItemStack to)",
"co... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_1 | {
"fields": [
{
"declarator": "testFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder testFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "testFolder"
}
],
"file": "bukkit/src/test/j... | {
"body": "@Test\n public void testSave_String() throws Exception {\n FileConfiguration config = getConfig();\n File file = testFolder.newFile(\"test.config\");\n\n for (Map.Entry<String, Object> entry : getTestValues().entrySet()) {\n config.set(entry.getKey(), entry.getValue());\n... | {
"fields": [
{
"declarator": "UTF8_OVERRIDE",
"modifier": "@Deprecated\n public static final",
"original_string": "@Deprecated\n public static final boolean UTF8_OVERRIDE;",
"type": "boolean",
"var_name": "UTF8_OVERRIDE"
},
{
"declarator": "UTF_BIG",
"modif... | {
"body": "public void save(File file) throws IOException {\n Validate.notNull(file, \"File cannot be null\");\n\n Files.createParentDirs(file);\n\n String data = saveToString();\n\n Writer writer = new OutputStreamWriter(new FileOutputStream(file), UTF8_OVERRIDE && !UTF_BIG ? Charsets.UTF... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_0 | {
"fields": [
{
"declarator": "testFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder testFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "testFolder"
}
],
"file": "bukkit/src/test/j... | {
"body": "@Test\n public void testSave_File() throws Exception {\n FileConfiguration config = getConfig();\n File file = testFolder.newFile(\"test.config\");\n\n for (Map.Entry<String, Object> entry : getTestValues().entrySet()) {\n config.set(entry.getKey(), entry.getValue());\n ... | {
"fields": [
{
"declarator": "UTF8_OVERRIDE",
"modifier": "@Deprecated\n public static final",
"original_string": "@Deprecated\n public static final boolean UTF8_OVERRIDE;",
"type": "boolean",
"var_name": "UTF8_OVERRIDE"
},
{
"declarator": "UTF_BIG",
"modif... | {
"body": "public void save(File file) throws IOException {\n Validate.notNull(file, \"File cannot be null\");\n\n Files.createParentDirs(file);\n\n String data = saveToString();\n\n Writer writer = new OutputStreamWriter(new FileOutputStream(file), UTF8_OVERRIDE && !UTF_BIG ? Charsets.UTF... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_3 | {
"fields": [
{
"declarator": "testFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder testFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "testFolder"
}
],
"file": "bukkit/src/test/j... | {
"body": "@Test\n public void testLoad_File() throws Exception {\n FileConfiguration config = getConfig();\n File file = testFolder.newFile(\"test.config\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\n String saved = getTestValuesString();\n Map<String,... | {
"fields": [
{
"declarator": "UTF8_OVERRIDE",
"modifier": "@Deprecated\n public static final",
"original_string": "@Deprecated\n public static final boolean UTF8_OVERRIDE;",
"type": "boolean",
"var_name": "UTF8_OVERRIDE"
},
{
"declarator": "UTF_BIG",
"modif... | {
"body": "public void load(File file) throws FileNotFoundException, IOException, InvalidConfigurationException {\n Validate.notNull(file, \"File cannot be null\");\n\n final FileInputStream stream = new FileInputStream(file);\n\n load(new InputStreamReader(stream, UTF8_OVERRIDE && !UTF_BIG ? Cha... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_2 | {
"fields": [
{
"declarator": "testFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder testFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "testFolder"
}
],
"file": "bukkit/src/test/j... | {
"body": "@Test\n public void testSaveToString() {\n FileConfiguration config = getConfig();\n\n for (Map.Entry<String, Object> entry : getTestValues().entrySet()) {\n config.set(entry.getKey(), entry.getValue());\n }\n\n String result = config.saveToString();\n Strin... | {
"fields": [
{
"declarator": "UTF8_OVERRIDE",
"modifier": "@Deprecated\n public static final",
"original_string": "@Deprecated\n public static final boolean UTF8_OVERRIDE;",
"type": "boolean",
"var_name": "UTF8_OVERRIDE"
},
{
"declarator": "UTF_BIG",
"modif... | {
"body": "public abstract String saveToString();",
"class_method_signature": "FileConfiguration.saveToString()",
"constructor": false,
"full_signature": "public abstract String saveToString()",
"identifier": "saveToString",
"invocations": [],
"modifiers": "public abstract",
"parameters": "()",
"retur... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_85 | {
"fields": [
{
"declarator": "EXTENDED_BIT = 0x40",
"modifier": "private static final",
"original_string": "private static final int EXTENDED_BIT = 0x40;",
"type": "int",
"var_name": "EXTENDED_BIT"
},
{
"declarator": "SPLASH_BIT = 0x4000",
"modifier": "private st... | {
"body": "@Test\n public void fromDamage() {\n Potion potion = Potion.fromDamage(PotionType.POISON.getDamageValue());\n assertTrue(potion.getType() == PotionType.POISON);\n potion = Potion.fromDamage(PotionType.POISON.getDamageValue() | SPLASH_BIT);\n assertTrue(potion.getType() == Pot... | {
"fields": [
{
"declarator": "extended = false",
"modifier": "private",
"original_string": "private boolean extended = false;",
"type": "boolean",
"var_name": "extended"
},
{
"declarator": "splash = false",
"modifier": "private",
"original_string": "private... | {
"body": "@Deprecated\n public static Potion fromDamage(int damage) {\n PotionType type = PotionType.getByDamageValue(damage & POTION_BIT);\n Potion potion;\n if (type == null || (type == PotionType.WATER && damage != 0)) {\n potion = new Potion(damage & NAME_BIT);\n } else ... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_5 | {
"fields": [
{
"declarator": "testFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder testFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "testFolder"
}
],
"file": "bukkit/src/test/j... | {
"body": "@Test\n public void testLoadFromString() throws Exception {\n FileConfiguration config = getConfig();\n Map<String, Object> values = getTestValues();\n String saved = getTestValuesString();\n\n config.loadFromString(saved);\n\n for (Map.Entry<String, Object> entry : va... | {
"fields": [
{
"declarator": "UTF8_OVERRIDE",
"modifier": "@Deprecated\n public static final",
"original_string": "@Deprecated\n public static final boolean UTF8_OVERRIDE;",
"type": "boolean",
"var_name": "UTF8_OVERRIDE"
},
{
"declarator": "UTF_BIG",
"modif... | {
"body": "public abstract void loadFromString(String contents) throws InvalidConfigurationException;",
"class_method_signature": "FileConfiguration.loadFromString(String contents)",
"constructor": false,
"full_signature": "public abstract void loadFromString(String contents)",
"identifier": "loadFromString",... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_89 | {
"fields": [
{
"declarator": "EXTENDED_BIT = 0x40",
"modifier": "private static final",
"original_string": "private static final int EXTENDED_BIT = 0x40;",
"type": "int",
"var_name": "EXTENDED_BIT"
},
{
"declarator": "SPLASH_BIT = 0x4000",
"modifier": "private st... | {
"body": "@Test(expected=IllegalArgumentException.class)\n public void maxLevelSet() {\n Potion potion = new Potion(PotionType.POISON);\n potion.setLevel(3);\n }",
"class_method_signature": "PotionTest.maxLevelSet()",
"constructor": false,
"full_signature": "@Test(expected=IllegalArgumentEx... | {
"fields": [
{
"declarator": "extended = false",
"modifier": "private",
"original_string": "private boolean extended = false;",
"type": "boolean",
"var_name": "extended"
},
{
"declarator": "splash = false",
"modifier": "private",
"original_string": "private... | {
"body": "public void setLevel(int level) {\n Validate.notNull(this.type, \"No-effect potions don't have a level.\");\n int max = type.getMaxLevel();\n Validate.isTrue(level > 0 && level <= max, \"Level must be \" + (max == 1 ? \"\" : \"between 1 and \") + max + \" for this potion\");\n t... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_88 | {
"fields": [
{
"declarator": "EXTENDED_BIT = 0x40",
"modifier": "private static final",
"original_string": "private static final int EXTENDED_BIT = 0x40;",
"type": "int",
"var_name": "EXTENDED_BIT"
},
{
"declarator": "SPLASH_BIT = 0x4000",
"modifier": "private st... | {
"body": "@Test\n public void setLevel() {\n Potion potion = new Potion(PotionType.POISON);\n assertEquals(1, potion.getLevel());\n potion.setLevel(2);\n assertEquals(2, potion.getLevel());\n assertTrue((potion.toDamageValue() & 0x3F) == (PotionType.POISON.getDamageValue() | 0x2... | {
"fields": [
{
"declarator": "extended = false",
"modifier": "private",
"original_string": "private boolean extended = false;",
"type": "boolean",
"var_name": "extended"
},
{
"declarator": "splash = false",
"modifier": "private",
"original_string": "private... | {
"body": "public void setLevel(int level) {\n Validate.notNull(this.type, \"No-effect potions don't have a level.\");\n int max = type.getMaxLevel();\n Validate.isTrue(level > 0 && level <= max, \"Level must be \" + (max == 1 ? \"\" : \"between 1 and \") + max + \" for this potion\");\n t... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
222136267_4 | {
"fields": [
{
"declarator": "testFolder = new TemporaryFolder()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public TemporaryFolder testFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "testFolder"
}
],
"file": "bukkit/src/test/j... | {
"body": "@Test\n public void testLoad_String() throws Exception {\n FileConfiguration config = getConfig();\n File file = testFolder.newFile(\"test.config\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(file));\n String saved = getTestValuesString();\n Map<Strin... | {
"fields": [
{
"declarator": "UTF8_OVERRIDE",
"modifier": "@Deprecated\n public static final",
"original_string": "@Deprecated\n public static final boolean UTF8_OVERRIDE;",
"type": "boolean",
"var_name": "UTF8_OVERRIDE"
},
{
"declarator": "UTF_BIG",
"modif... | {
"body": "public void load(File file) throws FileNotFoundException, IOException, InvalidConfigurationException {\n Validate.notNull(file, \"File cannot be null\");\n\n final FileInputStream stream = new FileInputStream(file);\n\n load(new InputStreamReader(stream, UTF8_OVERRIDE && !UTF_BIG ? Cha... | {
"created": null,
"fork": null,
"fork_count": 5,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 222136267,
"size": 9325,
"stargazer_count": 14,
"stars": null,
"updates": null,
"url": "https://github.com/CrucibleMC/Crucible"
} |
23063531_7 | {
"fields": [],
"file": "weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/WxMpMessageRouterTest.java",
"identifier": "WxMpMessageRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider=\"messages-1\")\n public void testAsync(WxMpXmlMessage message, String expected) throws InterruptedException {\n StringBuffer sb = new StringBuffer();\n WxMpMessageRouter router = new WxMpMessageRouter(null);\n prepare(true, sb, router);\n router.route(message);\n Thread... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WxMpMessageRouter.class)",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(WxMpMessageRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage) {\n if (isDuplicateMessage(wxMessage)) {\n // 如果是重复消息,那么就不做处理\n return null;\n }\n\n final List<WxMpMessageRouterRule> matchRules = new ArrayList<WxMpMessageRouterRule>();\n // 收集匹配的规则\n for (final WxMpMessageRouterRule... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
23063531_6 | {
"fields": [],
"file": "weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/WxMpMessageRouterTest.java",
"identifier": "WxMpMessageRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider=\"messages-1\")\n public void testSync(WxMpXmlMessage message, String expected) {\n StringBuffer sb = new StringBuffer();\n WxMpMessageRouter router = new WxMpMessageRouter(null);\n prepare(false, sb, router);\n router.route(message);\n Assert.assertEquals(sb.toString(), ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WxMpMessageRouter.class)",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(WxMpMessageRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage) {\n if (isDuplicateMessage(wxMessage)) {\n // 如果是重复消息,那么就不做处理\n return null;\n }\n\n final List<WxMpMessageRouterRule> matchRules = new ArrayList<WxMpMessageRouterRule>();\n // 收集匹配的规则\n for (final WxMpMessageRouterRule... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
23063531_1 | {
"fields": [],
"file": "weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMessageRouterTest.java",
"identifier": "WxCpMessageRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider=\"messages-1\")\n public void testSync(WxCpXmlMessage message, String expected) {\n StringBuffer sb = new StringBuffer();\n WxCpMessageRouter router = new WxCpMessageRouter(null);\n prepare(false, sb, router);\n router.route(message);\n Assert.assertEquals(sb.toString(), ... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WxCpMessageRouter.class)",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(WxCpMessageRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public WxCpXmlOutMessage route(final WxCpXmlMessage wxMessage) {\n if (isDuplicateMessage(wxMessage)) {\n // 如果是重复消息,那么就不做处理\n return null;\n }\n\n final List<WxCpMessageRouterRule> matchRules = new ArrayList<WxCpMessageRouterRule>();\n // 收集匹配的规则\n for (final WxCpMessageRouterRule... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
23063531_0 | {
"fields": [],
"file": "weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMessageRouterTest.java",
"identifier": "WxCpMessageRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(enabled = false)\n public void prepare(boolean async, StringBuffer sb, WxCpMessageRouter router) {\n router\n .rule()\n .async(async)\n .msgType(WxConsts.XML_MSG_TEXT).event(WxConsts.EVT_CLICK).eventKey(\"KEY_1\").content(\"CONTENT_1\")\n .handler(new WxEchoCpMessageHand... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WxCpMessageRouter.class)",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(WxCpMessageRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public WxCpMessageRouterRule rule() {\n return new WxCpMessageRouterRule(this);\n }",
"class_method_signature": "WxCpMessageRouter.rule()",
"constructor": false,
"full_signature": "public WxCpMessageRouterRule rule()",
"identifier": "rule",
"invocations": [],
"modifiers": "public",
"param... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
23063531_3 | {
"fields": [],
"file": "weixin-java-common/src/test/java/me/chanjar/weixin/common/bean/WxMenuTest.java",
"identifier": "WxMenuTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider=\"wxReturnMenu\")\n public void testFromJson(String json) {\n WxMenu menu = WxMenu.fromJson(json);\n Assert.assertEquals(menu.getButtons().size(), 3);\n }",
"class_method_signature": "WxMenuTest.testFromJson(String json)",
"constructor": false,
"full_signature": "@Test(data... | {
"fields": [
{
"declarator": "buttons = new ArrayList<WxMenuButton>()",
"modifier": "private",
"original_string": "private List<WxMenuButton> buttons = new ArrayList<WxMenuButton>();",
"type": "List<WxMenuButton>",
"var_name": "buttons"
},
{
"declarator": "matchRule",
... | {
"body": "public static WxMenu fromJson(String json) {\n return WxGsonBuilder.create().fromJson(json, WxMenu.class);\n }",
"class_method_signature": "WxMenu.fromJson(String json)",
"constructor": false,
"full_signature": "public static WxMenu fromJson(String json)",
"identifier": "fromJson",
"invocatio... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
23063531_2 | {
"fields": [],
"file": "weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMessageRouterTest.java",
"identifier": "WxCpMessageRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider=\"messages-1\")\n public void testAsync(WxCpXmlMessage message, String expected) throws InterruptedException {\n StringBuffer sb = new StringBuffer();\n WxCpMessageRouter router = new WxCpMessageRouter(null);\n prepare(true, sb, router);\n router.route(message);\n Thread... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WxCpMessageRouter.class)",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(WxCpMessageRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public WxCpXmlOutMessage route(final WxCpXmlMessage wxMessage) {\n if (isDuplicateMessage(wxMessage)) {\n // 如果是重复消息,那么就不做处理\n return null;\n }\n\n final List<WxCpMessageRouterRule> matchRules = new ArrayList<WxCpMessageRouterRule>();\n // 收集匹配的规则\n for (final WxCpMessageRouterRule... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
23063531_5 | {
"fields": [],
"file": "weixin-java-mp/src/test/java/me/chanjar/weixin/mp/api/WxMpMessageRouterTest.java",
"identifier": "WxMpMessageRouterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(enabled = false)\n public void prepare(boolean async, StringBuffer sb, WxMpMessageRouter router) {\n router\n .rule()\n .async(async)\n .msgType(WxConsts.XML_MSG_TEXT).event(WxConsts.EVT_CLICK).eventKey(\"KEY_1\").content(\"CONTENT_1\")\n .handler(new WxEchoMpMessageHand... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(WxMpMessageRouter.class)",
"modifier": "protected final",
"original_string": "protected final Logger log = LoggerFactory.getLogger(WxMpMessageRouter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarat... | {
"body": "public WxMpMessageRouterRule rule() {\n return new WxMpMessageRouterRule(this);\n }",
"class_method_signature": "WxMpMessageRouter.rule()",
"constructor": false,
"full_signature": "public WxMpMessageRouterRule rule()",
"identifier": "rule",
"invocations": [],
"modifiers": "public",
"param... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
23063531_4 | {
"fields": [],
"file": "weixin-java-common/src/test/java/me/chanjar/weixin/common/bean/WxMenuTest.java",
"identifier": "WxMenuTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider=\"wxPushMenu\")\n public void testToJson(String json) {\n WxMenu menu = new WxMenu();\n WxMenuButton button1 = new WxMenuButton();\n button1.setType(\"click\");\n button1.setName(\"今日歌曲\");\n button1.setKey(\"V1001_TODAY_MUSIC\");\n \n WxMenuButton button2 = new WxM... | {
"fields": [
{
"declarator": "buttons = new ArrayList<WxMenuButton>()",
"modifier": "private",
"original_string": "private List<WxMenuButton> buttons = new ArrayList<WxMenuButton>();",
"type": "List<WxMenuButton>",
"var_name": "buttons"
},
{
"declarator": "matchRule",
... | {
"body": "public String toJson() {\n return WxGsonBuilder.create().toJson(this);\n }",
"class_method_signature": "WxMenu.toJson()",
"constructor": false,
"full_signature": "public String toJson()",
"identifier": "toJson",
"invocations": [
"toJson",
"create"
],
"modifiers": "public",
"para... | {
"created": null,
"fork": null,
"fork_count": 7653,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 23063531,
"size": 1727,
"stargazer_count": 2566,
"stars": null,
"updates": null,
"url": "https://github.com/chanjarster/weixin-java-tools"
} |
183536958_0 | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(CredentialTest.class)",
"modifier": "private static",
"original_string": "private static Logger logger = LoggerFactory.getLogger(CredentialTest.class);",
"type": "Logger",
"var_name": "logger"
}
],
"file": "lib/s... | {
"body": "@Test\n void testBuildJwt() throws Exception {\n\n String keyId = TestKeys.ISSUER_KEY_ID;\n AlgorithmProvider.Type type = AlgorithmProvider.Type.ES256;\n Algorithm algorithm = AlgorithmProvider.create(type);\n PrivateKey priKey = algorithm.byteToPrivateKey(EncodeType.HEX.deco... | {
"fields": [
{
"declarator": "expDuration = 24 * 60 * 60",
"modifier": "private",
"original_string": "private int expDuration = 24 * 60 * 60;",
"type": "int",
"var_name": "expDuration"
},
{
"declarator": "DEFAULT_TYPE = \"CREDENTIAL\"",
"modifier": "public static... | {
"body": "@Override\n public Jwt buildJwt(Date issued, Date expiration) {\n String kid = issuerDid.getDid() + \"#\" + issuerDid.getKeyId();\n return new Jwt.Builder()\n .alg(issuerDid.getAlgorithm())\n .kid(kid)\n .version(version)\n .sub(t... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 183536958,
"size": 480,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/icon-project/did-sdk-java"
} |
183536958_1 | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(PresentationTest.class)",
"modifier": "private static",
"original_string": "private static Logger logger = LoggerFactory.getLogger(PresentationTest.class);",
"type": "Logger",
"var_name": "logger"
}
],
"file": "l... | {
"body": "@Test\n void testBuildJwt() throws Exception {\n\n String keyId = TestKeys.HOLDER_KEY_ID;\n AlgorithmProvider.Type type = AlgorithmProvider.Type.ES256;\n Algorithm algorithm = AlgorithmProvider.create(type);\n PrivateKey priKey = algorithm.byteToPrivateKey(EncodeType.HEX.deco... | {
"fields": [
{
"declarator": "EXP_DURATION = 5 * 60",
"modifier": "private final static",
"original_string": "private final static int EXP_DURATION = 5 * 60;",
"type": "int",
"var_name": "EXP_DURATION"
},
{
"declarator": "DEFAULT_TYPE = \"PRESENTATION\"",
"modifi... | {
"body": "@Override\n public Jwt buildJwt(Date issued, Date expiration) {\n String kid = issuerDid.getDid() + \"#\" + issuerDid.getKeyId();\n return new Jwt.Builder()\n .alg(issuerDid.getAlgorithm())\n .kid(kid)\n .iss(issuerDid.getDid())\n ... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 183536958,
"size": 480,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/icon-project/did-sdk-java"
} |
183536958_2 | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(KeyProviderTest.class)",
"modifier": "private static",
"original_string": "private static Logger logger = LoggerFactory.getLogger(KeyProviderTest.class);",
"type": "Logger",
"var_name": "logger"
},
{
"decla... | {
"body": "@Test\n void testES256KPublicKey() throws AlgorithmException {\n String keyId = \"es256k\";\n Algorithm algorithm = AlgorithmProvider.create(AlgorithmProvider.Type.ES256K);\n KeyProvider keyProvider = algorithm.generateKeyProvider(keyId);\n System.out.println(keyProvider.getP... | {
"fields": [
{
"declarator": "keyId",
"modifier": "private",
"original_string": "private String keyId;",
"type": "String",
"var_name": "keyId"
},
{
"declarator": "type",
"modifier": "private",
"original_string": "private AlgorithmProvider.Type type;",
... | {
"body": "public PublicKey getPublicKey() {\n return publicKey;\n }",
"class_method_signature": "KeyProvider.getPublicKey()",
"constructor": false,
"full_signature": "public PublicKey getPublicKey()",
"identifier": "getPublicKey",
"invocations": [],
"modifiers": "public",
"parameters": "()",
... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 183536958,
"size": 480,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/icon-project/did-sdk-java"
} |
9755019_83 | {
"fields": [],
"file": "quality-assessment/src/test/java/org/codeqinvest/quality/ArtefactTest.java",
"identifier": "ArtefactTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldConvertEmptyPackageNameToFilenameProperly() {\n assertThat(new Artefact(\"\", \"\").getFilename()).isEqualTo(\"\");\n }",
"class_method_signature": "ArtefactTest.shouldConvertEmptyPackageNameToFilenameProperly()",
"constructor": false,
"full_signature": "@Test public vo... | {
"fields": [
{
"declarator": "id",
"modifier": "@Id\n @GeneratedValue\n private",
"original_string": "@Id\n @GeneratedValue\n private Long id;",
"type": "Long",
"var_name": "id"
},
{
"declarator": "name",
"modifier": "@Column(nullable = false)\n private",
... | {
"body": "public String getFilename() {\n if (name.isEmpty()) {\n return \"\";\n }\n return name.replace('.', '/') + \".java\";\n }",
"class_method_signature": "Artefact.getFilename()",
"constructor": false,
"full_signature": "public String getFilename()",
"identifier": "getFilename",
"invoc... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_0 | {
"fields": [
{
"declarator": "investmentPlanService",
"modifier": "private",
"original_string": "private QualityInvestmentPlanService investmentPlanService;",
"type": "QualityInvestmentPlanService",
"var_name": "investmentPlanService"
},
{
"declarator": "profitCalculat... | {
"body": "@Test\n public void zeroProfitWhenThereAreNoQualityViolations() {\n QualityAnalysis analysisWithoutViolations = QualityAnalysis.success(null, Collections.<QualityViolation>emptyList());\n QualityInvestmentPlan qualityInvestmentPlan = investmentPlanService.computeInvestmentPlan(analysisWithoutViolati... | {
"fields": [
{
"declarator": "profitCalculator",
"modifier": "private final",
"original_string": "private final ProfitCalculator profitCalculator;",
"type": "ProfitCalculator",
"var_name": "profitCalculator"
}
],
"file": "investment-decision-making/src/main/java/org/codeqinv... | {
"body": "public QualityInvestmentPlan computeInvestmentPlan(QualityAnalysis analysis, String basePackage, int investmentInMinutes) {\n Multimap<Double, QualityViolation> violationsByProfit = ArrayListMultimap.create();\n for (QualityViolation violation : filterViolationsByArtefactNameStartingWith(basePackage,... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_95 | {
"fields": [
{
"declarator": "validator",
"modifier": "private",
"original_string": "private SonarConnectionSettingsValidator validator;",
"type": "SonarConnectionSettingsValidator",
"var_name": "validator"
}
],
"file": "web-ui/src/test/java/org/codeqinvest/web/project/Sonar... | {
"body": "@Test\n public void shouldSupportSonarConnectionSettingsType() {\n assertThat(validator.supports(SonarConnectionSettings.class)).isTrue();\n }",
"class_method_signature": "SonarConnectionSettingsValidatorTest.shouldSupportSonarConnectionSettingsType()",
"constructor": false,
"full_signature": "@... | {
"fields": [],
"file": "web-ui/src/main/java/org/codeqinvest/web/project/SonarConnectionSettingsValidator.java",
"identifier": "SonarConnectionSettingsValidator",
"interfaces": "implements Validator",
"methods": [
{
"class_method_signature": "SonarConnectionSettingsValidator.supports(Class<?> clazz... | {
"body": "@Override\n public boolean supports(Class<?> clazz) {\n return SonarConnectionSettings.class.equals(clazz);\n }",
"class_method_signature": "SonarConnectionSettingsValidator.supports(Class<?> clazz)",
"constructor": false,
"full_signature": "@Override public boolean supports(Class<?> clazz)",
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_56 | {
"fields": [
{
"declarator": "profile",
"modifier": "private",
"original_string": "private QualityProfile profile;",
"type": "QualityProfile",
"var_name": "profile"
},
{
"declarator": "firstRequirement",
"modifier": "private",
"original_string": "private Qu... | {
"body": "@Test\n public void failedAnalysisWhenCostCalculatorThrowsResourceNotFoundExceptionOnNonRemediationCosts() throws CodeChurnCalculationException, ScmConnectionEncodingException, ResourceNotFoundException {\n ViolationsCalculatorService violationsCalculatorService = mock(ViolationsCalculatorService.class... | {
"fields": [
{
"declarator": "violationsCalculatorService",
"modifier": "private final",
"original_string": "private final ViolationsCalculatorService violationsCalculatorService;",
"type": "ViolationsCalculatorService",
"var_name": "violationsCalculatorService"
},
{
"... | {
"body": "@Override\n public QualityAnalysis analyzeProject(Project project) {\n try {\n ViolationsAnalysisResult violationsAnalysisResult = violationsCalculatorService.calculateAllViolation(project);\n if (!violationsAnalysisResult.isSuccessful()) {\n log.error(\"Quality analysis for project {}... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_40 | {
"fields": [],
"file": "metrics-collector/src/test/java/org/codeqinvest/sonar/MetricCollectorServiceTest.java",
"identifier": "MetricCollectorServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void shouldFailWhenConnectionSettingsMissProjectAttribute() throws ResourceNotFoundException {\n new MetricCollectorService().collectMetricForResource(new SonarConnectionSettings(\"dummy\"), \"\", \"\");\n }",
"class_method_signature": "Metri... | {
"fields": [
{
"declarator": "DEFAULT_VALUE = 0.0",
"modifier": "static final",
"original_string": "static final double DEFAULT_VALUE = 0.0;",
"type": "double",
"var_name": "DEFAULT_VALUE"
}
],
"file": "metrics-collector/src/main/java/org/codeqinvest/sonar/MetricCollectorSer... | {
"body": "public double collectMetricForResource(SonarConnectionSettings connectionSettings, String resourceKey, String metricIdentifier) throws ResourceNotFoundException {\n if (!connectionSettings.hasProject()) {\n throw new IllegalArgumentException(\"you can only collect metric value for a resource with c... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_17 | {
"fields": [
{
"declarator": "calculator",
"modifier": "private",
"original_string": "private ProfitCalculator calculator;",
"type": "ProfitCalculator",
"var_name": "calculator"
},
{
"declarator": "artefact",
"modifier": "private",
"original_string": "priva... | {
"body": "@Test\n public void profitForAutomaticFixableViolation() {\n when(requirement.isAutomaticallyFixable()).thenReturn(true);\n assertThat(calculator.calculateProfit(violation)).isEqualTo(2.0);\n }",
"class_method_signature": "ProfitCalculatorTest.profitForAutomaticFixableViolation()",
"constructor... | {
"fields": [],
"file": "investment-decision-making/src/main/java/org/codeqinvest/investment/profit/ProfitCalculator.java",
"identifier": "ProfitCalculator",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProfitCalculator.calculateProfit(QualityViolation violation)",
"constructor"... | {
"body": "public double calculateProfit(QualityViolation violation) {\n double nonRemediationCosts = violation.getNonRemediationCosts() * (violation.getArtefact().hasManualEstimate()\n ? violation.getArtefact().getManualEstimate() / 100.0\n : violation.getArtefact().getChangeProbability());\n\n r... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_60 | {
"fields": [
{
"declarator": "codeChangeProbabilityCalculatorFactory",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private CodeChangeProbabilityCalculatorFactory codeChangeProbabilityCalculatorFactory;",
"type": "CodeChangeProbabilityCalculatorFactory",
"v... | {
"body": "@Test\n public void createCalculatorWithCorrectNumberOfDaysForWeightedSetting() {\n assertThat(((WeightedCodeChangeProbabilityCalculator)\n codeChangeProbabilityCalculatorFactory.create(CodeChangeSettings.weightedSetting(30))).getDays())\n .isEqualTo(30);\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "codeChurnCalculatorFactory",
"modifier": "@Getter\n private final",
"original_string": "@Getter\n private final CodeChurnCalculatorFactory codeChurnCalculatorFactory;",
"type": "CodeChurnCalculatorFactory",
"var_name": "codeChurnCalculatorFactory"
... | {
"body": "CodeChangeProbabilityCalculator create(CodeChangeSettings codeChangeSettings) {\n if (codeChangeSettings.getMethod() == SupportedCodeChangeProbabilityMethod.WEIGHTED.getId()) {\n return new WeightedCodeChangeProbabilityCalculator(codeChurnCalculatorFactory, LocalDate.now(), codeChangeSettings.getDa... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_37 | {
"fields": [
{
"declarator": "A = new ProjectInformation(\"A\", \"\")",
"modifier": "private",
"original_string": "private ProjectInformation A = new ProjectInformation(\"A\", \"\");",
"type": "ProjectInformation",
"var_name": "A"
},
{
"declarator": "B = new ProjectInf... | {
"body": "@Test\n public void compared_to_null_is_the_same() {\n assertThat(B.compareTo(null)).isEqualTo(comesAfter);\n }",
"class_method_signature": "ProjectInformationTest.compared_to_null_is_the_same()",
"constructor": false,
"full_signature": "@Test public void compared_to_null_is_the_same()",
"iden... | {
"fields": [
{
"declarator": "name",
"modifier": "private",
"original_string": "private String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "resourceKey",
"modifier": "private",
"original_string": "private String resourceKey;",
"typ... | {
"body": "@Override\n public int compareTo(Object o) {\n if (o != null) {\n ProjectInformation otherProjectInformation = (ProjectInformation) o;\n if (otherProjectInformation.getName() != null && this.getName() != null) {\n return this.name.compareToIgnoreCase(otherProjectInformati... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_21 | {
"fields": [],
"file": "code-changes-analyzer/src/test/java/org/codeqinvest/codechanges/CommitBasedCodeChangeProbabilityCalculatorTest.java",
"identifier": "CommitBasedCodeChangeProbabilityCalculatorTest",
"interfaces": "",
"superclass": "extends AbstractCodeChangeProbabilityCalculatorTest"
} | {
"body": "@Test\n public void codeChurnForOneLastCommit() throws CodeChurnCalculationException, ScmConnectionEncodingException {\n fakeCodeChurnCalculator.addCodeChurnWithoutDay(\"A\", new CodeChurn(Arrays.asList(0.8)));\n CodeChangeProbabilityCalculator codeChangeProbabilityCalculator = new CommitBasedCodeCh... | {
"fields": [
{
"declarator": "codeChurnCalculatorFactory",
"modifier": "private final",
"original_string": "private final CodeChurnCalculatorFactory codeChurnCalculatorFactory;",
"type": "CodeChurnCalculatorFactory",
"var_name": "codeChurnCalculatorFactory"
},
{
"decla... | {
"body": "@Override\n public double calculateCodeChangeProbability(ScmConnectionSettings connectionSettings, String file)\n throws CodeChurnCalculationException, ScmConnectionEncodingException {\n\n log.info(\"Calculate code change probability for file {}\", file);\n\n final CodeChurnCalculator codeChurn... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
9755019_99 | {
"fields": [
{
"declarator": "generator",
"modifier": "private",
"original_string": "private InvestmentOpportunitiesJsonGenerator generator;",
"type": "InvestmentOpportunitiesJsonGenerator",
"var_name": "generator"
},
{
"declarator": "weightedProfitCalculator",
"... | {
"body": "@Test\n public void analysisWithManyArtefactsAndManyViolations() throws IOException {\n Artefact artefact1 = new Artefact(\"project.A\", \"DUMMY\");\n Artefact artefact2 = new Artefact(\"project.B\", \"DUMMY\");\n Artefact artefact3 = new Artefact(\"project.test.util.C\", \"DUMMY\");\n Artefac... | {
"fields": [
{
"declarator": "MAPPER = new ObjectMapper()",
"modifier": "private static final",
"original_string": "private static final ObjectMapper MAPPER = new ObjectMapper();",
"type": "ObjectMapper",
"var_name": "MAPPER"
},
{
"declarator": "PACKAGE_SPLITTER = Spli... | {
"body": "public String generate(QualityAnalysis analysis) throws JsonProcessingException {\n Set<String> alreadyAddedArtefacts = Sets.newHashSet();\n Map<String, PackageNode> nodeLookupTable = Maps.newHashMap();\n RootNode rootNode = new RootNode(analysis.getProject().getName());\n\n for (QualityViolati... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 9755019,
"size": 1829,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/CodeQInvest/codeq-invest"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.