id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
1583138_58
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgInkscapeUtilsTest.java", "identifier": "SvgInkscapeUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testMatrixToSvgAttribute() {\n\t\tMatrix3f matrix = new Matrix3f();\n\t\tmatrix.setIdentity();\n\t\t\n\t\tmatrix.m00 = 1f;\n\t\tmatrix.m10 = 2f;\n\t\tmatrix.m01 = 3f;\n\t\tmatrix.m11 = 4f;\n\t\tmatrix.m02 = 5f;\n\t\tmatrix.m12 = 6f;\n\t\t\n\t\tString transformToAttribute = SvgInkscapeU...
{ "fields": [ { "declarator": "INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\"", "modifier": "public static final", "original_string": "public static final String INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\";", "type": "String", "var_name": "INKSCAPE" }, ...
{ "body": "public static String transformToAttribute(Matrix3f m) {\n\t\treturn SvgTransformUtils.serializeTransform(m);\n\t}", "class_method_signature": "SvgInkscapeUtils.transformToAttribute(Matrix3f m)", "constructor": false, "full_signature": "public static String transformToAttribute(Matrix3f m)", "identi...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_8
{ "fields": [ { "declarator": "monitor", "modifier": "", "original_string": "ButtonMonitorMock monitor;", "type": "ButtonMonitorMock", "var_name": "monitor" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/input/ButtonMonitorTest.java", "identifier"...
{ "body": "@Test\n\tpublic void holding() {\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tassertThat(monitor, MonitorMatcher.monitor(false, false, true));\n\t}", "class_method_signature": "ButtonMonitorTest.ho...
{ "fields": [ { "declarator": "pressed", "modifier": "", "original_string": "boolean pressed;", "type": "boolean", "var_name": "pressed" }, { "declarator": "released", "modifier": "", "original_string": "boolean released;", "type": "boolean", "va...
{ "body": "public void update() {\n\t\tboolean down = isDown();\n\t\tpressed = !wasDown && down;\n\t\treleased = wasDown && !down;\n\t\tholded = down && !pressed;\n\t\twasDown = down;\n\t}", "class_method_signature": "ButtonMonitor.update()", "constructor": false, "full_signature": "public void update()", "id...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_23
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnIsAliasWhenSameSprite() {\n\t\tTextureRegion region1 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tSprite sprite1 = new Sprite(region1);\n\t\tassertTrue(SpriteUtils.isAliasSprite(sprite1, sprite1));\n\t}", "class_method_signature": "SpriteUtilsTest.shouldRet...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_35
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertAllComponents() {\n\t\tColor color = new Color();\n\t\tint rgba8888 = Color.rgba8888(0.2f, 0.7f, 0.45f, 0.66f);\n\t\tColorUtils.rgba8888ToColor(color, rgba8888);\n\t\tassertEquals(0.2f, color.r, 0.01f);\n\t\tassertEquals(0.7f, color.g, 0.01f);\n\t\tassertEquals(0.45f, color....
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgba8888ToColor(Color color, int value) {\n\t\tColor.rgba8888ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgba8888ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgba8888ToColor(Color color, int value)", "identi...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_62
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/utils/AnimationUtilsTest.java", "identifier": "AnimationUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void test() {\n\t\tassertThat(AnimationUtils.secondsToFrame(0, 30), IsEqual.equalTo(0));\n\t\tassertThat(AnimationUtils.secondsToFrame(0.03333334f, 30), IsEqual.equalTo(1));\n\t\tassertThat(AnimationUtils.secondsToFrame(1f, 30), IsEqual.equalTo(30));\n\t}", "class_method_signature": "Anim...
{ "fields": [ { "declarator": "defaultPrecision = 1000", "modifier": "private final static", "original_string": "private final static int defaultPrecision = 1000;", "type": "int", "var_name": "defaultPrecision" } ], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/...
{ "body": "public static int secondsToFrame(float seconds, int fps) {\n\t\treturn (int) Math.floor(seconds * fps);\n\t}", "class_method_signature": "AnimationUtils.secondsToFrame(float seconds, int fps)", "constructor": false, "full_signature": "public static int secondsToFrame(float seconds, int fps)", "iden...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_63
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/utils/AnimationUtilsTest.java", "identifier": "AnimationUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void test2() {\n\t\tassertThat(AnimationUtils.framesToSeconds(0, 30), IsEqual.equalTo(0f));\n\t\tassertThat(AnimationUtils.framesToSeconds(1, 30), IsEqual.equalTo(1f / 30f));\n\t\tassertThat(AnimationUtils.framesToSeconds(30, 30), IsEqual.equalTo(1f));\n\t}", "class_method_signature": "An...
{ "fields": [ { "declarator": "defaultPrecision = 1000", "modifier": "private final static", "original_string": "private final static int defaultPrecision = 1000;", "type": "int", "var_name": "defaultPrecision" } ], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/...
{ "body": "public static float framesToSeconds(int frame, int fps) {\n\t\treturn ((float) frame / fps);\n\t}", "class_method_signature": "AnimationUtils.framesToSeconds(int frame, int fps)", "constructor": false, "full_signature": "public static float framesToSeconds(int frame, int fps)", "identifier": "frame...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_34
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertAlpha() {\n\t\tColor color = new Color();\n\t\tint rgba8888 = Color.rgba8888(0f, 0f, 0f, 1f);\n\t\tColorUtils.rgba8888ToColor(color, rgba8888);\n\t\tassertEquals(0f, color.r, 0.01f);\n\t\tassertEquals(0f, color.g, 0.01f);\n\t\tassertEquals(0f, color.b, 0.01f);\n\t\tassertEqu...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgba8888ToColor(Color color, int value) {\n\t\tColor.rgba8888ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgba8888ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgba8888ToColor(Color color, int value)", "identi...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_22
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnFalseIfSpriteNull() {\n\t\tTextureRegion region1 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tSprite sprite1 = new Sprite(region1);\n\t\tassertFalse(SpriteUtils.isAliasSprite(sprite1, null));\n\t\tassertFalse(SpriteUtils.isAliasSprite(null, sprite1));\n\t}", ...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_9
{ "fields": [ { "declarator": "monitor", "modifier": "", "original_string": "ButtonMonitorMock monitor;", "type": "ButtonMonitorMock", "var_name": "monitor" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/input/ButtonMonitorTest.java", "identifier"...
{ "body": "@Test\n\tpublic void released() {\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tassertThat(monitor, MonitorMatcher.monitor(false, true, false));\n\t}"...
{ "fields": [ { "declarator": "pressed", "modifier": "", "original_string": "boolean pressed;", "type": "boolean", "var_name": "pressed" }, { "declarator": "released", "modifier": "", "original_string": "boolean released;", "type": "boolean", "va...
{ "body": "public void update() {\n\t\tboolean down = isDown();\n\t\tpressed = !wasDown && down;\n\t\treleased = wasDown && !down;\n\t\tholded = down && !pressed;\n\t\twasDown = down;\n\t}", "class_method_signature": "ButtonMonitor.update()", "constructor": false, "full_signature": "public void update()", "id...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_59
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/processors/SvgDocumentProcessorTest.java", "identifier": "SvgDocumentProcessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void test() {\n\t\tInputStream svgStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"test-svguse.svg\");\n\n\t\tDocumentParser documentParser = new DocumentParser();\n\t\tDocument document = documentParser.parse(svgStream);\n\n\t\tSvgDocumentProcessor svgDocumentP...
{ "fields": [ { "declarator": "handler", "modifier": "", "original_string": "SvgElementProcessor handler;", "type": "SvgElementProcessor", "var_name": "handler" } ], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/svg/processors/SvgDocumentProcessor.java", "iden...
{ "body": "public void process(Document document, SvgElementProcessor handler) {\n\t\tthis.handler = handler;\n\t\tthis.handler.setDocument(document);\n\t\tElement root = document.getDocumentElement();\n\t\tinternalProcessElement(root);\n\t}", "class_method_signature": "SvgDocumentProcessor.process(Document documen...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_18
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/camera/MultipleVirtualViewportBuilderTest.java", "identifier": "MultipleVirtualViewportBuilderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldReturnVirtualViewportViewportWithHalfSizeTheMaxSize() {\n\t\tMultipleVirtualViewportBuilder multipleVirtualViewportBuilder = new MultipleVirtualViewportBuilder(800f, 480f, 854f, 600f);\n\t\tVirtualViewport virtualViewport = multipleVirtualViewportBuilder.getVirtualViewport(427f, ...
{ "fields": [ { "declarator": "minWidth", "modifier": "private final", "original_string": "private final float minWidth;", "type": "float", "var_name": "minWidth" }, { "declarator": "minHeight", "modifier": "private final", "original_string": "private final ...
{ "body": "public VirtualViewport getVirtualViewport(float width, float height) {\n\t\tif (width >= minWidth && width <= maxWidth && height >= minHeight && height <= maxHeight)\n\t\t\treturn new VirtualViewport(width, height, true);\n\n\t\tfloat aspect = width / height;\n\n\t\tfloat scaleForMinSize = minWidth / width...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_38
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertRgba565() {\n\t\tColor color = new Color();\n\t\tint rgb565 = Color.rgb565(0.2f, 0.4f, 0.6f);\n\t\tColorUtils.rgb565ToColor(color, rgb565);\n\t\tassertEquals(0.2f, color.r, 0.025f);\n\t\tassertEquals(0.4f, color.g, 0.025f);\n\t\tassertEquals(0.6f, color.b, 0.025f);\n\t}", ...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgb565ToColor(Color color, int value) {\n\t\tColor.rgb565ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgb565ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgb565ToColor(Color color, int value)", "identifier": "...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_5
{ "fields": [ { "declarator": "set", "modifier": "private", "original_string": "private RandomAccessSet<String> set;", "type": "RandomAccessSet<String>", "var_name": "set" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/utils/RandomAccessSetTest.java...
{ "body": "@Test\n\tpublic void aNewSetShouldBeEmpty(){\n\t\tAssert.assertTrue(set.isEmpty());\n\t}", "class_method_signature": "RandomAccessSetTest.aNewSetShouldBeEmpty()", "constructor": false, "full_signature": "@Test public void aNewSetShouldBeEmpty()", "identifier": "aNewSetShouldBeEmpty", "invocations...
{ "fields": [ { "declarator": "items = new ArrayList<T>()", "modifier": "", "original_string": "ArrayList<T> items = new ArrayList<T>();", "type": "ArrayList<T>", "var_name": "items" }, { "declarator": "positions = new ObjectIntMap<Object>()", "modifier": "", ...
{ "body": "@Override\n\tpublic boolean isEmpty() {\n\t\treturn items.isEmpty();\n\t}", "class_method_signature": "RandomAccessSet.isEmpty()", "constructor": false, "full_signature": "@Override public boolean isEmpty()", "identifier": "isEmpty", "invocations": [ "isEmpty" ], "modifiers": "@Override p...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_55
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgInkscapeUtilsTest.java", "identifier": "SvgInkscapeUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldParseScaleTransformWithTwoValues2() {\n\t\tString transformAttribute = \"scale(-1, 1)\";\n\n\t\tMatrix3f matrix = new Matrix3f();\n\t\tmatrix.setIdentity();\n\t\tSvgInkscapeUtils.parseTransformAttribute(transformAttribute, matrix);\n\n\t\tMatrix3f expectedMatrix = new Matrix3f(ne...
{ "fields": [ { "declarator": "INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\"", "modifier": "public static final", "original_string": "public static final String INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\";", "type": "String", "var_name": "INKSCAPE" }, ...
{ "body": "public static Matrix3f parseTransformAttribute(String transformAttribute, Matrix3f m) {\n\t\treturn SvgTransformUtils.parseTransform(transformAttribute, m);\n\t}", "class_method_signature": "SvgInkscapeUtils.parseTransformAttribute(String transformAttribute, Matrix3f m)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_43
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/games/SpatialHierarchicalImpl2Test.java", "identifier": "SpatialHierarchicalImpl2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldReturnParentAngle() {\n\t\tSpatial parent = new SpatialImpl(0f, 0f, 1f, 1f, 55f);\n\t\tSpatial child = new SpatialImpl(0f, 0f, 1f, 1f, 0f);\n\n\t\tSpatial hierarchicalSpatial = new SpatialHierarchicalImpl2(parent, child);\n\n\t\tassertThat(hierarchicalSpatial.getAngle(), IsEqual....
{ "fields": [ { "declarator": "parent", "modifier": "private final", "original_string": "private final Spatial parent;", "type": "Spatial", "var_name": "parent" }, { "declarator": "child", "modifier": "private final", "original_string": "private final Spatia...
{ "body": "@Override\n\tpublic float getAngle() {\n\t\treturn child.getAngle() + parent.getAngle();\n\t}", "class_method_signature": "SpatialHierarchicalImpl2.getAngle()", "constructor": false, "full_signature": "@Override public float getAngle()", "identifier": "getAngle", "invocations": [ "getAngle", ...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_14
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/camera/MultipleVirtualViewportBuilderTest.java", "identifier": "MultipleVirtualViewportBuilderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldReturnVirtualViewportForMaxSize() {\n\t\tMultipleVirtualViewportBuilder multipleVirtualViewportBuilder = new MultipleVirtualViewportBuilder(800f, 480f, 854f, 600f);\n\t\tVirtualViewport virtualViewport = multipleVirtualViewportBuilder.getVirtualViewport(854f, 600f);\n\t\tassertNo...
{ "fields": [ { "declarator": "minWidth", "modifier": "private final", "original_string": "private final float minWidth;", "type": "float", "var_name": "minWidth" }, { "declarator": "minHeight", "modifier": "private final", "original_string": "private final ...
{ "body": "public VirtualViewport getVirtualViewport(float width, float height) {\n\t\tif (width >= minWidth && width <= maxWidth && height >= minHeight && height <= maxHeight)\n\t\t\treturn new VirtualViewport(width, height, true);\n\n\t\tfloat aspect = width / height;\n\n\t\tfloat scaleForMinSize = minWidth / width...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_48
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testComplexPathWithLinesAndMoveTo() {\n\t\tString pathWithRelativeMove = \"M 100 100 L 300 100 L 200 300 z\";\n\t\tVector2f[] points = SvgConvertUtils.pathDataToVector2fList(pathWithRelativeMove);\n\n\t\tassertVectorEquals(100f, 100f, points[0]);\n\t\tassertVectorEquals(300f, 100f, poi...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static Vector2f[] pathDataToVector2fList(String d) {\n\t\tStringTokenizer tokens = new StringTokenizer(d, \", \");\n\n\t\tArrayList<Vector2f> pointList = new ArrayList<Vector2f>();\n\n\t\tVector2f currentLocation = new Vector2f(0f, 0f);\n\n\t\tCommand currentCommand = Command.None;\n\n\t\twhile (tok...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_25
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnIsAliasWhenRegionEquals() {\n\t\tTextureRegion region1 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tTextureRegion region2 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tSprite sprite1 = new Sprite(region1);\n\t\tSprite sprite2 = new Sprite(region...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_33
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertBlue() {\n\t\tColor color = new Color();\n\t\tint rgba8888 = Color.rgba8888(0f, 0f, 1f, 0f);\n\t\tColorUtils.rgba8888ToColor(color, rgba8888);\n\t\tassertEquals(0f, color.r, 0.01f);\n\t\tassertEquals(0f, color.g, 0.01f);\n\t\tassertEquals(1f, color.b, 0.01f);\n\t\tassertEqua...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgba8888ToColor(Color color, int value) {\n\t\tColor.rgba8888ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgba8888ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgba8888ToColor(Color color, int value)", "identi...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_64
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/utils/VersionTest.java", "identifier": "VersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testGreaterOrEqualThan() {\n\t\tVersion requiredVersion = new Version(\"1.6.0.10\");\n\n\t\tVersion version15 = new Version(\"1.5.0.0\");\n\t\tVersion lesserVersion = new Version(\"1.6.0.0\");\n\t\tVersion equalVersion = new Version(\"1.6.0.10\");\n\t\tVersion version1620 = new Version...
{ "fields": [ { "declarator": "numbers", "modifier": "", "original_string": "int[] numbers;", "type": "int[]", "var_name": "numbers" } ], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/utils/Version.java", "identifier": "Version", "interfaces": "", "methods...
{ "body": "public boolean greaterOrEqualThan(Version version) {\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tif (numbers[i] > version.numbers[i])\n\t\t\t\treturn true;\n\t\t\tif (numbers[i] < version.numbers[i])\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "class_method_signature": "Version.grea...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_13
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/camera/MultipleVirtualViewportBuilderTest.java", "identifier": "MultipleVirtualViewportBuilderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldReturnVirtualViewportForMinSize() {\n\t\tMultipleVirtualViewportBuilder multipleVirtualViewportBuilder = new MultipleVirtualViewportBuilder(800f, 480f, 854f, 600f);\n\t\tVirtualViewport virtualViewport = multipleVirtualViewportBuilder.getVirtualViewport(800f, 480f);\n\t\tassertNo...
{ "fields": [ { "declarator": "minWidth", "modifier": "private final", "original_string": "private final float minWidth;", "type": "float", "var_name": "minWidth" }, { "declarator": "minHeight", "modifier": "private final", "original_string": "private final ...
{ "body": "public VirtualViewport getVirtualViewport(float width, float height) {\n\t\tif (width >= minWidth && width <= maxWidth && height >= minHeight && height <= maxHeight)\n\t\t\treturn new VirtualViewport(width, height, true);\n\n\t\tfloat aspect = width / height;\n\n\t\tfloat scaleForMinSize = minWidth / width...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_44
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/games/SpatialHierarchicalImplTest.java", "identifier": "SpatialHierarchicalImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldReturnParentAngle() {\n\t\tSpatial parent = new SpatialImpl(0f, 0f, 1f, 1f, 55f);\n\t\tSpatial child = new SpatialHierarchicalImpl(parent, 1f, 1f);\n\t\tassertThat(child.getAngle(), IsEqual.equalTo(55f));\n\t}", "class_method_signature": "SpatialHierarchicalImplTest.shouldRetur...
{ "fields": [ { "declarator": "aux = new Vector2()", "modifier": "private final", "original_string": "private final Vector2 aux = new Vector2();", "type": "Vector2", "var_name": "aux" }, { "declarator": "localPosition = new Vector2()", "modifier": "private final",...
{ "body": "@Override\n\tpublic float getAngle() {\n\t\treturn localAngle + parent.getAngle();\n\t}", "class_method_signature": "SpatialHierarchicalImpl.getAngle()", "constructor": false, "full_signature": "@Override public float getAngle()", "identifier": "getAngle", "invocations": [ "getAngle" ], "...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_52
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testColorFromStyle() {\n\t\tColor color = SvgConvertUtils.fillColorFromStyle(\"fill:#ffff00;fill-opacity:0.8;display:inline\");\n\t\tassertColorEquals(1f, 1f, 0f, 0.8f, color);\n\t}", "class_method_signature": "SvgConvertUtilsTest.testColorFromStyle()", "constructor": false, "ful...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static Color fillColorFromStyle(String style) {\n\t\treturn fillColorFromStyle(new Color(), style);\n\t}", "class_method_signature": "SvgConvertUtils.fillColorFromStyle(String style)", "constructor": false, "full_signature": "public static Color fillColorFromStyle(String style)", "identifier...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_2
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/utils/PagingTest.java", "identifier": "PagingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldHaveTotalPages() {\n\t\tPaging paging = new Paging(new Object[] {}, 2);\n\t\tassertEquals(0, paging.getTotalPages());\n\n\t\tpaging = new Paging(new Object[] { 0, 1 }, 2);\n\t\tassertEquals(1, paging.getTotalPages());\n\n\t\tpaging = new Paging(new Object[] { 0, 1, 2 }, 2);\n\t\t...
{ "fields": [ { "declarator": "items", "modifier": "private", "original_string": "private List<T> items;", "type": "List<T>", "var_name": "items" }, { "declarator": "itemsPerPage", "modifier": "private", "original_string": "private int itemsPerPage;", ...
{ "body": "public int getTotalPages() {\n\t\treturn totalPages;\n\t}", "class_method_signature": "Paging.getTotalPages()", "constructor": false, "full_signature": "public int getTotalPages()", "identifier": "getTotalPages", "invocations": [], "modifiers": "public", "parameters": "()", "return": "int",...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_29
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnAliasWhenAtlasRegionsAreEqual() {\n\t\tAtlasRegion atlasRegion1 = new AtlasRegion(texture512x512, 50, 30, 40, 40);\n\t\tAtlasRegion atlasRegion2 = new AtlasRegion(texture512x512, 50, 30, 40, 40);\n\t\tSprite sprite1 = new AtlasSprite(atlasRegion1);\n\t\tSprite sprite2 = new...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_68
{ "fields": [], "file": "commons-gdx-artemis/src/test/java/com/gemserk/commons/artemis/templates/ParametersDelegateImplTest.java", "identifier": "ParametersDelegateImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldNotFailIfDelegateIsNull2() {\n\t\tParametersDelegateImpl parametersDelegate = new ParametersDelegateImpl();\n\t\tassertEquals(\"c\", parametersDelegate.get(\"a\", \"c\"));\n\t}", "class_method_signature": "ParametersDelegateImplTest.shouldNotFailIfDelegateIsNull2()", "constru...
{ "fields": [ { "declarator": "delegate = new ParametersWrapper()", "modifier": "", "original_string": "Parameters delegate = new ParametersWrapper();", "type": "Parameters", "var_name": "delegate" }, { "declarator": "internal = new ParametersWrapper()", "modifier...
{ "body": "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic <T> T get(String id) {\n\t\tObject object = internal.get(id);\n\t\tif (object == null)\n\t\t\treturn delegate.get(id);\n\t\treturn (T) object;\n\t}", "class_method_signature": "ParametersDelegateImpl.get(String id)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_28
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnNotAliasWhenAtlasRegionsAreNotEqual() {\n\t\tSprite sprite1 = new AtlasSprite(new AtlasRegion(texture512x512, 50, 30, 40, 40));\n\t\tSprite sprite2 = new AtlasSprite(new AtlasRegion(texture512x512, 50, 30, 20, 40));\n\t\tassertFalse(SpriteUtils.isAliasSprite(sprite1, sprite...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_3
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/utils/AngleUtilsTest.java", "identifier": "AngleUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void test() {\n\t\t\n\t\tassertThat(AngleUtils.minimumDifference(0, 0), IsEqual.equalTo(0.0));\n\t\tassertThat(AngleUtils.minimumDifference(0, 180), IsEqual.equalTo(180.0));\n\t\tassertThat(AngleUtils.minimumDifference(0, 181), IsEqual.equalTo(-179.0));\n\t\tassertThat(AngleUtils.minimumDif...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/componentsengine/utils/AngleUtils.java", "identifier": "AngleUtils", "interfaces": "", "methods": [ { "class_method_signature": "AngleUtils.minimumDifference(double a, double b)", "constructor": false, "full_signature": ...
{ "body": "public static double minimumDifference(double a, double b) {\n\t\tdouble diffAngle = b - a;\n\t\tif (diffAngle > 180)\n\t\t\tdiffAngle -= 360;\n\t\telse if (diffAngle < -180)\n\t\t\tdiffAngle += 360;\n\t\treturn diffAngle;\n\t}", "class_method_signature": "AngleUtils.minimumDifference(double a, double b)...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_53
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testColorFromStyle2() {\n\t\tColor color = new Color(0f, 0f, 0f, 1f);\n\t\tSvgConvertUtils.fillColorFromStyle(color, \"display:inline;fill:#00ff00\");\n\t\tassertColorEquals(0f, 1f, 0f, 1f, color);\n\t}", "class_method_signature": "SvgConvertUtilsTest.testColorFromStyle2()", "const...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static Color fillColorFromStyle(String style) {\n\t\treturn fillColorFromStyle(new Color(), style);\n\t}", "class_method_signature": "SvgConvertUtils.fillColorFromStyle(String style)", "constructor": false, "full_signature": "public static Color fillColorFromStyle(String style)", "identifier...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_45
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/reflection/InjectorImplTest.java", "identifier": "InjectorImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldNotConfigureInternalObjectWhenNotOnConfigurator() {\n\t\tInjector injectorImpl = new InjectorImpl();\n\t\tMyTemplate myTemplate = new MyTemplate();\n\t\tinjectorImpl.injectMembers(myTemplate);\n\t\tassertNull(myTemplate.object);\n\t\tassertNull(myTemplate.anotherObject);\n\t}", ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(InjectorImpl.class)", "modifier": "protected static final", "original_string": "protected static final Logger logger = LoggerFactory.getLogger(InjectorImpl.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@Override\n\tpublic <T> T injectMembers(T object) {\n\n\t\t// For now, it will only work for the declared fields of the object class, it will not try to set fields from its super classes.\n\n\t\tClass<?> clazz = object.getClass();\n\n\t\tClassCache classCache = ReflectionUtils.getClassCache(clazz);\n\t\tRa...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_12
{ "fields": [ { "declarator": "monitor", "modifier": "", "original_string": "ButtonMonitorMock monitor;", "type": "ButtonMonitorMock", "var_name": "monitor" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/input/ButtonMonitorTest.java", "identifier"...
{ "body": "@Test\n\tpublic void bugWithPressedAndReleasedAtTheSameTime() {\n\t\t monitor.down = true;\n\t\t monitor.update();\n\t\t assertThat(monitor, MonitorMatcher.monitor(true, false, false));\n\t\t monitor.down = false;\n\t\t monitor.update();\n\t\t assertThat(monitor, MonitorMatcher.monitor(false, true, false))...
{ "fields": [ { "declarator": "pressed", "modifier": "", "original_string": "boolean pressed;", "type": "boolean", "var_name": "pressed" }, { "declarator": "released", "modifier": "", "original_string": "boolean released;", "type": "boolean", "va...
{ "body": "public void update() {\n\t\tboolean down = isDown();\n\t\tpressed = !wasDown && down;\n\t\treleased = wasDown && !down;\n\t\tholded = down && !pressed;\n\t\twasDown = down;\n\t}", "class_method_signature": "ButtonMonitor.update()", "constructor": false, "full_signature": "public void update()", "id...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_65
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/animation4j/FrameAnimationImplTest.java", "identifier": "FrameAnimationImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testClone() {\n\t\tFrameAnimationImpl source = new FrameAnimationImpl(true, 10f, 50f, 40f);\n\t\tsource.update(5f);\n\t\tFrameAnimationImpl clone = source.clone();\n\t\tassertThat(clone.getFramesCount(), IsEqual.equalTo(source.getFramesCount()));\n\t\tassertThat(clone.getCurrentFrame()...
{ "fields": [ { "declarator": "framesTimes", "modifier": "", "original_string": "float[] framesTimes;", "type": "float[]", "var_name": "framesTimes" }, { "declarator": "currentFrame", "modifier": "", "original_string": "int currentFrame;", "type": "int...
{ "body": "public FrameAnimationImpl clone() {\n\t\treturn new FrameAnimationImpl(this);\n\t}", "class_method_signature": "FrameAnimationImpl.clone()", "constructor": false, "full_signature": "public FrameAnimationImpl clone()", "identifier": "clone", "invocations": [], "modifiers": "public", "parameter...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_32
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertGreen() {\n\t\tColor color = new Color();\n\t\tint rgba8888 = Color.rgba8888(0f, 1f, 0f, 0f);\n\t\tColorUtils.rgba8888ToColor(color, rgba8888);\n\t\tassertEquals(0f, color.r, 0.01f);\n\t\tassertEquals(1f, color.g, 0.01f);\n\t\tassertEquals(0f, color.b, 0.01f);\n\t\tassertEqu...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgba8888ToColor(Color color, int value) {\n\t\tColor.rgba8888ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgba8888ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgba8888ToColor(Color color, int value)", "identi...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_24
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnIsAliasWhenSameRegion() {\n\t\tTextureRegion region1 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tSprite sprite1 = new Sprite(region1);\n\t\tSprite sprite2 = new Sprite(region1);\n\t\tassertTrue(SpriteUtils.isAliasSprite(sprite1, sprite2));\n\t}", "class_me...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_49
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testReplicateHexNotation() {\n\t\tString replicateHexNotation = SvgConvertUtils.replicateHexNotation(\"FFF\");\n\t\tassertEquals(\"FFFFFF\", replicateHexNotation);\n\t}", "class_method_signature": "SvgConvertUtilsTest.testReplicateHexNotation()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static String replicateHexNotation(CharSequence hexColor) {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tstringBuilder.append(hexColor.charAt(0));\n\t\tstringBuilder.append(hexColor.charAt(0));\n\t\tstringBuilder.append(hexColor.charAt(1));\n\t\tstringBuilder.append(hexColor.charAt(1...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_66
{ "fields": [], "file": "commons-gdx-artemis/src/test/java/com/gemserk/commons/artemis/render/RenderLayersTest.java", "identifier": "RenderLayersTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldStartWithNoLayers() {\n\t\tRenderLayers renderLayers = new RenderLayers();\n\t\tassertThat(renderLayers.size(), IsEqual.equalTo(0));\n\t}", "class_method_signature": "RenderLayersTest.shouldStartWithNoLayers()", "constructor": false, "full_signature": "@Test public void sho...
{ "fields": [ { "declarator": "renderLayers", "modifier": "", "original_string": "RandomAccessMap<String, RenderLayer> renderLayers;", "type": "RandomAccessMap<String, RenderLayer>", "var_name": "renderLayers" } ], "file": "commons-gdx-artemis/src/main/java/com/gemserk/common...
{ "body": "public int size() {\n\t\treturn renderLayers.size();\n\t}", "class_method_signature": "RenderLayers.size()", "constructor": false, "full_signature": "public int size()", "identifier": "size", "invocations": [ "size" ], "modifiers": "public", "parameters": "()", "return": "int", "sig...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_31
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertRed() {\n\t\tColor color = new Color();\n\t\tint rgba8888 = Color.rgba8888(1f, 0f, 0f, 0f);\n\t\tColorUtils.rgba8888ToColor(color, rgba8888);\n\t\tassertEquals(1f, color.r, 0.01f);\n\t\tassertEquals(0f, color.g, 0.01f);\n\t\tassertEquals(0f, color.b, 0.01f);\n\t\tassertEqual...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgba8888ToColor(Color color, int value) {\n\t\tColor.rgba8888ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgba8888ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgba8888ToColor(Color color, int value)", "identi...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_27
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnNotAliasWhenRegionAreNotEqual() {\n\t\tTextureRegion region1 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tTextureRegion region2 = new TextureRegion(texture512x512, 50, 30, 10f, 40f);\n\t\tSprite sprite1 = new Sprite(region1);\n\t\tSprite sprite2 = new Sprite(...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_0
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/utils/timers/CountDownTimerTest.java", "identifier": "CountDownTimerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldStartNotStarted() {\n\t\t\n\t\tCountDownTimer countDownTimer = new CountDownTimer(1000);\n\t\tassertFalse(countDownTimer.isRunning());\n\t\t\n\t}", "class_method_signature": "CountDownTimerTest.shouldStartNotStarted()", "constructor": false, "full_signature": "@Test public ...
{ "fields": [ { "declarator": "time", "modifier": "", "original_string": "int time;", "type": "int", "var_name": "time" }, { "declarator": "timeLeft", "modifier": "", "original_string": "int timeLeft;", "type": "int", "var_name": "timeLeft" }...
{ "body": "@Override\n\tpublic boolean isRunning() {\n\t\treturn !fired;\n\t}", "class_method_signature": "CountDownTimer.isRunning()", "constructor": false, "full_signature": "@Override public boolean isRunning()", "identifier": "isRunning", "invocations": [], "modifiers": "@Override public", "paramete...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_50
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testColorValue() {\n\t\tColor color = SvgConvertUtils.colorValue(\"#FFF\");\n\t\tassertColorEquals(1f, 1f, 1f, 0f, color);\n\t}", "class_method_signature": "SvgConvertUtilsTest.testColorValue()", "constructor": false, "full_signature": "@Test public void testColorValue()", "ide...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static Color colorValue(String colorValue) {\n\t\treturn colorValue(new Color(), colorValue);\n\t}", "class_method_signature": "SvgConvertUtils.colorValue(String colorValue)", "constructor": false, "full_signature": "public static Color colorValue(String colorValue)", "identifier": "colorVal...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_46
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testPathDataConversionUsingRelativeMoveTo() {\n\t\tString pathWithRelativeMove = \"m 28.0,258.0 668.0,0 0,347.0 -668.0,0 z\";\n\t\tVector2f[] points = SvgConvertUtils.pathDataToVector2fList(pathWithRelativeMove);\n\n\t\tassertVectorEquals(28f, 258f, points[0]);\n\t\tassertVectorEquals(...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static Vector2f[] pathDataToVector2fList(String d) {\n\t\tStringTokenizer tokens = new StringTokenizer(d, \", \");\n\n\t\tArrayList<Vector2f> pointList = new ArrayList<Vector2f>();\n\n\t\tVector2f currentLocation = new Vector2f(0f, 0f);\n\n\t\tCommand currentCommand = Command.None;\n\n\t\twhile (tok...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_11
{ "fields": [ { "declarator": "monitor", "modifier": "", "original_string": "ButtonMonitorMock monitor;", "type": "ButtonMonitorMock", "var_name": "monitor" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/input/ButtonMonitorTest.java", "identifier"...
{ "body": "@Test\n\tpublic void pressReleaseWithoutHold() {\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\n\t\tassertThat(monitor, MonitorMatcher.monitor(false, true, false));\n\n\t}", "class_method_signature": ...
{ "fields": [ { "declarator": "pressed", "modifier": "", "original_string": "boolean pressed;", "type": "boolean", "var_name": "pressed" }, { "declarator": "released", "modifier": "", "original_string": "boolean released;", "type": "boolean", "va...
{ "body": "public void update() {\n\t\tboolean down = isDown();\n\t\tpressed = !wasDown && down;\n\t\treleased = wasDown && !down;\n\t\tholded = down && !pressed;\n\t\twasDown = down;\n\t}", "class_method_signature": "ButtonMonitor.update()", "constructor": false, "full_signature": "public void update()", "id...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_10
{ "fields": [ { "declarator": "monitor", "modifier": "", "original_string": "ButtonMonitorMock monitor;", "type": "ButtonMonitorMock", "var_name": "monitor" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/input/ButtonMonitorTest.java", "identifier"...
{ "body": "@Test\n\tpublic void keepReleased() {\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tassertThat(monit...
{ "fields": [ { "declarator": "pressed", "modifier": "", "original_string": "boolean pressed;", "type": "boolean", "var_name": "pressed" }, { "declarator": "released", "modifier": "", "original_string": "boolean released;", "type": "boolean", "va...
{ "body": "public void update() {\n\t\tboolean down = isDown();\n\t\tpressed = !wasDown && down;\n\t\treleased = wasDown && !down;\n\t\tholded = down && !pressed;\n\t\twasDown = down;\n\t}", "class_method_signature": "ButtonMonitor.update()", "constructor": false, "full_signature": "public void update()", "id...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_47
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testPathDataConversionUsingAbsoluteMoveTo() {\n\t\tString pathWithRelativeMove = \"M 28.0,258.0 668.0,0 0,347.0 -668.0,0 z\";\n\t\tVector2f[] points = SvgConvertUtils.pathDataToVector2fList(pathWithRelativeMove);\n\n\t\tassertVectorEquals(28f, 258f, points[0]);\n\t\tassertVectorEquals(...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static Vector2f[] pathDataToVector2fList(String d) {\n\t\tStringTokenizer tokens = new StringTokenizer(d, \", \");\n\n\t\tArrayList<Vector2f> pointList = new ArrayList<Vector2f>();\n\n\t\tVector2f currentLocation = new Vector2f(0f, 0f);\n\n\t\tCommand currentCommand = Command.None;\n\n\t\twhile (tok...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_51
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgConvertUtilsTest.java", "identifier": "SvgConvertUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testColorValue2() {\n\t\tColor color = SvgConvertUtils.colorValue(\"#FFFFFF\");\n\t\tassertColorEquals(1f, 1f, 1f, 0f, color);\n\t}", "class_method_signature": "SvgConvertUtilsTest.testColorValue2()", "constructor": false, "full_signature": "@Test public void testColorValue2()", ...
{ "fields": [ { "declarator": "commandMap = new HashMap<String, Command>() {\n\t\t{\n\t\t\tput(\"m\", Command.RelativeMoveTo);\n\t\t\tput(\"M\", Command.AbsoluteMoveTo);\n\t\t\tput(\"l\", Command.RelativeLineTo);\n\t\t\tput(\"L\", Command.AbsoluteLineTo);\n\t\t\tput(\"z\", Command.ClosePath);\n\t\t\tput(\"Z...
{ "body": "public static Color colorValue(String colorValue) {\n\t\treturn colorValue(new Color(), colorValue);\n\t}", "class_method_signature": "SvgConvertUtils.colorValue(String colorValue)", "constructor": false, "full_signature": "public static Color colorValue(String colorValue)", "identifier": "colorVal...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_1
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/utils/timers/CountDownTimerTest.java", "identifier": "CountDownTimerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldStartStarted() {\n\t\t\n\t\tboolean started = true;\n\t\tCountDownTimer countDownTimer = new CountDownTimer(1000, started);\n\t\tassertTrue(countDownTimer.isRunning());\n\t\t\n\t}", "class_method_signature": "CountDownTimerTest.shouldStartStarted()", "constructor": false, "...
{ "fields": [ { "declarator": "time", "modifier": "", "original_string": "int time;", "type": "int", "var_name": "time" }, { "declarator": "timeLeft", "modifier": "", "original_string": "int timeLeft;", "type": "int", "var_name": "timeLeft" }...
{ "body": "@Override\n\tpublic boolean isRunning() {\n\t\treturn !fired;\n\t}", "class_method_signature": "CountDownTimer.isRunning()", "constructor": false, "full_signature": "@Override public boolean isRunning()", "identifier": "isRunning", "invocations": [], "modifiers": "@Override public", "paramete...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_26
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/SpriteUtilsTest.java", ...
{ "body": "@Test\n\tpublic void shouldReturnNotAliasWhenSpriteAndAtlasSprite() {\n\t\tTextureRegion region1 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tSprite sprite1 = new Sprite(region1);\n\t\tSprite sprite2 = new AtlasSprite(new AtlasRegion(texture512x512, 50, 30, 40, 40));\n\t\tassertFalse(SpriteU...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/SpriteUtils.java", "identifier": "SpriteUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpriteUtils.getOriginalWidth(Sprite sprite)", "constructor": false, "full_signature": "publ...
{ "body": "public static boolean isAliasSprite(Sprite sprite1, Sprite sprite2) {\n\t\tboolean isAtlasSprite1 = sprite1 instanceof AtlasSprite;\n\t\tboolean isAtlasSprite2 = sprite2 instanceof AtlasSprite;\n\n\t\tif (isAtlasSprite1 != isAtlasSprite2)\n\t\t\treturn false;\n\n\t\tif (!isAtlasSprite1) {\n\t\t\treturn Tex...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_30
{ "fields": [ { "declarator": "texture512x512", "modifier": "private", "original_string": "private Texture texture512x512;", "type": "Texture", "var_name": "texture512x512" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/TextureRegionUtilsTest.ja...
{ "body": "@Test\n\tpublic void testRegionEquals() {\n\t\tTextureRegion region1 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tTextureRegion region2 = new TextureRegion(texture512x512, 50, 30, 40f, 40f);\n\t\tTextureRegion region3 = new TextureRegion(texture512x512, 60, 30, 40f, 40f);\n\t\tTextureRegion ...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/graphics/TextureRegionUtils.java", "identifier": "TextureRegionUtils", "interfaces": "", "methods": [ { "class_method_signature": "TextureRegionUtils.textureRegionEquals(TextureRegion t1, TextureRegion t2)", "const...
{ "body": "public static boolean textureRegionEquals(TextureRegion t1, TextureRegion t2) {\n\t\tif (t1 == t2)\n\t\t\treturn true;\n\n\t\tif (t1 == null)\n\t\t\treturn false;\n\n\t\tif (t2 == null)\n\t\t\treturn false;\n\n\t\tif (Float.floatToIntBits(t1.getU()) != Float.floatToIntBits(t2.getU()))\n\t\t\treturn false;\...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_67
{ "fields": [], "file": "commons-gdx-artemis/src/test/java/com/gemserk/commons/artemis/templates/ParametersDelegateImplTest.java", "identifier": "ParametersDelegateImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldNotFailIfDelegateIsNull() {\n\t\tParametersDelegateImpl parametersDelegate = new ParametersDelegateImpl();\n\t\tassertEquals(null, parametersDelegate.get(\"a\"));\n\t}", "class_method_signature": "ParametersDelegateImplTest.shouldNotFailIfDelegateIsNull()", "constructor": fal...
{ "fields": [ { "declarator": "delegate = new ParametersWrapper()", "modifier": "", "original_string": "Parameters delegate = new ParametersWrapper();", "type": "Parameters", "var_name": "delegate" }, { "declarator": "internal = new ParametersWrapper()", "modifier...
{ "body": "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic <T> T get(String id) {\n\t\tObject object = internal.get(id);\n\t\tif (object == null)\n\t\t\treturn delegate.get(id);\n\t\treturn (T) object;\n\t}", "class_method_signature": "ParametersDelegateImpl.get(String id)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_6
{ "fields": [ { "declarator": "monitor", "modifier": "", "original_string": "ButtonMonitorMock monitor;", "type": "ButtonMonitorMock", "var_name": "monitor" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/input/ButtonMonitorTest.java", "identifier"...
{ "body": "@Test\n\tpublic void nothingEverPressed() {\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tassertThat(monitor, MonitorMatcher.monitor(false, false, false));\n\t}", "class_method_signature": "ButtonMonitorTest.nothingEverPressed()", "constructor": false, "full_signature": "@Test public void no...
{ "fields": [ { "declarator": "pressed", "modifier": "", "original_string": "boolean pressed;", "type": "boolean", "var_name": "pressed" }, { "declarator": "released", "modifier": "", "original_string": "boolean released;", "type": "boolean", "va...
{ "body": "public void update() {\n\t\tboolean down = isDown();\n\t\tpressed = !wasDown && down;\n\t\treleased = wasDown && !down;\n\t\tholded = down && !pressed;\n\t\twasDown = down;\n\t}", "class_method_signature": "ButtonMonitor.update()", "constructor": false, "full_signature": "public void update()", "id...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_56
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgInkscapeUtilsTest.java", "identifier": "SvgInkscapeUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldParseScaleTransformWithOneValues() {\n\t\tString transformAttribute = \" scale (2) \";\n\n\t\tMatrix3f matrix = new Matrix3f();\n\t\tmatrix.setIdentity();\n\t\tSvgInkscapeUtils.parseTransformAttribute(transformAttribute, matrix);\n\n\t\tMatrix3f expectedMatrix = new Matrix3f(...
{ "fields": [ { "declarator": "INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\"", "modifier": "public static final", "original_string": "public static final String INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\";", "type": "String", "var_name": "INKSCAPE" }, ...
{ "body": "public static Matrix3f parseTransformAttribute(String transformAttribute, Matrix3f m) {\n\t\treturn SvgTransformUtils.parseTransform(transformAttribute, m);\n\t}", "class_method_signature": "SvgInkscapeUtils.parseTransformAttribute(String transformAttribute, Matrix3f m)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_40
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertFromHexString2() {\n\t\tColor color = new Color();\n\t\tcolor.set(0.2f, 0.3f, 0.4f, 0.5f);\n\t\tColorUtils.hexRGBToColor(color, \"#ffaabb\");\n\t\tassertEquals(1f, color.r, 0.025f);\n\t\tassertEquals(0.666f, color.g, 0.025f);\n\t\tassertEquals(0.733f, color.b, 0.025f);\n\t\t...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static Color hexRGBToColor(String hexColor) {\n\t\treturn hexRGBToColor(new Color(1f, 1f, 1f, 1f), hexColor);\n\t}", "class_method_signature": "ColorUtils.hexRGBToColor(String hexColor)", "constructor": false, "full_signature": "public static Color hexRGBToColor(String hexColor)", "identifie...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_17
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/camera/MultipleVirtualViewportBuilderTest.java", "identifier": "MultipleVirtualViewportBuilderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldReturnVirtualViewportViewportWithDoubleSizeTheMinSize() {\n\t\tMultipleVirtualViewportBuilder multipleVirtualViewportBuilder = new MultipleVirtualViewportBuilder(800f, 480f, 854f, 600f);\n\t\tVirtualViewport virtualViewport = multipleVirtualViewportBuilder.getVirtualViewport(800f...
{ "fields": [ { "declarator": "minWidth", "modifier": "private final", "original_string": "private final float minWidth;", "type": "float", "var_name": "minWidth" }, { "declarator": "minHeight", "modifier": "private final", "original_string": "private final ...
{ "body": "public VirtualViewport getVirtualViewport(float width, float height) {\n\t\tif (width >= minWidth && width <= maxWidth && height >= minHeight && height <= maxHeight)\n\t\t\treturn new VirtualViewport(width, height, true);\n\n\t\tfloat aspect = width / height;\n\n\t\tfloat scaleForMinSize = minWidth / width...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_60
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/text/CustomDecimalFormatTest.java", "identifier": "CustomDecimalFormatTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldFillTheMissingNumbersWithDefaultCharacter3() {\n\t\tCustomDecimalFormat customDecimalFormat = new CustomDecimalFormat(5);\n\t\tassertEquals(\"99999\", customDecimalFormat.format(99999L).toString());\n\t}", "class_method_signature": "CustomDecimalFormatTest.shouldFillTheMissingN...
{ "fields": [ { "declarator": "stringBuilder", "modifier": "private", "original_string": "private StringBuilder stringBuilder;", "type": "StringBuilder", "var_name": "stringBuilder" }, { "declarator": "fillCharacter = null", "modifier": "private", "original_...
{ "body": "public CharSequence format(long number) {\n\t\treturn format(number, stringBuilder);\n\t}", "class_method_signature": "CustomDecimalFormat.format(long number)", "constructor": false, "full_signature": "public CharSequence format(long number)", "identifier": "format", "invocations": [ "format"...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_37
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertRgba444() {\n\t\tColor color = new Color();\n\t\tint rgba4444 = Color.rgba4444(0.2f, 0.4f, 0.6f, 0.8f);\n\t\tColorUtils.rgba4444ToColor(color, rgba4444);\n\t\tassertEquals(0.2f, color.r, 0.01f);\n\t\tassertEquals(0.4f, color.g, 0.01f);\n\t\tassertEquals(0.6f, color.b, 0.01f)...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgba4444ToColor(Color color, int value) {\n\t\tColor.rgba4444ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgba4444ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgba4444ToColor(Color color, int value)", "identi...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_21
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/camera/CameraRestrictedImplTest.java", "identifier": "CameraRestrictedImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void bugWhenRecalculatingZoomShouldUseSmallerDimension() {\n\t\tCameraRestrictedImpl camera = new CameraRestrictedImpl(0f, 0f, 1f, 0f, 800f, 480f, new Rectangle(0f, 0f, 12f, 4f));\n\t\tassertThat(camera.getZoom(), IsEqual.equalTo(120f));\n\t\tcamera = new CameraRestrictedImpl(0f, 0f, 1f, 0f...
{ "fields": [ { "declarator": "worldBounds", "modifier": "private", "original_string": "private Rectangle worldBounds;", "type": "Rectangle", "var_name": "worldBounds" }, { "declarator": "x = 0f", "modifier": "private", "original_string": "private float x = ...
{ "body": "@Override\n\tpublic float getZoom() {\n\t\treturn zoom;\n\t}", "class_method_signature": "CameraRestrictedImpl.getZoom()", "constructor": false, "full_signature": "@Override public float getZoom()", "identifier": "getZoom", "invocations": [], "modifiers": "@Override public", "parameters": "()...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_20
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/camera/CameraRestrictedImplTest.java", "identifier": "CameraRestrictedImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testSetPosition() {\n\t\tCameraRestrictedImpl camera = new CameraRestrictedImpl();\n\t\tcamera.setBounds(8, 4);\n\t\tcamera.setWorldBounds(0, 0, 20, 10);\n\t\tcamera.setPosition(0f, 0f);\n\t\tassertThat(camera.getX(), IsEqual.equalTo(4f));\n\t\tassertThat(camera.getY(), IsEqual.equalTo...
{ "fields": [ { "declarator": "worldBounds", "modifier": "private", "original_string": "private Rectangle worldBounds;", "type": "Rectangle", "var_name": "worldBounds" }, { "declarator": "x = 0f", "modifier": "private", "original_string": "private float x = ...
{ "body": "@Override\n\tpublic void setPosition(float x, float y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\trecalculatePosition();\n\t}", "class_method_signature": "CameraRestrictedImpl.setPosition(float x, float y)", "constructor": false, "full_signature": "@Override public void setPosition(float x, float y)", ...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_36
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/graphics/ColorUtilsTest.java", "identifier": "ColorUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertRgb888() {\n\t\tColor color = new Color();\n\t\tint rgb888 = Color.rgb888(0.2f, 0.7f, 0.45f);\n\t\tColorUtils.rgb888ToColor(color, rgb888);\n\t\tassertEquals(0.2f, color.r, 0.01f);\n\t\tassertEquals(0.7f, color.g, 0.01f);\n\t\tassertEquals(0.45f, color.b, 0.01f);\n\t}", "c...
{ "fields": [ { "declarator": "intToFloat = 1f / 256f", "modifier": "private static final", "original_string": "private static final float intToFloat = 1f / 256f;", "type": "float", "var_name": "intToFloat" }, { "declarator": "hexNotationPrefix = \"#\"", "modifier...
{ "body": "public static void rgb888ToColor(Color color, int value) {\n\t\tColor.rgb888ToColor(color, value);\n\t}", "class_method_signature": "ColorUtils.rgb888ToColor(Color color, int value)", "constructor": false, "full_signature": "public static void rgb888ToColor(Color color, int value)", "identifier": "...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_61
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/text/CustomDecimalFormatTest.java", "identifier": "CustomDecimalFormatTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldGrowWhenNumberGreaterThanExpectedDigits() {\n\t\tCustomDecimalFormat customDecimalFormat = new CustomDecimalFormat(5);\n\t\tassertEquals(\"123456\", customDecimalFormat.format(123456L).toString());\n\t}", "class_method_signature": "CustomDecimalFormatTest.shouldGrowWhenNumberGr...
{ "fields": [ { "declarator": "stringBuilder", "modifier": "private", "original_string": "private StringBuilder stringBuilder;", "type": "StringBuilder", "var_name": "stringBuilder" }, { "declarator": "fillCharacter = null", "modifier": "private", "original_...
{ "body": "public CharSequence format(long number) {\n\t\treturn format(number, stringBuilder);\n\t}", "class_method_signature": "CustomDecimalFormat.format(long number)", "constructor": false, "full_signature": "public CharSequence format(long number)", "identifier": "format", "invocations": [ "format"...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_16
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/camera/MultipleVirtualViewportBuilderTest.java", "identifier": "MultipleVirtualViewportBuilderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldReturnVirtualViewportViewportWithHalfSizeTheMinSize() {\n\t\tMultipleVirtualViewportBuilder multipleVirtualViewportBuilder = new MultipleVirtualViewportBuilder(800f, 480f, 854f, 600f);\n\t\tVirtualViewport virtualViewport = multipleVirtualViewportBuilder.getVirtualViewport(400f, ...
{ "fields": [ { "declarator": "minWidth", "modifier": "private final", "original_string": "private final float minWidth;", "type": "float", "var_name": "minWidth" }, { "declarator": "minHeight", "modifier": "private final", "original_string": "private final ...
{ "body": "public VirtualViewport getVirtualViewport(float width, float height) {\n\t\tif (width >= minWidth && width <= maxWidth && height >= minHeight && height <= maxHeight)\n\t\t\treturn new VirtualViewport(width, height, true);\n\n\t\tfloat aspect = width / height;\n\n\t\tfloat scaleForMinSize = minWidth / width...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_41
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/gdx/games/SpatialUtilsTest.java", "identifier": "SpatialUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvertToLocalSpatial() {\n\t\tSpatial parent = new SpatialImpl(20, 50, 1f, 1f, 0f);\n\t\tSpatial child = new SpatialImpl(0f, 0f, 1f, 1f, 0f);\n\t\t\n\t\tSpatialUtils.convertToLocal(parent, child);\n\t\t\n\t\tassertThat(child.getX(), IsEqual.equalTo(-20f));\n\t\tassertThat(child.ge...
{ "fields": [], "file": "commons-gdx-core/src/main/java/com/gemserk/commons/gdx/games/SpatialUtils.java", "identifier": "SpatialUtils", "interfaces": "", "methods": [ { "class_method_signature": "SpatialUtils.convertToLocal(Spatial parent, Spatial child)", "constructor": false, "full_sig...
{ "body": "public static Spatial convertToLocal(Spatial parent, Spatial child) {\n\t\tfloat x = child.getX();\n\t\tfloat y = child.getY();\n\n\t\tfloat angle = child.getAngle();\n\n\t\tchild.setPosition(x - parent.getX(), y - parent.getY());\n\t\tchild.setAngle(angle - parent.getAngle());\n\n\t\treturn child;\n\t}", ...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_57
{ "fields": [], "file": "commons-gdx-core/src/test/java/com/gemserk/commons/svg/inkscape/SvgInkscapeUtilsTest.java", "identifier": "SvgInkscapeUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void shouldParseAMatrixAttribute() {\n\t\tString transformAttribute = \"matrix(-0.883294,-0.468819,-0.468819,0.883294,0,0)\";\n\t\tMatrix3f matrix = new Matrix3f();\n\t\tmatrix.setIdentity();\n\t\tSvgInkscapeUtils.parseTransformAttribute(transformAttribute, matrix);\n\t\tMatrix3f expectedMa...
{ "fields": [ { "declarator": "INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\"", "modifier": "public static final", "original_string": "public static final String INKSCAPE = \"http://www.inkscape.org/namespaces/inkscape\";", "type": "String", "var_name": "INKSCAPE" }, ...
{ "body": "public static Matrix3f parseTransformAttribute(String transformAttribute, Matrix3f m) {\n\t\treturn SvgTransformUtils.parseTransform(transformAttribute, m);\n\t}", "class_method_signature": "SvgInkscapeUtils.parseTransformAttribute(String transformAttribute, Matrix3f m)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
1583138_7
{ "fields": [ { "declarator": "monitor", "modifier": "", "original_string": "ButtonMonitorMock monitor;", "type": "ButtonMonitorMock", "var_name": "monitor" } ], "file": "commons-gdx-core/src/test/java/com/gemserk/componentsengine/input/ButtonMonitorTest.java", "identifier"...
{ "body": "@Test\n\tpublic void whenFirstPresed() {\n\t\tmonitor.down = false;\n\t\tmonitor.update();\n\t\tmonitor.down = true;\n\t\tmonitor.update();\n\t\tassertThat(monitor, MonitorMatcher.monitor(true, false, false));\n\t}", "class_method_signature": "ButtonMonitorTest.whenFirstPresed()", "constructor": false,...
{ "fields": [ { "declarator": "pressed", "modifier": "", "original_string": "boolean pressed;", "type": "boolean", "var_name": "pressed" }, { "declarator": "released", "modifier": "", "original_string": "boolean released;", "type": "boolean", "va...
{ "body": "public void update() {\n\t\tboolean down = isDown();\n\t\tpressed = !wasDown && down;\n\t\treleased = wasDown && !down;\n\t\tholded = down && !pressed;\n\t\twasDown = down;\n\t}", "class_method_signature": "ButtonMonitor.update()", "constructor": false, "full_signature": "public void update()", "id...
{ "created": null, "fork": null, "fork_count": 16, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1583138, "size": 1472, "stargazer_count": 69, "stars": null, "updates": null, "url": "https://github.com/gemserk/commons-gdx" }
89188081_5
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldChangeAppLocale_WhenInitialized_GivenPersisted() throws UnsupportedLocaleException {\n // Given\n doReturn(ANY_LOCALE).when(localePersistor).load();\n doReturn(ANY_LOCALE).when(localeResolver).resolve(ANY_LOCALE);\n\n // When\n sut.initialize(...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void initialize() {\n Locale persistedLocale = persistor.load();\n\n if (persistedLocale != null)\n try {\n currentLocale = resolver.resolve(persistedLocale);\n } catch (UnsupportedLocaleException e) {\n persistedLocale = null;\n ...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_9
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldLoadPersistedLocale_WhenGetCurrentSupportedLocale() {\n // Given\n doReturn(ANY_LOCALE).when(localePersistor).load();\n\n // When\n Locale currentSupportedLocale = sut.getLocale();\n\n // Then\n assertEquals(ANY_LOCALE, currentSupported...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "Locale getLocale() {\n return persistor.load();\n }", "class_method_signature": "LocaleChangerDelegate.getLocale()", "constructor": false, "full_signature": " Locale getLocale()", "identifier": "getLocale", "invocations": [ "load" ], "modifiers": "", "parameters": "()", "ret...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_8
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void ShouldThrowIllegalArgumentException_WhenChanged_GivenNotSupportedLocale() throws UnsupportedLocaleException {\n // Given\n doThrow(IllegalArgumentException.class).when(localeResolver).resolve(ANY_LOCALE);\n\n // When\n ...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void setLocale(Locale supportedLocale) {\n try {\n currentLocale = resolver.resolve(supportedLocale);\n\n persistor.save(supportedLocale);\n\n appLocaleChanger.change(currentLocale);\n\n } catch (UnsupportedLocaleException e) {\n throw new IllegalAr...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_4
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldChangeAppLocale_WhenInitialized_GivenNotPersisted() {\n // Given\n doReturn(null).when(localePersistor).load();\n\n // When\n sut.initialize();\n\n // Then\n verify(appLocaleChanger).change(defaultLocalePair.getResolvedLocale());\n }...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void initialize() {\n Locale persistedLocale = persistor.load();\n\n if (persistedLocale != null)\n try {\n currentLocale = resolver.resolve(persistedLocale);\n } catch (UnsupportedLocaleException e) {\n persistedLocale = null;\n ...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_13
{ "fields": [ { "declarator": "LOCALE_ES_ES = new Locale(\"es\", \"ES\")", "modifier": "private static final", "original_string": "private static final Locale LOCALE_ES_ES = new Locale(\"es\", \"ES\");", "type": "Locale", "var_name": "LOCALE_ES_ES" }, { "declarator": "L...
{ "body": "@Test(expected = UnsupportedLocaleException.class)\n public void ShouldThrowException_WhenResolveLocale_GivenNotSupportedLocale() throws UnsupportedLocaleException {\n // Given\n LocaleResolver sut = new LocaleResolver(\n Arrays.asList(LOCALE_ES_ES, LOCALE_IT_IT),\n ...
{ "fields": [ { "declarator": "supportedLocales", "modifier": "private", "original_string": "private List<Locale> supportedLocales;", "type": "List<Locale>", "var_name": "supportedLocales" }, { "declarator": "systemLocales", "modifier": "private", "original_...
{ "body": "Locale resolve(Locale supportedLocale) throws UnsupportedLocaleException {\n if (!supportedLocales.contains(supportedLocale))\n throw new UnsupportedLocaleException(\"The Locale you are trying to load is not in the supported list provided on library initialization\");\n\n MatchingL...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_3
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldGetMatch_WhenInitialized_GivenPersisted() throws Exception {\n // Given\n doReturn(ANY_LOCALE).when(localePersistor).load();\n\n // When\n sut.initialize();\n\n // Then\n verify(localeResolver).resolve(ANY_LOCALE);\n }", "class_met...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void initialize() {\n Locale persistedLocale = persistor.load();\n\n if (persistedLocale != null)\n try {\n currentLocale = resolver.resolve(persistedLocale);\n } catch (UnsupportedLocaleException e) {\n persistedLocale = null;\n ...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_2
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldPersistSupportedLocale_WhenInitialized_GivenNotPersisted() {\n // Given\n doReturn(null).when(localePersistor).load();\n doReturn(defaultLocalePair).when(localeResolver).resolveDefault();\n doReturn(ANY_LOCALE).when(defaultLocalePair).getSupportedLoc...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void initialize() {\n Locale persistedLocale = persistor.load();\n\n if (persistedLocale != null)\n try {\n currentLocale = resolver.resolve(persistedLocale);\n } catch (UnsupportedLocaleException e) {\n persistedLocale = null;\n ...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_12
{ "fields": [ { "declarator": "LOCALE_ES_ES = new Locale(\"es\", \"ES\")", "modifier": "private static final", "original_string": "private static final Locale LOCALE_ES_ES = new Locale(\"es\", \"ES\");", "type": "Locale", "var_name": "LOCALE_ES_ES" }, { "declarator": "L...
{ "body": "@Test\n public void ShouldResolveGivenSupportedLocaleDirectly_WhenResolveLocale_PreferringSupportedLocale() throws UnsupportedLocaleException {\n // Given\n MatchingAlgorithm matchingAlgorithm = mock(MatchingAlgorithm.class);\n\n LocaleResolver sut = new LocaleResolver(\n ...
{ "fields": [ { "declarator": "supportedLocales", "modifier": "private", "original_string": "private List<Locale> supportedLocales;", "type": "List<Locale>", "var_name": "supportedLocales" }, { "declarator": "systemLocales", "modifier": "private", "original_...
{ "body": "Locale resolve(Locale supportedLocale) throws UnsupportedLocaleException {\n if (!supportedLocales.contains(supportedLocale))\n throw new UnsupportedLocaleException(\"The Locale you are trying to load is not in the supported list provided on library initialization\");\n\n MatchingL...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_11
{ "fields": [ { "declarator": "LOCALE_ES_ES = new Locale(\"es\", \"ES\")", "modifier": "private static final", "original_string": "private static final Locale LOCALE_ES_ES = new Locale(\"es\", \"ES\");", "type": "Locale", "var_name": "LOCALE_ES_ES" }, { "declarator": "L...
{ "body": "@Test\n public void ShouldResolveGivenSupportedLocaleAsDefault_WhenResolveLocale_GivenNonMatchingLocales() throws UnsupportedLocaleException {\n // Given\n LocaleResolver sut = new LocaleResolver(\n Arrays.asList(LOCALE_ES_ES, LOCALE_IT_IT),\n Arrays.asList(LO...
{ "fields": [ { "declarator": "supportedLocales", "modifier": "private", "original_string": "private List<Locale> supportedLocales;", "type": "List<Locale>", "var_name": "supportedLocales" }, { "declarator": "systemLocales", "modifier": "private", "original_...
{ "body": "Locale resolve(Locale supportedLocale) throws UnsupportedLocaleException {\n if (!supportedLocales.contains(supportedLocale))\n throw new UnsupportedLocaleException(\"The Locale you are trying to load is not in the supported list provided on library initialization\");\n\n MatchingL...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_1
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldGetDefaultMatch_WhenInitialized_GivenNotPersisted() {\n // Given\n doReturn(null).when(localePersistor).load();\n\n // When\n sut.initialize();\n\n // Then\n verify(localeResolver).resolveDefault();\n }", "class_method_signature": ...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void initialize() {\n Locale persistedLocale = persistor.load();\n\n if (persistedLocale != null)\n try {\n currentLocale = resolver.resolve(persistedLocale);\n } catch (UnsupportedLocaleException e) {\n persistedLocale = null;\n ...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_0
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldLoadPersistedLocale_WhenInitialized() {\n // Given\n\n // When\n sut.initialize();\n\n // Then\n verify(localePersistor).load();\n }", "class_method_signature": "LocaleChangerDelegateTest.ShouldLoadPersistedLocale_WhenInitialized()", "c...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void initialize() {\n Locale persistedLocale = persistor.load();\n\n if (persistedLocale != null)\n try {\n currentLocale = resolver.resolve(persistedLocale);\n } catch (UnsupportedLocaleException e) {\n persistedLocale = null;\n ...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_10
{ "fields": [ { "declarator": "LOCALE_ES_ES = new Locale(\"es\", \"ES\")", "modifier": "private static final", "original_string": "private static final Locale LOCALE_ES_ES = new Locale(\"es\", \"ES\");", "type": "Locale", "var_name": "LOCALE_ES_ES" }, { "declarator": "L...
{ "body": "@Test\n public void ShouldResolveFirstSupportedLocaleAsDefault_WhenResolveDefaultLocale_GivenNonMatchingLocales() {\n // Given\n LocaleResolver sut = new LocaleResolver(\n Arrays.asList(LOCALE_ES_ES, LOCALE_IT_IT),\n Arrays.asList(LOCALE_EN_US, LOCALE_FR_FR),\...
{ "fields": [ { "declarator": "supportedLocales", "modifier": "private", "original_string": "private List<Locale> supportedLocales;", "type": "List<Locale>", "var_name": "supportedLocales" }, { "declarator": "systemLocales", "modifier": "private", "original_...
{ "body": "DefaultResolvedLocalePair resolveDefault() {\n\n MatchingLocales matchingPair = matchingAlgorithm.findDefaultMatch(supportedLocales, systemLocales);\n\n return matchingPair != null ?\n new DefaultResolvedLocalePair(matchingPair.getSupportedLocale(), matchingPair.getPreferredLoc...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_7
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldChangeAppLocaleWithAMatchingLocale_WhenChanged_GivenSupportedLocale() throws UnsupportedLocaleException {\n // Given\n doReturn(ANY_LOCALE).when(localeResolver).resolve(ANY_LOCALE);\n\n // When\n sut.setLocale(ANY_LOCALE);\n\n // Then\n ...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void setLocale(Locale supportedLocale) {\n try {\n currentLocale = resolver.resolve(supportedLocale);\n\n persistor.save(supportedLocale);\n\n appLocaleChanger.change(currentLocale);\n\n } catch (UnsupportedLocaleException e) {\n throw new IllegalAr...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
89188081_6
{ "fields": [ { "declarator": "ANY_LOCALE = new Locale(\"anyLanguage\")", "modifier": "private final static", "original_string": "private final static Locale ANY_LOCALE = new Locale(\"anyLanguage\");", "type": "Locale", "var_name": "ANY_LOCALE" }, { "declarator": "local...
{ "body": "@Test\n public void ShouldPersistLocaleWithSupportedLocale_WhenChanged_GivenSupportedLocale() {\n // Given\n\n // When\n sut.setLocale(ANY_LOCALE);\n\n // Then\n verify(localePersistor).save(ANY_LOCALE);\n }", "class_method_signature": "LocaleChangerDelegateTest.S...
{ "fields": [ { "declarator": "persistor", "modifier": "private", "original_string": "private LocalePersistor persistor;", "type": "LocalePersistor", "var_name": "persistor" }, { "declarator": "resolver", "modifier": "private", "original_string": "private Lo...
{ "body": "void setLocale(Locale supportedLocale) {\n try {\n currentLocale = resolver.resolve(supportedLocale);\n\n persistor.save(supportedLocale);\n\n appLocaleChanger.change(currentLocale);\n\n } catch (UnsupportedLocaleException e) {\n throw new IllegalAr...
{ "created": null, "fork": null, "fork_count": 21, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 89188081, "size": 273, "stargazer_count": 87, "stars": null, "updates": null, "url": "https://github.com/franmontiel/LocaleChanger" }
163244687_29
{ "fields": [], "file": "rocketmq/tools/src/test/java/org/apache/rocketmq/tools/command/topic/DeleteTopicSubCommandTest.java", "identifier": "DeleteTopicSubCommandTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExecute() {\n DeleteTopicSubCommand cmd = new DeleteTopicSubCommand();\n Options options = ServerUtil.buildCommandlineOptions(new Options());\n String[] subargs = new String[] {\"-t unit-test\", \"-c default-cluster\"};\n final CommandLine commandLine ...
{ "fields": [], "file": "rocketmq/tools/src/main/java/org/apache/rocketmq/tools/command/topic/DeleteTopicSubCommand.java", "identifier": "DeleteTopicSubCommand", "interfaces": "implements SubCommand", "methods": [ { "class_method_signature": "DeleteTopicSubCommand.deleteTopic(final DefaultMQAdminExt...
{ "body": "@Override\n public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException {\n DefaultMQAdminExt adminExt = new DefaultMQAdminExt(rpcHook);\n adminExt.setInstanceName(Long.toString(System.currentTimeMillis()));\n try {\n String t...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_130
{ "fields": [ { "declarator": "mQClientFactory = MQClientManager.getInstance().getAndCreateMQClientInstance(new ClientConfig())", "modifier": "@Spy\n private", "original_string": "@Spy\n private MQClientInstance mQClientFactory = MQClientManager.getInstance().getAndCreateMQClientInstance(n...
{ "body": "@Test\n public void testSendMessage_ZeroMessage() throws InterruptedException, RemotingException, MQBrokerException {\n try {\n producer.send(zeroMsg);\n failBecauseExceptionWasNotThrown(MQClientException.class);\n } catch (MQClientException e) {\n assertTh...
{ "fields": [ { "declarator": "defaultMQProducerImpl", "modifier": "protected final transient", "original_string": "protected final transient DefaultMQProducerImpl defaultMQProducerImpl;", "type": "DefaultMQProducerImpl", "var_name": "defaultMQProducerImpl" }, { "declar...
{ "body": "@Override\n public SendResult send(\n Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException {\n return this.defaultMQProducerImpl.send(msg);\n }", "class_method_signature": "DefaultMQProducer.send(\n Message msg)", "constructor": fa...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_167
{ "fields": [ { "declarator": "remotingAbstract = new NettyRemotingClient(new NettyClientConfig())", "modifier": "@Spy\n private", "original_string": "@Spy\n private NettyRemotingAbstract remotingAbstract = new NettyRemotingClient(new NettyClientConfig());", "type": "NettyRemotingAbs...
{ "body": "@Test\n public void testProcessResponseCommand() throws InterruptedException {\n final Semaphore semaphore = new Semaphore(0);\n ResponseFuture responseFuture = new ResponseFuture(1, 3000, new InvokeCallback() {\n @Override\n public void operationComplete(final Respon...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);", "type": "Logger", "var_name": "log" ...
{ "body": "public void processResponseCommand(ChannelHandlerContext ctx, RemotingCommand cmd) {\n final int opaque = cmd.getOpaque();\n final ResponseFuture responseFuture = responseTable.get(opaque);\n if (responseFuture != null) {\n responseFuture.setResponseCommand(cmd);\n\n ...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_91
{ "fields": [ { "declarator": "StoreMessage = \"Once, there was a chance for me!\"", "modifier": "private final", "original_string": "private final String StoreMessage = \"Once, there was a chance for me!\";", "type": "String", "var_name": "StoreMessage" }, { "declarato...
{ "body": "@Test\n public void testRecover() throws Exception {\n String topic = \"recoverTopic\";\n MessageBody = StoreMessage.getBytes();\n for (int i = 0; i < 100; i++) {\n MessageExtBrokerInner messageExtBrokerInner = buildMessage();\n messageExtBrokerInner.setTopic(t...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.STORE_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.STORE_LOGGER_NAME);", "type": "Logger", "var_name": "log" }, ...
{ "body": "private void recover(final boolean lastExitOK) {\n long maxPhyOffsetOfConsumeQueue = this.recoverConsumeQueue();\n\n if (lastExitOK) {\n this.commitLog.recoverNormally(maxPhyOffsetOfConsumeQueue);\n } else {\n this.commitLog.recoverAbnormally(maxPhyOffsetOfConsume...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_188
{ "fields": [ { "declarator": "defaultRequestProcessor", "modifier": "private", "original_string": "private DefaultRequestProcessor defaultRequestProcessor;", "type": "DefaultRequestProcessor", "var_name": "defaultRequestProcessor" }, { "declarator": "namesrvController"...
{ "body": "@Test\n public void testProcessRequest_RegisterBrokerWithFilterServer() throws RemotingCommandException,\n NoSuchFieldException, IllegalAccessException {\n RemotingCommand request = genSampleRegisterCmd(true);\n\n // version >= MQVersion.Version.V3_0_11.ordinal() to register with fi...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.NAMESRV_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.NAMESRV_LOGGER_NAME);", "type": "Logger", "var_name": "log" ...
{ "body": "@Override\n public RemotingCommand processRequest(ChannelHandlerContext ctx,\n RemotingCommand request) throws RemotingCommandException {\n if (log.isDebugEnabled()) {\n log.debug(\"receive request, {} {} {}\",\n request.getCode(),\n RemotingHelper....
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_87
{ "fields": [ { "declarator": "LOGGER = getLogger(MappedFileQueueTest.class)", "modifier": "public static final", "original_string": "public static final Logger LOGGER = getLogger(MappedFileQueueTest.class);", "type": "Logger", "var_name": "LOGGER" } ], "file": "rocketmq/stor...
{ "body": "@Test\n public void testDeleteExpiredFileByTime() throws Exception {\n MappedFileQueue mappedFileQueue =\n new MappedFileQueue(\"target/unit_test_store/f/\", 1024, null);\n\n for (int i = 0; i < 100; i++) {\n MappedFile mappedFile = mappedFileQueue.getLastMappedFile(0...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.STORE_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.STORE_LOGGER_NAME);", "type": "Logger", "var_name": "log" }, ...
{ "body": "public int deleteExpiredFileByTime(final long expiredTime,\n final int deleteFilesInterval,\n final long intervalForcibly,\n final boolean cleanImmediately) {\n Object[] mfs = this.copyMappedFiles(0);\n\n if (null == mfs)\n return 0;\n\n int mfsLength = ...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_44
{ "fields": [ { "declarator": "defaultMQAdminExt", "modifier": "private static", "original_string": "private static DefaultMQAdminExt defaultMQAdminExt;", "type": "DefaultMQAdminExt", "var_name": "defaultMQAdminExt" }, { "declarator": "defaultMQAdminExtImpl", "mod...
{ "body": "@Test\n public void testPutKVConfig() throws RemotingException, MQClientException, InterruptedException {\n String topicConfig = defaultMQAdminExt.getKVConfig(NamesrvUtil.NAMESPACE_ORDER_TOPIC_CONFIG, \"UnitTest\");\n assertThat(topicConfig).isEqualTo(\"topicListConfig\");\n KVTable...
{ "fields": [ { "declarator": "defaultMQAdminExtImpl", "modifier": "private final", "original_string": "private final DefaultMQAdminExtImpl defaultMQAdminExtImpl;", "type": "DefaultMQAdminExtImpl", "var_name": "defaultMQAdminExtImpl" }, { "declarator": "adminExtGroup = ...
{ "body": "@Override\n public void putKVConfig(String namespace, String key, String value) {\n defaultMQAdminExtImpl.putKVConfig(namespace, key, value);\n }", "class_method_signature": "DefaultMQAdminExt.putKVConfig(String namespace, String key, String value)", "constructor": false, "full_signature...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_52
{ "fields": [ { "declarator": "defaultMQAdminExt", "modifier": "private static", "original_string": "private static DefaultMQAdminExt defaultMQAdminExt;", "type": "DefaultMQAdminExt", "var_name": "defaultMQAdminExt" }, { "declarator": "defaultMQAdminExtImpl", "mod...
{ "body": "@Test\n public void testGetConsumeStatus() throws InterruptedException, RemotingException, MQClientException, MQBrokerException {\n Map<String, Map<MessageQueue, Long>> result = defaultMQAdminExt.getConsumeStatus(\"unit-test\", \"default-broker-group\", \"127.0.0.1:10911\");\n assertThat(r...
{ "fields": [ { "declarator": "defaultMQAdminExtImpl", "modifier": "private final", "original_string": "private final DefaultMQAdminExtImpl defaultMQAdminExtImpl;", "type": "DefaultMQAdminExtImpl", "var_name": "defaultMQAdminExtImpl" }, { "declarator": "adminExtGroup = ...
{ "body": "@Override\n public Map<String, Map<MessageQueue, Long>> getConsumeStatus(String topic, String group,\n String clientAddr) throws RemotingException,\n MQBrokerException, InterruptedException, MQClientException {\n return defaultMQAdminExtImpl.getConsumeStatus(topic, group, clientAddr...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_215
{ "fields": [ { "declarator": "lowLevelCarreraConsumer", "modifier": "private", "original_string": "private LowLevelCarreraConsumer lowLevelCarreraConsumer;", "type": "LowLevelCarreraConsumer", "var_name": "lowLevelCarreraConsumer" }, { "declarator": "simpleCarreraConsu...
{ "body": "@Test\n public void testSimpleCarreraConsumer() throws InterruptedException{\n simpleCarreraConsumer.startConsume(new MessageProcessor() {\n @Override\n public Result process(Message message, Context context) {\n System.out.println(\"receive msg:\" + context.t...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CarreraConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CarreraConsumer.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public synchronized void startConsume(MessageProcessor processor, int concurrency) {\n baseStartConsume(processor, concurrency, Collections.EMPTY_MAP);\n }", "class_method_signature": "CarreraConsumer.startConsume(MessageProcessor processor, int concurrency)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_151
{ "fields": [ { "declarator": "mqClientInstance = MQClientManager.getInstance().getAndCreateMQClientInstance(new ClientConfig())", "modifier": "private", "original_string": "private MQClientInstance mqClientInstance = MQClientManager.getInstance().getAndCreateMQClientInstance(new ClientConfig())...
{ "body": "@Test\n public void testTopicRouteData2TopicPublishInfo() {\n TopicRouteData topicRouteData = new TopicRouteData();\n\n topicRouteData.setFilterServerTable(new HashMap<String, List<String>>());\n List<BrokerData> brokerDataList = new ArrayList<BrokerData>();\n BrokerData brok...
{ "fields": [ { "declarator": "LOCK_TIMEOUT_MILLIS = 3000", "modifier": "private final static", "original_string": "private final static long LOCK_TIMEOUT_MILLIS = 3000;", "type": "long", "var_name": "LOCK_TIMEOUT_MILLIS" }, { "declarator": "log = ClientLogger.getLog()"...
{ "body": "public static TopicPublishInfo topicRouteData2TopicPublishInfo(final String topic, final TopicRouteData route) {\n TopicPublishInfo info = new TopicPublishInfo();\n info.setTopicRouteData(route);\n if (route.getOrderTopicConf() != null && route.getOrderTopicConf().length() > 0) {\n ...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_48
{ "fields": [ { "declarator": "defaultMQAdminExt", "modifier": "private static", "original_string": "private static DefaultMQAdminExt defaultMQAdminExt;", "type": "DefaultMQAdminExt", "var_name": "defaultMQAdminExt" }, { "declarator": "defaultMQAdminExtImpl", "mod...
{ "body": "@Test\n public void testCleanExpiredConsumerQueueByAddr() throws InterruptedException, RemotingTimeoutException, MQClientException, RemotingSendRequestException, RemotingConnectException {\n boolean clean = defaultMQAdminExt.cleanExpiredConsumerQueueByAddr(\"127.0.0.1:10911\");\n assertTha...
{ "fields": [ { "declarator": "defaultMQAdminExtImpl", "modifier": "private final", "original_string": "private final DefaultMQAdminExtImpl defaultMQAdminExtImpl;", "type": "DefaultMQAdminExtImpl", "var_name": "defaultMQAdminExtImpl" }, { "declarator": "adminExtGroup = ...
{ "body": "@Override\n public boolean cleanExpiredConsumerQueueByAddr(\n String addr) throws RemotingConnectException, RemotingSendRequestException,\n RemotingTimeoutException, MQClientException, InterruptedException {\n return defaultMQAdminExtImpl.cleanExpiredConsumerQueueByAddr(addr);\n ...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_106
{ "fields": [], "file": "rocketmq/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java", "identifier": "UtilAllTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetPid() {\n assertThat(UtilAll.getPid()).isGreaterThan(0);\n }", "class_method_signature": "UtilAllTest.testGetPid()", "constructor": false, "full_signature": "@Test public void testGetPid()", "identifier": "testGetPid", "invocations": [ "isGreaterThan", ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME);", "type": "Logger", "var_name": "log" },...
{ "body": "public static int getPid() {\n RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();\n String name = runtime.getName(); // format: \"pid@hostname\"\n try {\n return Integer.parseInt(name.substring(0, name.indexOf('@')));\n } catch (Exception e) {\n ...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_110
{ "fields": [], "file": "rocketmq/common/src/test/java/org/apache/rocketmq/common/MixAllTest.java", "identifier": "MixAllTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBrokerVIPChannel() {\n assertThat(MixAll.brokerVIPChannel(true, \"127.0.0.1:10911\")).isEqualTo(\"127.0.0.1:10909\");\n }", "class_method_signature": "MixAllTest.testBrokerVIPChannel()", "constructor": false, "full_signature": "@Test public void testBrokerVIPChann...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME);", "type": "Logger", "var_name": "log" },...
{ "body": "public static String brokerVIPChannel(final boolean isChange, final String brokerAddr) {\n if (isChange) {\n String[] ipAndPort = brokerAddr.split(\":\");\n String brokerAddrNew = ipAndPort[0] + \":\" + (Integer.parseInt(ipAndPort[1]) - 2);\n return brokerAddrNew;\n ...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_147
{ "fields": [ { "declarator": "mqClientAPI = new MQClientAPIImpl(new NettyClientConfig(), null, null, new ClientConfig())", "modifier": "private", "original_string": "private MQClientAPIImpl mqClientAPI = new MQClientAPIImpl(new NettyClientConfig(), null, null, new ClientConfig());", "type...
{ "body": "@Test\n public void testSendMessageSync_Success() throws InterruptedException, RemotingException, MQBrokerException {\n doAnswer(new Answer() {\n @Override\n public Object answer(InvocationOnMock mock) throws Throwable {\n RemotingCommand request = mock.getArg...
{ "fields": [ { "declarator": "log = ClientLogger.getLog()", "modifier": "private final static", "original_string": "private final static Logger log = ClientLogger.getLog();", "type": "Logger", "var_name": "log" }, { "declarator": "sendSmartMsg =\n Boolean.parseB...
{ "body": "public SendResult sendMessage(\n final String addr,\n final String brokerName,\n final Message msg,\n final SendMessageRequestHeader requestHeader,\n final long timeoutMillis,\n final CommunicationMode communicationMode,\n final SendMessageContext context,\n...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_146
{ "fields": [ { "declarator": "mqClientAPI = new MQClientAPIImpl(new NettyClientConfig(), null, null, new ClientConfig())", "modifier": "private", "original_string": "private MQClientAPIImpl mqClientAPI = new MQClientAPIImpl(new NettyClientConfig(), null, null, new ClientConfig());", "type...
{ "body": "@Test\n public void testSendMessageOneWay_WithException() throws RemotingException, InterruptedException, MQBrokerException {\n doThrow(new RemotingTimeoutException(\"Remoting Exception in Test\")).when(remotingClient).invokeOneway(anyString(), any(RemotingCommand.class), anyLong());\n try...
{ "fields": [ { "declarator": "log = ClientLogger.getLog()", "modifier": "private final static", "original_string": "private final static Logger log = ClientLogger.getLog();", "type": "Logger", "var_name": "log" }, { "declarator": "sendSmartMsg =\n Boolean.parseB...
{ "body": "public SendResult sendMessage(\n final String addr,\n final String brokerName,\n final Message msg,\n final SendMessageRequestHeader requestHeader,\n final long timeoutMillis,\n final CommunicationMode communicationMode,\n final SendMessageContext context,\n...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_111
{ "fields": [], "file": "rocketmq/common/src/test/java/org/apache/rocketmq/common/MixAllTest.java", "identifier": "MixAllTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompareAndIncreaseOnly() {\n AtomicLong target = new AtomicLong(5);\n assertThat(MixAll.compareAndIncreaseOnly(target, 6)).isTrue();\n assertThat(target.get()).isEqualTo(6);\n\n assertThat(MixAll.compareAndIncreaseOnly(target, 4)).isFalse();\n a...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME);", "type": "Logger", "var_name": "log" },...
{ "body": "public static boolean compareAndIncreaseOnly(final AtomicLong target, final long value) {\n long prev = target.get();\n while (value > prev) {\n boolean updated = target.compareAndSet(prev, value);\n if (updated)\n return true;\n\n prev = target...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_107
{ "fields": [], "file": "rocketmq/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java", "identifier": "UtilAllTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetDiskPartitionSpaceUsedPercent() {\n String tmpDir = System.getProperty(\"java.io.tmpdir\");\n\n assertThat(UtilAll.getDiskPartitionSpaceUsedPercent(null)).isCloseTo(-1, within(0.000001));\n assertThat(UtilAll.getDiskPartitionSpaceUsedPercent(\"\")).isClose...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.COMMON_LOGGER_NAME);", "type": "Logger", "var_name": "log" },...
{ "body": "public static double getDiskPartitionSpaceUsedPercent(final String path) {\n if (null == path || path.isEmpty())\n return -1;\n\n try {\n File file = new File(path);\n\n if (!file.exists())\n return -1;\n\n long totalSpace = file.getT...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_150
{ "fields": [ { "declarator": "mqClientAPI = new MQClientAPIImpl(new NettyClientConfig(), null, null, new ClientConfig())", "modifier": "private", "original_string": "private MQClientAPIImpl mqClientAPI = new MQClientAPIImpl(new NettyClientConfig(), null, null, new ClientConfig());", "type...
{ "body": "@Test\n public void testSendMessageAsync_WithException() throws RemotingException, InterruptedException, MQBrokerException {\n doThrow(new RemotingTimeoutException(\"Remoting Exception in Test\")).when(remotingClient)\n .invokeAsync(anyString(), any(RemotingCommand.class), anyLong(), a...
{ "fields": [ { "declarator": "log = ClientLogger.getLog()", "modifier": "private final static", "original_string": "private final static Logger log = ClientLogger.getLog();", "type": "Logger", "var_name": "log" }, { "declarator": "sendSmartMsg =\n Boolean.parseB...
{ "body": "public SendResult sendMessage(\n final String addr,\n final String brokerName,\n final Message msg,\n final SendMessageRequestHeader requestHeader,\n final long timeoutMillis,\n final CommunicationMode communicationMode,\n final SendMessageContext context,\n...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_49
{ "fields": [ { "declarator": "defaultMQAdminExt", "modifier": "private static", "original_string": "private static DefaultMQAdminExt defaultMQAdminExt;", "type": "DefaultMQAdminExt", "var_name": "defaultMQAdminExt" }, { "declarator": "defaultMQAdminExtImpl", "mod...
{ "body": "@Test\n public void testCleanUnusedTopic() throws InterruptedException, RemotingTimeoutException, MQClientException, RemotingSendRequestException, RemotingConnectException {\n boolean result = defaultMQAdminExt.cleanUnusedTopic(\"default-cluster\");\n assertThat(result).isFalse();\n }",...
{ "fields": [ { "declarator": "defaultMQAdminExtImpl", "modifier": "private final", "original_string": "private final DefaultMQAdminExtImpl defaultMQAdminExtImpl;", "type": "DefaultMQAdminExtImpl", "var_name": "defaultMQAdminExtImpl" }, { "declarator": "adminExtGroup = ...
{ "body": "@Override\n public boolean cleanUnusedTopic(String cluster) throws RemotingConnectException, RemotingSendRequestException,\n RemotingTimeoutException, MQClientException, InterruptedException {\n return defaultMQAdminExtImpl.cleanUnusedTopicByAddr(cluster);\n }", "class_method_signatur...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_73
{ "fields": [ { "declarator": "pullMessageProcessor", "modifier": "private", "original_string": "private PullMessageProcessor pullMessageProcessor;", "type": "PullMessageProcessor", "var_name": "pullMessageProcessor" }, { "declarator": "brokerController = new BrokerCont...
{ "body": "@Test\n public void testProcessRequest_TopicNotExist() throws RemotingCommandException {\n brokerController.getTopicConfigManager().getTopicConfigTable().remove(topic);\n final RemotingCommand request = createPullMsgCommand(RequestCode.PULL_MESSAGE);\n RemotingCommand response = pul...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(LoggerName.BROKER_LOGGER_NAME)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(LoggerName.BROKER_LOGGER_NAME);", "type": "Logger", "var_name": "log" },...
{ "body": "@Override\n public RemotingCommand processRequest(final ChannelHandlerContext ctx,\n RemotingCommand request) throws RemotingCommandException {\n return this.processRequest(ctx.channel(), request, true);\n }", "class_method_signature": "PullMessageProcessor.processRequest(final Channe...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_214
{ "fields": [ { "declarator": "lowLevelCarreraConsumer", "modifier": "private", "original_string": "private LowLevelCarreraConsumer lowLevelCarreraConsumer;", "type": "LowLevelCarreraConsumer", "var_name": "lowLevelCarreraConsumer" }, { "declarator": "simpleCarreraConsu...
{ "body": "@Test\n public void testLowLevelCarreraConsumer() throws InterruptedException {\n lowLevelCarreraConsumer.startConsume(new MessageProcessor() {\n @Override\n public Result process(Message message, Context context) {\n System.out.println(\"receive msg:\" + cont...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(CarreraConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CarreraConsumer.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public synchronized void startConsume(MessageProcessor processor, int concurrency) {\n baseStartConsume(processor, concurrency, Collections.EMPTY_MAP);\n }", "class_method_signature": "CarreraConsumer.startConsume(MessageProcessor processor, int concurrency)", "constructor": false, "full_si...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_53
{ "fields": [ { "declarator": "defaultMQAdminExt", "modifier": "private static", "original_string": "private static DefaultMQAdminExt defaultMQAdminExt;", "type": "DefaultMQAdminExt", "var_name": "defaultMQAdminExt" }, { "declarator": "defaultMQAdminExtImpl", "mod...
{ "body": "@Test\n public void testGetTopicClusterList() throws InterruptedException, RemotingException, MQClientException, MQBrokerException {\n Set<String> result = defaultMQAdminExt.getTopicClusterList(\"unit-test\");\n assertThat(result.size()).isEqualTo(0);\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "defaultMQAdminExtImpl", "modifier": "private final", "original_string": "private final DefaultMQAdminExtImpl defaultMQAdminExtImpl;", "type": "DefaultMQAdminExtImpl", "var_name": "defaultMQAdminExtImpl" }, { "declarator": "adminExtGroup = ...
{ "body": "@Override\n public Set<String> getTopicClusterList(\n final String topic) throws InterruptedException, MQBrokerException, MQClientException, RemotingException {\n return this.defaultMQAdminExtImpl.getTopicClusterList(topic);\n }", "class_method_signature": "DefaultMQAdminExt.getTopicC...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }
163244687_45
{ "fields": [ { "declarator": "defaultMQAdminExt", "modifier": "private static", "original_string": "private static DefaultMQAdminExt defaultMQAdminExt;", "type": "DefaultMQAdminExt", "var_name": "defaultMQAdminExt" }, { "declarator": "defaultMQAdminExtImpl", "mod...
{ "body": "@Test\n public void testQueryTopicConsumeByWho() throws InterruptedException, RemotingException, MQClientException, MQBrokerException {\n GroupList groupList = defaultMQAdminExt.queryTopicConsumeByWho(\"UnitTest\");\n assertThat(groupList.getGroupList().contains(\"consumer-group-two\")).is...
{ "fields": [ { "declarator": "defaultMQAdminExtImpl", "modifier": "private final", "original_string": "private final DefaultMQAdminExtImpl defaultMQAdminExtImpl;", "type": "DefaultMQAdminExtImpl", "var_name": "defaultMQAdminExtImpl" }, { "declarator": "adminExtGroup = ...
{ "body": "@Override\n public GroupList queryTopicConsumeByWho(\n String topic) throws InterruptedException, MQBrokerException, RemotingException,\n MQClientException {\n return this.defaultMQAdminExtImpl.queryTopicConsumeByWho(topic);\n }", "class_method_signature": "DefaultMQAdminExt.qu...
{ "created": null, "fork": null, "fork_count": 258, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 163244687, "size": 18470, "stargazer_count": 987, "stars": null, "updates": null, "url": "https://github.com/didi/DDMQ" }