id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
42046027_35 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDistance() {\n final CCVector2 vec1 = new CCVector2(0, 0);\n assertTrue(3.0 == vec1.distance(0, 3));\n assertTrue(4.0 == vec1.distance(4, 0));\n\n final CCVector2 vec2 = new CCVector2(1, 1);\n// assertTrue(CCMath.sqrt(2) == vec1.distance(vec2));... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public double distance(final double theX, final double theY) {\n return CCMath.sqrt(distanceSquared(theX, theY));\n }",
"class_method_signature": "CCVector2.distance(final double theX, final double theY)",
"constructor": false,
"full_signature": "public double distance(final double theX, fi... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_19 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNegate() {\n final CCVector3 vec1 = new CCVector3(3, 2, -1);\n final CCVector3 vec2 = vec1.negate();\n assertEquals(new CCVector3(-3, -2, 1), vec2);\n\n vec1.negateLocal();\n assertEquals(vec2, vec1);\n }",
"class_method_signature": "CCVect... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "public CCVector3 negate(CCVector3 theStore) {\n return multiply(-1, theStore);\n }",
"class_method_signature": "CCVector3.negate(CCVector3 theStore)",
"constructor": false,
"full_signature": "public CCVector3 negate(CCVector3 theStore)",
"identifier": "negate",
"invocations": [
"mul... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_0 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java",
"identifier": "CCVector4Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAdd() {\n final CCVector4 vec1 = new CCVector4();\n final CCVector4 vec2 = new CCVector4(CCVector4.ONE);\n\n vec1.addLocal(1, 2, 3, 4);\n assertEquals(new CCVector4(1, 2, 3, 4), vec1);\n vec1.addLocal(-1, -2, -3, -4);\n assertEquals(CCVec... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector4(0, 0, 0, 0)",
... | {
"body": "public CCVector4 add(final double theX, final double theY, final double theZ, final double theW, CCVector4 theStore) {\n\t\tif (theStore == null)\n\t\t\ttheStore = new CCVector4();\n\t\t\n\t\treturn theStore.set(\n\t\t\tx + theX, \n\t\t\ty + theY, \n\t\t\tz + theZ, \n\t\t\tw + theW\n\t\t);\n\t}",
"class_... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_39 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDot() {\n final CCVector2 vec1 = new CCVector2(7, 2);\n assertTrue(23.0 == vec1.dot(3, 1));\n\n assertTrue(-5.0 == vec1.dot(new CCVector2(-1, 1)));\n }",
"class_method_signature": "CCVector2Test.testDot()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public double dot(final double theX, final double theY) {\n return x * theX + y * theY;\n }",
"class_method_signature": "CCVector2.dot(final double theX, final double theY)",
"constructor": false,
"full_signature": "public double dot(final double theX, final double theY)",
"identifier": "... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_42 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCPlaneTest.java",
"identifier": "CCPlaneTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testClone() {\n final CCPlane plane1 = new CCPlane();\n final CCPlane plane2 = plane1.clone();\n assertEquals(plane1, plane2);\n assertNotSame(plane1, plane2);\n }",
"class_method_signature": "CCPlaneTest.testClone()",
"constructor": false,
"full_... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "XZ = new CCPlane(CCVector3.UNIT_Y, 0)",
... | {
"body": "@Override\n\tpublic CCPlane clone() {\n\t\treturn new CCPlane(this);\n\t}",
"class_method_signature": "CCPlane.clone()",
"constructor": false,
"full_signature": "@Override public CCPlane clone()",
"identifier": "clone",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_15 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToArray() {\n final CCVector3 vec1 = new CCVector3();\n vec1.set(CCMath.PI, Float.MAX_VALUE, 42);\n final double[] array = vec1.toArray(null);\n final double[] array2 = vec1.toArray(new double[3]);\n assertNotNull(array);\n assertTrue(arr... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "public double[] toArray(double[] theStore) {\n if (theStore == null) {\n theStore = new double[3];\n }\n\n // do last first to ensure size is correct before any edits occur.\n theStore[2] = z;\n theStore[1] = y;\n theStore[0] = x;\n return theStor... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_14 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSubtract() {\n final CCVector3 vec1 = new CCVector3();\n final CCVector3 vec2 = new CCVector3(CCVector3.ONE);\n\n vec1.subtractLocal(1, 2, 3);\n assertEquals(new CCVector3(-1, -2, -3), vec1);\n vec1.subtractLocal(-1, -2, -3);\n assertEqua... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "public CCVector3 subtract(final double theX, final double theY, final double theZ, CCVector3 theStore) {\n\t\tif (theStore == null)\n\t\t\ttheStore = new CCVector3();\n\t\t\n\t\ttheStore.set(\n\t\t\tx - theX, \n\t\t\ty - theY, \n\t\t\tz - theZ\n\t\t);\n\t\treturn theStore;\n\t}",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_43 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCPlaneTest.java",
"identifier": "CCPlaneTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDistance() {\n final CCPlane plane1 = new CCPlane(CCVector3.UNIT_Y, 1.0f);\n final CCVector3 point = new CCVector3(0, 5, 0);\n assertTrue(4.0 == plane1.pseudoDistance(point));\n assertEquals(Side.Outside, plane1.whichSide(point));\n\n point.set(... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "XZ = new CCPlane(CCVector3.UNIT_Y, 0)",
... | {
"body": "public double distance(final CCVector3 thePoint){\n\t\treturn CCMath.abs(pseudoDistance(thePoint));\n\t}",
"class_method_signature": "CCPlane.distance(final CCVector3 thePoint)",
"constructor": false,
"full_signature": "public double distance(final CCVector3 thePoint)",
"identifier": "distance",
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_38 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAngle() {\n final CCVector2 vec1 = new CCVector2(1, 0);\n assertTrue(CCMath.HALF_PI == vec1.angleBetween(new CCVector2(0, 1)));\n assertTrue(-CCMath.HALF_PI == vec1.angleBetween(new CCVector2(0, -1)));\n\n assertTrue(CCMath.HALF_PI == vec1.smallestAngl... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public static double angle(final double theX1, final double theY1, final double theX2, final double theY2){\n\t\treturn CCMath.atan2(theX2, theY2) - CCMath.atan2(theX1, theY1);\n\t}",
"class_method_signature": "CCVector2.angle(final double theX1, final double theY1, final double theX2, final double theY2... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_1 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java",
"identifier": "CCVector4Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSubtract() {\n final CCVector4 vec1 = new CCVector4();\n final CCVector4 vec2 = new CCVector4(CCVector4.ONE);\n\n vec1.subtractLocal(1, 2, 3, 4);\n assertEquals(new CCVector4(-1, -2, -3, -4), vec1);\n vec1.subtractLocal(-1, -2, -3, -4);\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector4(0, 0, 0, 0)",
... | {
"body": "public CCVector4 subtract(final double theX, final double theY, final double theZ, final double theW, CCVector4 theStore) {\n\t\tif (theStore == null)\n\t\t\ttheStore = new CCVector4();\n\t\t\n\t\treturn theStore.set(\n\t\t\tx - theX, \n\t\t\ty - theY, \n\t\t\tz - theZ, \n\t\t\tw - theW\n\t\t);\n\t}",
"c... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_18 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testScaleAdd() {\n final CCVector3 vec1 = new CCVector3(1, 1, 1);\n final CCVector3 vec2 = vec1.scaleAdd(2.0f, new CCVector3(1, 2, 3));\n assertEquals(new CCVector3(3.0f, 4.0f, 5.0f), vec2);\n\n vec1.scaleAddLocal(2.0f, new CCVector3(1, 2, 3));\n as... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "public CCVector3 scaleAdd(final double theScale, final CCVector3 theAdd, CCVector3 theStore) {\n \tif(theStore == null)theStore = new CCVector3();\n \ttheStore.set(\n \t\tx * theScale + theAdd.x,\n \t\ty * theScale + theAdd.y,\n \t\tz * theScale + theAdd.z\n );\n return theStor... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_34 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNormalize() {\n final CCVector2 vec1 = new CCVector2(2, 1);\n// assertTrue(vec1.length() == CCMath.sqrt(5));\n\n final CCVector2 vec2 = vec1.normalize();\n final double invLength = 1f / CCMath.sqrt(2 * 2 + 1 * 1);\n assertEquals(new CCVector2(2 ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public CCVector2 normalize(final CCVector2 theStore) {\n final double lengthSq = lengthSquared();\n if (CCMath.abs(lengthSq) > CCMath.FLT_EPSILON) {\n return multiply(1f / CCMath.sqrt(lengthSq), theStore);\n }\n\n return theStore != null ? theStore.set(CCVector2.ZERO)... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_22 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCross() {\n final CCVector3 vec1 = new CCVector3(1, 0, 0);\n final CCVector3 vec2 = new CCVector3(0, 1, 0);\n assertEquals(CCVector3.UNIT_Z, vec1.cross(vec2));\n\n assertEquals(CCVector3.UNIT_Z, vec1.cross(0, 1, 0));\n\n vec1.crossLocal(vec2);\n... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "public CCVector3 cross(final double theX, final double theY, final double theZ, CCVector3 theStore) {\n \tif(theStore == null)theStore = new CCVector3();\n \n \treturn theStore.set(\n \t\ty * theZ - z * theY,\n \t\tz * theX - x * theZ,\n \t\tx * theY - y * theX\n );\n }",
... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_29 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToArray() {\n final CCVector2 vec1 = new CCVector2();\n vec1.set(CCMath.PI, Float.MAX_VALUE);\n final double[] array = vec1.toArray(null);\n final double[] array2 = vec1.toArray(new double[2]);\n assertNotNull(array);\n assertTrue(array.l... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public double[] toArray(double[] theStore) {\n if (theStore == null) {\n theStore = new double[2];\n }\n // do last first to ensure size is correct before any edits occur.\n theStore[1] = y;\n theStore[0] = x;\n return theStore;\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_6 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java",
"identifier": "CCVector4Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNegate() {\n final CCVector4 vec1 = new CCVector4(3, 2, -1, 1);\n final CCVector4 vec2 = vec1.negate();\n assertEquals(new CCVector4(-3, -2, 1, -1), vec2);\n\n vec1.negateLocal();\n assertEquals(vec2, vec1);\n }",
"class_method_signature": ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector4(0, 0, 0, 0)",
... | {
"body": "public CCVector4 negate(CCVector4 theStore) {\n\t\treturn multiply(-1, theStore);\n\t}",
"class_method_signature": "CCVector4.negate(CCVector4 theStore)",
"constructor": false,
"full_signature": "public CCVector4 negate(CCVector4 theStore)",
"identifier": "negate",
"invocations": [
"multiply"... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_44 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCPlaneTest.java",
"identifier": "CCPlaneTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReflect() {\n final CCPlane plane1 = new CCPlane(CCVector3.UNIT_X, 5.0f);\n assertEquals(new CCVector3(), plane1.reflectVector(new CCVector3(), new CCVector3()));\n assertEquals(new CCVector3(-1, 0, 0), plane1.reflectVector(new CCVector3(1, 0, 0), null));\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "XZ = new CCPlane(CCVector3.UNIT_Y, 0)",
... | {
"body": "public CCVector3 reflectVector(final CCVector3 theUnitVector, final CCVector3 theStore) {\n\t\tCCVector3 result = theStore;\n\t\tif (result == null) {\n\t\t\tresult = new CCVector3();\n\t\t}\n\n\t\tfinal double dotProd = _myNormal.dot(theUnitVector) * 2;\n\t\tresult.set(theUnitVector).subtractLocal(_myNorm... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_13 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAdd() {\n final CCVector3 vec1 = new CCVector3();\n final CCVector3 vec2 = new CCVector3(CCVector3.ONE);\n\n vec1.addLocal(1, 2, 3);\n assertEquals(new CCVector3(1, 2, 3), vec1);\n vec1.addLocal(-1, -2, -3);\n assertEquals(CCVector3.ZERO,... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "public static CCVector3 add(final CCVector3 ...theVector3fs){\n \tCCVector3 myResult = new CCVector3();\n\t\tfor(CCVector3 myVector:theVector3fs){\n\t\t\tmyResult.addLocal(myVector);\n\t\t}\n\t\treturn myResult;\n\t}",
"class_method_signature": "CCVector3.add(final CCVector3 ...theVector3fs)",
"cons... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_25 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testClone() {\n final CCVector3 vec1 = new CCVector3(0, 0, 0);\n final CCVector3 vec2 = vec1.clone();\n assertEquals(vec1, vec2);\n assertNotSame(vec1, vec2);\n }",
"class_method_signature": "CCVector3Test.testClone()",
"constructor": false,
"full... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "@Override\n public CCVector3 clone() {\n return new CCVector3(this);\n }",
"class_method_signature": "CCVector3.clone()",
"constructor": false,
"full_signature": "@Override public CCVector3 clone()",
"identifier": "clone",
"invocations": [],
"modifiers": "@Override public",
"para... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_33 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNegate() {\n final CCVector2 vec1 = new CCVector2(2, 1);\n final CCVector2 vec2 = vec1.negate(null);\n assertEquals(new CCVector2(-2, -1), vec2);\n\n vec1.negateLocal();\n assertEquals(vec2, vec1);\n }",
"class_method_signature": "CCVector2... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public CCVector2 negate(final CCVector2 theStore) {\n return multiply(-1, theStore);\n }",
"class_method_signature": "CCVector2.negate(final CCVector2 theStore)",
"constructor": false,
"full_signature": "public CCVector2 negate(final CCVector2 theStore)",
"identifier": "negate",
"invoca... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_48 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCRay3Test.java",
"identifier": "CCRay3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntersectsTriangle() {\n final CCVector3 v0 = new CCVector3(-1, -1, -1);\n final CCVector3 v1 = new CCVector3(+1, -1, -1);\n final CCVector3 v2 = new CCVector3(+1, +1, -1);\n\n final CCVector3 intersectionPoint = new CCVector3();\n\n // inside t... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "cc-math/src/main/java/cc/creativecomputing/math/CCRay... | {
"body": "public boolean intersectsTriangle(\n\t\tfinal CCVector3 theA, \n\t\tfinal CCVector3 theB, \n\t\tfinal CCVector3 theC, \n\t\tfinal CCVector3 theLocationStore\n\t) {\n\t\treturn intersects(theA, theB, theC, theLocationStore, false);\n\t}",
"class_method_signature": "CCRay3.intersectsTriangle(\n\t\tfinal CC... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_49 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCRay3Test.java",
"identifier": "CCRay3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntersectsPlane() {\n final CCVector3 intersectionPoint = new CCVector3();\n\n CCPlane plane = new CCPlane(new CCVector3(0, 1, 0), 2);\n\n CCRay3 pickRay = new CCRay3(new CCVector3(0, 3, 0), new CCVector3(0, 0, 1));\n assertNull(pickRay.intersectsPlane... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "cc-math/src/main/java/cc/creativecomputing/math/CCRay... | {
"body": "public CCVector3 intersectsPlane(final CCPlane thePlane, CCVector3 theLocationStore) {\n\t\tfinal CCVector3 normal = thePlane.normal();\n\t\tfinal double denominator = normal.dot(_myDirection);\n\n\t\tif (denominator > -CCMath.FLT_EPSILON && denominator < CCMath.FLT_EPSILON) {\n\t\t\treturn null; // coplan... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_32 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testScaleAdd() {\n final CCVector2 vec1 = new CCVector2(1, 1);\n final CCVector2 vec2 = vec1.scaleAdd(2.0f, new CCVector2(1, 2));\n final CCVector2 vec2B = vec1.scaleAdd(2.0f, new CCVector2(1, 2), new CCVector2());\n assertEquals(new CCVector2(3.0f, 4.0f),... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public CCVector2 scaleAdd(final double theScale, final CCVector2 theAdd, final CCVector2 theStore) {\n CCVector2 result = theStore;\n if (result == null) {\n result = new CCVector2();\n }\n \n result.x = x * theScale + theAdd.x;\n result.y = y * theScale... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_24 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector3Test.java",
"identifier": "CCVector3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDot() {\n final CCVector3 vec1 = new CCVector3(7, 2, 5);\n assertTrue(33.0 == vec1.dot(3, 1, 2));\n\n assertTrue(-10.0 == vec1.dot(new CCVector3(-1, 1, -1)));\n }",
"class_method_signature": "CCVector3Test.testDot()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ALLOWED_DEVIANCE = 0.000001f",
"mod... | {
"body": "public double dot(final double theX, final double theY, final double theZ) {\n return x * theX + y * theY + z * theZ;\n }",
"class_method_signature": "CCVector3.dot(final double theX, final double theY, final double theZ)",
"constructor": false,
"full_signature": "public double dot(final do... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_12 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java",
"identifier": "CCVector4Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSimpleHash() {\n // Just a simple sanity check.\n final CCVector4 vec1 = new CCVector4(1, 2, 3, 4);\n final CCVector4 vec2 = new CCVector4(1, 2, 3, 4);\n final CCVector4 vec3 = new CCVector4(2, 2, 2, 2);\n\n assertTrue(vec1.hashCode() == vec2.ha... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector4(0, 0, 0, 0)",
... | {
"body": "@Override\n\tpublic int hashCode() {\n\t\tint result = 33;\n\n\t\tfinal long myX = Double.doubleToLongBits(x);\n\t\tresult += 31 * result + (int) (myX ^ myX >>> 32);\n\n\t\tfinal long myY = Double.doubleToLongBits(y);\n\t\tresult += 31 * result + (int) (myY ^ myY >>> 32);\n\n\t\tfinal long myZ = Double.dou... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_45 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCRay3Test.java",
"identifier": "CCRay3Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testData() {\n final CCRay3 ray = new CCRay3();\n assertEquals(CCVector3.UNIT_Z, ray.getDirection());\n assertEquals(CCVector3.ZERO, ray.getOrigin());\n\n ray.setDirection(CCVector3.NEG_UNIT_X);\n assertEquals(CCVector3.NEG_UNIT_X, ray.getDirection(... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "cc-math/src/main/java/cc/creativecomputing/math/CCRay... | {
"body": "public CCRay3 set(final CCRay3 theSource) {\n\t\t_myOrigin.set(theSource.getOrigin());\n\t\t_myDirection.set(theSource.getDirection());\n\t\treturn this;\n\t}",
"class_method_signature": "CCRay3.set(final CCRay3 theSource)",
"constructor": false,
"full_signature": "public CCRay3 set(final CCRay3 theS... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_7 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector4Test.java",
"identifier": "CCVector4Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNormalize() {\n final CCVector4 vec1 = new CCVector4(2, 1, 3, -1);\n// assertTrue(vec1.length() == CCMath.sqrt(15));\n\n final CCVector4 vec2 = vec1.normalize();\n final double invLength = 1f / CCMath.sqrt(2 * 2 + 1 * 1 + 3 * 3 + -1 * -1);\n// a... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector4(0, 0, 0, 0)",
... | {
"body": "public CCVector4 normalize(CCVector4 theStore) {\n\t\tfinal double lengthSq = lengthSquared();\n\t\tif (CCMath.abs(lengthSq) > CCMath.FLT_EPSILON) {\n\t\t\treturn multiply(1f / CCMath.sqrt(lengthSq), theStore);\n\t\t}\n\n\t\tif(theStore == null)theStore = new CCVector4();\n\t\treturn theStore.set(CCVector4... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
42046027_28 | {
"fields": [],
"file": "cc-math/src/test/java/cc/creativecomputing/math/CCVector2Test.java",
"identifier": "CCVector2Test",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSubtract() {\n final CCVector2 vec1 = new CCVector2();\n final CCVector2 vec2 = new CCVector2(CCVector2.ONE);\n\n vec1.subtractLocal(1, 2);\n assertEquals(new CCVector2(-1, -2), vec1);\n vec1.subtractLocal(-1, -2);\n assertEquals(CCVector... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ZERO = new CCVector2(0, 0)",
"modif... | {
"body": "public CCVector2 subtract(final double theX, final double theY, final CCVector2 theStore) {\n CCVector2 result = theStore;\n if (result == null) {\n result = new CCVector2();\n }\n\n return result.set(\n \tx - theX, \n \ty - theY\n );\n }",
"... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 42046027,
"size": 382577,
"stargazer_count": 5,
"stars": null,
"updates": null,
"url": "https://github.com/texone/creativecomputing"
} |
133662794_6 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void testAdjacentHahs() {\n\t\tString adjacent;\n\t\t\n\t\tadjacent = GeoHashUtil.adjacentHash(\"9yzf7\", \"TOP\");\n\t\tassertEquals(\"9yzfe\", adjacent);\n\t\t\n\t\tadjacent = GeoHashUtil.adjacentHash(\"9yzf7\", \"BOTTOM\");\n\t\tassertEquals(\"9yzf5\", adjacent);\n\t\t\n\t\tadjacent = Ge... | {
"fields": [
{
"declarator": "geometryFactory = JTSFactoryFinder.getGeometryFactory()",
"modifier": "private static",
"original_string": "private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();",
"type": "GeometryFactory",
"var_name": "geometryFactory... | {
"body": "public static String adjacentHash(String geohash, String directionString) {\n\t\tDirection direction = Direction.valueOf(directionString.toUpperCase());\n\t\tif (direction == null) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid direction parameter, needs to be either TOP, BOTTON, RIGHT or LEFT\");\n... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_7 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test \n\tpublic void test() throws ParseException {\n\t\t\n\t\tLineString route = (LineString)reader.read(ROUTE_WKT);\n\t\t\n\t\tfor (Coordinate coord : route.getCoordinates()) {\n\t\t\tSystem.out.println(coord.x + \":\" + coord.y);\n\t\t\tif (GeoFenceUtil.geofenceString(coord.y, coord.x, COLUMBIA_WKT).eq... | {
"fields": [
{
"declarator": "OUTSIDE = \"OUTSIDE\"",
"modifier": "private static final",
"original_string": "private static final String OUTSIDE = \"OUTSIDE\";",
"type": "String",
"var_name": "OUTSIDE"
},
{
"declarator": "INSIDE = \"INSIDE\"",
"modifier": "priva... | {
"body": "public static String geofenceString(final double latitude, final double longitude, String geometryWKT) {\n\t\treturn geofenceStringImpl(latitude, longitude, geometryWKT);\n\t}",
"class_method_signature": "GeoFenceUtil.geofenceString(final double latitude, final double longitude, String geometryWKT)",
"... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_0 | {
"fields": [],
"file": "avro-vs-protobuf/datagenerator/java/datagenerator/src/test/java/com/trivadis/datagenerator/TestPersonData.java",
"identifier": "TestPersonData",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testGetPersons() throws IOException {\n\t\tList<PersonDO> persons = PersonData.getPersons();\n\t}",
"class_method_signature": "TestPersonData.testGetPersons()",
"constructor": false,
"full_signature": "@Test public void testGetPersons()",
"identifier": "testGetPersons",
"invo... | {
"fields": [],
"file": "avro-vs-protobuf/datagenerator/java/datagenerator/src/main/java/com/trivadis/datagenerator/PersonData.java",
"identifier": "PersonData",
"interfaces": "",
"methods": [
{
"class_method_signature": "PersonData.getPersons()",
"constructor": false,
"full_signature": ... | {
"body": "public static List<PersonDO> getPersons() {\n\t\tJSONParser parser = new JSONParser();\n\t\tJSONObject jsonObject = null;\n\t\tJSONArray jsonArray = null;\n\t\t\n\t\tList<PersonDO> personsDO = new ArrayList<>();\n\t\t\n try {\n Object obj = parser.parse(new FileReader(\"/mnt/hgfs/git/gsch... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_10 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test \n\tpublic void testCentroidPolygon() throws ParseException {\n\t\t\n\t\tSystem.out.println(GeoUtil.centroidWKT(COLUMBIA_WKT));\n\t}",
"class_method_signature": "GeoUtilTest.testCentroidPolygon()",
"constructor": false,
"full_signature": "@Test public void testCentroidPolygon()",
"identifier"... | {
"fields": [
{
"declarator": "geometryFactory = JTSFactoryFinder.getGeometryFactory()",
"modifier": "private static",
"original_string": "private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();",
"type": "GeometryFactory",
"var_name": "geometryFactory... | {
"body": "public static String centroidWKT(String geometryWKT) {\n\t\tString pointWKT = \"\";\n\t\t\n\t\ttry {\n\t\t\tGeometry geometry = reader.read(geometryWKT);\n\t\t\tPoint point = geometry.getCentroid();\n\t\t\tpointWKT = writer.write(point);\n\t\t\t\n\t\t} catch (ParseException e) {\n\t\t\tthrow new RuntimeExc... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_1 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void testGeoHashByPosition() {\n\t\tassertEquals(\"9yzfftyn0101\", GeoHashUtil.geohash(38.484769753492536, -90.23345947265625));\n\t}",
"class_method_signature": "GeoHashUtilTest.testGeoHashByPosition()",
"constructor": false,
"full_signature": "@Test public void testGeoHashByPosition... | {
"fields": [
{
"declarator": "geometryFactory = JTSFactoryFinder.getGeometryFactory()",
"modifier": "private static",
"original_string": "private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();",
"type": "GeometryFactory",
"var_name": "geometryFactory... | {
"body": "public static String geohash(final double latitude, final double longitude, int length) {\n\t\treturn GeoHash.encodeHash(latitude, longitude, length);\n\t}",
"class_method_signature": "GeoHashUtil.geohash(final double latitude, final double longitude, int length)",
"constructor": false,
"full_signatu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_2 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void testGeoHashByPositionWithLength4() {\n\t\tassertEquals(\"9yzf\", GeoHashUtil.geohash(38.484769753492536, -90.23345947265625, 4));\n\t}",
"class_method_signature": "GeoHashUtilTest.testGeoHashByPositionWithLength4()",
"constructor": false,
"full_signature": "@Test public void test... | {
"fields": [
{
"declarator": "geometryFactory = JTSFactoryFinder.getGeometryFactory()",
"modifier": "private static",
"original_string": "private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();",
"type": "GeometryFactory",
"var_name": "geometryFactory... | {
"body": "public static String geohash(final double latitude, final double longitude, int length) {\n\t\treturn GeoHash.encodeHash(latitude, longitude, length);\n\t}",
"class_method_signature": "GeoHashUtil.geohash(final double latitude, final double longitude, int length)",
"constructor": false,
"full_signatu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_3 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void testGeoHashByPositionWithLengthGreaterMax() {\n\t\ttry {\n\t\t\tGeoHashUtil.geohash(38.484769753492536, -90.23345947265625, 13);\n\t\t\tfail(\"Should fail with an Illegal Argument Exception because of the length greater thant 12\");\n\t\t} catch (IllegalArgumentException expected) {\n\... | {
"fields": [
{
"declarator": "geometryFactory = JTSFactoryFinder.getGeometryFactory()",
"modifier": "private static",
"original_string": "private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();",
"type": "GeometryFactory",
"var_name": "geometryFactory... | {
"body": "public static String geohash(final double latitude, final double longitude, int length) {\n\t\treturn GeoHash.encodeHash(latitude, longitude, length);\n\t}",
"class_method_signature": "GeoHashUtil.geohash(final double latitude, final double longitude, int length)",
"constructor": false,
"full_signatu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_4 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void testGeoHashCoverBoundingBox() {\n\t\tSystem.out.println(GeoHashUtil.coverBoundingBox(COLUMBIA_WKT, 5));\n\t\tList<String> results = GeoHashUtil.coverBoundingBox(COLUMBIA_WKT, 5);\n\t\tString[] resultArr = results.toArray(new String[results.size()]);\n\t\tString[] expectedArr = new Stri... | {
"fields": [
{
"declarator": "geometryFactory = JTSFactoryFinder.getGeometryFactory()",
"modifier": "private static",
"original_string": "private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();",
"type": "GeometryFactory",
"var_name": "geometryFactory... | {
"body": "public static List<String> coverBoundingBox(String geometryWKT, int length) {\n\t\tList<String> list = new ArrayList<>();\n\t\tGeometry geometry;\n\t\ttry {\n\t\t\tgeometry = reader.read(geometryWKT);\n\n\t\t\t// returns the bounding box\n\t\t\tEnvelope e = geometry.getEnvelopeInternal();\n\t\t\tCoverage c... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_8 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void test2() throws ParseException {\n\t\tString status = \"\";\n\t\tLineString route = (LineString)reader.read(ROUTE_WKT);\n\t\t\n\t\tfor (Coordinate coord : route.getCoordinates()) {\n\t\t\t\n\t\t\tstatus = GeoFenceUtil.geofence(coord.y, coord.x, status, COLUMBIA_WKT);\n\t\t\tSystem.out.p... | {
"fields": [
{
"declarator": "OUTSIDE = \"OUTSIDE\"",
"modifier": "private static final",
"original_string": "private static final String OUTSIDE = \"OUTSIDE\";",
"type": "String",
"var_name": "OUTSIDE"
},
{
"declarator": "INSIDE = \"INSIDE\"",
"modifier": "priva... | {
"body": "public static boolean geofence(final double latitude, final double longitude, String geometryWKT) {\n\t\treturn geofenceImpl(latitude, longitude, geometryWKT);\n\t}",
"class_method_signature": "GeoFenceUtil.geofence(final double latitude, final double longitude, String geometryWKT)",
"constructor": fal... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_9 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void testWithDistance() throws ParseException, TransformException {\n\t\tLineString route = (LineString)reader.read(ROUTE_WKT);\n\t\tPolygon columbiaWkt = (Polygon) reader.read(COLUMBIA_WKT);\n\t\t\n\t\tfor (Coordinate coord : route.getCoordinates()) {\n\t\t\tString status = GeoFenceUtil.ge... | {
"fields": [
{
"declarator": "OUTSIDE = \"OUTSIDE\"",
"modifier": "private static final",
"original_string": "private static final String OUTSIDE = \"OUTSIDE\";",
"type": "String",
"var_name": "OUTSIDE"
},
{
"declarator": "INSIDE = \"INSIDE\"",
"modifier": "priva... | {
"body": "public static String geofenceString(final double latitude, final double longitude, String geometryWKT) {\n\t\treturn geofenceStringImpl(latitude, longitude, geometryWKT);\n\t}",
"class_method_signature": "GeoFenceUtil.geofenceString(final double latitude, final double longitude, String geometryWKT)",
"... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
133662794_5 | {
"fields": [
{
"declarator": "STAINT_LOUIS_WKT = \"POLYGON ((-90.25749206542969 38.71551876930462, -90.31723022460938 38.69301319283493, -90.3247833251953 38.64744452237617, -90.31997680664062 38.58306291549108, -90.27053833007812 38.55460931253295, -90.22109985351562 38.54601733154524, -90.15037536621094 ... | {
"body": "@Test\n\tpublic void testGeoHashCoverBoundingBoxWithUpperLeftAndLowerRight() {\n\t\tList<String> results = GeoHashUtil.coverBoundingBox(52.449732623925755,113.309593200683594,52.45559096922489,3.3178329467773445, 5);\n\t\tString[] resultArr = results.toArray(new String[results.size()]);\n\t\tSystem.out.pri... | {
"fields": [
{
"declarator": "geometryFactory = JTSFactoryFinder.getGeometryFactory()",
"modifier": "private static",
"original_string": "private static GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();",
"type": "GeometryFactory",
"var_name": "geometryFactory... | {
"body": "public static List<String> coverBoundingBox(String geometryWKT, int length) {\n\t\tList<String> list = new ArrayList<>();\n\t\tGeometry geometry;\n\t\ttry {\n\t\t\tgeometry = reader.read(geometryWKT);\n\n\t\t\t// returns the bounding box\n\t\t\tEnvelope e = geometry.getEnvelopeInternal();\n\t\t\tCoverage c... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133662794,
"size": 138493,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/gschmutz/various-demos"
} |
7416746_5 | {
"fields": [
{
"declarator": "NUMBER_OF_NETWORKS = 2",
"modifier": "private static",
"original_string": "private static int NUMBER_OF_NETWORKS = 2;",
"type": "int",
"var_name": "NUMBER_OF_NETWORKS"
},
{
"declarator": "node",
"modifier": "",
"original_string... | {
"body": "@Test (expected=NetworkAllocationException.class)\n public void shouldLimitNumberOfNetworks() {\n \tfor (int i = 0 ; i <= NUMBER_OF_NETWORKS ; i++) {\n \t\tnode.getNetworkForKey(new NetworkKey(i,0,0,0,0,0,0,0));\n \t}\n }",
"class_method_signature": "NodeTest.shouldLimitNumberOfNetworks()"... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName())",
"modifier": "public final static",
"original_string": "public final static Logger LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public synchronized Network getNetworkForKey(NetworkKey key) {\n\t\tint count = 0;\n\t\tInteger freeIndex = null;\n\t\t\n\t\tfor (Network network : networks) {\n\t\t\tNetworkKey currentNetworkKey = network.getNetworkKey();\n\t\t\t\n\t\t\t// if network not associated with a key already\n\t\t\tif (currentNet... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_19 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void oneBit() {\n int old = 0;\n int mask = 0b0000_0010;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 1,1);\n assertEquals(0b0000_0010, newVal);\n }",
"class_method_signature": "IntUtilsTest.oneBit()",
"constructor": false,
"full_signature": "@Te... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_9 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/BitUtilsTest.java",
"identifier": "BitUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetMaxBitIndex() {\n assertEquals(1,BitUtils.getMaxBitIndex(1));\n assertEquals(8,BitUtils.getMaxBitIndex(255));\n org.junit.Assert.assertNotSame(8, BitUtils.getMaxBitIndex(256));\n }",
"class_method_signature": "BitUtilsTest.testGetMaxBitIndex()",
"constructor": fals... | {
"fields": [],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/BitUtils.java",
"identifier": "BitUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "BitUtils.getMaxBitIndex(int number)",
"constructor": false,
"full_signature": "public static int getMaxBit... | {
"body": "public static int getMaxBitIndex(int number) {\n if (number < 0) {\n throw new RuntimeException(\"negative numbers unsupported\");\n }\n int maxBit = 0;\n while((number = number >>> 1) >=0) {\n maxBit++;\n if (number == 0) {\n break;\n }\n } \n return maxBit;... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_15 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMaskLEPartialByteLeftAlign() {\n int old = 0;\n int mask = 0xffffff00;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 0x563412);\n assertEquals(0x12345600, newVal);\n }",
"class_method_signature": "IntUtilsTest.setMaskLEPartialByteLeftAlign()",... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_14 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMaskLEPartialByte() {\n int old = 0;\n int mask = 0x0fff0;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 0xc0ab);\n assertEquals(0x0abc0, newVal);\n }",
"class_method_signature": "IntUtilsTest.setMaskLEPartialByte()",
"constructor": false,
... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_8 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/NetworkHandleTest.java",
"identifier": "NetworkHandleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test \n\tpublic void checkRefCountIncremented() {\n\t\tNetworkKey key = new NetworkKey(1,2,3,4,5,6,7,8);\n\t\tNetwork n = new Network(0, key, null);\n\t\tArrayList<NetworkHandle> handles = new ArrayList<NetworkHandle>();\n\t\tfor (int i = 0 ; i < 10 ; i++) {\n\t\t\tNetworkHandle h = new NetworkHandle(n);\... | {
"fields": [
{
"declarator": "freed = false",
"modifier": "private",
"original_string": "private boolean freed = false;",
"type": "boolean",
"var_name": "freed"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/NetworkHandle.java",
"identifier": "NetworkHandle... | {
"body": "@Override\n\tpublic synchronized void free() {\n\t\t// if has been freed\n\t\tcheckState();\n\t\tsuper.free();\n\t\tfreed = true;\n\t}",
"class_method_signature": "NetworkHandle.free()",
"constructor": false,
"full_signature": "@Override public synchronized void free()",
"identifier": "free",
"in... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_18 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void offsetMultiByte() {\n int old = 0;\n int mask = 0x00ffff0;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 2789);\n //int swap = (2789 & 0xff00) >>> 8;\n //swap += (2789 & 0xFF) << 8;\n //System.out.printf(\"%x\\n\", 2789);\n //Sys... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_4 | {
"fields": [
{
"declarator": "NUMBER_OF_NETWORKS = 2",
"modifier": "private static",
"original_string": "private static int NUMBER_OF_NETWORKS = 2;",
"type": "int",
"var_name": "NUMBER_OF_NETWORKS"
},
{
"declarator": "node",
"modifier": "",
"original_string... | {
"body": "@Test\n public void shouldReturnSameNetworkForSameKey() {\n \tNetwork n1 = node.getNetworkForKey(networkKey1);\n Network n2 = node.getNetworkForKey(networkKey1);\n assertSame(n1.getNumber(),n2.getNumber());\n }",
"class_method_signature": "NodeTest.shouldReturnSameNetworkForSameKey... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName())",
"modifier": "public final static",
"original_string": "public final static Logger LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public synchronized Network getNetworkForKey(NetworkKey key) {\n\t\tint count = 0;\n\t\tInteger freeIndex = null;\n\t\t\n\t\tfor (Network network : networks) {\n\t\t\tNetworkKey currentNetworkKey = network.getNetworkKey();\n\t\t\t\n\t\t\t// if network not associated with a key already\n\t\t\tif (currentNet... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_22 | {
"fields": [
{
"declarator": "channel",
"modifier": "",
"original_string": "Channel channel;",
"type": "Channel",
"var_name": "channel"
}
],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/ChannelTest.java",
"identifier": "ChannelTest",
"interfaces": "",
"sup... | {
"body": "@Test\n public void shouldNotDiscardMessageCausingSequenceError() throws InterruptedException {\n final List<CombinedBurst> bursts = new ArrayList<CombinedBurst>();\n final Lock syncLock = new ReentrantLock();\n final Condition allBurstsArrived = syncLock.newCondition();\n fi... | {
"fields": [
{
"declarator": "SEARCH_TIMEOUT_NEVER = 255",
"modifier": "public static final",
"original_string": "public static final int SEARCH_TIMEOUT_NEVER = 255;",
"type": "int",
"var_name": "SEARCH_TIMEOUT_NEVER"
},
{
"declarator": "LOGGER = Logger.getLogger(Event... | {
"body": "public synchronized void registerBurstListener(\n\t\t\tBroadcastListener<CombinedBurst> listener) {\n\t\tburstMessenger.addBroadcastListener(listener);\n\t}",
"class_method_signature": "Channel.registerBurstListener(\n\t\t\tBroadcastListener<CombinedBurst> listener)",
"constructor": false,
"full_sign... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_13 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMaskLENibble() {\n int old = 0;\n int mask = 0xf;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 0xc);\n assertEquals(0xc, newVal);\n }",
"class_method_signature": "IntUtilsTest.setMaskLENibble()",
"constructor": false,
"full_signature": "@... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_3 | {
"fields": [
{
"declarator": "NUMBER_OF_NETWORKS = 2",
"modifier": "private static",
"original_string": "private static int NUMBER_OF_NETWORKS = 2;",
"type": "int",
"var_name": "NUMBER_OF_NETWORKS"
},
{
"declarator": "node",
"modifier": "",
"original_string... | {
"body": "@Test\n public void shouldReturnDifferentNetworksForDifferentKeys() {\n Network n1 = node.getNetworkForKey(networkKey1);\n Network n2 = node.getNetworkForKey(networkKey2);\n assertNotSame(n1.getNumber(),n2.getNumber());\n }",
"class_method_signature": "NodeTest.shouldReturnDiff... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName())",
"modifier": "public final static",
"original_string": "public final static Logger LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public synchronized Network getNetworkForKey(NetworkKey key) {\n\t\tint count = 0;\n\t\tInteger freeIndex = null;\n\t\t\n\t\tfor (Network network : networks) {\n\t\t\tNetworkKey currentNetworkKey = network.getNetworkKey();\n\t\t\t\n\t\t\t// if network not associated with a key already\n\t\t\tif (currentNet... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_2 | {
"fields": [
{
"declarator": "NUMBER_OF_NETWORKS = 2",
"modifier": "private static",
"original_string": "private static int NUMBER_OF_NETWORKS = 2;",
"type": "int",
"var_name": "NUMBER_OF_NETWORKS"
},
{
"declarator": "node",
"modifier": "",
"original_string... | {
"body": "@Test\n public void shouldReturnFreeChannelToPool() {\n node.freeChannel(channel1);\n\n verify(channel1).setFree(true);\n }",
"class_method_signature": "NodeTest.shouldReturnFreeChannelToPool()",
"constructor": false,
"full_signature": "@Test public void shouldReturnFreeChannelToP... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName())",
"modifier": "public final static",
"original_string": "public final static Logger LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public synchronized void freeChannel(Channel channel) {\n\t\t// need to hold synchronisation in case someone is\n\t\t// calling getFreeChannel)\n\t\tchannel.setFree(true);\n\t}",
"class_method_signature": "Node.freeChannel(Channel channel)",
"constructor": false,
"full_signature": "public synchronize... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_12 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMaskLE() {\n int old = 0;\n int mask = 0x0ffff0;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 0xcdab);\n assertEquals(0x0abcd0, newVal);\n }",
"class_method_signature": "IntUtilsTest.setMaskLE()",
"constructor": false,
"full_signature": "... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_11 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMaskMultiByte() {\n int old = 0xdeadbeef;\n int mask = 0x0f_ff_f0_00;\n int newVal = IntUtils.setMaskedBits(old, mask, 0xabcd);\n assertEquals(0xdabcdeef, newVal);\n }",
"class_method_signature": "IntUtilsTest.setMaskMultiByte()",
"constructor": ... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBits(int wholeElement,int mask, int value) {\n\t\tint clearMask = ~mask;\n\t int shift = Integer.numberOfTrailingZeros(mask);\n\t value = value << shift;\n\t wholeElement &= clearMask;\n\t wholeElement |= (mask & value);\n\t\treturn wholeElement;\n }",
"class_metho... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_1 | {
"fields": [
{
"declarator": "NUMBER_OF_NETWORKS = 2",
"modifier": "private static",
"original_string": "private static int NUMBER_OF_NETWORKS = 2;",
"type": "int",
"var_name": "NUMBER_OF_NETWORKS"
},
{
"declarator": "node",
"modifier": "",
"original_string... | {
"body": "@Test\n public void shouldNotGetNonFreeChannels() {\n when(channel1.isFree()).thenReturn(false);\n\n assertNull(node.getFreeChannel());\n }",
"class_method_signature": "NodeTest.shouldNotGetNonFreeChannels()",
"constructor": false,
"full_signature": "@Test public void shouldNotGet... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName())",
"modifier": "public final static",
"original_string": "public final static Logger LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public synchronized Channel getFreeChannel() {\n\n\t\tfor (Channel c : channels) {\n\t\t\tif (c.isFree()) {\n\t\t\t\tc.setFree(false);\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"class_method_signature": "Node.getFreeChannel()",
"constructor": false,
"full_signature": "public synch... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_0 | {
"fields": [
{
"declarator": "NUMBER_OF_NETWORKS = 2",
"modifier": "private static",
"original_string": "private static int NUMBER_OF_NETWORKS = 2;",
"type": "int",
"var_name": "NUMBER_OF_NETWORKS"
},
{
"declarator": "node",
"modifier": "",
"original_string... | {
"body": "@Test\n public void shouldSetChannelFreeFlagToFalse() {\n when(channel1.isFree()).thenReturn(true);\n Channel channel = node.getFreeChannel();\n\n assertSame(channel1, channel);\n verify(channel1).setFree(false);\n }",
"class_method_signature": "NodeTest.shouldSetChannel... | {
"fields": [
{
"declarator": "LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName())",
"modifier": "public final static",
"original_string": "public final static Logger LOGGER = Logger.getLogger(EventMachine.class\n\t\t\t.getName());",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public synchronized Channel getFreeChannel() {\n\n\t\tfor (Channel c : channels) {\n\t\t\tif (c.isFree()) {\n\t\t\t\tc.setFree(false);\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"class_method_signature": "Node.getFreeChannel()",
"constructor": false,
"full_signature": "public synch... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_10 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMask() {\n int old = 0xadde;\n int mask = 0x0ff0;\n int newVal = IntUtils.setMaskedBits(old, mask, 0xcc);\n assertEquals(0xacce, newVal);\n }",
"class_method_signature": "IntUtilsTest.setMask()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBits(int wholeElement,int mask, int value) {\n\t\tint clearMask = ~mask;\n\t int shift = Integer.numberOfTrailingZeros(mask);\n\t value = value << shift;\n\t wholeElement &= clearMask;\n\t wholeElement |= (mask & value);\n\t\treturn wholeElement;\n }",
"class_metho... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_7 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/messages/responses/VersionResponseTest.java",
"identifier": "VersionResponseTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testValidationPass() throws MessageException {\n VersionResponse msg = new VersionResponse();\n msg.decode(new byte[]{1,(byte)0x3E,(byte) 'h',(byte) 'e',(byte) 'l',(byte) 'l',(byte) 'o',(byte) ' ',(byte) 'w',(byte) 'o',(byte) 'r',(byte) 'l',(byte) '\\0'});\n System.out.println... | {
"fields": [
{
"declarator": "additionalElements",
"modifier": "private static",
"original_string": "private static DataElement [] additionalElements;",
"type": "DataElement []",
"var_name": "additionalElements"
},
{
"declarator": "VERSION_STRING_LENGTH = 11",
"m... | {
"body": "public String getVersionString() {\n char [] string = new char[VERSION_STRING_LENGTH];\n for (int i = 0 ; i< VERSION_STRING_LENGTH; i++) {\n string[i] = (char)getDataElement(DataElement.VERSION_STRING_BYTE,i).intValue();\n }\n return new String(string);\n }",
"class_method_signature": "... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_21 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void maxSign() {\n assertEquals(0xffffffff,IntUtils.maxUnsigned(32));\n }",
"class_method_signature": "IntUtilsTest.maxSign()",
"constructor": false,
"full_signature": "@Test public void maxSign()",
"identifier": "maxSign",
"invocations": [
"assertEquals",
"max... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int maxUnsigned(int numBits) {\n\t\tif (numBits > 32) {\n\t\t\tthrow new IllegalArgumentException(\"integer overflow\");\n\t\t}\n\t\tif (numBits == 0) return 0;\n\t\tif (numBits == 32) return 0xffffffff;\n\t\treturn (0b1 << (numBits)) -1;\n\t}",
"class_method_signature": "IntUtils.maxUnsign... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_17 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test123() {\n int old = 0;\n int mask = 0xff;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 123);\n //System.out.printf(\"%x\\n\", 123);\n //System.out.printf(\"%x\\n\", newVal);\n assertEquals(123, newVal);\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_16 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void setMaskLEPartialByteRightAlign() {\n int old = 0;\n int mask = 0x00ffffff;\n int newVal = IntUtils.setMaskedBitsLE(old, mask, 0x563412);\n assertEquals(0x123456, newVal);\n }",
"class_method_signature": "IntUtilsTest.setMaskLEPartialByteRightAlign()",... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int setMaskedBitsLE(int wholeElement, int mask, int value) {\n\t\treturn setMaskedBitsLE(wholeElement, mask, value, Integer.bitCount(mask));\n\t}",
"class_method_signature": "IntUtils.setMaskedBitsLE(int wholeElement, int mask, int value)",
"constructor": false,
"full_signature": "publi... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_20 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/utils/IntUtilsTest.java",
"identifier": "IntUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void maxSigned() {\n assertEquals(7, IntUtils.maxSigned(4));\n }",
"class_method_signature": "IntUtilsTest.maxSigned()",
"constructor": false,
"full_signature": "@Test public void maxSigned()",
"identifier": "maxSigned",
"invocations": [
"assertEquals",
"maxSig... | {
"fields": [
{
"declarator": "BYTES = 4",
"modifier": "public static final",
"original_string": "public static final int BYTES = 4;",
"type": "int",
"var_name": "BYTES"
}
],
"file": "jformica_core/src/main/java/org/cowboycoders/ant/utils/IntUtils.java",
"identifier": "IntU... | {
"body": "public static int maxSigned(int numBits) {\n\t\tif (numBits == 0) return 0;\n\t\treturn (0b1 << (numBits -1)) -1;\n\t}",
"class_method_signature": "IntUtils.maxSigned(int numBits)",
"constructor": false,
"full_signature": "public static int maxSigned(int numBits)",
"identifier": "maxSigned",
"inv... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
7416746_6 | {
"fields": [],
"file": "jformica_core/src/test/java/org/cowboycoders/ant/messages/notifications/SerialErrorMessageTest.java",
"identifier": "SerialErrorMessageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws MessageException {\n SerialErrorMessage msg = new SerialErrorMessage();\n msg.decode(new byte[]{1,(byte)0xAE,(byte) 255,1,2,3});\n\n int count = 0;\n // should be 1,2,3 ...\n for (Byte b : msg.getOriginalMessage()) {\n assertEquals(b.byteValue(), ((byt... | {
"fields": [
{
"declarator": "additionalElements = \n new DataElement [] {\n DataElement.ERROR_CODE,\n // additional elements contain original message\n }",
"modifier": "private static",
"original_string": "private static DataElement [] additionalElements = \n new DataElement [... | {
"body": "public byte [] getOriginalMessage() {\n List<Byte> payload = getStandardPayload();\n //strip off error code\n payload = payload.subList(1, payload.size());\n byte [] rtn = new byte[payload.size()];\n for (int i = 0 ; i< payload.size() ; i++) {\n rtn[i] = payload.get(i);\n }\n return rt... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 7416746,
"size": 25201,
"stargazer_count": 17,
"stars": null,
"updates": null,
"url": "https://github.com/fluxoid-org/JFormica"
} |
53275454_0 | {
"fields": [],
"file": "morpheus/src/test/java/at/rags/morpheus/DeserializerTest.java",
"identifier": "DeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreateObjectFromString() throws Exception {\n HashMap<String, Class> mockMap = mock(HashMap.class);\n when(mockMap.get(\"articles\")).thenReturn(Article.class);\n Deserializer.setRegisteredClasses(mockMap);\n Deserializer deserializer = new Deserializer();\n\n Resour... | {
"fields": [
{
"declarator": "registeredClasses = new HashMap<>()",
"modifier": "private static",
"original_string": "private static HashMap<String, Class> registeredClasses = new HashMap<>();",
"type": "HashMap<String, Class>",
"var_name": "registeredClasses"
}
],
"file": "... | {
"body": "public Resource createObjectFromString(String resourceName) throws InstantiationException, IllegalAccessException, NotExtendingResourceException {\n Class objectClass = registeredClasses.get(resourceName);\n try {\n return (Resource) objectClass.newInstance();\n } catch (InstantiationExceptio... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 53275454,
"size": 580,
"stargazer_count": 27,
"stars": null,
"updates": null,
"url": "https://github.com/xamoom/Morpheus"
} |
53275454_1 | {
"fields": [],
"file": "morpheus/src/test/java/at/rags/morpheus/DeserializerTest.java",
"identifier": "DeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetField() throws Exception {\n Deserializer deserializer = new Deserializer();\n Article article = new Article();\n\n Resource resource = deserializer.setField(article, \"title\", \"My Title\");\n\n article = (Article)resource;\n assertEquals(article.getTitle(), \"M... | {
"fields": [
{
"declarator": "registeredClasses = new HashMap<>()",
"modifier": "private static",
"original_string": "private static HashMap<String, Class> registeredClasses = new HashMap<>();",
"type": "HashMap<String, Class>",
"var_name": "registeredClasses"
}
],
"file": "... | {
"body": "public Resource setField(Resource resourceObject, String fieldName, Object data) {\n Field field = null;\n try {\n field = resourceObject.getClass().getDeclaredField(fieldName);\n field.setAccessible(true);\n field.set(resourceObject, data);\n } catch (NoSuchFieldException e) {\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 53275454,
"size": 580,
"stargazer_count": 27,
"stars": null,
"updates": null,
"url": "https://github.com/xamoom/Morpheus"
} |
53275454_2 | {
"fields": [],
"file": "morpheus/src/test/java/at/rags/morpheus/DeserializerTest.java",
"identifier": "DeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetFieldNoSuchFieldException() throws Exception {\n Deserializer deserializer = new Deserializer();\n Article article = new Article();\n\n Resource resource = deserializer.setField(article, \"asdf\", \"My Title\");\n\n article = (Article)resource;\n assertNotNull(art... | {
"fields": [
{
"declarator": "registeredClasses = new HashMap<>()",
"modifier": "private static",
"original_string": "private static HashMap<String, Class> registeredClasses = new HashMap<>();",
"type": "HashMap<String, Class>",
"var_name": "registeredClasses"
}
],
"file": "... | {
"body": "public Resource setField(Resource resourceObject, String fieldName, Object data) {\n Field field = null;\n try {\n field = resourceObject.getClass().getDeclaredField(fieldName);\n field.setAccessible(true);\n field.set(resourceObject, data);\n } catch (NoSuchFieldException e) {\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 53275454,
"size": 580,
"stargazer_count": 27,
"stars": null,
"updates": null,
"url": "https://github.com/xamoom/Morpheus"
} |
53275454_3 | {
"fields": [],
"file": "morpheus/src/test/java/at/rags/morpheus/DeserializerTest.java",
"identifier": "DeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIdField() throws Exception {\n Deserializer deserializer = new Deserializer();\n Article article = new Article();\n\n Resource resource = deserializer.setIdField(article, \"123456\");\n\n article = (Article)resource;\n assertEquals(article.getId(), \"123456\");\n ... | {
"fields": [
{
"declarator": "registeredClasses = new HashMap<>()",
"modifier": "private static",
"original_string": "private static HashMap<String, Class> registeredClasses = new HashMap<>();",
"type": "HashMap<String, Class>",
"var_name": "registeredClasses"
}
],
"file": "... | {
"body": "public Resource setIdField(Resource resourceObject, Object data) throws NotExtendingResourceException {\n Class superClass = null;\n try {\n superClass = getMorpheusResourceSuperClass(resourceObject);\n } catch (NotExtendingResourceException e) {\n throw e;\n }\n\n try {\n Fie... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 53275454,
"size": 580,
"stargazer_count": 27,
"stars": null,
"updates": null,
"url": "https://github.com/xamoom/Morpheus"
} |
53275454_4 | {
"fields": [],
"file": "morpheus/src/test/java/at/rags/morpheus/DeserializerTest.java",
"identifier": "DeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIdFieldNumber() throws Exception {\n Deserializer deserializer = new Deserializer();\n Article article = new Article();\n\n Resource resource = deserializer.setIdField(article, 123456);\n\n article = (Article)resource;\n assertEquals(article.getId(), \"123456\");\... | {
"fields": [
{
"declarator": "registeredClasses = new HashMap<>()",
"modifier": "private static",
"original_string": "private static HashMap<String, Class> registeredClasses = new HashMap<>();",
"type": "HashMap<String, Class>",
"var_name": "registeredClasses"
}
],
"file": "... | {
"body": "public Resource setIdField(Resource resourceObject, Object data) throws NotExtendingResourceException {\n Class superClass = null;\n try {\n superClass = getMorpheusResourceSuperClass(resourceObject);\n } catch (NotExtendingResourceException e) {\n throw e;\n }\n\n try {\n Fie... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 53275454,
"size": 580,
"stargazer_count": 27,
"stars": null,
"updates": null,
"url": "https://github.com/xamoom/Morpheus"
} |
53275454_5 | {
"fields": [],
"file": "morpheus/src/test/java/at/rags/morpheus/DeserializerTest.java",
"identifier": "DeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetIdFieldMultiExtendingClass() throws Exception {\n Deserializer deserializer = new Deserializer();\n MultiExtendResource multiExtendResource= new MultiExtendResource();\n\n Resource resource = deserializer.setIdField(multiExtendResource, 123456);\n\n multiExtendResour... | {
"fields": [
{
"declarator": "registeredClasses = new HashMap<>()",
"modifier": "private static",
"original_string": "private static HashMap<String, Class> registeredClasses = new HashMap<>();",
"type": "HashMap<String, Class>",
"var_name": "registeredClasses"
}
],
"file": "... | {
"body": "public Resource setIdField(Resource resourceObject, Object data) throws NotExtendingResourceException {\n Class superClass = null;\n try {\n superClass = getMorpheusResourceSuperClass(resourceObject);\n } catch (NotExtendingResourceException e) {\n throw e;\n }\n\n try {\n Fie... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 53275454,
"size": 580,
"stargazer_count": 27,
"stars": null,
"updates": null,
"url": "https://github.com/xamoom/Morpheus"
} |
34793185_83 | {
"fields": [
{
"declarator": "extension = new MediumConstraintMatchPersistenceExtension()",
"modifier": "private",
"original_string": "private MediumConstraintMatchPersistenceExtension extension = new MediumConstraintMatchPersistenceExtension();",
"type": "MediumConstraintMatchPersistence... | {
"body": "@Test\n public void unmarshalMediumConstraintMatchNull() throws RuleModelDRLPersistenceException {\n String actionString = \"scoreHolder.addMediumConstraintMatch(kcontext, null);\";\n\n IAction action = extension.unmarshal(actionString);\n\n assertTrue(action instanceof ActionMedium... | {
"fields": [
{
"declarator": "CONSTRAINT_MATCH_PATTERN = Pattern.compile(\"scoreHolder\\\\.addMediumConstraintMatch\\\\(\\\\s*kcontext\\\\s*,.+\\\\);\")",
"modifier": "private static final",
"original_string": "private static final Pattern CONSTRAINT_MATCH_PATTERN = Pattern.compile(\"scoreHolde... | {
"body": "@Override\n public PluggableIAction unmarshal(final String iActionString) throws RuleModelDRLPersistenceException {\n String[] parameters = PersistenceExtensionUtils.unwrapParenthesis(iActionString).split(\"\\\\s*,\\\\s*\");\n\n if (parameters.length > 0 && \"kcontext\".equals(parameters[0... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_3 | {
"fields": [
{
"declarator": "assetsUsageService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private AssetsUsageService assetsUsageService;",
"type": "AssetsUsageService",
"var_name": "assetsUsageService"
},
{
"declarator": "saveValidator",
... | {
"body": "@Test\n public void checkNotAPlanningSolution() {\n DataObject dataObject = new DataObjectImpl(\"test\",\n \"Test\");\n\n Collection<ValidationMessage> result = saveValidator.validate(mock(Path.class),\n ... | {
"fields": [
{
"declarator": "assetsUsageService",
"modifier": "private",
"original_string": "private AssetsUsageService assetsUsageService;",
"type": "AssetsUsageService",
"var_name": "assetsUsageService"
}
],
"file": "optaplanner-wb-screens/optaplanner-wb-domain-editor/opt... | {
"body": "@Override\n public Collection<ValidationMessage> validate(final Path dataObjectPath,\n final DataObject dataObject) {\n if (dataObject != null && dataObject.getAnnotation(PLANNING_SOLUTION_ANNOTATION) != null) {\n List<Path> planningSolu... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_95 | {
"fields": [
{
"declarator": "widget",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ConstraintMatchInputWidget widget;",
"type": "ConstraintMatchInputWidget",
"var_name": "widget"
},
{
"declarator": "translationService",
"modifier": "@... | {
"body": "@Test\n public void numberConstraintMatch() throws Exception {\n when(widget.getConstraintMatchValue()).thenReturn(\"123\");\n\n handler.onBlur(mock(BlurEvent.class));\n\n verify(widget,\n never()).showError(anyString());\n verify(widget).clearError();\n }",
... | {
"fields": [
{
"declarator": "widget",
"modifier": "private",
"original_string": "private ConstraintMatchInputWidget widget;",
"type": "ConstraintMatchInputWidget",
"var_name": "widget"
},
{
"declarator": "translationService",
"modifier": "private",
"origin... | {
"body": "@Override\n public void onBlur(BlurEvent event) {\n String inputValue = widget.getConstraintMatchValue();\n if (inputValue == null || inputValue.trim().isEmpty()) {\n widget.showError(translationService.getTranslation(ConstraintMatchInputWidgetBlurHandler_EmptyValuesAreNotAllowe... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_116 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock",
"original_string": "@Mock\n ScoreDirectorFactoryFormView view;",
"type": "ScoreDirectorFactoryFormView",
"var_name": "view"
},
{
"declarator": "path",
"modifier": "@Mock\n private",
"original_s... | {
"body": "@Test\n public void setModel() throws Exception {\n ScoreDirectorFactoryConfigModel model = new ScoreDirectorFactoryConfigModel();\n model.setKSessionName(\"someSession\");\n\n form.setModel(model,\n path);\n\n verify(view).setKSession(\"someSession\",\n ... | {
"fields": [
{
"declarator": "view",
"modifier": "private",
"original_string": "private ScoreDirectorFactoryFormView view;",
"type": "ScoreDirectorFactoryFormView",
"var_name": "view"
},
{
"declarator": "model",
"modifier": "private",
"original_string": "pr... | {
"body": "public void setModel(final ScoreDirectorFactoryConfigModel model,\n final Path path) {\n this.model = model;\n\n view.setKSession(model.getKSessionName(),\n path);\n }",
"class_method_signature": "ScoreDirectorFactoryForm.setModel(final Sco... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_141 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PhaseConfigFormView view;",
"type": "PhaseConfigFormView",
"var_name": "view"
},
{
"declarator": "constructionHeuristicFormProvider",
"modifier": "@Mock\... | {
"body": "@Test\n public void removeConstructionHeuristic() {\n phaseConfigForm.removeConstructionHeuristic(constructionHeuristicForm);\n verify(view).removeConstructionHeuristic(constructionHeuristicForm.getElement());\n }",
"class_method_signature": "PhaseConfigFormTest.removeConstructionHeur... | {
"fields": [
{
"declarator": "model",
"modifier": "private",
"original_string": "private List<PhaseConfigModel> model;",
"type": "List<PhaseConfigModel>",
"var_name": "model"
},
{
"declarator": "phaseFormList = new ArrayList()",
"modifier": "private",
"orig... | {
"body": "public void removeConstructionHeuristic(final ConstructionHeuristicForm constructionHeuristicForm) {\n phaseFormList.remove(constructionHeuristicForm);\n view.removeConstructionHeuristic(constructionHeuristicForm.getElement());\n model.remove(constructionHeuristicForm.getModel());\n ... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_56 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PlannerDataObjectEditorView view;",
"type": "PlannerDataObjectEditorView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": "@Mock... | {
"body": "@Test\n public void getFindClassUsagesCallbackObjectIsNotAPlanningSolution() {\n PlannerDataObjectEditor objectEditor = createObjectEditor();\n\n Path solutionPath = PathFactory.newPath(\"PlanningSolution.java\",\n \"default:///test/PlanningSo... | {
"fields": [
{
"declarator": "view",
"modifier": "private",
"original_string": "private PlannerDataObjectEditorView view;",
"type": "PlannerDataObjectEditorView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": "private",
"original_s... | {
"body": "RemoteCallback<List<Path>> getFindClassUsagesCallback() {\n return new RemoteCallback<List<Path>>() {\n @Override\n public void callback(List<Path> paths) {\n if (context != null) {\n // Remove current data object from the path list\n ... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_40 | {
"fields": [
{
"declarator": "ioService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private IOService ioService;",
"type": "IOService",
"var_name": "ioService"
},
{
"declarator": "comparatorDefinitionService",
"modifier": "@Mock\n privat... | {
"body": "@Test\n public void generationResultErrorsIsNull() {\n generationResult.setErrors(null);\n DataObject dataObject = mock(DataObject.class);\n generationResult.setDataObject(dataObject);\n plannerDataModelerHelperUtils.updateDataObject(dataObjectPath);\n\n verify(dataObj... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(PlannerDataModelerHelperUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(PlannerDataModelerHelperUtils.class);",
"type": "Logger",
"var_n... | {
"body": "public void updateDataObject(Path dataObjectPath) {\n String dataObjectString = ioService.readAllString(Paths.convert(dataObjectPath));\n\n GenerationResult generationResult = dataModelerService.loadDataObject(dataObjectPath,\n ... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_100 | {
"fields": [
{
"declarator": "path",
"modifier": "@Mock",
"original_string": "@Mock\n Path path;",
"type": "Path",
"var_name": "path"
},
{
"declarator": "solverValidator",
"modifier": "private",
"original_string": "private SolverValidator solverValidator... | {
"body": "@Test\n public void projectPlannerError() throws Exception {\n\n final String url = \"/ProjectPlannerError/src/main/resources/cb/my.solver.xml\";\n\n org.uberfire.java.nio.file.Path path = testFileSystem.fileSystemProvider.getPath(this.getClass().getResource(url).toURI());\n\n final... | {
"fields": [
{
"declarator": "SMOKE_TEST_MILLISECONDS_SPENT_LIMIT = 3000",
"modifier": "private static final",
"original_string": "private static final long SMOKE_TEST_MILLISECONDS_SPENT_LIMIT = 3000;",
"type": "long",
"var_name": "SMOKE_TEST_MILLISECONDS_SPENT_LIMIT"
},
{
... | {
"body": "public List<ValidationMessage> validate(final Path resourcePath,\n final String content) {\n return validate(resourcePath,\n content,\n false);\n }",
"class_method_signature": "SolverValidator.validate(fina... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_17 | {
"fields": [
{
"declarator": "deleteValidator",
"modifier": "private",
"original_string": "private PlanningScoreDeleteValidator deleteValidator;",
"type": "PlanningScoreDeleteValidator",
"var_name": "deleteValidator"
}
],
"file": "optaplanner-wb-screens/optaplanner-wb-domain... | {
"body": "@Test\n public void validateIsNotAPlanningScore() {\n DataObject dataObject = new DataObjectImpl(\"test\",\n \"PlainDataObject\");\n ObjectProperty objectProperty = new ObjectPropertyImpl(\"notAPlanningScore\",\n ... | {
"fields": [],
"file": "optaplanner-wb-screens/optaplanner-wb-domain-editor/optaplanner-wb-domain-editor-backend/src/main/java/org/optaplanner/workbench/screens/domaineditor/backend/server/validation/PlanningScoreDeleteValidator.java",
"identifier": "PlanningScoreDeleteValidator",
"interfaces": "implements Obj... | {
"body": "@Override\n public Collection<ValidationMessage> validate(final DataObject dataObject,\n final ObjectProperty objectProperty) {\n final boolean isGeneratedPlanningScoreField =\n dataObject != null\n && dataObje... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_60 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private DataObjectFieldPickerView view;",
"type": "DataObjectFieldPickerView",
"var_name": "view"
},
{
"declarator": "fieldPickerItemProducer",
"modifier": "@Moc... | {
"body": "@Test\n public void initWhenComparatorObjectNotSpecified() {\n fieldPicker.init(mock(DataModel.class),\n mock(DataObject.class),\n null,\n editor);\n verify(view,\n times(1)).displayComparatorCheckbox(tru... | {
"fields": [
{
"declarator": "fieldPickerItemList = new ArrayList<>()",
"modifier": "private",
"original_string": "private List<DataObjectFieldPickerItem> fieldPickerItemList = new ArrayList<>();",
"type": "List<DataObjectFieldPickerItem>",
"var_name": "fieldPickerItemList"
},
... | {
"body": "public void init(DataModel dataModel,\n DataObject rootDataObject,\n List<ObjectPropertyPath> objectPropertyPaths,\n PlannerDataObjectEditorView.Presenter presenter) {\n this.dataModel = dataModel;\n this.rootDataObject = rootDataObj... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_37 | {
"fields": [
{
"declarator": "ioService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private IOService ioService;",
"type": "IOService",
"var_name": "ioService"
},
{
"declarator": "dataModelerService",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void sourceDataObjectIsNotPlanningSolution() {\n DataObject dataObject = new DataObjectImpl(\"test\", \"TestSource\");\n generationResult.setDataObject(dataObject);\n\n deleteHelper.postProcess(sourcePath);\n\n verify(ioService, never()).exists(any());\n }",... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PlanningSolutionDeleteHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PlanningSolutionDeleteHelper.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public void postProcess(final Path path) {\n String dataObjectSource = ioService.readAllString(Paths.convert(path));\n GenerationResult generationResult = dataModelerService.loadDataObject(path,\n data... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_120 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private TerminationTreeItemContentView view;",
"type": "TerminationTreeItemContentView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": ... | {
"body": "@Test\n public void setNonNestedTerminationConfigOption() {\n terminationTreeItemContent.setTerminationConfigOption(TerminationConfigOption.MILLISECONDS_SPENT_LIMIT);\n verify(view).setNestedTreeItem(false);\n verify(view,\n times(0)).setDropDownHelpContent(any());\n ... | {
"fields": [
{
"declarator": "MINUTES_SPENT_DEFAULT_VALUE = 5L",
"modifier": "public static final",
"original_string": "public static final long MINUTES_SPENT_DEFAULT_VALUE = 5L;",
"type": "long",
"var_name": "MINUTES_SPENT_DEFAULT_VALUE"
},
{
"declarator": "UNIMPROVED... | {
"body": "public void setTerminationConfigOption(TerminationConfigOption terminationConfigOption) {\n this.terminationConfigOption = terminationConfigOption;\n view.setNestedTreeItem(terminationConfigOption == NESTED);\n if (terminationConfigOption == NESTED) {\n view.setDropDownHelpC... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_21 | {
"fields": [
{
"declarator": "dataModelerService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private DataModelerService dataModelerService;",
"type": "DataModelerService",
"var_name": "dataModelerService"
},
{
"declarator": "ioService",
"mo... | {
"body": "@Test\n public void checkDataObjectIsNotAPlanningSolution() {\n DataObject dataObject = new DataObjectImpl(\"test\",\n \"Test\");\n\n Collection<ValidationMessage> result = copyValidator.validate(dataObjectPath,\n ... | {
"fields": [
{
"declarator": "dataModelerService",
"modifier": "private",
"original_string": "private DataModelerService dataModelerService;",
"type": "DataModelerService",
"var_name": "dataModelerService"
},
{
"declarator": "ioService",
"modifier": "private",
... | {
"body": "@Override\n public Collection<ValidationMessage> validate(final Path dataObjectPath,\n final DataObject dataObject) {\n if (dataObject != null && dataObject.getAnnotation(PLANNING_SOLUTION_ANNOTATION) != null) {\n return Arrays.asList(ne... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_136 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private TerminationTreeItemContentView view;",
"type": "TerminationTreeItemContentView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": ... | {
"body": "@Test\n public void setExistingTerminationCompositionStyleValue() {\n terminationTreeItemContent.setExistingValue(TerminationCompositionStyleModel.AND,\n TerminationConfigOption.TERMINATION_COMPOSITION_STYLE);\n\n verify(view).setTerminati... | {
"fields": [
{
"declarator": "MINUTES_SPENT_DEFAULT_VALUE = 5L",
"modifier": "public static final",
"original_string": "public static final long MINUTES_SPENT_DEFAULT_VALUE = 5L;",
"type": "long",
"var_name": "MINUTES_SPENT_DEFAULT_VALUE"
},
{
"declarator": "UNIMPROVED... | {
"body": "public void setExistingValue(Object value,\n TerminationConfigOption terminationConfigOption) {\n TerminationManager operation = terminationManagerMap.get(terminationConfigOption);\n if (operation != null) {\n operation.setExistingValue(value);\n ... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_76 | {
"fields": [
{
"declarator": "extension = new HardConstraintMatchPersistenceExtension()",
"modifier": "private",
"original_string": "private HardConstraintMatchPersistenceExtension extension = new HardConstraintMatchPersistenceExtension();",
"type": "HardConstraintMatchPersistenceExtensio... | {
"body": "@Test\n public void unmarshalActionBendableHardConstraintMatch() throws RuleModelDRLPersistenceException {\n String actionString = \"scoreHolder.addHardConstraintMatch(kcontext, 1, -1);\";\n\n IAction action = extension.unmarshal(actionString);\n\n assertTrue(action instanceof Actio... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(HardConstraintMatchPersistenceExtension.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(HardConstraintMatchPersistenceExtension.class);",
"type": "L... | {
"body": "@Override\n public PluggableIAction unmarshal(final String iActionString) throws RuleModelDRLPersistenceException {\n List<String> parameters = StringUtils.splitArgumentsList(PersistenceExtensionUtils.unwrapParenthesis(iActionString));\n\n if (!parameters.isEmpty() && \"kcontext\".equals(p... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_99 | {
"fields": [
{
"declarator": "path",
"modifier": "@Mock",
"original_string": "@Mock\n Path path;",
"type": "Path",
"var_name": "path"
},
{
"declarator": "solverValidator",
"modifier": "private",
"original_string": "private SolverValidator solverValidator... | {
"body": "@Test\n public void projectBuildError() throws Exception {\n\n final String url = \"/ProjectBuildError/src/main/resources/cb/my.solver.xml\";\n\n org.uberfire.java.nio.file.Path path = testFileSystem.fileSystemProvider.getPath(this.getClass().getResource(url).toURI());\n\n final Lis... | {
"fields": [
{
"declarator": "SMOKE_TEST_MILLISECONDS_SPENT_LIMIT = 3000",
"modifier": "private static final",
"original_string": "private static final long SMOKE_TEST_MILLISECONDS_SPENT_LIMIT = 3000;",
"type": "long",
"var_name": "SMOKE_TEST_MILLISECONDS_SPENT_LIMIT"
},
{
... | {
"body": "public List<ValidationMessage> validate(final Path resourcePath,\n final String content) {\n return validate(resourcePath,\n content,\n false);\n }",
"class_method_signature": "SolverValidator.validate(fina... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_77 | {
"fields": [
{
"declarator": "extension = new SoftConstraintMatchPersistenceExtension()",
"modifier": "private",
"original_string": "private SoftConstraintMatchPersistenceExtension extension = new SoftConstraintMatchPersistenceExtension();",
"type": "SoftConstraintMatchPersistenceExtensio... | {
"body": "@Test\n public void acceptString() {\n assertTrue(extension.accept(\"scoreHolder.addSoftConstraintMatch(kcontext, -1);\"));\n assertTrue(extension.accept(\"scoreHolder.addSoftConstraintMatch(kcontext, 1, -1);\"));\n\n assertFalse(extension.accept(\"unknownString\"));\n }",
"cla... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(SoftConstraintMatchPersistenceExtension.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(SoftConstraintMatchPersistenceExtension.class);",
"type": "L... | {
"body": "@Override\n public boolean accept(final String iActionString) {\n return CONSTRAINT_MATCH_PATTERN.matcher(iActionString).matches();\n }",
"class_method_signature": "SoftConstraintMatchPersistenceExtension.accept(final String iActionString)",
"constructor": false,
"full_signature": "@Over... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_98 | {
"fields": [
{
"declarator": "path",
"modifier": "@Mock",
"original_string": "@Mock\n Path path;",
"type": "Path",
"var_name": "path"
},
{
"declarator": "solverValidator",
"modifier": "private",
"original_string": "private SolverValidator solverValidator... | {
"body": "@Test\n public void projectWorks() throws Exception {\n\n final String url = \"/ProjectWorks/src/main/resources/cb/my.solver.xml\";\n\n org.uberfire.java.nio.file.Path path = testFileSystem.fileSystemProvider.getPath(this.getClass().getResource(url).toURI());\n\n final List<Validati... | {
"fields": [
{
"declarator": "SMOKE_TEST_MILLISECONDS_SPENT_LIMIT = 3000",
"modifier": "private static final",
"original_string": "private static final long SMOKE_TEST_MILLISECONDS_SPENT_LIMIT = 3000;",
"type": "long",
"var_name": "SMOKE_TEST_MILLISECONDS_SPENT_LIMIT"
},
{
... | {
"body": "public List<ValidationMessage> validate(final Path resourcePath,\n final String content) {\n return validate(resourcePath,\n content,\n false);\n }",
"class_method_signature": "SolverValidator.validate(fina... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_20 | {
"fields": [
{
"declarator": "dataModelerService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private DataModelerService dataModelerService;",
"type": "DataModelerService",
"var_name": "dataModelerService"
},
{
"declarator": "ioService",
"mo... | {
"body": "@Test\n public void accept() {\n assertTrue(copyValidator.accept(dataObjectPath));\n Path propertiesPath = mock(Path.class);\n when(propertiesPath.getFileName()).thenReturn(\"Test.properties\");\n assertFalse(copyValidator.accept(propertiesPath));\n }",
"class_method_sig... | {
"fields": [
{
"declarator": "dataModelerService",
"modifier": "private",
"original_string": "private DataModelerService dataModelerService;",
"type": "DataModelerService",
"var_name": "dataModelerService"
},
{
"declarator": "ioService",
"modifier": "private",
... | {
"body": "@Override\n public boolean accept(final Path path) {\n return path.getFileName().endsWith(\".java\");\n }",
"class_method_signature": "PlanningSolutionCopyValidator.accept(final Path path)",
"constructor": false,
"full_signature": "@Override public boolean accept(final Path path)",
"id... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_137 | {
"fields": [
{
"declarator": "terminationConfigFormView",
"modifier": "private",
"original_string": "private TerminationConfigFormViewImpl terminationConfigFormView;",
"type": "TerminationConfigFormViewImpl",
"var_name": "terminationConfigFormView"
},
{
"declarator": "... | {
"body": "@Test\n public void initTree() {\n TreeItem treeItem = new TreeItem();\n terminationConfigFormView.initTree(treeItem);\n verify(tree).clear();\n verify(tree).addItem(treeItem);\n }",
"class_method_signature": "TerminationConfigFormViewImplTest.initTree()",
"constructor... | {
"fields": [
{
"declarator": "tree",
"modifier": "@DataField(\"tree\")",
"original_string": "@DataField(\"tree\")\n Tree tree;",
"type": "Tree",
"var_name": "tree"
},
{
"declarator": "emptyTreeLabel",
"modifier": "@Inject\n @DataField(\"emptyTreeLabel\")",
... | {
"body": "@Override\n public void initTree(TreeItem rootTreeItem) {\n this.tree.clear();\n this.tree.addItem(rootTreeItem);\n }",
"class_method_signature": "TerminationConfigFormViewImpl.initTree(TreeItem rootTreeItem)",
"constructor": false,
"full_signature": "@Override public void initTre... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_36 | {
"fields": [
{
"declarator": "ioService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private IOService ioService;",
"type": "IOService",
"var_name": "ioService"
},
{
"declarator": "dataModelerService",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void sourceDataObjectIsNull() {\n generationResult.setDataObject(null);\n\n // must not throw NPE\n deleteHelper.postProcess(sourcePath);\n\n verify(ioService, never()).exists(any());\n }",
"class_method_signature": "PlanningSolutionDeleteHelperTest.source... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(PlanningSolutionDeleteHelper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PlanningSolutionDeleteHelper.class);",
"type": "Logger",
"var_nam... | {
"body": "@Override\n public void postProcess(final Path path) {\n String dataObjectSource = ioService.readAllString(Paths.convert(path));\n GenerationResult generationResult = dataModelerService.loadDataObject(path,\n data... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_121 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private TerminationTreeItemContentView view;",
"type": "TerminationTreeItemContentView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": ... | {
"body": "@Test\n public void setTreeItem() {\n TreeItem treeItem = new TreeItem();\n terminationTreeItemContent.setTreeItem(treeItem);\n verify(view,\n times(1)).setRoot(true);\n }",
"class_method_signature": "TerminationTreeItemContentTest.setTreeItem()",
"constructor":... | {
"fields": [
{
"declarator": "MINUTES_SPENT_DEFAULT_VALUE = 5L",
"modifier": "public static final",
"original_string": "public static final long MINUTES_SPENT_DEFAULT_VALUE = 5L;",
"type": "long",
"var_name": "MINUTES_SPENT_DEFAULT_VALUE"
},
{
"declarator": "UNIMPROVED... | {
"body": "public void setTreeItem(TreeItem treeItem) {\n this.treeItem = treeItem;\n view.setRoot(treeItem.getParentItem() == null);\n }",
"class_method_signature": "TerminationTreeItemContent.setTreeItem(TreeItem treeItem)",
"constructor": false,
"full_signature": "public void setTreeItem(Tre... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_61 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private DataObjectFieldPickerView view;",
"type": "DataObjectFieldPickerView",
"var_name": "view"
},
{
"declarator": "fieldPickerItemProducer",
"modifier": "@Moc... | {
"body": "@Test\n public void addFieldPickerItem() {\n initFieldPicker();\n when(fieldPickerItemProducer.get()).thenReturn(mock(DataObjectFieldPickerItem.class));\n fieldPicker.addFieldPickerItem();\n verify(view,\n times(1)).addFieldPickerItem(any(DataObjectFieldPickerIt... | {
"fields": [
{
"declarator": "fieldPickerItemList = new ArrayList<>()",
"modifier": "private",
"original_string": "private List<DataObjectFieldPickerItem> fieldPickerItemList = new ArrayList<>();",
"type": "List<DataObjectFieldPickerItem>",
"var_name": "fieldPickerItemList"
},
... | {
"body": "@Override\n public DataObjectFieldPickerItem addFieldPickerItem() {\n DataObjectFieldPickerItem fieldPickerItem = fieldPickerItemProducer.get();\n fieldPickerItem.init(dataModel,\n rootDataObject,\n this);\n fieldPickerItemList... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_101 | {
"fields": [
{
"declarator": "saveAndRenameService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private SaveAndRenameServiceImpl<SolverConfigModel, Metadata> saveAndRenameService;",
"type": "SaveAndRenameServiceImpl<SolverConfigModel, Metadata>",
"var_name": "s... | {
"body": "@Test\n public void testInit() throws Exception {\n service.init();\n\n verify(saveAndRenameService).init(service);\n }",
"class_method_signature": "SolverEditorServiceImplTest.testInit()",
"constructor": false,
"full_signature": "@Test public void testInit()",
"identifier": "te... | {
"fields": [
{
"declarator": "ioService",
"modifier": "@Inject\n @Named(\"ioStrategy\")\n private",
"original_string": "@Inject\n @Named(\"ioStrategy\")\n private IOService ioService;",
"type": "IOService",
"var_name": "ioService"
},
{
"declarator": "copySe... | {
"body": "@PostConstruct\n public void init() {\n saveAndRenameService.init(this);\n }",
"class_method_signature": "SolverEditorServiceImpl.init()",
"constructor": false,
"full_signature": "@PostConstruct public void init()",
"identifier": "init",
"invocations": [
"init"
],
"modifiers"... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_16 | {
"fields": [
{
"declarator": "deleteValidator",
"modifier": "private",
"original_string": "private PlanningScoreDeleteValidator deleteValidator;",
"type": "PlanningScoreDeleteValidator",
"var_name": "deleteValidator"
}
],
"file": "optaplanner-wb-screens/optaplanner-wb-domain... | {
"body": "@Test\n public void validateIsAPlanningScore() {\n DataObject dataObject = new DataObjectImpl(\"test\",\n \"PlanningSolution\");\n dataObject.addAnnotation(new AnnotationImpl(DriverUtils.buildAnnotationDefinition(PlanningSolution.class)));\... | {
"fields": [],
"file": "optaplanner-wb-screens/optaplanner-wb-domain-editor/optaplanner-wb-domain-editor-backend/src/main/java/org/optaplanner/workbench/screens/domaineditor/backend/server/validation/PlanningScoreDeleteValidator.java",
"identifier": "PlanningScoreDeleteValidator",
"interfaces": "implements Obj... | {
"body": "@Override\n public Collection<ValidationMessage> validate(final DataObject dataObject,\n final ObjectProperty objectProperty) {\n final boolean isGeneratedPlanningScoreField =\n dataObject != null\n && dataObje... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_41 | {
"fields": [
{
"declarator": "ioService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private IOService ioService;",
"type": "IOService",
"var_name": "ioService"
},
{
"declarator": "comparatorDefinitionService",
"modifier": "@Mock\n privat... | {
"body": "@Test\n public void generationResultErrorsIsEmpty() {\n generationResult.setErrors(Collections.emptyList());\n DataObject dataObject = mock(DataObject.class);\n generationResult.setDataObject(dataObject);\n plannerDataModelerHelperUtils.updateDataObject(dataObjectPath);\n\n ... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(PlannerDataModelerHelperUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(PlannerDataModelerHelperUtils.class);",
"type": "Logger",
"var_n... | {
"body": "public void updateDataObject(Path dataObjectPath) {\n String dataObjectString = ioService.readAllString(Paths.convert(dataObjectPath));\n\n GenerationResult generationResult = dataModelerService.loadDataObject(dataObjectPath,\n ... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_140 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PhaseConfigFormView view;",
"type": "PhaseConfigFormView",
"var_name": "view"
},
{
"declarator": "constructionHeuristicFormProvider",
"modifier": "@Mock\... | {
"body": "@Test\n public void addConstructionHeuristicExisting() {\n addConstructionHeuristic(false);\n }",
"class_method_signature": "PhaseConfigFormTest.addConstructionHeuristicExisting()",
"constructor": false,
"full_signature": "@Test public void addConstructionHeuristicExisting()",
"identif... | {
"fields": [
{
"declarator": "model",
"modifier": "private",
"original_string": "private List<PhaseConfigModel> model;",
"type": "List<PhaseConfigModel>",
"var_name": "model"
},
{
"declarator": "phaseFormList = new ArrayList()",
"modifier": "private",
"orig... | {
"body": "public void addConstructionHeuristic() {\n ConstructionHeuristicPhaseConfigModel constructionHeuristicPhaseConfigModel = new ConstructionHeuristicPhaseConfigModel();\n model.add(constructionHeuristicPhaseConfigModel);\n addConstructionHeuristic(constructionHeuristicPhaseConfigModel);\n... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_57 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PlannerDataObjectEditorView view;",
"type": "PlannerDataObjectEditorView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": "@Mock... | {
"body": "@Test\n public void getFindClassUsagesCallbackObjectWithoutContext() {\n PlannerDataObjectEditor objectEditor = createObjectEditor();\n objectEditor.onContextChange(null);\n\n objectEditor.getFindClassUsagesCallback().callback(Collections.emptyList());\n\n verify(view, never(... | {
"fields": [
{
"declarator": "view",
"modifier": "private",
"original_string": "private PlannerDataObjectEditorView view;",
"type": "PlannerDataObjectEditorView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": "private",
"original_s... | {
"body": "RemoteCallback<List<Path>> getFindClassUsagesCallback() {\n return new RemoteCallback<List<Path>>() {\n @Override\n public void callback(List<Path> paths) {\n if (context != null) {\n // Remove current data object from the path list\n ... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_117 | {
"fields": [
{
"declarator": "view",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private TerminationTreeItemContentView view;",
"type": "TerminationTreeItemContentView",
"var_name": "view"
},
{
"declarator": "translationService",
"modifier": ... | {
"body": "@Test\n public void removeNestedDropDownOption() {\n terminationTreeItemContent.removeDropDownOption(TerminationConfigOption.NESTED);\n verify(view,\n times(0)).removeDropDownOption(any());\n }",
"class_method_signature": "TerminationTreeItemContentTest.removeNestedDropD... | {
"fields": [
{
"declarator": "MINUTES_SPENT_DEFAULT_VALUE = 5L",
"modifier": "public static final",
"original_string": "public static final long MINUTES_SPENT_DEFAULT_VALUE = 5L;",
"type": "long",
"var_name": "MINUTES_SPENT_DEFAULT_VALUE"
},
{
"declarator": "UNIMPROVED... | {
"body": "public void removeDropDownOption(TerminationConfigOption terminationConfigOption) {\n if (terminationConfigOption != NESTED) {\n view.removeDropDownOption(terminationConfigOption);\n }\n }",
"class_method_signature": "TerminationTreeItemContent.removeDropDownOption(Termination... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_94 | {
"fields": [
{
"declarator": "widget",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ConstraintMatchInputWidget widget;",
"type": "ConstraintMatchInputWidget",
"var_name": "widget"
},
{
"declarator": "translationService",
"modifier": "@... | {
"body": "@Test\n public void whiteSpaceConstraintMatch() throws Exception {\n when(widget.getConstraintMatchValue()).thenReturn(\" \");\n when(translationService.getTranslation(GuidedRuleEditorConstants.ConstraintMatchInputWidgetBlurHandler_EmptyValuesAreNotAllowedForModifyScore))\n ... | {
"fields": [
{
"declarator": "widget",
"modifier": "private",
"original_string": "private ConstraintMatchInputWidget widget;",
"type": "ConstraintMatchInputWidget",
"var_name": "widget"
},
{
"declarator": "translationService",
"modifier": "private",
"origin... | {
"body": "@Override\n public void onBlur(BlurEvent event) {\n String inputValue = widget.getConstraintMatchValue();\n if (inputValue == null || inputValue.trim().isEmpty()) {\n widget.showError(translationService.getTranslation(ConstraintMatchInputWidgetBlurHandler_EmptyValuesAreNotAllowe... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_2 | {
"fields": [
{
"declarator": "assetsUsageService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private AssetsUsageService assetsUsageService;",
"type": "AssetsUsageService",
"var_name": "assetsUsageService"
},
{
"declarator": "saveValidator",
... | {
"body": "@Test\n public void checkDataObjectIsNull() {\n Collection<ValidationMessage> result = saveValidator.validate(mock(Path.class),\n null);\n assertEquals(0, result.size());\n }",
"class_method_signature": "PlanningSolu... | {
"fields": [
{
"declarator": "assetsUsageService",
"modifier": "private",
"original_string": "private AssetsUsageService assetsUsageService;",
"type": "AssetsUsageService",
"var_name": "assetsUsageService"
}
],
"file": "optaplanner-wb-screens/optaplanner-wb-domain-editor/opt... | {
"body": "@Override\n public Collection<ValidationMessage> validate(final Path dataObjectPath,\n final DataObject dataObject) {\n if (dataObject != null && dataObject.getAnnotation(PLANNING_SOLUTION_ANNOTATION) != null) {\n List<Path> planningSolu... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_82 | {
"fields": [
{
"declarator": "extension = new MediumConstraintMatchPersistenceExtension()",
"modifier": "private",
"original_string": "private MediumConstraintMatchPersistenceExtension extension = new MediumConstraintMatchPersistenceExtension();",
"type": "MediumConstraintMatchPersistence... | {
"body": "@Test\n public void unmarshalMediumConstraintMatch() throws RuleModelDRLPersistenceException {\n String actionString = \"scoreHolder.addMediumConstraintMatch(kcontext, -1);\";\n\n IAction action = extension.unmarshal(actionString);\n\n assertTrue(action instanceof ActionMediumConstr... | {
"fields": [
{
"declarator": "CONSTRAINT_MATCH_PATTERN = Pattern.compile(\"scoreHolder\\\\.addMediumConstraintMatch\\\\(\\\\s*kcontext\\\\s*,.+\\\\);\")",
"modifier": "private static final",
"original_string": "private static final Pattern CONSTRAINT_MATCH_PATTERN = Pattern.compile(\"scoreHolde... | {
"body": "@Override\n public PluggableIAction unmarshal(final String iActionString) throws RuleModelDRLPersistenceException {\n String[] parameters = PersistenceExtensionUtils.unwrapParenthesis(iActionString).split(\"\\\\s*,\\\\s*\");\n\n if (parameters.length > 0 && \"kcontext\".equals(parameters[0... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
34793185_66 | {
"fields": [
{
"declarator": "translationService",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private TranslationService translationService;",
"type": "TranslationService",
"var_name": "translationService"
},
{
"declarator": "fieldMetadataProvider... | {
"body": "@Test\n public void getFieldMetadataMatchingField() {\n Annotation planningScoreAnnotation = new AnnotationImpl(DriverUtils.buildAnnotationDefinition(PlanningScore.class));\n ObjectProperty matchingField = new ObjectPropertyImpl(\"matchingField\",\n ... | {
"fields": [
{
"declarator": "PLANNER_ANNOTATION_DESCRIPTION_MAP = new HashMap<>(3)",
"modifier": "private",
"original_string": "private Map<String, String> PLANNER_ANNOTATION_DESCRIPTION_MAP = new HashMap<>(3);",
"type": "Map<String, String>",
"var_name": "PLANNER_ANNOTATION_DESCRI... | {
"body": "@Override\n public Optional<FieldMetadata> getFieldMetadata(ObjectProperty objectProperty) {\n if (objectProperty.getAnnotations() != null) {\n return objectProperty.getAnnotations()\n .stream()\n .map(p -> PLANNER_ANNOTATION_DESCRIPTION_MAP.get(p.... | {
"created": "4/29/2015 12:43:09 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 34793185,
"size": null,
"stargazer_count": null,
"stars": 16,
"updates": "2020-01-23T12:14:11+00:00",
"url": "https://github.com/kiegroup/optapla... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.