id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
1605107_62 | {
"fields": [
{
"declarator": "resFile = new File(\"/d2/test.processing/delft.cr/test_cr.res\")",
"modifier": "private static final",
"original_string": "private static final File resFile = new File(\"/d2/test.processing/delft.cr/test_cr.res\");",
"type": "File",
"var_name": "resFile... | {
"body": "@Ignore\n @Test\n public void testComputeCorners() throws Exception {\n\n long start = System.currentTimeMillis();\n GeoPos[] corners = GeoUtils.computeCorners(slcimage, orbit_ACTUAL, window, height);\n long stop = System.currentTimeMillis();\n\n System.out.println(\"time ... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/GeoUtils.java",
"identifier": "GeoUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "GeoUtils.computeCorners(final SLCImage meta, final Orbit orbit, final Window tile, final float height[])",
"constructor... | {
"body": "public static GeoPos[] computeCorners(final SLCImage meta, final Orbit orbit, final Window tile, final float height[]) throws Exception {\n\n if (height.length != 4) {\n throw new IllegalArgumentException(\"input height array has to have 4 elements\");\n }\n\n GeoPos[] corne... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_35 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testComputeOrbitRadius() throws Exception {\n final double orbitRadius_ACTUAL = orbit_ACTUAL.computeOrbitRadius(pixel_EXPECTED, slcimage);\n Assert.assertEquals(orbitRadius_EXPECTED, orbitRadius_ACTUAL, eps_03);\n }",
"class_method_signature": "OrbitTest.testComput... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public double computeOrbitRadius(Point p, SLCImage metadata) throws Exception {\n double azimuthTime = metadata.line2ta(p.y);\n return this.getXYZ(azimuthTime).norm();\n }",
"class_method_signature": "Orbit.computeOrbitRadius(Point p, SLCImage metadata)",
"constructor": false,
"full_... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_23 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testXyz2lp() throws Exception {\n Point sarPosition_ACTUAL = orbit_ACTUAL.xyz2lp(pixelXYZ_EXPECTED, slcimage);\n\n Assert.assertEquals(pixel_EXPECTED.x, sarPosition_ACTUAL.x, eps_04);\n Assert.assertEquals(pixel_EXPECTED.y, sarPosition_ACTUAL.y, eps_04);\n }",... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public synchronized Point xyz2lp(final Point pointOnEllips, final SLCImage slcimage) {\n\n Point sarPixel = new Point();\n\n // Compute tazi, tran\n Point time = xyz2t(pointOnEllips, slcimage);\n\n // Convert time to pixel\n sarPixel.x = slcimage.tr2pix(time.x);\n ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_74 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testWshift_inplace_JBLAS() throws Exception {\n DoubleMatrix A_15_SHIFT_ACTUAL = A_15.dup();\n LinearAlgebraUtils.wshift_inplace(A_15_SHIFT_ACTUAL, 3);\n Assert.assertEquals(A_15_SHIFT_ACTUAL, A_15_SHIFT_EXPECTED);\n }",
"class_method_signature": "LinearAlge... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static void wshift_inplace(DoubleMatrix inVector, int n) throws IllegalArgumentException {\n\n if (n >= inVector.length) {\n System.err.println(\"wshift: shift larger than matrix not implemented.\");\n throw new IllegalArgumentException(\"wshift: shift larger than matrix... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_128 | {
"fields": [
{
"declarator": "nRows = 128",
"modifier": "static",
"original_string": "static int nRows = 128;",
"type": "int",
"var_name": "nRows"
},
{
"declarator": "nCols = 256",
"modifier": "static",
"original_string": "static int nCols = 256;",
"t... | {
"body": "@Test\n public void testCoherence() throws Exception {\n\n // get test data\n String fileTestDataName_1 = testDataLocationCoh + \"CINT_input\" + \".cr4.swap\";\n String fileTestDataName_2 = testDataLocationCoh + \"NORMS_input\" + \".cr4.swap\";\n\n final int nRows = 128;\n ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(SarUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(SarUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-core/src/main/java/o... | {
"body": "@Deprecated\n public static DoubleMatrix coherence(final ComplexDoubleMatrix inputMatrix, final ComplexDoubleMatrix normsMatrix, final int winL, final int winP) {\n\n logger.trace(\"coherence ver #2\");\n if (!(winL >= winP)) {\n logger.warn(\"coherence: estimator window size L<... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_5 | {
"fields": [
{
"declarator": "DELTA_04 = 1e-04",
"modifier": "private static final",
"original_string": "private static final double DELTA_04 = 1e-04;",
"type": "double",
"var_name": "DELTA_04"
},
{
"declarator": "DELTA_03 = 1e-03",
"modifier": "private static fi... | {
"body": "@Test\n public void filterBlock_HAMM_OVSMP_WEIGHT() throws Exception {\n\n /// define parameters parameters\n final double alphaHamming = 0.75;\n final int ovsFactor = 2;\n final boolean doWeightCorrelFlag = true;\n\n masterCplx_ACTUAL = masterCplx.dup();\n slav... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(RangeFilter.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(RangeFilter.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "generalIn... | {
"body": "@Deprecated\n public static void filterBlock(ComplexDoubleMatrix masterDataBlock, // updated\n ComplexDoubleMatrix slaveDataBlock, // updated\n int nlMean,\n double SNRthreshold,\n double RSR, //... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_108 | {
"fields": [
{
"declarator": "powerOfTwo_EXPECTED",
"modifier": "static",
"original_string": "static double powerOfTwo_EXPECTED;",
"type": "double",
"var_name": "powerOfTwo_EXPECTED"
},
{
"declarator": "notPowerOfTwo_EXPECTED",
"modifier": "static",
"origin... | {
"body": "@Test\n public void testSqrt() throws Exception {\n Assert.assertEquals(Math.sqrt(VALUE), MathUtils.sqrt(VALUE), DELTA);\n }",
"class_method_signature": "MathUtilsTest.testSqrt()",
"constructor": false,
"full_signature": "@Test public void testSqrt()",
"identifier": "testSqrt",
"invo... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/MathUtils.java",
"identifier": "MathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MathUtils.isEven(long value)",
"constructor": false,
"full_signature": "public static boolean isEven(long value... | {
"body": "@Deprecated\n public static double sqrt(double value) {\n return Math.sqrt(value);\n }",
"class_method_signature": "MathUtils.sqrt(double value)",
"constructor": false,
"full_signature": "@Deprecated public static double sqrt(double value)",
"identifier": "sqrt",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_54 | {
"fields": [
{
"declarator": "masterResFile = new File(\"test/testOrbit/test_cr.res\")",
"modifier": "private static final",
"original_string": "private static final File masterResFile = new File(\"test/testOrbit/test_cr.res\");",
"type": "File",
"var_name": "masterResFile"
},
... | {
"body": "@Test\n public void testGetHamb() throws Exception {\n Assert.assertEquals(hAmb_1_EXPECTED, baseline.getHamb(line_1, pix_1, 0), DELTA_06);\n Assert.assertEquals(hAmb_2_EXPECTED, baseline.getHamb(line_2, pix_2, 0), DELTA_06);\n }",
"class_method_signature": "BaselineTest.testGetHamb()"... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(Baseline.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(Baseline.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "isInitialized",... | {
"body": "public double getHamb(final double line, final double pixel, final double height) throws Exception {\n //final double theta = get_theta(line,pixel,height);\n final double theta_inc = getThetaInc(line, pixel, height);\n final double Bperp = getBperp(line, pixel, height);\n f... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_42 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(ResFileTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(ResFileTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "testFile"... | {
"body": "@Test\n public void testParseTimeValue() throws Exception {\n\n ProductData.UTC expectedTime = ProductData.UTC.parse(\"11-JUN-2003 06:12:52.090719\");\n ProductData.UTC returnedTime = resFile.parseDateTimeValue(\"First_pixel_azimuth_time \\\\(UTC\\\\)\");\n Assert.assertEquals(expec... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(ResFile.class.getName())",
"modifier": "private static",
"original_string": "private static Logger logger = Logger.getLogger(ResFile.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "r... | {
"body": "public double parseTimeValue(final String key) throws ParseException {\n // assume format: 02-AUG-1995 21:16:42.210\n final String dateTime = parseStringValue(key);\n return DateUtils.dateTimeToSecOfDay(dateTime);\n }",
"class_method_signature": "ResFile.parseTimeValue(final Stri... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_149 | {
"fields": [
{
"declarator": "array = {1, 2, 3}",
"modifier": "private",
"original_string": "private double[] array = {1, 2, 3};",
"type": "double[]",
"var_name": "array"
},
{
"declarator": "X = new Point(array)",
"modifier": "private",
"original_string": "... | {
"body": "@Test\n public void testDivByScalar() throws Exception {\n testPoint = X.divByScalar(0.25);\n refPoint = new Point(4, 8, 12);\n assertEquals(refPoint, testPoint);\n }",
"class_method_signature": "PointTest.testDivByScalar()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/Point.java",
"identifier": "Point",
"interfaces": "",
"methods": [
{
"class_method_signature": "Point.Point()",
"constructor": true,
"full_signature": "public Point()",
"identifier": "Point",
"modifiers": "pu... | {
"body": "public Point divByScalar(double scalar) {\n double dx = x / scalar;\n double dy = y / scalar;\n double dz = z / scalar;\n return new Point(dx,dy,dz);\n }",
"class_method_signature": "Point.divByScalar(double scalar)",
"constructor": false,
"full_signature": "public Poin... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_15 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testOrbitInterpolationCoeffs_Z() throws Exception {\n Assert.assertArrayEquals(orbitCoeff_Z_EXPECTED, orbit_ACTUAL.getCoeff_Z(), eps_04);\n }",
"class_method_signature": "OrbitTest.testOrbitInterpolationCoeffs_Z()",
"constructor": false,
"full_signature": "@Test publi... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public double[] getCoeff_Z() {\n return coeff_Z;\n }",
"class_method_signature": "Orbit.getCoeff_Z()",
"constructor": false,
"full_signature": "public double[] getCoeff_Z()",
"identifier": "getCoeff_Z",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "doubl... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_132 | {
"fields": [
{
"declarator": "nRows = 128",
"modifier": "static",
"original_string": "static int nRows = 128;",
"type": "int",
"var_name": "nRows"
},
{
"declarator": "nCols = 256",
"modifier": "static",
"original_string": "static int nCols = 256;",
"t... | {
"body": "@Test\n public void testIntensity() throws Exception {\n DoubleMatrix intensity_ACTUAL = SarUtils.intensity(cplxData);\n Assert.assertEquals(DoubleMatrix.ones(cplxData.rows, cplxData.columns), intensity_ACTUAL);\n }",
"class_method_signature": "SarUtilsTest.testIntensity()",
"constr... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(SarUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(SarUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-core/src/main/java/o... | {
"body": "public static DoubleMatrix intensity(final ComplexDoubleMatrix inputMatrix) {\n return pow(inputMatrix.real(), 2).add(pow(inputMatrix.imag(), 2));\n }",
"class_method_signature": "SarUtils.intensity(final ComplexDoubleMatrix inputMatrix)",
"constructor": false,
"full_signature": "public sta... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_81 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testCholeskyInvert_JBLAS() throws Exception {\n DoubleMatrix A_PASCAL_33_CHOL_INV_ACTUAL = LinearAlgebraUtils.invert(A_PASCAL_33);\n Assert.assertEquals(A_PASCAL_33_CHOL_INV_EXPECTED, A_PASCAL_33_CHOL_INV_ACTUAL);\n }",
"class_method_signature": "LinearAlgebraUtils... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static double[][] invert(double[][] inMatrix) {\n double[][] outMatrix = inMatrix.clone();\n invert_inplace(outMatrix);\n return outMatrix;\n }",
"class_method_signature": "LinearAlgebraUtils.invert(double[][] inMatrix)",
"constructor": false,
"full_signature": "public ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_39 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(ResFileTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(ResFileTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "testFile"... | {
"body": "@Test\n public void testQueryKeyString() throws Exception {\n String expectedValue = \"FRAME 17\";\n String returnValue = resFile.parseStringValue(\"Scene location\");\n\n Assert.assertEquals(expectedValue, returnValue);\n }",
"class_method_signature": "ResFileTest.testQueryKey... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(ResFile.class.getName())",
"modifier": "private static",
"original_string": "private static Logger logger = Logger.getLogger(ResFile.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "r... | {
"body": "public String parseStringValue(String key) {\n return queryKey(key, 2).get(0).toString().trim();\n }",
"class_method_signature": "ResFile.parseStringValue(String key)",
"constructor": false,
"full_signature": "public String parseStringValue(String key)",
"identifier": "parseStringValue",
... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_124 | {
"fields": [
{
"declarator": "DELTA = 10e-16",
"modifier": "private static final",
"original_string": "private static final double DELTA = 10e-16;",
"type": "double",
"var_name": "DELTA"
},
{
"declarator": "NumOfSamples = 16",
"modifier": "final static",
"o... | {
"body": "@Test\n public void testInvertHammingDoubleMatrix() throws Exception {\n DoubleMatrix inverseHamming_ACTUAL = WeightWindows.inverseHamming(new DoubleMatrix(inputAxisHamming), Br, Fs, ALPHA);\n Assert.assertEquals(new DoubleMatrix(inverseHamming_EXPECTED),inverseHamming_ACTUAL);\n }",
... | {
"fields": [
{
"declarator": "n",
"modifier": "private static",
"original_string": "private static int n;",
"type": "int",
"var_name": "n"
}
],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/WeightWindows.java",
"identifier": "WeightWindows",
"interfaces": "",
... | {
"body": "public static double[] inverseHamming(final double[] hamming) {\n\n double[] invertHamming = new double[hamming.length];\n\n for (int i = 0; i < hamming.length; i++) {\n if (hamming[i] != 0) {\n invertHamming[i] = 1. / hamming[i];\n }\n }\n r... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_97 | {
"fields": [
{
"declarator": "complexMatrix_EXPECTED",
"modifier": "private static",
"original_string": "private static ComplexDoubleMatrix complexMatrix_EXPECTED;",
"type": "ComplexDoubleMatrix",
"var_name": "complexMatrix_EXPECTED"
},
{
"declarator": "complexMatrix_E... | {
"body": "@Test\n public void testInvfft2D_inplace() throws Exception {\n\n ComplexDoubleMatrix complexMatrix_ACTUAL = fftMatrix_2D_EXPECTED.dup();\n SpectralUtils.invfft2D_inplace(complexMatrix_ACTUAL);\n Assert.assertEquals(complexMatrix_EXPECTED, complexMatrix_ACTUAL);\n\n // Not Sq... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(SpectralUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(SpectralUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-core/src/m... | {
"body": "public static void invfft2D_inplace(ComplexDoubleMatrix A) {\n DoubleFFT_2D fft2d = new DoubleFFT_2D(A.rows, A.columns);\n// fft2d.complexInverse(A.data, true);\n ComplexDoubleMatrix aTemp = A.transpose();\n fft2d.complexInverse(aTemp.data, true);\n A.data = aTemp.transpo... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_78 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testCholeskyInvert_Arrays() throws Exception {\n double[][] A_PASCAL_33_CHOL_INV_ACTUAL = LinearAlgebraUtils.invert(A_PASCAL_33.toArray2());\n Assert.assertEquals(A_PASCAL_33_CHOL_INV_EXPECTED.toArray2(), A_PASCAL_33_CHOL_INV_ACTUAL);\n }",
"class_method_signature"... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static double[][] invert(double[][] inMatrix) {\n double[][] outMatrix = inMatrix.clone();\n invert_inplace(outMatrix);\n return outMatrix;\n }",
"class_method_signature": "LinearAlgebraUtils.invert(double[][] inMatrix)",
"constructor": false,
"full_signature": "public ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_73 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testFliplr() throws Exception {\n DoubleMatrix A_33_FLIP_ACTUAL = A_33.dup();\n LinearAlgebraUtils.fliplr_inplace(A_33_FLIP_ACTUAL);\n Assert.assertEquals(A_33_FLIP_EXPECTED, A_33_FLIP_ACTUAL);\n }",
"class_method_signature": "LinearAlgebraUtilsTest.testFlip... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static void fliplr_inplace(DoubleMatrix A) {\n\n final int nRows = A.rows;\n final int nCols = A.columns;\n\n if (nRows == 1 || nCols == 1) {\n double tmp;\n// for (int i = 0; i < (nCols / 2); ++i) {\n// tmp = A.get(0, i);\n// ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_24 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testXyz2orb() throws Exception {\n Point satellitePos_ACTUAL = orbit_ACTUAL.xyz2orb(pixelXYZ_EXPECTED, slcimage);\n Assert.assertArrayEquals(satellitePos_EXPECTED.toArray(), satellitePos_ACTUAL.toArray(), eps_06);\n }",
"class_method_signature": "OrbitTest.testXyz2... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public synchronized Point xyz2orb(final Point pointOnEllips, final SLCImage slcimage) {\n // return satellite position\n // Point pointTime = xyz2t(pointOnEllips,slcimage);\n return getXYZ(xyz2t(pointOnEllips, slcimage).y); // inlined\n }",
"class_method_signature": "Orbit.xyz2orb... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_32 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testEll2lp() throws Exception {\n double[] phi_lam_height = new double[]{crGEO_EXPECTED[0] * Constants.DTOR, crGEO_EXPECTED[1] * Constants.DTOR, crGEO_EXPECTED[2]};\n final Point lp_ACTUAL = orbit_ACTUAL.ell2lp(phi_lam_height, slcimage);\n Assert.assertEquals(sub... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public synchronized Point ell2lp(final double[] phi_lam_height, final SLCImage slcimage) throws Exception {\n final Point pointOnEllips = Ellipsoid.ell2xyz(phi_lam_height);\n return xyz2lp(pointOnEllips, slcimage);\n }",
"class_method_signature": "Orbit.ell2lp(final double[] phi_lam_heig... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_139 | {
"fields": [
{
"declarator": "inputEll = new Ellipsoid()",
"modifier": "private",
"original_string": "private Ellipsoid inputEll = new Ellipsoid();",
"type": "Ellipsoid",
"var_name": "inputEll"
},
{
"declarator": "cr_GEO_expected = {51.9903894167,4.3896355000,41.670}",... | {
"body": "@Ignore\n @Test\n public void testShowdata() throws Exception {\n inputEll.showdata();\n }",
"class_method_signature": "EllipsoidTest.testShowdata()",
"constructor": false,
"full_signature": "@Ignore @Test public void testShowdata()",
"identifier": "testShowdata",
"invocations": [... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(Ellipsoid.class.getName())",
"modifier": "",
"original_string": "Logger logger = Logger.getLogger(Ellipsoid.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "e2 = 0.0066943800355127909... | {
"body": "public void showdata() {\n logger.info(\"ELLIPSOID: \\tEllipsoid used (orbit, output): \" + name + \".\");\n logger.info(\"ELLIPSOID: a = \" + a);\n logger.info(\"ELLIPSOID: b = \" + b);\n logger.info(\"ELLIPSOID: e2 = \" + e2);\n logger.info(\"ELLIPSOID: e2' = \" + ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_65 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testAbsMatrix_JBLAS() throws Exception {\n DoubleMatrix SOL_33_ACTUAL_ABS = LinearAlgebraUtils.absMatrix(new DoubleMatrix(SOL_33_EXPECTED));\n Assert.assertEquals(new DoubleMatrix(SOL_33_EXPECTED_ABS), SOL_33_ACTUAL_ABS);\n }",
"class_method_signature": "LinearAlge... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static DoubleMatrix absMatrix(DoubleMatrix inMatrix) {\n return abs(inMatrix);\n }",
"class_method_signature": "LinearAlgebraUtils.absMatrix(DoubleMatrix inMatrix)",
"constructor": false,
"full_signature": "public static DoubleMatrix absMatrix(DoubleMatrix inMatrix)",
"identifier":... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_142 | {
"fields": [
{
"declarator": "ORBIT_DEGREE = 2",
"modifier": "final static",
"original_string": "final static int ORBIT_DEGREE = 2;",
"type": "int",
"var_name": "ORBIT_DEGREE"
},
{
"declarator": "slcImages",
"modifier": "private",
"original_string": "privat... | {
"body": "@Test\n public void testFindOptimalMaster() throws Exception {\n\n final MasterSelection dataStack = new MasterSelection();\n dataStack.setInput(slcImages, orbits);\n dataStack.estimateOptimalMaster(ProgressMonitor.NULL);\n\n float modeledCoherence_ACTUAL = dataStack.getModel... | {
"fields": [
{
"declarator": "BTEMP_CRITICAL = 3 * 365",
"modifier": "private final static",
"original_string": "private final static int BTEMP_CRITICAL = 3 * 365;",
"type": "int",
"var_name": "BTEMP_CRITICAL"
},
{
"declarator": "BPERP_CRITICAL = 1200",
"modifier... | {
"body": "public int findOptimalMaster(IfgStack[] ifgStack) {\n\n orbitNumber = ifgStack[0].master.orbitNumber;\n modeledCoherence = ifgStack[0].meanCoherence;\n\n int index = 0;\n int i = 0;\n for (IfgStack anIfgStack : ifgStack) {\n\n long orbit = anIfgStack.master.orb... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_115 | {
"fields": [
{
"declarator": "DELTA_06 = 1e-06",
"modifier": "private static final",
"original_string": "private static final double DELTA_06 = 1e-06;",
"type": "double",
"var_name": "DELTA_06"
},
{
"declarator": "DELTA_03 = 1e-03",
"modifier": "private static fi... | {
"body": "@Test\n public void testPolyFit() throws Exception {\n\n // max degree\n final int maxDegree = 6;\n\n double[] x = MathUtils.increment(11, 0, 0.1);\n double[] y = new double[x.length];\n\n // define double as errf(x)\n for (int i = 0; i < x.length; i++) {\n ... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(PolyUtils.class)",
"modifier": "public static final",
"original_string": "public static final Logger logger = (Logger) LoggerFactory.getLogger(PolyUtils.class);",
"type": "Logger",
"var_name": "logger"
}
]... | {
"body": "public static double[] polyFit(DoubleMatrix t, DoubleMatrix y, final int degree) throws IllegalArgumentException {\n\n logger.setLevel(Level.INFO);\n\n if (t.length != y.length || !t.isVector() || !y.isVector()) {\n logger.error(\"polyfit: require same size vectors.\");\n ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_49 | {
"fields": [
{
"declarator": "masterResFile = new File(\"test/testOrbit/test_cr.res\")",
"modifier": "private static final",
"original_string": "private static final File masterResFile = new File(\"test/testOrbit/test_cr.res\");",
"type": "File",
"var_name": "masterResFile"
},
... | {
"body": "@Test\n public void testGetBpar() throws Exception {\n Assert.assertEquals(bPar_1_EXPECTED, baseline.getBpar(line_1, pix_1, 0), DELTA_06);\n Assert.assertEquals(bPar_2_EXPECTED, baseline.getBpar(line_2, pix_2, 0), DELTA_06);\n }",
"class_method_signature": "BaselineTest.testGetBpar()"... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(Baseline.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(Baseline.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "isInitialized",... | {
"body": "public double getBpar(final double line, final double pixel, final double height) throws Exception {\n return polyVal(bparCoeffs,\n normalize2(line, linMin, linMax),\n normalize2(pixel, pixMin, pixMax),\n normalize2(height, hMin, hMax));\n }",
"class... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_103 | {
"fields": [
{
"declarator": "powerOfTwo_EXPECTED",
"modifier": "static",
"original_string": "static double powerOfTwo_EXPECTED;",
"type": "double",
"var_name": "powerOfTwo_EXPECTED"
},
{
"declarator": "notPowerOfTwo_EXPECTED",
"modifier": "static",
"origin... | {
"body": "@Test\n public void testDeg2rad() throws Exception {\n Assert.assertEquals(valInRadians_EXPECTED, MathUtils.deg2rad(valInDegrees_EXPECTED), DELTA);\n }",
"class_method_signature": "MathUtilsTest.testDeg2rad()",
"constructor": false,
"full_signature": "@Test public void testDeg2rad()",
... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/MathUtils.java",
"identifier": "MathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MathUtils.isEven(long value)",
"constructor": false,
"full_signature": "public static boolean isEven(long value... | {
"body": "public static double deg2rad(double valueInDegrees) {\n// return Math.toDegrees(rad);\n return valueInDegrees * Constants.DTOR;\n }",
"class_method_signature": "MathUtils.deg2rad(double valueInDegrees)",
"constructor": false,
"full_signature": "public static double deg2rad(double val... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_154 | {
"fields": [
{
"declarator": "array = {1, 2, 3}",
"modifier": "private",
"original_string": "private double[] array = {1, 2, 3};",
"type": "double[]",
"var_name": "array"
},
{
"declarator": "X = new Point(array)",
"modifier": "private",
"original_string": "... | {
"body": "@Test\n public void testDistance() throws Exception {\n testDouble = X.distance(Z);\n refDouble = 5.19615242270663;\n assertEquals(refDouble, testDouble, delta);\n }",
"class_method_signature": "PointTest.testDistance()",
"constructor": false,
"full_signature": "@Test publi... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/Point.java",
"identifier": "Point",
"interfaces": "",
"methods": [
{
"class_method_signature": "Point.Point()",
"constructor": true,
"full_signature": "public Point()",
"identifier": "Point",
"modifiers": "pu... | {
"body": "@Override\n public double distance(Coordinate p) {\n\n double dx = x - p.x;\n double dy = y - p.y;\n double dz = z - p.z;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n }",
"class_method_signature": "Point.distance(Coordinate p)",
"constructor": false,
"full_si... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_90 | {
"fields": [
{
"declarator": "complexMatrix_EXPECTED",
"modifier": "private static",
"original_string": "private static ComplexDoubleMatrix complexMatrix_EXPECTED;",
"type": "ComplexDoubleMatrix",
"var_name": "complexMatrix_EXPECTED"
},
{
"declarator": "complexMatrix_E... | {
"body": "@Test\n public void testIfftshiftDouble() throws Exception {\n\n final DoubleMatrix matrix_EXPECTED = new DoubleMatrix(vector_EXPECTED);\n final DoubleMatrix matrixShift_EXPECTED = new DoubleMatrix(shiftVector_EXPECTED);\n\n DoubleMatrix matrix_ACTUAL = SpectralUtils.ifftshift(matri... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(SpectralUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(SpectralUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-core/src/m... | {
"body": "public static ComplexDoubleMatrix ifftshift(ComplexDoubleMatrix inMatrix) throws IllegalArgumentException {\n\n if (!inMatrix.isVector()) {\n logger.error(\"ifftshift: only vectors\");\n throw new IllegalArgumentException(\"ifftshift: works only for vectors!\");\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_123 | {
"fields": [
{
"declarator": "DELTA = 10e-16",
"modifier": "private static final",
"original_string": "private static final double DELTA = 10e-16;",
"type": "double",
"var_name": "DELTA"
},
{
"declarator": "NumOfSamples = 16",
"modifier": "final static",
"o... | {
"body": "@Test\n public void testInvertHammingArray() throws Exception {\n double[] inverseHamming_ACTUAL = WeightWindows.inverseHamming(inputAxisHamming, Br, Fs, ALPHA);\n Assert.assertArrayEquals(inverseHamming_EXPECTED,inverseHamming_ACTUAL, DELTA);\n }",
"class_method_signature": "WeightWi... | {
"fields": [
{
"declarator": "n",
"modifier": "private static",
"original_string": "private static int n;",
"type": "int",
"var_name": "n"
}
],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/WeightWindows.java",
"identifier": "WeightWindows",
"interfaces": "",
... | {
"body": "public static double[] inverseHamming(final double[] hamming) {\n\n double[] invertHamming = new double[hamming.length];\n\n for (int i = 0; i < hamming.length; i++) {\n if (hamming[i] != 0) {\n invertHamming[i] = 1. / hamming[i];\n }\n }\n r... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_28 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testPointByReference_getXYZ() throws Exception {\n Point t1 = orbit_ACTUAL.getXYZ(1);\n Point t2 = orbit_ACTUAL.getXYZ(2);\n Assert.assertFalse(t1 == t2);\n }",
"class_method_signature": "OrbitTest.testPointByReference_getXYZ()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public Point getXYZ(final double azTime) {\n\n if (azTime < time[0] || azTime > time[numStateVectors - 1]) {\n logger.warn(\"getXYZ() interpolation at: \" + azTime + \" is outside interval time axis: (\"\n + time[0] + \", \" + time[numStateVectors - 1] + \").\");\n ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_86 | {
"fields": [
{
"declarator": "complexMatrix_EXPECTED",
"modifier": "private static",
"original_string": "private static ComplexDoubleMatrix complexMatrix_EXPECTED;",
"type": "ComplexDoubleMatrix",
"var_name": "complexMatrix_EXPECTED"
},
{
"declarator": "complexMatrix_E... | {
"body": "@Test\n public void testFftshiftDouble() throws Exception {\n\n final DoubleMatrix matrix_EXPECTED = new DoubleMatrix(vector_EXPECTED);\n final DoubleMatrix matrixShift_EXPECTED = new DoubleMatrix(shiftVector_EXPECTED);\n\n DoubleMatrix matrixShift_ACTUAL = SpectralUtils.fftshift(ma... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(SpectralUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(SpectralUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-core/src/m... | {
"body": "public static ComplexDoubleMatrix fftshift(ComplexDoubleMatrix inMatrix) {\n if (!inMatrix.isVector()) {\n logger.error(\"ifftshift: only vectors\");\n throw new IllegalArgumentException(\"ifftshift: works only for vectors!\");\n }\n\n final int cplxMatrixLength =... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_69 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testDotmult_JBLAS() throws Exception {\n ComplexDoubleMatrix A_PASCAL_22_CPLX_times2_ACTUAL = LinearAlgebraUtils.dotmult(A_PASCAL_22_CPLX, A_PASCAL_22_CPLX);\n Assert.assertEquals(A_PASCAL_22_CPLX_times2_EXPECTED, A_PASCAL_22_CPLX_times2_ACTUAL);\n }",
"class_metho... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static ComplexDoubleMatrix dotmult(ComplexDoubleMatrix A, ComplexDoubleMatrix B) {\n return A.mul(B);\n }",
"class_method_signature": "LinearAlgebraUtils.dotmult(ComplexDoubleMatrix A, ComplexDoubleMatrix B)",
"constructor": false,
"full_signature": "public static ComplexDoubleMatrix... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_135 | {
"fields": [
{
"declarator": "win_EXPECTED = new Window(11, 21, 103, 114)",
"modifier": "private final static",
"original_string": "private final static Window win_EXPECTED = new Window(11, 21, 103, 114);",
"type": "Window",
"var_name": "win_EXPECTED"
},
{
"declarator"... | {
"body": "@Test\n public void testCompareTo() throws Exception {\n Assert.assertEquals(0, win_ACTUAL.compareTo(win_EXPECTED));\n }",
"class_method_signature": "WindowTest.testCompareTo()",
"constructor": false,
"full_signature": "@Test public void testCompareTo()",
"identifier": "testCompareTo",... | {
"fields": [
{
"declarator": "linelo",
"modifier": "public",
"original_string": "public long linelo;",
"type": "long",
"var_name": "linelo"
},
{
"declarator": "linehi",
"modifier": "public",
"original_string": "public long linehi;",
"type": "long",
... | {
"body": "public int compareTo(final Object o) {\n\n Window other = (Window) o;\n\n if (linelo < other.linelo) return -1;\n if (linelo > other.linelo) return 1;\n if (linehi < other.linehi) return -1;\n if (linehi > other.linehi) return 1;\n\n if (pixlo < other.pixlo) return... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_12 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testGetPolyDegree() throws Exception {\n Assert.assertEquals(poly_degree_EXPECTED, orbit_ACTUAL.getPoly_degree());\n }",
"class_method_signature": "OrbitTest.testGetPolyDegree()",
"constructor": false,
"full_signature": "@Test public void testGetPolyDegree()",
"iden... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public int getPoly_degree() {\n return poly_degree;\n }",
"class_method_signature": "Orbit.getPoly_degree()",
"constructor": false,
"full_signature": "public int getPoly_degree()",
"identifier": "getPoly_degree",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"retur... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_45 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Slant2HeightTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = (Logger) LoggerFactory.getLogger(Slant2HeightTest.class);",
"type": "Logger",
"var_name": "l... | {
"body": "@Test\n public void testSchwabisch() throws Exception{\n\n int nPoints = 200;\n int nHeights = 3;\n int degree1d = 2;\n int degree2d = 5;\n\n DoubleMatrix inputTile = unwrappedPhase.dup();\n\n StopWatch watch = new StopWatch();\n\n watch.start();\n ... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Slant2Height.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = (Logger) LoggerFactory.getLogger(Slant2Height.class);",
"type": "Logger",
"var_name": "logger"
... | {
"body": "public void schwabisch() throws Exception {\n\n logger.trace(\"slant2h Schwabisch (PM 01-Apr-2011)\");\n\n final int heightStep = MAXHEIGHT / (nHeights - 1); // heights to eval ref.refPhase\n\n // Matrices for storing refPhase for all ref. ellipsoids\n // refPhase(i,0) refPhas... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_119 | {
"fields": [
{
"declarator": "DELTA = 10e-16",
"modifier": "private static final",
"original_string": "private static final double DELTA = 10e-16;",
"type": "double",
"var_name": "DELTA"
},
{
"declarator": "NumOfSamples = 16",
"modifier": "final static",
"o... | {
"body": "@Test\n public void testRectArray() throws Exception {\n double[] rect_ACTUAL = WeightWindows.rect(inputAxisRect);\n Assert.assertArrayEquals(rect_EXPECTED, rect_ACTUAL, DELTA);\n }",
"class_method_signature": "WeightWindowsTest.testRectArray()",
"constructor": false,
"full_signat... | {
"fields": [
{
"declarator": "n",
"modifier": "private static",
"original_string": "private static int n;",
"type": "int",
"var_name": "n"
}
],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/WeightWindows.java",
"identifier": "WeightWindows",
"interfaces": "",
... | {
"body": "public static DoubleMatrix rect(final DoubleMatrix x) throws IllegalArgumentException {\n if (!x.isVector()) {\n System.err.println(\"myrect: only lying vectors.\");\n throw new IllegalArgumentException();\n }\n\n return new DoubleMatrix(rect(x.toArray()));\n }... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_53 | {
"fields": [
{
"declarator": "masterResFile = new File(\"test/testOrbit/test_cr.res\")",
"modifier": "private static final",
"original_string": "private static final File masterResFile = new File(\"test/testOrbit/test_cr.res\");",
"type": "File",
"var_name": "masterResFile"
},
... | {
"body": "@Test\n public void testGetAlpha() throws Exception {\n Assert.assertEquals(alpha_1_EXPECTED, baseline.getAlpha(line_1, pix_1, 0), DELTA_06);\n Assert.assertEquals(alpha_2_EXPECTED, baseline.getAlpha(line_2, pix_2, 0), DELTA_06);\n }",
"class_method_signature": "BaselineTest.testGetAl... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(Baseline.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(Baseline.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "isInitialized",... | {
"body": "public double getAlpha(final double line, final double pixel, final double height) throws Exception {\n final double Bperp = getBperp(line, pixel, height);\n final double Bpar = getBpar(line, pixel, height);\n final double theta = getTheta(line, pixel, height);\n final double al... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_2 | {
"fields": [
{
"declarator": "DELTA_04 = 1e-04",
"modifier": "private static final",
"original_string": "private static final double DELTA_04 = 1e-04;",
"type": "double",
"var_name": "DELTA_04"
},
{
"declarator": "DELTA_03 = 1e-03",
"modifier": "private static fi... | {
"body": "@Test\n public void filterBlock_HAMM() throws Exception {\n\n final double alphaHamming = 0.75;\n final int ovsFactor = 1;\n final boolean doWeightCorrelFlag = false;\n\n masterCplx_ACTUAL = masterCplx.dup();\n slaveCplx_ACTUAL = slaveCplx.dup();\n\n /// load Ex... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(RangeFilter.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(RangeFilter.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "generalIn... | {
"body": "@Deprecated\n public static void filterBlock(ComplexDoubleMatrix masterDataBlock, // updated\n ComplexDoubleMatrix slaveDataBlock, // updated\n int nlMean,\n double SNRthreshold,\n double RSR, //... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_158 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(DemTile.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(DemTile.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "masterResFile = n... | {
"body": "@Test\n public void testGetDEMCorners() throws Exception {\n\n demTile.computeGeoCorners(masterMeta, masterOrbit, masterTileWindow);\n\n double phiMin_EXPECTED = 0.65198531114095126;\n Assert.assertEquals(phiMin_EXPECTED, demTile.phiMin, DELTA_08);\n\n double phiMax_EXPECTED ... | {
"fields": [
{
"declarator": "logger = org.apache.log4j.Logger.getLogger(DemTile.class.getName())",
"modifier": "static",
"original_string": "static org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(DemTile.class.getName());",
"type": "org.apache.log4j.Logger",
"var... | {
"body": "@Deprecated\n public void computeGeoCorners(final SLCImage meta, final Orbit orbit, final Window tile) throws Exception {\n\n double[] phiAndLambda;\n\n final double l0 = tile.linelo;\n final double lN = tile.linehi;\n final double p0 = tile.pixlo;\n final double pN = ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_159 | {
"fields": [
{
"declarator": "logger = Logger.getLogger(TopoPhase.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(TopoPhase.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "testDataDir =... | {
"body": "@Test\n public void testGridding() throws Exception {\n\n double[][] grd_EXPECTED; // output_buffer.r4\n\n // load test data\n String testDataDir = \"/d2/etna_test/demTest/\";\n String bufferFileName;\n\n bufferFileName = testDataDir + \"output_buffer.r8.swap\";\n ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(TopoPhase.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(TopoPhase.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "masterOrbit",... | {
"body": "public void gridData() throws Exception {\n if (rngAzRatio == 0) {\n calculateScalingRatio();\n }\n int mlAz = masterMeta.getMlAz();\n int mlRg = masterMeta.getMlRg();\n int offset = 0;\n demPhase = TriangleUtils.gridDataLinear(demRadarCode_y, demRadarCo... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_3 | {
"fields": [
{
"declarator": "DELTA_04 = 1e-04",
"modifier": "private static final",
"original_string": "private static final double DELTA_04 = 1e-04;",
"type": "double",
"var_name": "DELTA_04"
},
{
"declarator": "DELTA_03 = 1e-03",
"modifier": "private static fi... | {
"body": "@Test\n public void filterBlock_HAMM_WEIGHT() throws Exception {\n\n final double alphaHamming = 0.75;\n final int ovsFactor = 1;\n final boolean doWeightCorrelFlag = true;\n\n masterCplx_ACTUAL = masterCplx.dup();\n slaveCplx_ACTUAL = slaveCplx.dup();\n\n /// l... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(RangeFilter.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(RangeFilter.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "generalIn... | {
"body": "@Deprecated\n public static void filterBlock(ComplexDoubleMatrix masterDataBlock, // updated\n ComplexDoubleMatrix slaveDataBlock, // updated\n int nlMean,\n double SNRthreshold,\n double RSR, //... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_52 | {
"fields": [
{
"declarator": "masterResFile = new File(\"test/testOrbit/test_cr.res\")",
"modifier": "private static final",
"original_string": "private static final File masterResFile = new File(\"test/testOrbit/test_cr.res\");",
"type": "File",
"var_name": "masterResFile"
},
... | {
"body": "@Test\n public void testGetBvert() throws Exception {\n Assert.assertEquals(bVert_1_EXPECTED, baseline.getBvert(line_1, pix_1, 0), DELTA_06);\n Assert.assertEquals(bVert_2_EXPECTED, baseline.getBvert(line_2, pix_2, 0), DELTA_06);\n }",
"class_method_signature": "BaselineTest.testGetBv... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(Baseline.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(Baseline.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "isInitialized",... | {
"body": "public double getBvert(final double line, final double pixel, final double height) throws Exception {\n final double B = getB(line, pixel, height);\n final double alpha = getAlpha(line, pixel, height);\n return B * Math.sin(alpha);// sign ok\n }",
"class_method_signature": "Baseli... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_118 | {
"fields": [
{
"declarator": "DELTA_06 = 1e-06",
"modifier": "private static final",
"original_string": "private static final double DELTA_06 = 1e-06;",
"type": "double",
"var_name": "DELTA_06"
},
{
"declarator": "DELTA_03 = 1e-03",
"modifier": "private static fi... | {
"body": "@Test\n public void testPolyval() throws Exception {\n\n final double[] x = {0, 1, 2, 3};\n final double[] y = {0, 1, 2, 3};\n final double[] coeffsTemplate = MathUtils.increment(60, 1, 1);\n\n final double[][] values_EXPECTED = {{1, 6, 11, 16},\n {1, 21, 71, 1... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(PolyUtils.class)",
"modifier": "public static final",
"original_string": "public static final Logger logger = (Logger) LoggerFactory.getLogger(PolyUtils.class);",
"type": "Logger",
"var_name": "logger"
}
]... | {
"body": "public static double[][] polyval(final double[] x, final double[] y, final double coeff[], int degree) {\n\n if (degree < -1) {\n logger.warn(\"polyValGrid: degree < -1 ????\");\n }\n\n if (x.length > y.length) {\n logger.warn(\"polValGrid: x larger than y, while ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_44 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(DInSARTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = (Logger) LoggerFactory.getLogger(DInSARTest.class);",
"type": "Logger",
"var_name": "logger"
}... | {
"body": "@Test\n public void testDinsar() throws Exception {\n\n ComplexDoubleMatrix defoData = cplxIfg.dup();\n\n StopWatch watch = new StopWatch();\n watch.start();\n DInSAR dinsar = new DInSAR(masterMeta, masterOrbit, defoSlaveMeta, defoSlaveOrbit, topoSlaveMeta, topoSlaveOrbit);\n... | {
"fields": [
{
"declarator": "masterMeta",
"modifier": "final private",
"original_string": "final private SLCImage masterMeta;",
"type": "SLCImage",
"var_name": "masterMeta"
},
{
"declarator": "slaveDefoMeta",
"modifier": "final private",
"original_string":... | {
"body": "public DInSAR(SLCImage masterMeta, Orbit masterOrbit,\n SLCImage slaveDefoMeta, Orbit slaveDefoOrbit,\n SLCImage topoSlaveMeta, Orbit slaveTopoOrbit) {\n\n this.masterMeta = masterMeta;\n this.masterOrbit = masterOrbit;\n\n this.slaveDefoMeta = slaveDe... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_13 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testOrbitInterpolationCoeffs_X() throws Exception {\n Assert.assertArrayEquals(orbitCoeff_X_EXPECTED, orbit_ACTUAL.getCoeff_X(), eps_04);\n }",
"class_method_signature": "OrbitTest.testOrbitInterpolationCoeffs_X()",
"constructor": false,
"full_signature": "@Test publi... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public double[] getCoeff_X() {\n return coeff_X;\n }",
"class_method_signature": "Orbit.getCoeff_X()",
"constructor": false,
"full_signature": "public double[] getCoeff_X()",
"identifier": "getCoeff_X",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "doubl... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_134 | {
"fields": [
{
"declarator": "win_EXPECTED = new Window(11, 21, 103, 114)",
"modifier": "private final static",
"original_string": "private final static Window win_EXPECTED = new Window(11, 21, 103, 114);",
"type": "Window",
"var_name": "win_EXPECTED"
},
{
"declarator"... | {
"body": "@Test\n public void testSetWindow() throws Exception {\n\n Assert.assertEquals(win_EXPECTED.linelo, win_ACTUAL.linelo);\n Assert.assertEquals(win_EXPECTED.linehi, win_ACTUAL.linehi);\n Assert.assertEquals(win_EXPECTED.pixlo, win_ACTUAL.pixlo);\n Assert.assertEquals(win_EXPECT... | {
"fields": [
{
"declarator": "linelo",
"modifier": "public",
"original_string": "public long linelo;",
"type": "long",
"var_name": "linelo"
},
{
"declarator": "linehi",
"modifier": "public",
"original_string": "public long linehi;",
"type": "long",
... | {
"body": "public void setWindow(final Window other) {\n linelo = other.linelo;\n linehi = other.linehi;\n pixlo = other.pixlo;\n pixhi = other.pixhi;\n }",
"class_method_signature": "Window.setWindow(final Window other)",
"constructor": false,
"full_signature": "public void setWi... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_87 | {
"fields": [
{
"declarator": "complexMatrix_EXPECTED",
"modifier": "private static",
"original_string": "private static ComplexDoubleMatrix complexMatrix_EXPECTED;",
"type": "ComplexDoubleMatrix",
"var_name": "complexMatrix_EXPECTED"
},
{
"declarator": "complexMatrix_E... | {
"body": "@Test\n public void testFftshiftComplex() throws Exception {\n\n ComplexDoubleMatrix matrixCplx_EXPECTED = new ComplexDoubleMatrix(new DoubleMatrix(vector_EXPECTED),\n new DoubleMatrix(vector_EXPECTED));\n\n ComplexDoubleMatrix shiftMatrixCplx_EXPECTED = new ComplexDoubleMat... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(SpectralUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(SpectralUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-core/src/m... | {
"body": "public static ComplexDoubleMatrix fftshift(ComplexDoubleMatrix inMatrix) {\n if (!inMatrix.isVector()) {\n logger.error(\"ifftshift: only vectors\");\n throw new IllegalArgumentException(\"ifftshift: works only for vectors!\");\n }\n\n final int cplxMatrixLength =... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_68 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testMatrixPower_Arrays() throws Exception {\n Assert.assertEquals(A_PASCAL_33_SQUARED,\n LinearAlgebraUtils.matrixPower(A_PASCAL_33.toArray2(), 3));\n }",
"class_method_signature": "LinearAlgebraUtilsTest.testMatrixPower_Arrays()",
"constructor": false,
... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static DoubleMatrix matrixPower(DoubleMatrix data, double scalar) {\n return pow(data, scalar);\n }",
"class_method_signature": "LinearAlgebraUtils.matrixPower(DoubleMatrix data, double scalar)",
"constructor": false,
"full_signature": "public static DoubleMatrix matrixPower(DoubleMa... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_29 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testPointByReference_getXYZDot() throws Exception {\n Point t1 = orbit_ACTUAL.getXYZDot(1);\n Point t2 = orbit_ACTUAL.getXYZDot(2);\n Assert.assertFalse(t1 == t2);\n }",
"class_method_signature": "OrbitTest.testPointByReference_getXYZDot()",
"constructor":... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public Point getXYZDot(double azTime) {\n\n if (azTime < time[0] || azTime > time[numStateVectors - 1]) {\n logger.warn(\"getXYZDot() interpolation at: \" + azTime + \" is outside interval time axis: (\"\n + time[0] + \", \" + time[numStateVectors - 1] + \").\");\n ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_122 | {
"fields": [
{
"declarator": "DELTA = 10e-16",
"modifier": "private static final",
"original_string": "private static final double DELTA = 10e-16;",
"type": "double",
"var_name": "DELTA"
},
{
"declarator": "NumOfSamples = 16",
"modifier": "final static",
"o... | {
"body": "@Test\n public void testHammingDoubleMatrix() throws Exception {\n DoubleMatrix hamming_ACTUAL_MATRIX = WeightWindows.hamming(new DoubleMatrix(inputAxisHamming), Br, Fs, ALPHA);\n Assert.assertEquals(new DoubleMatrix(hamming_EXPECTED), hamming_ACTUAL_MATRIX);\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "n",
"modifier": "private static",
"original_string": "private static int n;",
"type": "int",
"var_name": "n"
}
],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/WeightWindows.java",
"identifier": "WeightWindows",
"interfaces": "",
... | {
"body": "public static double[] hamming(final int n) {\n double[] window = new double[n];\n for (int i = 0; i < n; i++) {\n window[i] = 0.54 - 0.46 * Math.cos(2 * Math.PI * ((double) i / (double) (n - 1)));\n }\n return window;\n }",
"class_method_signature": "WeightWindo... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_91 | {
"fields": [
{
"declarator": "complexMatrix_EXPECTED",
"modifier": "private static",
"original_string": "private static ComplexDoubleMatrix complexMatrix_EXPECTED;",
"type": "ComplexDoubleMatrix",
"var_name": "complexMatrix_EXPECTED"
},
{
"declarator": "complexMatrix_E... | {
"body": "@Test\n public void testIfftshiftComplex() throws Exception {\n\n ComplexDoubleMatrix matrixCplx_EXPECTED = new ComplexDoubleMatrix(new DoubleMatrix(vector_EXPECTED),\n new DoubleMatrix(vector_EXPECTED));\n\n ComplexDoubleMatrix shiftMatrixCplx_EXPECTED = new ComplexDoubleMa... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(SpectralUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(SpectralUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-core/src/m... | {
"body": "public static ComplexDoubleMatrix ifftshift(ComplexDoubleMatrix inMatrix) throws IllegalArgumentException {\n\n if (!inMatrix.isVector()) {\n logger.error(\"ifftshift: only vectors\");\n throw new IllegalArgumentException(\"ifftshift: works only for vectors!\");\n }\n\n ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_155 | {
"fields": [
{
"declarator": "array = {1, 2, 3}",
"modifier": "private",
"original_string": "private double[] array = {1, 2, 3};",
"type": "double[]",
"var_name": "array"
},
{
"declarator": "X = new Point(array)",
"modifier": "private",
"original_string": "... | {
"body": "@Test\n public void testScale() throws Exception {\n testPoint = X.scale(5);\n refPoint = new Point(5, 10, 15);\n assertEquals(testPoint, refPoint);\n }",
"class_method_signature": "PointTest.testScale()",
"constructor": false,
"full_signature": "@Test public void testScale... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/Point.java",
"identifier": "Point",
"interfaces": "",
"methods": [
{
"class_method_signature": "Point.Point()",
"constructor": true,
"full_signature": "public Point()",
"identifier": "Point",
"modifiers": "pu... | {
"body": "public Point scale(double scalar) {\n return multByScalar(scalar);\n }",
"class_method_signature": "Point.scale(double scalar)",
"constructor": false,
"full_signature": "public Point scale(double scalar)",
"identifier": "scale",
"invocations": [
"multByScalar"
],
"modifiers": "p... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_102 | {
"fields": [
{
"declarator": "powerOfTwo_EXPECTED",
"modifier": "static",
"original_string": "static double powerOfTwo_EXPECTED;",
"type": "double",
"var_name": "powerOfTwo_EXPECTED"
},
{
"declarator": "notPowerOfTwo_EXPECTED",
"modifier": "static",
"origin... | {
"body": "@Test\n public void testRad2deg() throws Exception {\n Assert.assertEquals(valInDegrees_EXPECTED, MathUtils.rad2deg(valInRadians_EXPECTED), DELTA);\n }",
"class_method_signature": "MathUtilsTest.testRad2deg()",
"constructor": false,
"full_signature": "@Test public void testRad2deg()",
... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/utils/MathUtils.java",
"identifier": "MathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MathUtils.isEven(long value)",
"constructor": false,
"full_signature": "public static boolean isEven(long value... | {
"body": "public static double rad2deg(double valueInRadians) {\n// return Math.toDegrees(rad);\n return valueInRadians * Constants.RTOD;\n }",
"class_method_signature": "MathUtils.rad2deg(double valueInRadians)",
"constructor": false,
"full_signature": "public static double rad2deg(double val... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_48 | {
"fields": [
{
"declarator": "masterResFile = new File(\"test/testOrbit/test_cr.res\")",
"modifier": "private static final",
"original_string": "private static final File masterResFile = new File(\"test/testOrbit/test_cr.res\");",
"type": "File",
"var_name": "masterResFile"
},
... | {
"body": "@Test\n public void testGetBhor() throws Exception {\n Assert.assertEquals(bHor_1_EXPECTED, baseline.getBhor(line_1, pix_1, 0), DELTA_06);\n Assert.assertEquals(bHor_2_EXPECTED, baseline.getBhor(line_2, pix_2, 0), DELTA_06);\n }",
"class_method_signature": "BaselineTest.testGetBhor()"... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(Baseline.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(Baseline.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "isInitialized",... | {
"body": "public double getBhor(final double line, final double pixel, final double height) throws Exception {\n final double B = getB(line, pixel, height);\n final double alpha = getAlpha(line, pixel, height);\n return B * Math.cos(alpha);// sign ok\n }",
"class_method_signature": "Baselin... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_114 | {
"fields": [
{
"declarator": "DELTA_06 = 1e-06",
"modifier": "private static final",
"original_string": "private static final double DELTA_06 = 1e-06;",
"type": "double",
"var_name": "DELTA_06"
},
{
"declarator": "DELTA_03 = 1e-03",
"modifier": "private static fi... | {
"body": "@Test\n public void testNumberOfCoefficients() throws Exception {\n final int coeffs_EXPECTED = 21;\n int coeffs_ACTUAL = PolyUtils.numberOfCoefficients(5);\n Assert.assertEquals(coeffs_EXPECTED, coeffs_ACTUAL);\n }",
"class_method_signature": "PolyUtilsTest.testNumberOfCoeffic... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(PolyUtils.class)",
"modifier": "public static final",
"original_string": "public static final Logger logger = (Logger) LoggerFactory.getLogger(PolyUtils.class);",
"type": "Logger",
"var_name": "logger"
}
]... | {
"body": "public static int numberOfCoefficients(final int degree) {\n return (int) (0.5 * (Math.pow(degree + 1, 2) + degree + 1));\n }",
"class_method_signature": "PolyUtils.numberOfCoefficients(final int degree)",
"constructor": false,
"full_signature": "public static int numberOfCoefficients(final... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_143 | {
"fields": [
{
"declarator": "array = {1, 2, 3}",
"modifier": "private",
"original_string": "private double[] array = {1, 2, 3};",
"type": "double[]",
"var_name": "array"
},
{
"declarator": "X = new Point(array)",
"modifier": "private",
"original_string": "... | {
"body": "@Test\n public void testMin() throws Exception {\n testPoint = Z.min(X);\n refPoint = new Point(3, 3, 3);\n assertEquals(refPoint, testPoint);\n }",
"class_method_signature": "PointTest.testMin()",
"constructor": false,
"full_signature": "@Test public void testMin()",
"id... | {
"fields": [],
"file": "jdoris-core/src/main/java/org/jdoris/core/Point.java",
"identifier": "Point",
"interfaces": "",
"methods": [
{
"class_method_signature": "Point.Point()",
"constructor": true,
"full_signature": "public Point()",
"identifier": "Point",
"modifiers": "pu... | {
"body": "public Point min(Point p) {\n double dx = x - p.x;\n double dy = y - p.y;\n double dz = z - p.z;\n return new Point(dx, dy, dz);\n }",
"class_method_signature": "Point.min(Point p)",
"constructor": false,
"full_signature": "public Point min(Point p)",
"identifier": "m... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_64 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testSolve33() throws Exception {\n double[] SOL_33_ACTUAL = LinearAlgebraUtils.solve33(A_PASCAL_33.toArray2(), X_33);\n Assert.assertArrayEquals(SOL_33_EXPECTED, SOL_33_ACTUAL, DELTA);\n\n }",
"class_method_signature": "LinearAlgebraUtilsTest.testSolve33()",
"con... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static double[] solve33(double[][] A, double[] rhs) throws IllegalArgumentException {\n\n double[] result = new double[3];\n\n if (A[0].length != 3 || A.length != 3) {\n throw new IllegalArgumentException(\"solve33: input: size of A not 33.\");\n }\n if (rhs.le... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_138 | {
"fields": [
{
"declarator": "win_EXPECTED = new Window(11, 21, 103, 114)",
"modifier": "private final static",
"original_string": "private final static Window win_EXPECTED = new Window(11, 21, 103, 114);",
"type": "Window",
"var_name": "win_EXPECTED"
},
{
"declarator"... | {
"body": "@Test\n public void testPixels() throws Exception {\n Assert.assertEquals(win_EXPECTED.pixels(), win_ACTUAL.pixels());\n Assert.assertEquals(win_EXPECTED.pixels(), Window.pixels(win_ACTUAL));\n }",
"class_method_signature": "WindowTest.testPixels()",
"constructor": false,
"full_si... | {
"fields": [
{
"declarator": "linelo",
"modifier": "public",
"original_string": "public long linelo;",
"type": "long",
"var_name": "linelo"
},
{
"declarator": "linehi",
"modifier": "public",
"original_string": "public long linehi;",
"type": "long",
... | {
"body": "public static long pixels(final Window w) {\n return w.pixhi - w.pixlo + 1;\n }",
"class_method_signature": "Window.pixels(final Window w)",
"constructor": false,
"full_signature": "public static long pixels(final Window w)",
"identifier": "pixels",
"invocations": [],
"modifiers": "pu... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_33 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testLph2ell() throws Exception {\n final double[] crGEO_ACTUAL = orbit_ACTUAL.lph2ell(subPixel_EXPECTED.y, subPixel_EXPECTED.x, subPixel_EXPECTED.z, slcimage);\n Assert.assertEquals(crGEO_EXPECTED[0], crGEO_ACTUAL[0] * Constants.RTOD, eps_05);\n Assert.assertEqua... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public synchronized double[] lph2ell(final double line, final double pixel, final double height, final SLCImage slcimage) throws Exception {\n final Point xyz = lph2xyz(line, pixel, height, slcimage);\n return Ellipsoid.xyz2ell(xyz);\n }",
"class_method_signature": "Orbit.lph2ell(final d... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_25 | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(OrbitTest.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
... | {
"body": "@Test\n public void testLp2xyz() throws Exception {\n Point xyz_ACTUAL = orbit_ACTUAL.lp2xyz(pixel_EXPECTED.y, pixel_EXPECTED.x, slcimage);\n Assert.assertArrayEquals(pixelXYZ_EXPECTED.toArray(), xyz_ACTUAL.toArray(), eps_03);\n }",
"class_method_signature": "OrbitTest.testLp2xyz()",
... | {
"fields": [
{
"declarator": "logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = (Logger) LoggerFactory.getLogger(Orbit.class.getName());",
"type": "Logger",
"var_name": "logger"
},
{
"dec... | {
"body": "public synchronized Point lp2xyz(final Point sarPixel, final SLCImage slcimage) throws Exception {\n return lph2xyz(sarPixel.y, sarPixel.x, 0, slcimage);\n }",
"class_method_signature": "Orbit.lp2xyz(final Point sarPixel, final SLCImage slcimage)",
"constructor": false,
"full_signature": "p... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
1605107_72 | {
"fields": [
{
"declarator": "A_15 = new DoubleMatrix(5, 1)",
"modifier": "private static",
"original_string": "private static DoubleMatrix A_15 = new DoubleMatrix(5, 1);",
"type": "DoubleMatrix",
"var_name": "A_15"
},
{
"declarator": "A_15_SHIFT_EXPECTED = new DoubleM... | {
"body": "@Test\n public void testMatTxmatComplex_JBLASS() throws Exception {\n ComplexDoubleMatrix ATA_33_CPLX_ACTUAL =\n LinearAlgebraUtils.matTxmat(new ComplexDoubleMatrix(A_33, A_33), new ComplexDoubleMatrix(A_33, A_33));\n ComplexDoubleMatrix ATA_33_CPLX_EXPECTED =\n ... | {
"fields": [
{
"declarator": "logger = Logger.getLogger(LinearAlgebraUtils.class.getName())",
"modifier": "static",
"original_string": "static Logger logger = Logger.getLogger(LinearAlgebraUtils.class.getName());",
"type": "Logger",
"var_name": "logger"
}
],
"file": "jdoris-... | {
"body": "public static DoubleMatrix matTxmat(DoubleMatrix matrix1, DoubleMatrix matrix2) {\n return matrix1.transpose().mmul(matrix2);\n }",
"class_method_signature": "LinearAlgebraUtils.matTxmat(DoubleMatrix matrix1, DoubleMatrix matrix2)",
"constructor": false,
"full_signature": "public static Dou... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 1605107,
"size": 3997,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/ppolabs/jdoris"
} |
102143456_2 | {
"fields": [
{
"declarator": "TOPIC = \"topic\"",
"modifier": "private static final",
"original_string": "private static final String TOPIC = \"topic\";",
"type": "String",
"var_name": "TOPIC"
},
{
"declarator": "PARTITION = 0",
"modifier": "private static final"... | {
"body": "@Test(expected = TemporaryKafkaProcessingError.class)\n public void temporaryErrorShouldStoreEventAsUnprocessable() {\n final ProductEventProcessor processor = mockedProcessor(TEMPORARY_ERROR);\n productEventConsumer = new ProductEventConsumer(processor, unprocessableEventService);\n ... | {
"fields": [],
"file": "product-detail-page/src/main/java/com/rewedigital/examples/msintegration/productdetailpage/product/ProductEventConsumer.java",
"identifier": "ProductEventConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProductEventConsumer.ProductEventConsumer(ProductE... | {
"body": "@KafkaListener(topics = \"${eventing.topic_name}\")\n public void listen(final ConsumerRecord<String, String> consumerRecord, final Acknowledgment ack) {\n super.handleConsumerRecord(consumerRecord, ack);\n }",
"class_method_signature": "ProductEventConsumer.listen(final ConsumerRecord<Strin... | {
"created": null,
"fork": null,
"fork_count": 12,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 102143456,
"size": 648,
"stargazer_count": 59,
"stars": null,
"updates": null,
"url": "https://github.com/rewe-digital-incubator/integration-patterns"
} |
102143456_0 | {
"fields": [
{
"declarator": "TOPIC = \"topic\"",
"modifier": "private static final",
"original_string": "private static final String TOPIC = \"topic\";",
"type": "String",
"var_name": "TOPIC"
},
{
"declarator": "PARTITION = 0",
"modifier": "private static final"... | {
"body": "@Test\n public void eventWithSyntaxErrorShouldNeitherBeProcessedNorStoredAsUnprocessable() {\n productEventConsumer = new ProductEventConsumer(mockedProcessor(SUCCESS), unprocessableEventService);\n productEventConsumer.listen(CONSUMER_RECORD,ack);\n\n verify(ack).acknowledge();\n ... | {
"fields": [],
"file": "product-detail-page/src/main/java/com/rewedigital/examples/msintegration/productdetailpage/product/ProductEventConsumer.java",
"identifier": "ProductEventConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProductEventConsumer.ProductEventConsumer(ProductE... | {
"body": "@KafkaListener(topics = \"${eventing.topic_name}\")\n public void listen(final ConsumerRecord<String, String> consumerRecord, final Acknowledgment ack) {\n super.handleConsumerRecord(consumerRecord, ack);\n }",
"class_method_signature": "ProductEventConsumer.listen(final ConsumerRecord<Strin... | {
"created": null,
"fork": null,
"fork_count": 12,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 102143456,
"size": 648,
"stargazer_count": 59,
"stars": null,
"updates": null,
"url": "https://github.com/rewe-digital-incubator/integration-patterns"
} |
102143456_1 | {
"fields": [
{
"declarator": "TOPIC = \"topic\"",
"modifier": "private static final",
"original_string": "private static final String TOPIC = \"topic\";",
"type": "String",
"var_name": "TOPIC"
},
{
"declarator": "PARTITION = 0",
"modifier": "private static final"... | {
"body": "@Test\n public void eventLeadingToUnexpectedErrorShouldBeStoredAsUnprocessable() {\n final ProductEventProcessor processor = mockedProcessor(UNEXPECTED_ERROR);\n productEventConsumer = new ProductEventConsumer(processor, unprocessableEventService);\n productEventConsumer.listen(CONS... | {
"fields": [],
"file": "product-detail-page/src/main/java/com/rewedigital/examples/msintegration/productdetailpage/product/ProductEventConsumer.java",
"identifier": "ProductEventConsumer",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProductEventConsumer.ProductEventConsumer(ProductE... | {
"body": "@KafkaListener(topics = \"${eventing.topic_name}\")\n public void listen(final ConsumerRecord<String, String> consumerRecord, final Acknowledgment ack) {\n super.handleConsumerRecord(consumerRecord, ack);\n }",
"class_method_signature": "ProductEventConsumer.listen(final ConsumerRecord<Strin... | {
"created": null,
"fork": null,
"fork_count": 12,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 102143456,
"size": 648,
"stargazer_count": 59,
"stars": null,
"updates": null,
"url": "https://github.com/rewe-digital-incubator/integration-patterns"
} |
152655369_31 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @SuppressLint(\"AuthLeak\")\n public void testStripUserInfo() {\n assertEquals(\"\", UrlUtils.stripUserInfo(null));\n assertEquals(\"\", UrlUtils.stripUserInfo(\"\"));\n\n assertEquals(\"https://www.mozilla.org\", UrlUtils.stripUserInfo(\"https://user:password@www.mozilla... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static String stripUserInfo(@Nullable String url) {\n if (TextUtils.isEmpty(url)) {\n return \"\";\n }\n\n try {\n URI uri = new URI(url);\n\n final String userInfo = uri.getUserInfo();\n if (userInfo == null) {\n return... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_27 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isPermittedProtocol() {\n assertFalse(UrlUtils.isSupportedProtocol(\"\"));\n assertFalse(UrlUtils.isSupportedProtocol(null));\n\n assertTrue(UrlUtils.isSupportedProtocol(\"http\"));\n assertTrue(UrlUtils.isSupportedProtocol(\"https\"));\n assertTrue... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean isSupportedProtocol(@Nullable final String scheme) {\n return scheme != null && (isPermittedResourceProtocol(scheme) || scheme.startsWith(\"error\"));\n }",
"class_method_signature": "UrlUtils.isSupportedProtocol(@Nullable final String scheme)",
"constructor": false,
"... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_11 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/publicsuffix/TestPublicSuffix.java",
"identifier": "TestPublicSuffix",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetPublicSuffixNonZeroAdditionalParts() {\n final Map<String, String> inputToExpected = new HashMap<>();\n\n inputToExpected.put(\"www.mozilla.org\", \"mozilla.org\");\n inputToExpected.put(\"www.google.com\", \"google.com\");\n inputToExpected.put(\"b... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/publicsuffix/PublicSuffix.java",
"identifier": "PublicSuffix",
"interfaces": "",
"methods": [
{
"class_method_signature": "PublicSuffix.init(Context context)",
"constructor": false,
"full_signature": "public static void i... | {
"body": "@NonNull\n @WorkerThread // This method might need to load data from disk\n public static String getPublicSuffix(@NonNull final Context context, @NonNull final String domain, final int additionalPartCount) {\n if (context == null) {\n throw new NullPointerException(\"Expected non-nu... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_2 | {
"fields": [
{
"declarator": "TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\";",
"type": "String",
"var_name": "TEST_... | {
"body": "@Test\n public void testOnProgress() {\n final Session session = mock(Session.class);\n final SessionCallbackProxy proxy = new SessionCallbackProxy(session, mock(IWebView.Callback.class));\n\n proxy.onProgress(1);\n\n verify(session).setProgress(SessionCallbackProxy.MINIMUM_P... | {
"fields": [
{
"declarator": "MINIMUM_PROGRESS = 5",
"modifier": "static final",
"original_string": "static final int MINIMUM_PROGRESS = 5;",
"type": "int",
"var_name": "MINIMUM_PROGRESS"
},
{
"declarator": "session",
"modifier": "private final",
"original_... | {
"body": "@Override\n public void onProgress(int progress) {\n progress = Math.max(MINIMUM_PROGRESS, progress);\n\n // We do not want to show to show a progress that 100% because this will make the progress\n // bar disappear.\n progress = Math.min(99, progress);\n\n session.set... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_10 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/publicsuffix/TestPublicSuffix.java",
"identifier": "TestPublicSuffix",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetPublicSuffixZeroAdditionalParts() {\n final Map<String, String> inputToExpected = new HashMap<>();\n\n // Empty value.\n inputToExpected.put(\"\", \"\");\n inputToExpected.put(\" \", \"\");\n\n // Test domains with public suffix\n inpu... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/publicsuffix/PublicSuffix.java",
"identifier": "PublicSuffix",
"interfaces": "",
"methods": [
{
"class_method_signature": "PublicSuffix.init(Context context)",
"constructor": false,
"full_signature": "public static void i... | {
"body": "@NonNull\n @WorkerThread // This method might need to load data from disk\n public static String getPublicSuffix(@NonNull final Context context, @NonNull final String domain, final int additionalPartCount) {\n if (context == null) {\n throw new NullPointerException(\"Expected non-nu... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_3 | {
"fields": [
{
"declarator": "TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\";",
"type": "String",
"var_name": "TEST_... | {
"body": "@Test\n public void testOnUrlChanged() {\n final Session session = mock(Session.class);\n final SessionCallbackProxy proxy = new SessionCallbackProxy(session, mock(IWebView.Callback.class));\n\n proxy.onURLChanged(TEST_URL);\n\n verify(session).setUrl(TEST_URL);\n }",
"c... | {
"fields": [
{
"declarator": "MINIMUM_PROGRESS = 5",
"modifier": "static final",
"original_string": "static final int MINIMUM_PROGRESS = 5;",
"type": "int",
"var_name": "MINIMUM_PROGRESS"
},
{
"declarator": "session",
"modifier": "private final",
"original_... | {
"body": "@Override\n public void onURLChanged(@NonNull String url) {\n session.setUrl(url);\n }",
"class_method_signature": "SessionCallbackProxy.onURLChanged(@NonNull String url)",
"constructor": false,
"full_signature": "@Override public void onURLChanged(@NonNull String url)",
"identifier": ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_26 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isPermittedResourceProtocol() {\n assertFalse(UrlUtils.isPermittedResourceProtocol(\"\"));\n assertFalse(UrlUtils.isPermittedResourceProtocol(null));\n\n assertTrue(UrlUtils.isPermittedResourceProtocol(\"http\"));\n assertTrue(UrlUtils.isPermittedResourceP... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean isPermittedResourceProtocol(@Nullable final String scheme) {\n return scheme != null && (\n scheme.startsWith(\"http\") ||\n scheme.startsWith(\"https\") ||\n scheme.startsWith(\"file\") ||\n scheme.startsWith(\"data\"... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_30 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsSearchQuery() {\n assertTrue(UrlUtils.isSearchQuery(\"hello world\"));\n\n assertFalse(UrlUtils.isSearchQuery(\"mozilla.org\"));\n assertFalse(UrlUtils.isSearchQuery(\"mozilla\"));\n }",
"class_method_signature": "UrlUtilsTest.testIsSearchQuery()",
"... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean isSearchQuery(String text) {\n return text.contains(\" \");\n }",
"class_method_signature": "UrlUtils.isSearchQuery(String text)",
"constructor": false,
"full_signature": "public static boolean isSearchQuery(String text)",
"identifier": "isSearchQuery",
"invocation... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_17 | {
"fields": [
{
"declarator": "BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C\"",
"modifier": "private final",
"original_string": "private final String BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=gui... | {
"body": "@Test(expected = NullPointerException.class)\n public void testGetFormattedDomainNullContextThrows() throws Exception {\n FormattedDomain.format(null, new URI(\"http://google.com\"), false, 0);\n }",
"class_method_signature": "TestFormattedDomain.testGetFormattedDomainNullContextThrows()",
... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java",
"identifier": "FormattedDomain",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormattedDomain.FormattedDomain()",
"constructor": true,
"full_signature": "private FormattedDomain()",
... | {
"body": "@NonNull\n @WorkerThread // calls PublicSuffix methods.\n public static String format(@NonNull final Context context, @NonNull final URI uri,\n final boolean shouldIncludePublicSuffix, @IntRange(from = 0) final int subdomainCount) {\n if (context == null) {\n ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_4 | {
"fields": [
{
"declarator": "TEST_URL = \"https://www.mozilla.org\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URL = \"https://www.mozilla.org\";",
"type": "String",
"var_name": "TEST_URL"
},
{
"declarator": "TEST_URL_2 ... | {
"body": "@Test\n public void testIsRecorded() {\n final Session session = new Session(Source.VIEW, TEST_URL);\n assertFalse(session.isRecorded());\n\n session.markAsRecorded();\n assertTrue(session.isRecorded());\n }",
"class_method_signature": "SessionTest.testIsRecorded()",
"... | {
"fields": [
{
"declarator": "source",
"modifier": "private final",
"original_string": "private final Source source;",
"type": "Source",
"var_name": "source"
},
{
"declarator": "uuid",
"modifier": "private final",
"original_string": "private final String uu... | {
"body": "public boolean isRecorded() {\n return isRecorded;\n }",
"class_method_signature": "Session.isRecorded()",
"constructor": false,
"full_signature": "public boolean isRecorded()",
"identifier": "isRecorded",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "bo... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_40 | {
"fields": [
{
"declarator": "trackingProtectionWebViewClient",
"modifier": "private",
"original_string": "private TrackingProtectionWebViewClient trackingProtectionWebViewClient;",
"type": "TrackingProtectionWebViewClient",
"var_name": "trackingProtectionWebViewClient"
},
{... | {
"body": "@Test\n public void testMainFrameAllowed() throws Exception {\n trackingProtectionWebViewClient.notifyCurrentURL(\"http://mozilla.org\");\n\n // Blocked sites can still be loaded if opened as the main frame\n// {\n// final WebResourceRequest request = createRequest(\"http... | {
"fields": [
{
"declarator": "blockingEnabled",
"modifier": "private",
"original_string": "private boolean blockingEnabled;",
"type": "boolean",
"var_name": "blockingEnabled"
},
{
"declarator": "currentPageURL",
"modifier": "",
"original_string": "String cu... | {
"body": "public void notifyCurrentURL(final String url) {\n currentPageURL = url;\n }",
"class_method_signature": "TrackingProtectionWebViewClient.notifyCurrentURL(final String url)",
"constructor": false,
"full_signature": "public void notifyCurrentURL(final String url)",
"identifier": "notifyCur... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_37 | {
"fields": [],
"file": "app/src/testAmazonWebview/java/org/mozilla/focus/webview/matcher/UrlMatcherTest.java",
"identifier": "UrlMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void categoriesWork() {\n // Test that category enabling/disabling works correctly. We test this by creating\n // 4 categories, each with only one domain. We then iterate over all permutations of categories,\n // and test that only the expected domains are actually bl... | {
"fields": [
{
"declarator": "categoryPrefMap",
"modifier": "private final",
"original_string": "private final Map<String, String> categoryPrefMap;",
"type": "Map<String, String>",
"var_name": "categoryPrefMap"
},
{
"declarator": "WEBFONT_EXTENSIONS = new String[]{\n ... | {
"body": "public boolean matches(final Uri resourceURI, final Uri pageURI) {\n final String path = resourceURI.getPath();\n\n if (path == null) {\n return false;\n }\n\n // We need to handle webfonts first: if they are blocked, then whitelists don't matter.\n // If they ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_21 | {
"fields": [
{
"declarator": "BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C\"",
"modifier": "private final",
"original_string": "private final String BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=gui... | {
"body": "@Test\n public void testIsIPv4WithPort() {\n assertFalse(FormattedDomain.isIPv4(\"8.8.8.8:400\"));\n assertFalse(FormattedDomain.isIPv4(\"8.8.8.8:1337\"));\n }",
"class_method_signature": "TestFormattedDomain.testIsIPv4WithPort()",
"constructor": false,
"full_signature": "@Test pu... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java",
"identifier": "FormattedDomain",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormattedDomain.FormattedDomain()",
"constructor": true,
"full_signature": "private FormattedDomain()",
... | {
"body": "@VisibleForTesting static boolean isIPv4(final String host) {\n return Patterns.IP_ADDRESS.matcher(host).matches();\n }",
"class_method_signature": "FormattedDomain.isIPv4(final String host)",
"constructor": false,
"full_signature": "@VisibleForTesting static boolean isIPv4(final String hos... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_8 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/publicsuffix/TestPublicSuffix.java",
"identifier": "TestPublicSuffix",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStripPublicSuffix() {\n // Test empty value\n Assert.assertEquals(\"\",\n PublicSuffix.stripPublicSuffix(RuntimeEnvironment.application, \"\"));\n\n // Test domains with public suffix\n Assert.assertEquals(\"www.mozilla\",\n ... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/publicsuffix/PublicSuffix.java",
"identifier": "PublicSuffix",
"interfaces": "",
"methods": [
{
"class_method_signature": "PublicSuffix.init(Context context)",
"constructor": false,
"full_signature": "public static void i... | {
"body": "@NonNull\n @WorkerThread // This method might need to load data from disk\n public static String stripPublicSuffix(Context context, @NonNull String domain) {\n if (domain.length() == 0) {\n return domain;\n }\n\n final int index = findPublicSuffixIndex(context, domain)... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_9 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/publicsuffix/TestPublicSuffix.java",
"identifier": "TestPublicSuffix",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NullPointerException.class)\n public void testStripPublicSuffixThrowsException() {\n PublicSuffix.stripPublicSuffix(RuntimeEnvironment.application, null);\n }",
"class_method_signature": "TestPublicSuffix.testStripPublicSuffixThrowsException()",
"constructor": false,
"fu... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/publicsuffix/PublicSuffix.java",
"identifier": "PublicSuffix",
"interfaces": "",
"methods": [
{
"class_method_signature": "PublicSuffix.init(Context context)",
"constructor": false,
"full_signature": "public static void i... | {
"body": "@NonNull\n @WorkerThread // This method might need to load data from disk\n public static String stripPublicSuffix(Context context, @NonNull String domain) {\n if (domain.length() == 0) {\n return domain;\n }\n\n final int index = findPublicSuffixIndex(context, domain)... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_20 | {
"fields": [
{
"declarator": "BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C\"",
"modifier": "private final",
"original_string": "private final String BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=gui... | {
"body": "@Test\n public void testIsIPv4WithProtocol() {\n assertFalse(FormattedDomain.isIPv4(\"http://8.8.8.8\"));\n assertFalse(FormattedDomain.isIPv4(\"https://8.8.8.8\"));\n }",
"class_method_signature": "TestFormattedDomain.testIsIPv4WithProtocol()",
"constructor": false,
"full_signatu... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java",
"identifier": "FormattedDomain",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormattedDomain.FormattedDomain()",
"constructor": true,
"full_signature": "private FormattedDomain()",
... | {
"body": "@VisibleForTesting static boolean isIPv4(final String host) {\n return Patterns.IP_ADDRESS.matcher(host).matches();\n }",
"class_method_signature": "FormattedDomain.isIPv4(final String host)",
"constructor": false,
"full_signature": "@VisibleForTesting static boolean isIPv4(final String hos... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_36 | {
"fields": [],
"file": "app/src/testAmazonWebview/java/org/mozilla/focus/webview/matcher/UrlMatcherTest.java",
"identifier": "UrlMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void matches() throws Exception {\n final UrlMatcher matcher = new UrlMatcher(new String[] {\n \"bcd.random\"\n });\n\n assertTrue(matcher.matches(Uri.parse(\"http://bcd.random/something\"), Uri.parse(\"http://mozilla.org\")));\n assertTrue(match... | {
"fields": [
{
"declarator": "categoryPrefMap",
"modifier": "private final",
"original_string": "private final Map<String, String> categoryPrefMap;",
"type": "Map<String, String>",
"var_name": "categoryPrefMap"
},
{
"declarator": "WEBFONT_EXTENSIONS = new String[]{\n ... | {
"body": "public boolean matches(final Uri resourceURI, final Uri pageURI) {\n final String path = resourceURI.getPath();\n\n if (path == null) {\n return false;\n }\n\n // We need to handle webfonts first: if they are blocked, then whitelists don't matter.\n // If they ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_41 | {
"fields": [
{
"declarator": "trackingProtectionWebViewClient",
"modifier": "private",
"original_string": "private TrackingProtectionWebViewClient trackingProtectionWebViewClient;",
"type": "TrackingProtectionWebViewClient",
"var_name": "trackingProtectionWebViewClient"
},
{... | {
"body": "@Test\n public void testFaviconBlocked() throws Exception {\n trackingProtectionWebViewClient.notifyCurrentURL(\"http://www.mozilla.org\");\n\n// {\n// // Webkit tries to load favicon.ico, even though it isn't used:\n// final WebResourceRequest request = createRequest... | {
"fields": [
{
"declarator": "blockingEnabled",
"modifier": "private",
"original_string": "private boolean blockingEnabled;",
"type": "boolean",
"var_name": "blockingEnabled"
},
{
"declarator": "currentPageURL",
"modifier": "",
"original_string": "String cu... | {
"body": "public void notifyCurrentURL(final String url) {\n currentPageURL = url;\n }",
"class_method_signature": "TrackingProtectionWebViewClient.notifyCurrentURL(final String url)",
"constructor": false,
"full_signature": "public void notifyCurrentURL(final String url)",
"identifier": "notifyCur... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_16 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/SupportUtilsTest.java",
"identifier": "SupportUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getManifestoURL() throws Exception {\n Locale.setDefault(Locale.UK);\n assertEquals(\"https://www.mozilla.org/en-GB/about/manifesto/\",\n SupportUtils.getManifestoURL());\n\n Locale.setDefault(Locale.KOREA);\n assertEquals(\"https://www.mozi... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/SupportUtils.java",
"identifier": "SupportUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "SupportUtils.getSumoURLForTopic(final Context context, final String topic)",
"constructor": false,
"full_signat... | {
"body": "public static String getManifestoURL() {\n final String langTag = Locales.getLanguageTag(Locale.getDefault());\n return \"https://www.mozilla.org/\" + langTag + \"/about/manifesto/\";\n }",
"class_method_signature": "SupportUtils.getManifestoURL()",
"constructor": false,
"full_signat... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_5 | {
"fields": [
{
"declarator": "TEST_URL = \"https://www.mozilla.org\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URL = \"https://www.mozilla.org\";",
"type": "String",
"var_name": "TEST_URL"
},
{
"declarator": "TEST_URL_2 ... | {
"body": "@Test\n public void testSameAs() {\n final Session session1 = new Session(Source.VIEW, TEST_URL);\n final Session session2 = new Session(Source.VIEW, TEST_URL);\n\n assertFalse(session1.isSameAs(session2));\n assertFalse(session2.isSameAs(session1));\n\n assertTrue(ses... | {
"fields": [
{
"declarator": "source",
"modifier": "private final",
"original_string": "private final Source source;",
"type": "Source",
"var_name": "source"
},
{
"declarator": "uuid",
"modifier": "private final",
"original_string": "private final String uu... | {
"body": "public boolean isSameAs(@NonNull Session session) {\n return uuid.equals(session.getUUID());\n }",
"class_method_signature": "Session.isSameAs(@NonNull Session session)",
"constructor": false,
"full_signature": "public boolean isSameAs(@NonNull Session session)",
"identifier": "isSameAs",... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_6 | {
"fields": [
{
"declarator": "TEST_URL = \"https://github.com/mozilla-mobile/focus-android\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URL = \"https://github.com/mozilla-mobile/focus-android\";",
"type": "String",
"var_name": "TEST_UR... | {
"body": "@Test\n public void testHasSessionWithUUID() {\n final SessionManager sessionManager = SessionManager.getInstance();\n assertFalse(sessionManager.hasSessionWithUUID(UUID.randomUUID().toString()));\n\n sessionManager.createSession(Source.USER_ENTERED, TEST_URL);\n\n assertTrue... | {
"fields": [
{
"declarator": "INSTANCE = new SessionManager()",
"modifier": "private static final",
"original_string": "private static final SessionManager INSTANCE = new SessionManager();",
"type": "SessionManager",
"var_name": "INSTANCE"
},
{
"declarator": "sessions"... | {
"body": "public boolean hasSessionWithUUID(@NonNull String uuid) {\n for (Session session : sessions.getValue()) {\n if (uuid.equals(session.getUUID())) {\n return true;\n }\n }\n\n return false;\n }",
"class_method_signature": "SessionManager.hasSessio... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_15 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/SupportUtilsTest.java",
"identifier": "SupportUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getSumoURLForTopic() throws Exception {\n final String version = BuildConfig.VERSION_NAME;\n Locale.setDefault(Locale.GERMANY);\n assertEquals(\"https://support.mozilla.org/1/mobile/\" + version + \"/Android/de-DE/foobar\",\n SupportUtils.getSumoUR... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/SupportUtils.java",
"identifier": "SupportUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "SupportUtils.getSumoURLForTopic(final Context context, final String topic)",
"constructor": false,
"full_signat... | {
"body": "public static String getSumoURLForTopic(final Context context, final String topic) {\n String escapedTopic;\n try {\n escapedTopic = URLEncoder.encode(topic, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n throw new IllegalStateException(\"utf-8 should ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_39 | {
"fields": [
{
"declarator": "trackingProtectionWebViewClient",
"modifier": "private",
"original_string": "private TrackingProtectionWebViewClient trackingProtectionWebViewClient;",
"type": "TrackingProtectionWebViewClient",
"var_name": "trackingProtectionWebViewClient"
},
{... | {
"body": "@Test\n public void shouldInterceptRequest() throws Exception {\n trackingProtectionWebViewClient.notifyCurrentURL(\"http://www.mozilla.org\");\n\n // Just some generic sanity checks that a definitely not blocked domain can be loaded, and\n // definitely blocked domains can't be\n//... | {
"fields": [
{
"declarator": "blockingEnabled",
"modifier": "private",
"original_string": "private boolean blockingEnabled;",
"type": "boolean",
"var_name": "blockingEnabled"
},
{
"declarator": "currentPageURL",
"modifier": "",
"original_string": "String cu... | {
"body": "@Override\n public WebResourceResponse shouldInterceptRequest(final WebView view, final String request) {\n if (!blockingEnabled) {\n return super.shouldInterceptRequest(view, request);\n }\n\n final Uri resourceUri = Uri.parse(request);\n\n // shouldInterceptReque... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_19 | {
"fields": [
{
"declarator": "BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C\"",
"modifier": "private final",
"original_string": "private final String BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=gui... | {
"body": "@Test\n public void testIsIPv4RealAddress() {\n assertTrue(FormattedDomain.isIPv4(\"192.168.1.1\"));\n assertTrue(FormattedDomain.isIPv4(\"8.8.8.8\"));\n assertTrue(FormattedDomain.isIPv4(\"63.245.215.20\"));\n }",
"class_method_signature": "TestFormattedDomain.testIsIPv4RealAd... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java",
"identifier": "FormattedDomain",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormattedDomain.FormattedDomain()",
"constructor": true,
"full_signature": "private FormattedDomain()",
... | {
"body": "@VisibleForTesting static boolean isIPv4(final String host) {\n return Patterns.IP_ADDRESS.matcher(host).matches();\n }",
"class_method_signature": "FormattedDomain.isIPv4(final String host)",
"constructor": false,
"full_signature": "@VisibleForTesting static boolean isIPv4(final String hos... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_23 | {
"fields": [
{
"declarator": "BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C\"",
"modifier": "private final",
"original_string": "private final String BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=gui... | {
"body": "@Test\n public void testIsIPv4WithIPv6() {\n assertFalse(FormattedDomain.isIPv4(\"2001:db8::1 \"));\n assertFalse(FormattedDomain.isIPv4(\"2001:db8:0:1:1:1:1:1\"));\n assertFalse(FormattedDomain.isIPv4(\"[2001:db8:a0b:12f0::1]\"));\n }",
"class_method_signature": "TestFormatted... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java",
"identifier": "FormattedDomain",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormattedDomain.FormattedDomain()",
"constructor": true,
"full_signature": "private FormattedDomain()",
... | {
"body": "@VisibleForTesting static boolean isIPv4(final String host) {\n return Patterns.IP_ADDRESS.matcher(host).matches();\n }",
"class_method_signature": "FormattedDomain.isIPv4(final String host)",
"constructor": false,
"full_signature": "@VisibleForTesting static boolean isIPv4(final String hos... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_34 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStripCommonSubdomains() {\n assertEquals(\"mozilla.org\", UrlUtils.stripCommonSubdomains(\"mozilla.org\"));\n assertEquals(\"mozilla.org\", UrlUtils.stripCommonSubdomains(\"www.mozilla.org\"));\n assertEquals(\"mozilla.org\", UrlUtils.stripCommonSubdomains(\"... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static String stripCommonSubdomains(@Nullable String host) {\n if (host == null) {\n return null;\n }\n\n // In contrast to desktop, we also strip mobile subdomains,\n // since its unlikely users are intentionally typing them\n int start = 0;\n\n ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_22 | {
"fields": [
{
"declarator": "BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C\"",
"modifier": "private final",
"original_string": "private final String BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=gui... | {
"body": "@Test\n public void testIsIPv4WithPath() {\n assertFalse(FormattedDomain.isIPv4(\"8.8.8.8/index.html\"));\n assertFalse(FormattedDomain.isIPv4(\"8.8.8.8/\"));\n }",
"class_method_signature": "TestFormattedDomain.testIsIPv4WithPath()",
"constructor": false,
"full_signature": "@Test... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java",
"identifier": "FormattedDomain",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormattedDomain.FormattedDomain()",
"constructor": true,
"full_signature": "private FormattedDomain()",
... | {
"body": "@VisibleForTesting static boolean isIPv4(final String host) {\n return Patterns.IP_ADDRESS.matcher(host).matches();\n }",
"class_method_signature": "FormattedDomain.isIPv4(final String host)",
"constructor": false,
"full_signature": "@VisibleForTesting static boolean isIPv4(final String hos... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_18 | {
"fields": [
{
"declarator": "BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=guided#h=dupes%7CData%20%26%20BI%20Services%20Team%7C\"",
"modifier": "private final",
"original_string": "private final String BUGZILLA_URL = \"https://bugzilla.mozilla.org/enter_bug.cgi?format=gui... | {
"body": "@Test(expected = NullPointerException.class)\n public void testGetFormattedDomainNullURIThrows() throws Exception {\n FormattedDomain.format(RuntimeEnvironment.application, null, false, 0);\n }",
"class_method_signature": "TestFormattedDomain.testGetFormattedDomainNullURIThrows()",
"constr... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java",
"identifier": "FormattedDomain",
"interfaces": "",
"methods": [
{
"class_method_signature": "FormattedDomain.FormattedDomain()",
"constructor": true,
"full_signature": "private FormattedDomain()",
... | {
"body": "@NonNull\n @WorkerThread // calls PublicSuffix methods.\n public static String format(@NonNull final Context context, @NonNull final URI uri,\n final boolean shouldIncludePublicSuffix, @IntRange(from = 0) final int subdomainCount) {\n if (context == null) {\n ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_14 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/publicsuffix/TestPublicSuffix.java",
"identifier": "TestPublicSuffix",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NullPointerException.class)\n public void testGetPublicSuffixWithNullDomainThrows() {\n PublicSuffix.getPublicSuffix(RuntimeEnvironment.application, null, 0);\n }",
"class_method_signature": "TestPublicSuffix.testGetPublicSuffixWithNullDomainThrows()",
"constructor": false... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/publicsuffix/PublicSuffix.java",
"identifier": "PublicSuffix",
"interfaces": "",
"methods": [
{
"class_method_signature": "PublicSuffix.init(Context context)",
"constructor": false,
"full_signature": "public static void i... | {
"body": "@NonNull\n @WorkerThread // This method might need to load data from disk\n public static String getPublicSuffix(@NonNull final Context context, @NonNull final String domain, final int additionalPartCount) {\n if (context == null) {\n throw new NullPointerException(\"Expected non-nu... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_25 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void urlsMatchExceptForTrailingSlash() throws Exception {\n assertTrue(UrlUtils.urlsMatchExceptForTrailingSlash(\"http://www.mozilla.org\", \"http://www.mozilla.org\"));\n assertTrue(UrlUtils.urlsMatchExceptForTrailingSlash(\"http://www.mozilla.org/\", \"http://www.mozilla.o... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean urlsMatchExceptForTrailingSlash(final @NonNull String url1, final @NonNull String url2) {\n int lengthDifference = url1.length() - url2.length();\n\n if (lengthDifference == 0) {\n // The simplest case:\n return url1.equalsIgnoreCase(url2);\n ... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_33 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isHttpOrHttpsUrl() {\n assertFalse(UrlUtils.isHttpOrHttps(null));\n assertFalse(UrlUtils.isHttpOrHttps(\"\"));\n assertFalse(UrlUtils.isHttpOrHttps(\" \"));\n assertFalse(UrlUtils.isHttpOrHttps(\"mozilla.org\"));\n assertFalse(UrlUtils.isHttpOrH... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean isHttpOrHttps(String url) {\n if (TextUtils.isEmpty(url)) {\n return false;\n }\n\n return url.startsWith(\"http:\") || url.startsWith(\"https:\");\n }",
"class_method_signature": "UrlUtils.isHttpOrHttps(String url)",
"constructor": false,
"ful... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_0 | {
"fields": [
{
"declarator": "TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\";",
"type": "String",
"var_name": "TEST_... | {
"body": "@Test\n public void testOnPageStarted() {\n final Session session = mock(Session.class);\n final SessionCallbackProxy proxy = new SessionCallbackProxy(session, mock(IWebView.Callback.class));\n\n proxy.onPageStarted(TEST_URL);\n\n verify(session).setUrl(TEST_URL);\n ve... | {
"fields": [
{
"declarator": "MINIMUM_PROGRESS = 5",
"modifier": "static final",
"original_string": "static final int MINIMUM_PROGRESS = 5;",
"type": "int",
"var_name": "MINIMUM_PROGRESS"
},
{
"declarator": "session",
"modifier": "private final",
"original_... | {
"body": "@Override\n public void onPageStarted(@NonNull String url) {\n session.setLoading(true);\n session.setSecure(false);\n\n // We are always setting the progress to 5% when a new page starts loading. Otherwise it might\n // look like the browser is doing nothing (on a slow netwo... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_13 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/publicsuffix/TestPublicSuffix.java",
"identifier": "TestPublicSuffix",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NullPointerException.class)\n public void testGetPublicSuffixWithNullContextThrows() {\n PublicSuffix.getPublicSuffix(null, \"whatever\", 0);\n }",
"class_method_signature": "TestPublicSuffix.testGetPublicSuffixWithNullContextThrows()",
"constructor": false,
"full_signat... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/publicsuffix/PublicSuffix.java",
"identifier": "PublicSuffix",
"interfaces": "",
"methods": [
{
"class_method_signature": "PublicSuffix.init(Context context)",
"constructor": false,
"full_signature": "public static void i... | {
"body": "@NonNull\n @WorkerThread // This method might need to load data from disk\n public static String getPublicSuffix(@NonNull final Context context, @NonNull final String domain, final int additionalPartCount) {\n if (context == null) {\n throw new NullPointerException(\"Expected non-nu... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_29 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNormalize() {\n assertEquals(\"http://www.mozilla.org\", UrlUtils.normalize(\"http://www.mozilla.org\"));\n assertEquals(\"https://www.mozilla.org\", UrlUtils.normalize(\"https://www.mozilla.org\"));\n assertEquals(\"https://www.mozilla.org/en-US/internet-hea... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static String normalize(@NonNull String input) {\n String trimmedInput = input.trim();\n Uri uri = Uri.parse(trimmedInput);\n\n if (TextUtils.isEmpty(uri.getScheme())) {\n uri = Uri.parse(\"http://\" + trimmedInput);\n }\n\n return uri.toString();\n }... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_28 | {
"fields": [],
"file": "app/src/test/java/org/mozilla/focus/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIsUrl() {\n assertTrue(UrlUtils.isUrl(\"http://www.mozilla.org\"));\n assertTrue(UrlUtils.isUrl(\"https://www.mozilla.org\"));\n assertTrue(UrlUtils.isUrl(\"https://www.mozilla.org \"));\n assertTrue(UrlUtils.isUrl(\" https://www.mozilla.org\"));\n ... | {
"fields": [],
"file": "app/src/main/java/org/mozilla/focus/utils/UrlUtils.java",
"identifier": "UrlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "UrlUtils.normalize(@NonNull String input)",
"constructor": false,
"full_signature": "public static String normalize(@No... | {
"body": "public static boolean isUrl(String url) {\n String trimmedUrl = url.trim();\n if (trimmedUrl.contains(\" \")) {\n return false;\n }\n\n return trimmedUrl.contains(\".\") || trimmedUrl.contains(\":\");\n }",
"class_method_signature": "UrlUtils.isUrl(String url)",
... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
152655369_1 | {
"fields": [
{
"declarator": "TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URL = \"https://github.com/mozilla-mobile/focus-android/\";",
"type": "String",
"var_name": "TEST_... | {
"body": "@Test\n public void testOnPageFinished() {\n final Session session = mock(Session.class);\n final SessionCallbackProxy proxy = new SessionCallbackProxy(session, mock(IWebView.Callback.class));\n\n proxy.onPageFinished(true);\n\n verify(session).setLoading(false);\n ver... | {
"fields": [
{
"declarator": "MINIMUM_PROGRESS = 5",
"modifier": "static final",
"original_string": "static final int MINIMUM_PROGRESS = 5;",
"type": "int",
"var_name": "MINIMUM_PROGRESS"
},
{
"declarator": "session",
"modifier": "private final",
"original_... | {
"body": "@Override\n public void onPageFinished(boolean isSecure) {\n session.setLoading(false);\n session.setSecure(isSecure);\n }",
"class_method_signature": "SessionCallbackProxy.onPageFinished(boolean isSecure)",
"constructor": false,
"full_signature": "@Override public void onPageFini... | {
"created": "10/11/2018 9:01:33 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 152655369,
"size": null,
"stargazer_count": null,
"stars": 11,
"updates": "2019-11-07T17:54:44+00:00",
"url": "https://github.com/mozilla-mobile/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.