id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
26442054_7
{ "fields": [ { "declarator": "message", "modifier": "", "original_string": "MultipartReplyMessage message;", "type": "MultipartReplyMessage", "var_name": "message" }, { "declarator": "MESSAGE_TYPE = 19", "modifier": "private static final", "original_string"...
{ "body": "@Test\n public void testGroupFeaturesSerialize() {\n builder.setType(MultipartType.forValue(8));\n MultipartReplyGroupFeaturesCaseBuilder featureCase = new MultipartReplyGroupFeaturesCaseBuilder();\n MultipartReplyGroupFeaturesBuilder feature = new MultipartReplyGroupFeaturesBuilder...
{ "fields": [ { "declarator": "MESSAGE_TYPE = 19", "modifier": "private static final", "original_string": "private static final byte MESSAGE_TYPE = 19;", "type": "byte", "var_name": "MESSAGE_TYPE" }, { "declarator": "registry", "modifier": "private", "origin...
{ "body": "@Override\n public void serialize(MultipartReplyMessage message, ByteBuf outBuffer) {\n ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH);\n outBuffer.writeShort(message.getType().getIntValue());\n writeFlags(message.getFlags(), outBuffer);\n...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 26442054, "size": 112693, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/fp7-netide/Engine" }
26442054_18
{ "fields": [ { "declarator": "message", "modifier": "", "original_string": "RoleRequestOutput message;", "type": "RoleRequestOutput", "var_name": "message" }, { "declarator": "MESSAGE_TYPE = 25", "modifier": "private static final", "original_string": "priva...
{ "body": "@Test\n public void testSerialize() {\n RoleReplyMessageFactory serializer = new RoleReplyMessageFactory();\n SerializerRegistry registry = new NetIdeSerializerRegistryImpl();\n registry.init();\n ByteBuf serializedBuffer = UnpooledByteBufAllocator.DEFAULT.buffer();\n ...
{ "fields": [ { "declarator": "MESSAGE_TYPE = 25", "modifier": "private static final", "original_string": "private static final byte MESSAGE_TYPE = 25;", "type": "byte", "var_name": "MESSAGE_TYPE" }, { "declarator": "PADDING = 4", "modifier": "private static final...
{ "body": "@Override\n public void serialize(RoleRequestOutput message, ByteBuf outBuffer) {\n ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH);\n outBuffer.writeInt(message.getRole().getIntValue());\n outBuffer.writeZero(PADDING);\n outBuffer.w...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 26442054, "size": 112693, "stargazer_count": 9, "stars": null, "updates": null, "url": "https://github.com/fp7-netide/Engine" }
56717384_7
{ "fields": [ { "declarator": "incompleteResult", "modifier": "private", "original_string": "private PackResult incompleteResult;", "type": "PackResult", "var_name": "incompleteResult" }, { "declarator": "completeResult", "modifier": "private", "original_str...
{ "body": "@Test\n\tvoid packagerCanBeInterrupted() throws InterruptedException {\n\t\tfinal Container container = new ValidatingContainer(\"\", 1000, 1500, 3200, 0);\n\t\tfinal List<Container> singleContainer = Collections.singletonList(container);\n\t\tfinal BruteForcePackager bruteForcePackager = new BruteForcePac...
{ "fields": [ { "declarator": "containers", "modifier": "protected final", "original_string": "protected final Container[] containers;", "type": "Container[]", "var_name": "containers" }, { "declarator": "rotate3D", "modifier": "protected final", "original_s...
{ "body": "public Container pack(List<BoxItem> boxes) {\n\t\treturn pack(boxes, Long.MAX_VALUE);\n\t}", "class_method_signature": "Packager.pack(List<BoxItem> boxes)", "constructor": false, "full_signature": "public Container pack(List<BoxItem> boxes)", "identifier": "pack", "invocations": [ "pack" ],...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_30
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testBouwcampCodes33x32A() {\n\t\tBouwkampCodeDirectory directory = BouwkampCodeDirectory.getInstance();\n\n\t\tBouwkampCode bkpLine = directory.codesForCount(9, \"33x32A\");\n\t\t\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(toContainer(bkpLine));\n\t\tBruteForcePa...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_26
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid test3DBruteForceFor6PacketsIssue28() {\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 152, 252, 1, 0));\n\t\tPackager bruteForcePackager = new BruteForcePackager(containers, true, true, 1);\n\n\t\tList<BoxItem> products1 = Arra...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_10
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BoxTest.java", "identifier": "BoxTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testSmallestFootprintMinimum() {\n\t\t\n\t\tBox box = new Box(1, 1, 10, 0);\n\t\t\n\t\tAssert.assertTrue(box.fitRotate3DSmallestFootprint(1, 1, 10));\n\t\tassertThat(box.getWidth(), is(1));\n\t\tassertThat(box.getDepth(), is(1));\n\t\tassertThat(box.getHeight(), is(10));\n\n\t\tAssert.assertT...
{ "fields": [ { "declarator": "weight", "modifier": "final", "original_string": "final int weight;", "type": "int", "var_name": "weight" } ], "file": "core/src/main/java/com/github/skjolber/packing/Box.java", "identifier": "Box", "interfaces": "", "methods": [ { ...
{ "body": "boolean fitRotate3DSmallestFootprint(Dimension space) {\n\t\treturn fitRotate3DSmallestFootprint(space.getWidth(), space.getDepth(), space.getHeight());\n\t}", "class_method_signature": "Box.fitRotate3DSmallestFootprint(Dimension space)", "constructor": false, "full_signature": " boolean fitRotate3DS...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_11
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/LevelTest.java", "identifier": "LevelTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testValidator() {\n\t\tLevel level = new Level();\n\t\tPlacement a = new Placement(new Space(1, 1, 1, 0, 0, 0), new Box(1, 1, 1, 0));\n\t\tlevel.add(a);\n\n\t\tPlacement b = new Placement(new Space(1, 1, 1, 1, 0, 0), new Box(1, 1, 1, 0));\n\t\tlevel.add(b);\n\n\t\tlevel.validate();\n\t\t\n\t}...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/src/main/java/com/github/skjolber/packing/Level....
{ "body": "public void validate() {\n\t\tfor(int i = 0; i < size(); i++) {\n\t\t\tfor(int j = 0; j < size(); j++) {\n\t\t\t\tif(j == i) {\n\t\t\t\t\tif(!get(i).intersects(get(j))) {\n\t\t\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(get(i).intersects(get(j))) {\n\t\t\t\t\t...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_27
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testBruteForceFor6PacketsIssue28() {\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 152, 252, 58, 0));\n\t\tPackager bruteForcePackager = new BruteForcePackager(containers, false, true, 1);\n\n\t\tList<BoxItem> products1 = Arra...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_31
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testBouwcampCodes() {\n\t\t// these does not really result in successful stacking, but still should run as expected\n\t\tBouwkampCodeDirectory directory = BouwkampCodeDirectory.getInstance();\n\t\t\n\t\tList<BouwkampCodes> codesForCount = directory.codesForCount(10);\n\t\tfor(BouwkampCodes c ...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_6
{ "fields": [ { "declarator": "incompleteResult", "modifier": "private", "original_string": "private PackResult incompleteResult;", "type": "PackResult", "var_name": "incompleteResult" }, { "declarator": "completeResult", "modifier": "private", "original_str...
{ "body": "@Test\n\tvoid testLimitIsRespected() {\n\n\t\tlong deadline = System.currentTimeMillis() + 100000;\n\n\t\tList<Container> containers = new ArrayList<>();\n\n\t\tcontainers.add(new ValidatingContainer(\"0\", 5, 5, 1, 0));\n\n\t\tList<BoxItem> products = new ArrayList<>();\n\n\t\tproducts.add(new BoxItem(new...
{ "fields": [ { "declarator": "containers", "modifier": "protected final", "original_string": "protected final Container[] containers;", "type": "Container[]", "var_name": "containers" }, { "declarator": "rotate3D", "modifier": "protected final", "original_s...
{ "body": "public List<Container> packList(List<BoxItem> boxes, int limit, long deadline) {\n\t\treturn packList(boxes, limit, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build());\n\t}", "class_method_signature": "Packager.packList(List<BoxItem> boxes, int limit, long deadl...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_16
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingBinary1() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 2, 2, 1, 0));\n\t\tBruteForcePackager packager = new BruteForcePackager(containers);\n\n\t\tList<BoxItem> products = new ArrayList<>();\n\n\t\tfor(int i =...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_1
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/SpaceTest.java", "identifier": "SpaceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testEquals() {\n\t\tassertEquals(new Space(1, 2, 3, 4, 5, 6), new Space(1, 2, 3, 4, 5, 6));\n\t}", "class_method_signature": "SpaceTest.testEquals()", "constructor": false, "full_signature": "@Test void testEquals()", "identifier": "testEquals", "invocations": [ "assertEquals" ...
{ "fields": [ { "declarator": "parent", "modifier": "private", "original_string": "private Space parent;", "type": "Space", "var_name": "parent" }, { "declarator": "remainder", "modifier": "private", "original_string": "private Space remainder;", "type...
{ "body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (!super.equals(obj))\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tSpace other = (Space) obj;\n\t\tif (parent == null) {\n\t\t\tif (other.parent != null)\n\t\t\t\tretur...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_36
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/ContainerTest.java", "identifier": "ContainerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\t\tvoid testGetUsedSpaceWhenEmpty() {\n assertEquals(new Dimension(0, 0, 0), new Container(0, 0, 0, 0).getUsedSpace());\n }", "class_method_signature": "ContainerTest.testGetUsedSpaceWhenEmpty()", "constructor": false, "full_signature": "@Test void testGetUsedSpaceWhenEmpty()", "i...
{ "fields": [ { "declarator": "stackWeight = 0", "modifier": "protected", "original_string": "protected int stackWeight = 0;", "type": "int", "var_name": "stackWeight" }, { "declarator": "stackHeight = 0", "modifier": "protected", "original_string": "protect...
{ "body": "public Dimension getUsedSpace() {\n\t\tDimension maxBox = Dimension.EMPTY;\n\t\tfor (Level level : levels) {\n\t\t\tmaxBox = getUsedSpace(level, maxBox);\n\t\t}\n\t\treturn maxBox;\n\t}", "class_method_signature": "Container.getUsedSpace()", "constructor": false, "full_signature": "public Dimension g...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_20
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStacking3xLP() {\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 350, 150, 400, 0));\n\t\tBruteForcePackager packager = new BruteForcePackager(containers);\n\n\t\tList<BoxItem> products1 = new ArrayList<>();\n\n\t\tproducts1...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_21
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testLargestAreaFitFirstDoesNotWork() {\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 15, 10, 10, 0));\n\t\tPackager bruteForcePackager = new BruteForcePackager(containers, true, true, 1);\n\t\tLargestAreaFitFirstPackager packa...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_0
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/DimensionTest.java", "identifier": "DimensionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testEquals() {\n\t\tassertEquals(new Dimension(1, 1, 1), new Dimension(1, 1, 1));\n\t}", "class_method_signature": "DimensionTest.testEquals()", "constructor": false, "full_signature": "@Test void testEquals()", "identifier": "testEquals", "invocations": [ "assertEquals" ], ...
{ "fields": [ { "declarator": "EMPTY = new Dimension(0, 0, 0)", "modifier": "public static final", "original_string": "public static final Dimension EMPTY = new Dimension(0, 0, 0);", "type": "Dimension", "var_name": "EMPTY" }, { "declarator": "width", "modifier": ...
{ "body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tDimension other = (Dimension) obj;\n\t\tif (depth != other.depth)\n\t\t\treturn false;\n\t\tif (height != ot...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_17
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingBinary2() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 8, 8, 1, 0));\n\t\tBruteForcePackager packager = new BruteForcePackager(containers);\n\n\t\tList<BoxItem> products = new ArrayList<>();\n\n\t\tproducts.ad...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_14
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingRectanglesOnSquareRectangle() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 10, 10, 1, 0));\n\t\tBruteForcePackager packager = new BruteForcePackager(containers);\n\n\t\tList<BoxItem> products = new ArrayList<>...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_22
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testPackagingExposesVolumeUsed() {\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 60, 25, 20, 0));\n\t\tPackager bruteForcePackager = new BruteForcePackager(containers, true, true, 1);\n\n\t\tList<BoxItem> products1 = Arrays.as...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_34
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/impl/BinarySearchIteratorTest.java", "identifier": "BinarySearchIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testLower() {\n\t\t\n\t\tBinarySearchIterator iterator = new BinarySearchIterator(0, 15);\n\t\t\n\t\tint mid = Integer.MAX_VALUE;\n\t\t\n\t\twhile(iterator.hasNext()) {\n\t\t\t\n\t\t\tint next = iterator.next();\n\t\t\t\n\t\t\tassertTrue(next < mid);\n\t\t\t\n\t\t\tmid = next;\n\t\t\t\n\t\t\t...
{ "fields": [ { "declarator": "low", "modifier": "private", "original_string": "private int low;", "type": "int", "var_name": "low" }, { "declarator": "high", "modifier": "private", "original_string": "private int high;", "type": "int", "var_name...
{ "body": "public void lower() {\n\t\thigh = mid - 1;\n\t}", "class_method_signature": "BinarySearchIterator.lower()", "constructor": false, "full_signature": "public void lower()", "identifier": "lower", "invocations": [], "modifiers": "public", "parameters": "()", "return": "void", "signature": "v...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_18
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingTooHigh() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 10, 10, 5, 0));\n\t\tBruteForcePackager packager = new BruteForcePackager(containers);\n\n\t\tList<BoxItem> products = new ArrayList<>();\n\n\t\tproducts....
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_3
{ "fields": [ { "declarator": "incompleteResult", "modifier": "private", "original_string": "private PackResult incompleteResult;", "type": "PackResult", "var_name": "incompleteResult" }, { "declarator": "completeResult", "modifier": "private", "original_str...
{ "body": "@Test\n\tvoid testBinarySearchChecksBoxesBelowPositiveBetterMatch() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\n\t\tcontainers.add(new ValidatingContainer(\"0\", 5, 5, 1, 0));\n\t\tcontainers.add(new ValidatingContainer(\"1\", 5, 5, 1, 0));\n\t\tcontainers.add(new ValidatingContainer(\"2\",...
{ "fields": [ { "declarator": "containers", "modifier": "protected final", "original_string": "protected final Container[] containers;", "type": "Container[]", "var_name": "containers" }, { "declarator": "rotate3D", "modifier": "protected final", "original_s...
{ "body": "public Container pack(List<BoxItem> boxes) {\n\t\treturn pack(boxes, Long.MAX_VALUE);\n\t}", "class_method_signature": "Packager.pack(List<BoxItem> boxes)", "constructor": false, "full_signature": "public Container pack(List<BoxItem> boxes)", "identifier": "pack", "invocations": [ "pack" ],...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_2
{ "fields": [ { "declarator": "incompleteResult", "modifier": "private", "original_string": "private PackResult incompleteResult;", "type": "PackResult", "var_name": "incompleteResult" }, { "declarator": "completeResult", "modifier": "private", "original_str...
{ "body": "@Test\n\tvoid testBinarySearchChecksBoxesBelowPositive() {\n\n\t\tlong deadline = System.currentTimeMillis() + 100000;\n\n\t\tList<Container> containers = new ArrayList<>();\n\n\t\tcontainers.add(new ValidatingContainer(\"0\", 5, 5, 1, 0));\n\t\tcontainers.add(new ValidatingContainer(\"1\", 5, 5, 1, 0));\n...
{ "fields": [ { "declarator": "containers", "modifier": "protected final", "original_string": "protected final Container[] containers;", "type": "Container[]", "var_name": "containers" }, { "declarator": "rotate3D", "modifier": "protected final", "original_s...
{ "body": "public Container pack(List<BoxItem> boxes) {\n\t\treturn pack(boxes, Long.MAX_VALUE);\n\t}", "class_method_signature": "Packager.pack(List<BoxItem> boxes)", "constructor": false, "full_signature": "public Container pack(List<BoxItem> boxes)", "identifier": "pack", "invocations": [ "pack" ],...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_19
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingTooHighLevel() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 10, 10, 5, 0));\n\t\tBruteForcePackager packager = new BruteForcePackager(containers);\n\n\t\tList<BoxItem> products = new ArrayList<>();\n\n\t\tprod...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_35
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/ContainerTest.java", "identifier": "ContainerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testEquals() {\n\t\tassertEquals(new Container(1, 1, 1, 0), new Container(new Dimension(1, 1, 1), 1));\n\t}", "class_method_signature": "ContainerTest.testEquals()", "constructor": false, "full_signature": "@Test void testEquals()", "identifier": "testEquals", "invocations": [ "...
{ "fields": [ { "declarator": "stackWeight = 0", "modifier": "protected", "original_string": "protected int stackWeight = 0;", "type": "int", "var_name": "stackWeight" }, { "declarator": "stackHeight = 0", "modifier": "protected", "original_string": "protect...
{ "body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (!super.equals(obj))\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tContainer other = (Container) obj;\n\t\tif (levels == null) {\n\t\t\tif (other.levels != null)\n\t\t\...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_23
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\t@Disabled\n\tvoid testRunsPerformanceGraphLinearStacking() {\n\t\tlong duration = 60 * 10;\n\n\t\t// n! permutations\n\t\t// 6 rotations per box\n\t\t// so something like n! * 6^n combinations, each needing to be stacked\n\t\t//\n\t\t// anyways my laptop cannot do more than perhaps 10 within 5 sec...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_15
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingRectanglesOnSquareRectangleVolumeFirst() {\n\t\t// this test uses the space between the level floor and box top\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 10, 10, 4, 0));\n\t\tBruteForcePackager packager = new B...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_24
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testIssue11ArrayOutOfBounds() {\n\t\tList<Container> containers = Arrays.asList(\n\t\t\tnew ValidatingContainer(\"2\", 330, 222, 121, 0),\n\t\t\tnew ValidatingContainer(\"4\", 330, 235, 225, 0)\n\t\t);\n\n\t\tList<BoxItem> items = Arrays.asList(\n\t\t\tnew BoxItem(new Box(105, 105, 293, 0), 1...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_32
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingRectanglesOnSquareWithReuse() {\n\t\tint n = 12;\n\t\tint boxesPerLevel = 4;\n\n\t\tList<Container> containers = new ArrayList<>();\n\t\tint levels = n / boxesPerLevel + (n % boxesPerLevel > 0 ? 1 : 0);\n\n\t\tcontainers.add(new ValidatingContainer(2 * boxesPerLevel / 2, 1 * (boxe...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_5
{ "fields": [ { "declarator": "incompleteResult", "modifier": "private", "original_string": "private PackResult incompleteResult;", "type": "PackResult", "var_name": "incompleteResult" }, { "declarator": "completeResult", "modifier": "private", "original_str...
{ "body": "@Test\n\tvoid testBinarySearchChecksBoxesTheLastBox() {\n\n\t\tlong deadline = System.currentTimeMillis() + 100000;\n\n\t\tList<Container> containers = new ArrayList<>();\n\n\t\tcontainers.add(new ValidatingContainer(\"0\", 5, 5, 1, 0));\n\t\tcontainers.add(new ValidatingContainer(\"1\", 5, 5, 1, 0));\n\t\...
{ "fields": [ { "declarator": "containers", "modifier": "protected final", "original_string": "protected final Container[] containers;", "type": "Container[]", "var_name": "containers" }, { "declarator": "rotate3D", "modifier": "protected final", "original_s...
{ "body": "public Container pack(List<BoxItem> boxes) {\n\t\treturn pack(boxes, Long.MAX_VALUE);\n\t}", "class_method_signature": "Packager.pack(List<BoxItem> boxes)", "constructor": false, "full_signature": "public Container pack(List<BoxItem> boxes)", "identifier": "pack", "invocations": [ "pack" ],...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_28
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testPackagerWith3ContainersAnd1BoxItemUsingSingleConstraint() {\n\t\tfinal List<Container> containers = Arrays.asList(\n\t\t\t\tnew ValidatingContainer(1,1,4417,1),\n\t\t\t\tnew ValidatingContainer(4417,1,1,1),\n\t\t\t\tnew ValidatingContainer(1,4417,1,1));\n\t\tfinal List<BoxItem> packets = ...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_12
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/LevelTest.java", "identifier": "LevelTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testValidatorThrowsException() {\n\t\tLevel level = new Level();\n\t\tPlacement a = new Placement(new Space(1, 1, 1, 0, 0, 0), new Box(2, 1, 1, 0));\n\t\tlevel.add(a);\n\n\t\tPlacement b = new Placement(new Space(1, 1, 1, 1, 0, 0), new Box(1, 1, 1, 0));\n\t\tlevel.add(b);\n\n\t\tassertThrows(...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "core/src/main/java/com/github/skjolber/packing/Level....
{ "body": "public void validate() {\n\t\tfor(int i = 0; i < size(); i++) {\n\t\t\tfor(int j = 0; j < size(); j++) {\n\t\t\t\tif(j == i) {\n\t\t\t\t\tif(!get(i).intersects(get(j))) {\n\t\t\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(get(i).intersects(get(j))) {\n\t\t\t\t\t...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_9
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BoxTest.java", "identifier": "BoxTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testFitInFootprintRotate() {\n\t\t\n\t\tBox box = new Box(1, 6, 3, 0);\n\t\t\n\t\tAssert.assertTrue(box.fitRotate2D(1, 6));\n\t\tassertThat(box.getWidth(), is(1));\n\t\tassertThat(box.getDepth(), is(6));\n\t\tAssert.assertTrue(box.fitRotate2D(6, 1));\n\t\tassertThat(box.getWidth(), is(6));\n\...
{ "fields": [ { "declarator": "weight", "modifier": "final", "original_string": "final int weight;", "type": "int", "var_name": "weight" } ], "file": "core/src/main/java/com/github/skjolber/packing/Box.java", "identifier": "Box", "interfaces": "", "methods": [ { ...
{ "body": "boolean fitRotate2D(int w, int d) {\n\n\t\tif (w >= width && d >= depth) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (d >= width && w >= depth) {\n\t\t\trotate2D();\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "class_method_signature": "Box.fitRotate2D(int w, int d)", "constructor": false, "fu...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_8
{ "fields": [ { "declarator": "incompleteResult", "modifier": "private", "original_string": "private PackResult incompleteResult;", "type": "PackResult", "var_name": "incompleteResult" }, { "declarator": "completeResult", "modifier": "private", "original_str...
{ "body": "@Test\n\tvoid packagerCanBeInterruptedWithAFunction() throws InterruptedException {\n\t\tfinal Container container = new ValidatingContainer(\"\", 1000, 1500, 3200, 0);\n\t\tfinal List<Container> singleContainer = Collections.singletonList(container);\n\t\tfinal BruteForcePackager bruteForcePackager = new ...
{ "fields": [ { "declarator": "containers", "modifier": "protected final", "original_string": "protected final Container[] containers;", "type": "Container[]", "var_name": "containers" }, { "declarator": "rotate3D", "modifier": "protected final", "original_s...
{ "body": "public Container pack(List<BoxItem> boxes) {\n\t\treturn pack(boxes, Long.MAX_VALUE);\n\t}", "class_method_signature": "Packager.pack(List<BoxItem> boxes)", "constructor": false, "full_signature": "public Container pack(List<BoxItem> boxes)", "identifier": "pack", "invocations": [ "pack" ],...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_13
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testStackingRectanglesOnSquare() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 10, 10, 1, 0));\n\t\tBruteForcePackager packager = new BruteForcePackager(containers);\n\n\t\tList<BoxItem> products = new ArrayList<>();\n\n\t...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_29
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid testExpansionOfRemainderSpace() {\n\t\t// issue 159\n\t\tList<Container> containers = new ArrayList<>();\n\t\tContainer container = new ValidatingContainer(\"X\",100, 36, 1, 1000);\n\t\tcontainers.add(container);\n\n\t\tList<BoxItem> products = new ArrayList<>();\n\t\tproducts.add(new BoxItem...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_4
{ "fields": [ { "declarator": "incompleteResult", "modifier": "private", "original_string": "private PackResult incompleteResult;", "type": "PackResult", "var_name": "incompleteResult" }, { "declarator": "completeResult", "modifier": "private", "original_str...
{ "body": "@Test\n\tvoid testBinarySearchChecksBoxesTheFirstBox() {\n\n\t\tList<Container> containers = new ArrayList<>();\n\n\t\tcontainers.add(new ValidatingContainer(\"0\", 5, 5, 1, 0));\n\t\tcontainers.add(new ValidatingContainer(\"1\", 5, 5, 1, 0));\n\t\tcontainers.add(new ValidatingContainer(\"2\", 5, 5, 1, 0))...
{ "fields": [ { "declarator": "containers", "modifier": "protected final", "original_string": "protected final Container[] containers;", "type": "Container[]", "var_name": "containers" }, { "declarator": "rotate3D", "modifier": "protected final", "original_s...
{ "body": "public Container pack(List<BoxItem> boxes) {\n\t\treturn pack(boxes, Long.MAX_VALUE);\n\t}", "class_method_signature": "Packager.pack(List<BoxItem> boxes)", "constructor": false, "full_signature": "public Container pack(List<BoxItem> boxes)", "identifier": "pack", "invocations": [ "pack" ],...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_33
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/impl/BinarySearchIteratorTest.java", "identifier": "BinarySearchIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tvoid testHigher() {\n\t\t\n\t\tBinarySearchIterator iterator = new BinarySearchIterator(0, 15);\n\t\t\n\t\tint mid = -1;\n\t\t\n\t\twhile(iterator.hasNext()) {\n\t\t\t\n\t\t\tint next = iterator.next();\n\t\t\t\n\t\t\tassertTrue(next > mid);\n\t\t\t\n\t\t\tmid = next;\n\t\t\t\n\t\t\titerator.highe...
{ "fields": [ { "declarator": "low", "modifier": "private", "original_string": "private int low;", "type": "int", "var_name": "low" }, { "declarator": "high", "modifier": "private", "original_string": "private int high;", "type": "int", "var_name...
{ "body": "public void higher() {\n\t\tlow = mid + 1;\n\t}", "class_method_signature": "BinarySearchIterator.higher()", "constructor": false, "full_signature": "public void higher()", "identifier": "higher", "invocations": [], "modifiers": "public", "parameters": "()", "return": "void", "signature":...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
56717384_25
{ "fields": [], "file": "core/src/test/java/com/github/skjolber/packing/BruteForcePackagerTest.java", "identifier": "BruteForcePackagerTest", "interfaces": "", "superclass": "extends AbstractPackagerTest" }
{ "body": "@Test\n\tvoid test2DBruteForceFor6PacketsIssue28() {\n\t\tList<Container> containers = new ArrayList<>();\n\t\tcontainers.add(new ValidatingContainer(\"container1\", 152, 252, 1, 0));\n\t\tPackager bruteForcePackager = new BruteForcePackager(containers, false, true, 1);\n\n\t\tList<BoxItem> products1 = Arr...
{ "fields": [], "file": "core/src/main/java/com/github/skjolber/packing/BruteForcePackager.java", "identifier": "BruteForcePackager", "interfaces": "", "methods": [ { "class_method_signature": "BruteForcePackager.newBuilder()", "constructor": false, "full_signature": "public static Brute...
{ "body": "public BruteForceResult pack(List<Placement> placements, Container container, PermutationRotationIterator rotator, long deadline, int checkpointsPerDeadlineCheck) {\n\t\treturn pack(placements, container, rotator, BooleanSupplierBuilder.builder().withDeadline(deadline, checkpointsPerDeadlineCheck).build())...
{ "created": "4/20/2016 8:03:45 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 56717384, "size": null, "stargazer_count": null, "stars": 100, "updates": "2020-01-20T17:12:02+00:00", "url": "https://github.com/skjolber/3d-bin-...
1484463_5
{ "fields": [ { "declarator": "timelineCoder = new TimelineCoderImpl()", "modifier": "private static final", "original_string": "private static final TimelineCoder timelineCoder = new TimelineCoderImpl();", "type": "TimelineCoder", "var_name": "timelineCoder" }, { "decl...
{ "body": "@Test(groups = \"fast\")\n public void testByteRepeater() throws Exception\n {\n final int hostId = 123;\n final int sampleKindId = 456;\n final DateTime startTime = new DateTime();\n final List<DateTime> dateTimes = new ArrayList<DateTime>();\n final int byteRepeat...
{ "fields": [ { "declarator": "log = Logger.getCallersLoggerViaExpensiveMagic()", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getCallersLoggerViaExpensiveMagic();", "type": "Logger", "var_name": "log" }, { "declarator...
{ "body": "public synchronized TimelineChunk extractTimelineChunkAndReset(final DateTime startTime, final DateTime endTime, final byte[] timeBytes)\n {\n // Extract the chunk\n final byte[] sampleBytes = getEncodedSamples().getEncodedBytes();\n log.debug(\"Creating TimelineChunk for sampleKind...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_19
{ "fields": [], "file": "dashboard/src/test/java/com/ning/arecibo/dashboard/config/TestCustomGroupsManager.java", "identifier": "TestCustomGroupsManager", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"fast\")\n public void testCustomGroupsConfiguration() throws Exception\n {\n // Create a groups configuration file\n final String configPath = System.getProperty(\"java.io.tmpdir\") + \"/TestCustomGroupsManager-\" + System.currentTimeMillis();\n final String grou...
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private static final", "original_string": "private static final ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" }, { "declarator": "customGroups = new Arra...
{ "body": "public List<CustomGroup> getCustomGroups()\n {\n return customGroups;\n }", "class_method_signature": "CustomGroupsManager.getCustomGroups()", "constructor": false, "full_signature": "public List<CustomGroup> getCustomGroups()", "identifier": "getCustomGroups", "invocations": [], "...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_9
{ "fields": [], "file": "agent/src/test/java/com/ning/arecibo/agent/transform/RateTransformTest.java", "identifier": "RateTransformTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"slow\")\n public void objectTypeTest()\n {\n RateTransform rt = new RateTransform();\n assertEquals(null, rt.process(new Double(12)));\n sleep(10);\n assertEquals(Double.class, rt.process(new Double(12)).getClass());\n }", "class_method_signature": "R...
{ "fields": [ { "declarator": "log = Logger.getLogger(RateTransform.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(RateTransform.class);", "type": "Logger", "var_name": "log" }, { "declarator": "EPS = ...
{ "body": "@Override\n\tpublic Object process(Object value)\n\t{\n\t\tLong time = System.currentTimeMillis();\n\t\tif (this.lastValue == null) {\n\t\t\tthis.lastUpdate = time;\n\t\t\tthis.lastValue = value;\n\t\t\treturn null;\t\t\t\t\t // no value at this time\n\t\t}\n\t\tif (!(value instanceof Number)) {\n\t...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_15
{ "fields": [], "file": "dashboard/src/test/java/com/ning/arecibo/dashboard/config/TestLegendConfigurationsManager.java", "identifier": "TestLegendConfigurationsManager", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"fast\")\n public void testDefaultConfiguration() throws Exception\n {\n final DashboardConfig config = new ConfigurationObjectFactory(System.getProperties()).build(DashboardConfig.class);\n final LegendConfigurationsManager manager = new LegendConfigurationsManager(conf...
{ "fields": [ { "declarator": "LEGENDS_KEY = \"legends\"", "modifier": "public static final", "original_string": "public static final String LEGENDS_KEY = \"legends\";", "type": "String", "var_name": "LEGENDS_KEY" }, { "declarator": "FIXTURES_KEY = \"fixtures\"", ...
{ "body": "public Map getConfiguration()\n {\n final ImmutableMap.Builder builder = new ImmutableMap.Builder();\n builder.put(LEGENDS_KEY, legendConfiguration);\n builder.put(FIXTURES_KEY, legendFixtures);\n return builder.build();\n }", "class_method_signature": "LegendConfigurati...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_14
{ "fields": [ { "declarator": "payload = {123, 34, 116, 105, 109, 101, 115, 116, 97, 109, 112, 34, 58, 49, 51, 51, 49, 49,\n 52, 56, 49, 49, 56, 48, 56, 50, 44, 34, 109, 105, 110, 95, 104, 101, 97, 112, 85, 115, 101, 100, 34, 58, 49, 46, 53,\n 49, 53, 54, 57, 56, 56, 56, 56, 69, 57, 44, 34, 10...
{ "body": "@Test(groups = \"fast\")\n public void testParser() throws Exception\n {\n final Event event = KafkaAreciboClient.convertByteBufferPayloadToEvent(payload);\n Assert.assertEquals(event.getEventType(), \"fcc83090-a6d0-4509-8a0a-3a06b99f96f7\");\n Assert.assertEquals(event.getTimest...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(KafkaAreciboClient.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(KafkaAreciboClient.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@VisibleForTesting\n static Event convertByteBufferPayloadToEvent(final byte[] bytes) throws IOException\n {\n // We convert only to MapEvent for now\n // TODO - should be handle separately MonitoringEvents?\n return mapper.readValue(bytes, MapEvent.class);\n }", "class_meth...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_8
{ "fields": [], "file": "agent/src/test/java/com/ning/arecibo/agent/transform/RateTransformTest.java", "identifier": "RateTransformTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"fast\")\n public void nullStartTest()\n {\n RateTransform rt = new RateTransform();\n assertEquals(null, rt.process(new Double(12)));\n }", "class_method_signature": "RateTransformTest.nullStartTest()", "constructor": false, "full_signature": "@Test(groups = \"...
{ "fields": [ { "declarator": "log = Logger.getLogger(RateTransform.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(RateTransform.class);", "type": "Logger", "var_name": "log" }, { "declarator": "EPS = ...
{ "body": "@Override\n\tpublic Object process(Object value)\n\t{\n\t\tLong time = System.currentTimeMillis();\n\t\tif (this.lastValue == null) {\n\t\t\tthis.lastUpdate = time;\n\t\t\tthis.lastValue = value;\n\t\t\treturn null;\t\t\t\t\t // no value at this time\n\t\t}\n\t\tif (!(value instanceof Number)) {\n\t...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_18
{ "fields": [], "file": "dashboard/src/test/java/com/ning/arecibo/dashboard/config/TestCustomGroupsManager.java", "identifier": "TestCustomGroupsManager", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"fast\")\n public void testDefaultConfiguration() throws Exception\n {\n final DashboardConfig config = new ConfigurationObjectFactory(System.getProperties()).build(DashboardConfig.class);\n final CustomGroupsManager manager = new CustomGroupsManager(config);\n fi...
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private static final", "original_string": "private static final ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" }, { "declarator": "customGroups = new Arra...
{ "body": "public List<CustomGroup> getCustomGroups()\n {\n return customGroups;\n }", "class_method_signature": "CustomGroupsManager.getCustomGroups()", "constructor": false, "full_signature": "public List<CustomGroup> getCustomGroups()", "identifier": "getCustomGroups", "invocations": [], "...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_4
{ "fields": [ { "declarator": "timelineCoder = new TimelineCoderImpl()", "modifier": "private static final", "original_string": "private static final TimelineCoder timelineCoder = new TimelineCoderImpl();", "type": "TimelineCoder", "var_name": "timelineCoder" }, { "decl...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test(groups=\"fast\")\n public void testBasicAccumulator() throws Exception {\n final int hostId = 123;\n final int sampleKindId = 456;\n final TimelineChunkAccumulator accum = new TimelineChunkAccumulator(hostId, sampleKindId, sampleCoder);\n ...
{ "fields": [ { "declarator": "log = Logger.getCallersLoggerViaExpensiveMagic()", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getCallersLoggerViaExpensiveMagic();", "type": "Logger", "var_name": "log" }, { "declarator...
{ "body": "public synchronized TimelineChunk extractTimelineChunkAndReset(final DateTime startTime, final DateTime endTime, final byte[] timeBytes)\n {\n // Extract the chunk\n final byte[] sampleBytes = getEncodedSamples().getEncodedBytes();\n log.debug(\"Creating TimelineChunk for sampleKind...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_13
{ "fields": [ { "declarator": "dbi", "modifier": "@Inject\n private", "original_string": "@Inject\n private DBI dbi;", "type": "DBI", "var_name": "dbi" }, { "declarator": "helper", "modifier": "@Inject\n private", "original_string": "@Inject\n pr...
{ "body": "@Test(groups = \"slow\")\n public void testInsertAcknowledgementLog() throws Exception\n {\n final List<ConfDataAlertIncidentLog> alertIncidentLogs = confDataDAO.selectAll(ConfDataAlertIncidentLog.TYPE_NAME, ConfDataAlertIncidentLog.class);\n final List<ConfDataPerson> confDataPersons =...
{ "fields": [ { "declarator": "log = Logger.getLogger(ConfDataDAO.class)", "modifier": "static final", "original_string": "static final Logger log = Logger.getLogger(ConfDataDAO.class);", "type": "Logger", "var_name": "log" }, { "declarator": "dbi", "modifier": "p...
{ "body": "public <T extends ConfDataObject> List<T> selectAll(final String table, final Class<T> type) throws ConfDataDAOException\n {\n try {\n return dbi.withHandle(new HandleCallback<List<T>>()\n {\n public List<T> withHandle(final Handle handle) throws Exception\n ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_3
{ "fields": [ { "declarator": "basePath = new File(System.getProperty(\"java.io.tmpdir\"), \"TestReplayer-\" + System.currentTimeMillis())", "modifier": "private static final", "original_string": "private static final File basePath = new File(System.getProperty(\"java.io.tmpdir\"), \"TestReplaye...
{ "body": "@Test(groups = \"slow\")\n public void testOrdering() throws Exception\n {\n Assert.assertTrue(basePath.mkdir());\n\n final List<String> filePathsCreated = new ArrayList<String>();\n final List<File> filesCreated = new ArrayList<File>();\n final int expected = 50;\n\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(Replayer.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(Replayer.class);", "type": "Logger", "var_name": "log" }, { "declarator": "sm...
{ "body": "public List<HostSamplesForTimestamp> readAll()\n {\n final List<HostSamplesForTimestamp> samples = new ArrayList<HostSamplesForTimestamp>();\n\n readAll(true, null, new Function<HostSamplesForTimestamp, Void>()\n {\n @Override\n public Void apply(@Nullable fina...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_2
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private static final", "original_string": "private static final ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" }, { "declarator": "TOPIC = UUID.randomUUID...
{ "body": "@Test(groups = \"integration\", enabled = false)\n public void testHandle() throws Exception\n {\n Assert.assertEquals(processor.getEventsReceived(), 0);\n Assert.assertEquals(kafkaEventHandler.getEventsSent(), 0);\n Assert.assertEquals(kafkaEventHandler.getEventsDiscarded(), 0);...
{ "fields": [ { "declarator": "log = Logger.getLogger(KafkaEventHandler.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(KafkaEventHandler.class);", "type": "Logger", "var_name": "log" }, { "declarator":...
{ "body": "@Override\n public void handle(final Event event)\n {\n try {\n final ProducerData<String, String> data = new ProducerData<String, String>(event.getEventType(), eventToMessage(event));\n producer.send(data);\n eventsSent.incrementAndGet();\n }\n c...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_12
{ "fields": [], "file": "agent/src/test/java/com/ning/arecibo/agent/transform/RateTransformTest.java", "identifier": "RateTransformTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"slow\")\n public void rateTest1()\n {\n RateTransform rt = new RateTransform();\n assertEquals(null, rt.process(new Double(12)));\n sleep(10);\n assertEquals(0.0, rt.process(new Double(12))); // no change; expect 0.0, so checks for rounding errors\n ...
{ "fields": [ { "declarator": "log = Logger.getLogger(RateTransform.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(RateTransform.class);", "type": "Logger", "var_name": "log" }, { "declarator": "EPS = ...
{ "body": "@Override\n\tpublic Object process(Object value)\n\t{\n\t\tLong time = System.currentTimeMillis();\n\t\tif (this.lastValue == null) {\n\t\t\tthis.lastUpdate = time;\n\t\t\tthis.lastValue = value;\n\t\t\treturn null;\t\t\t\t\t // no value at this time\n\t\t}\n\t\tif (!(value instanceof Number)) {\n\t...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_11
{ "fields": [], "file": "agent/src/test/java/com/ning/arecibo/agent/transform/RateTransformTest.java", "identifier": "RateTransformTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"slow\", expectedExceptions = IllegalArgumentException.class)\n public void nullTypeTest()\n {\n RateTransform rt = new RateTransform();\n assertEquals(null, rt.process(new Double(12)));\n sleep(10);\n rt.process(new Double(\"foo\"));\n }", "class_meth...
{ "fields": [ { "declarator": "log = Logger.getLogger(RateTransform.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(RateTransform.class);", "type": "Logger", "var_name": "log" }, { "declarator": "EPS = ...
{ "body": "@Override\n\tpublic Object process(Object value)\n\t{\n\t\tLong time = System.currentTimeMillis();\n\t\tif (this.lastValue == null) {\n\t\t\tthis.lastUpdate = time;\n\t\t\tthis.lastValue = value;\n\t\t\treturn null;\t\t\t\t\t // no value at this time\n\t\t}\n\t\tif (!(value instanceof Number)) {\n\t...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_1
{ "fields": [ { "declarator": "HOST_UUID = UUID.randomUUID()", "modifier": "private static final", "original_string": "private static final UUID HOST_UUID = UUID.randomUUID();", "type": "UUID", "var_name": "HOST_UUID" }, { "declarator": "HOST_NAME = HOST_UUID.toString()...
{ "body": "@Test(groups = \"slow\")\n public void testAggregation() throws Exception\n {\n // Create the host\n hostId = timelineDAO.getOrAddHost(HOST_NAME);\n Assert.assertNotNull(hostId);\n Assert.assertEquals(timelineDAO.getHosts().values().size(), 1);\n\n // Create the sam...
{ "fields": [ { "declarator": "log = Logger.getLogger(TimelineAggregator.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(TimelineAggregator.class);", "type": "Logger", "var_name": "log" }, { "declarator...
{ "body": "public void getAndProcessTimelineAggregationCandidates()\n {\n if (!isAggregating.compareAndSet(false, true)) {\n log.info(\"Asked to aggregate, but we're already aggregating!\");\n return;\n }\n else {\n log.debug(\"Starting aggregating\");\n ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_0
{ "fields": [ { "declarator": "mapper = new ObjectMapper()", "modifier": "private static final", "original_string": "private static final ObjectMapper mapper = new ObjectMapper();", "type": "ObjectMapper", "var_name": "mapper" }, { "declarator": "HOST_1 = UUID.randomUUI...
{ "body": "@Test(groups = \"fast\")\n public void testWriteJsonForInMemoryChunks() throws Exception\n {\n final DateTime startTime = new DateTime(DateTimeZone.UTC).minusHours(2);\n final ByteArrayOutputStream output = new ByteArrayOutputStream();\n final JsonGenerator generator = mapper.get...
{ "fields": [ { "declarator": "log = Logger.getCallersLoggerViaExpensiveMagic()", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getCallersLoggerViaExpensiveMagic();", "type": "Logger", "var_name": "log" }, { "declarator...
{ "body": "@VisibleForTesting\n void writeJsonForInMemoryChunks(final JsonGenerator generator, final ObjectWriter writer, final Map<Integer, Map<Integer, DecimatingSampleFilter>> filters, final List<Integer> hostIdsList,\n final List<Integer> sampleKindIdsList, @Nullable final Da...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_10
{ "fields": [], "file": "agent/src/test/java/com/ning/arecibo/agent/transform/RateTransformTest.java", "identifier": "RateTransformTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"slow\")\n public void integerTypeTest()\n {\n RateTransform rt = new RateTransform();\n assertEquals(null, rt.process(new Integer(12)));\n sleep(10);\n assertEquals(Double.class, rt.process(new Integer(2)).getClass());\n }", "class_method_signature": ...
{ "fields": [ { "declarator": "log = Logger.getLogger(RateTransform.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(RateTransform.class);", "type": "Logger", "var_name": "log" }, { "declarator": "EPS = ...
{ "body": "@Override\n\tpublic Object process(Object value)\n\t{\n\t\tLong time = System.currentTimeMillis();\n\t\tif (this.lastValue == null) {\n\t\t\tthis.lastUpdate = time;\n\t\t\tthis.lastValue = value;\n\t\t\treturn null;\t\t\t\t\t // no value at this time\n\t\t}\n\t\tif (!(value instanceof Number)) {\n\t...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_7
{ "fields": [], "file": "util/src/test/java/com/ning/arecibo/util/timeline/TestCategoryAndSampleKinds.java", "identifier": "TestCategoryAndSampleKinds", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"fast\")\n public void testMapping() throws Exception\n {\n final CategoryAndSampleKinds kinds = new CategoryAndSampleKinds(\"JVM\");\n kinds.addSampleKind(\"GC\");\n kinds.addSampleKind(\"CPU\");\n\n final ObjectMapper mapper = new ObjectMapper();\n ...
{ "fields": [ { "declarator": "eventCategory", "modifier": "@JsonProperty\n private final", "original_string": "@JsonProperty\n private final String eventCategory;", "type": "String", "var_name": "eventCategory" }, { "declarator": "sampleKinds = new HashSet<String...
{ "body": "public void addSampleKind(final String sampleKind)\n {\n sampleKinds.add(sampleKind);\n }", "class_method_signature": "CategoryAndSampleKinds.addSampleKind(final String sampleKind)", "constructor": false, "full_signature": "public void addSampleKind(final String sampleKind)", "identifi...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_17
{ "fields": [], "file": "dashboard/src/test/java/com/ning/arecibo/dashboard/config/TestLegendConfigurationsManager.java", "identifier": "TestLegendConfigurationsManager", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"fast\")\n public void testFixturesConfiguration() throws Exception\n {\n // Create a legend configuration file\n final String configPath = System.getProperty(\"java.io.tmpdir\") + \"/TestLegendConfigurationsManager-\" + System.currentTimeMillis();\n final String ...
{ "fields": [ { "declarator": "LEGENDS_KEY = \"legends\"", "modifier": "public static final", "original_string": "public static final String LEGENDS_KEY = \"legends\";", "type": "String", "var_name": "LEGENDS_KEY" }, { "declarator": "FIXTURES_KEY = \"fixtures\"", ...
{ "body": "public Map getConfiguration()\n {\n final ImmutableMap.Builder builder = new ImmutableMap.Builder();\n builder.put(LEGENDS_KEY, legendConfiguration);\n builder.put(FIXTURES_KEY, legendFixtures);\n return builder.build();\n }", "class_method_signature": "LegendConfigurati...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_16
{ "fields": [], "file": "dashboard/src/test/java/com/ning/arecibo/dashboard/config/TestLegendConfigurationsManager.java", "identifier": "TestLegendConfigurationsManager", "interfaces": "", "superclass": "" }
{ "body": "@Test(groups = \"fast\")\n public void testLegendConfiguration() throws Exception\n {\n // Create a legend configuration file\n final String configPath = System.getProperty(\"java.io.tmpdir\") + \"/TestLegendConfigurationsManager-\" + System.currentTimeMillis();\n final String le...
{ "fields": [ { "declarator": "LEGENDS_KEY = \"legends\"", "modifier": "public static final", "original_string": "public static final String LEGENDS_KEY = \"legends\";", "type": "String", "var_name": "LEGENDS_KEY" }, { "declarator": "FIXTURES_KEY = \"fixtures\"", ...
{ "body": "public Map getConfiguration()\n {\n final ImmutableMap.Builder builder = new ImmutableMap.Builder();\n builder.put(LEGENDS_KEY, legendConfiguration);\n builder.put(FIXTURES_KEY, legendFixtures);\n return builder.build();\n }", "class_method_signature": "LegendConfigurati...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
1484463_6
{ "fields": [ { "declarator": "timelineCoder = new TimelineCoderImpl()", "modifier": "private static final", "original_string": "private static final TimelineCoder timelineCoder = new TimelineCoderImpl();", "type": "TimelineCoder", "var_name": "timelineCoder" }, { "decl...
{ "body": "@Test(groups = \"fast\")\n public void testShortRepeater() throws Exception\n {\n final int hostId = 123;\n final int sampleKindId = 456;\n final DateTime startTime = new DateTime();\n final List<DateTime> dateTimes = new ArrayList<DateTime>();\n final int shortRepe...
{ "fields": [ { "declarator": "log = Logger.getCallersLoggerViaExpensiveMagic()", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getCallersLoggerViaExpensiveMagic();", "type": "Logger", "var_name": "log" }, { "declarator...
{ "body": "public synchronized TimelineChunk extractTimelineChunkAndReset(final DateTime startTime, final DateTime endTime, final byte[] timeBytes)\n {\n // Extract the chunk\n final byte[] sampleBytes = getEncodedSamples().getEncodedBytes();\n log.debug(\"Creating TimelineChunk for sampleKind...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1484463, "size": 5433, "stargazer_count": 30, "stars": null, "updates": null, "url": "https://github.com/ning/Arecibo" }
22981257_201
{ "fields": [ { "declarator": "PRECISION = 0.000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.000001;", "type": "double", "var_name": "PRECISION" } ], "file": "geo-analyzer/src/test/java/au/gov/amsa/geo/model/GridTrave...
{ "body": "@Test\n\tpublic void testGridNextPoint6() {\n\t\tGridTraversor grid = createGrid();\n\t\tPosition a = Position.create(-33.0, 151.89463780840157);\n\t\tPosition b = Position.create(-33.001766204833984, 152.011962890625);\n\n\t\tPosition p = grid.nextPoint(a, b);\n\t\tSystem.out.println(\"next=\" + p);\n\t\t...
{ "fields": [ { "declarator": "log = Logger.getLogger(GridTraversor.class)", "modifier": "private static", "original_string": "private static Logger log = Logger.getLogger(GridTraversor.class);", "type": "Logger", "var_name": "log" }, { "declarator": "SMALL_INCREMENT_DE...
{ "body": "public Position nextPoint(Position a, Position b) {\n\t\tif (a.equals(b))\n\t\t\treturn b;\n\t\tdouble bearingDegrees = bearingDegrees(a, b);\n\n\t\t// if on left edge heading left or top edge heading up then nudge into\n\t\t// next cell\n\t\t// TODO is this required?\n\t\tCell cell1 = Cell.cellAt(a.getLat...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_128
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/util/nmea/saver/NmeaSaverTest.java", "identifier": "NmeaSaverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNewGroupingSecondaryLineWithoutTimeIsGivenTime() throws InterruptedException, IOException {\n String line = \"\\\\2G2:53958,s:Gantheaume Pt*7D\\\\\";\n String amendedLine = \"\\\\2G2:53958,s:Gantheaume Pt,c:1234567,a:1234567890*30\\\\\";\n Clock clock = new C...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(NmeaSaver.class)", "modifier": "private static", "original_string": "private static Logger log = LoggerFactory.getLogger(NmeaSaver.class);", "type": "Logger", "var_name": "log" }, { "declarator": "subscriber",...
{ "body": "public void start() {\n start(Schedulers.io());\n }", "class_method_signature": "NmeaSaver.start()", "constructor": false, "full_signature": "public void start()", "identifier": "start", "invocations": [ "start", "io" ], "modifiers": "public", "parameters": "()", "return...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_256
{ "fields": [], "file": "geotools-extras/src/test/java/au/gov/amsa/gt/ShapefileTest.java", "identifier": "ShapefileTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreatePolygonShapefile() throws IOException {\n try (InputStreamReader r = new InputStreamReader(\n Shapefile.class.getResourceAsStream(\"/southwest.txt\"))) {\n // read coordinates from classpath\n List<Coordinate> coords = Strings.lin...
{ "fields": [ { "declarator": "datastore", "modifier": "private final", "original_string": "private final DataStore datastore;", "type": "DataStore", "var_name": "datastore" }, { "declarator": "GEOMETRY_FACTORY = new GeometryFactory()", "modifier": "private final ...
{ "body": "public static void createPolygon(List<Coordinate> coords, File output) {\n ShapefileCreator.createPolygon(coords, output);\n }", "class_method_signature": "Shapefile.createPolygon(List<Coordinate> coords, File output)", "constructor": false, "full_signature": "public static void createPolyg...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_190
{ "fields": [ { "declarator": "PRECISION = 0.000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.000001;", "type": "double", "var_name": "PRECISION" } ], "file": "geo-analyzer/src/test/java/au/gov/amsa/geo/model/GridTrave...
{ "body": "@Test\n\tpublic void testGridNextPointOnLeftEdgeStartingRightEdge() {\n\t\tGridTraversor grid = createGrid();\n\t\tPosition a = Position.create(-31.7, 142.6);\n\t\tPosition b = Position.create(-30.8, 140.2);\n\t\tPosition p = grid.nextPoint(a, b);\n\t\tPosition p2 = grid.nextPoint(p, b);\n\t\tassertEquals(...
{ "fields": [ { "declarator": "log = Logger.getLogger(GridTraversor.class)", "modifier": "private static", "original_string": "private static Logger log = Logger.getLogger(GridTraversor.class);", "type": "Logger", "var_name": "log" }, { "declarator": "SMALL_INCREMENT_DE...
{ "body": "public Position nextPoint(Position a, Position b) {\n\t\tif (a.equals(b))\n\t\t\treturn b;\n\t\tdouble bearingDegrees = bearingDegrees(a, b);\n\n\t\t// if on left edge heading left or top edge heading up then nudge into\n\t\t// next cell\n\t\t// TODO is this required?\n\t\tCell cell1 = Cell.cellAt(a.getLat...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_240
{ "fields": [ { "declarator": "PRECISION = 0.000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.000001;", "type": "double", "var_name": "PRECISION" } ], "file": "formats/src/test/java/au/gov/amsa/risky/format/BinaryFixes...
{ "body": "@Test\n public void testIterable() {\n File file = new File(\"target/123456790.track\");\n TestingUtil.writeTwoBinaryFixes(file.getAbsolutePath(), BinaryFixesFormat.WITHOUT_MMSI);\n for (Fix fix:BinaryFixes.iterable(file)) {\n System.out.println(fix);\n }\n }", ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(BinaryFixes.class)", "modifier": "private static", "original_string": "private static Logger log = LoggerFactory.getLogger(BinaryFixes.class);", "type": "Logger", "var_name": "log" }, { "declarator": "BINARY_F...
{ "body": "public static Iterable<Fix> iterable(File file) {\n return iterable(file, (mmsi, bb) -> BinaryFixesUtil.toFix(mmsi, bb));\n }", "class_method_signature": "BinaryFixes.iterable(File file)", "constructor": false, "full_signature": "public static Iterable<Fix> iterable(File file)", "identifi...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_186
{ "fields": [ { "declarator": "PRECISION = 0.000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.000001;", "type": "double", "var_name": "PRECISION" } ], "file": "geo-analyzer/src/test/java/au/gov/amsa/geo/model/GridTrave...
{ "body": "@Test\n\tpublic void testGridNextPointOnRightEdgeStartingTopEdge() {\n\t\tGridTraversor grid = createGrid();\n\t\tPosition a = Position.create(-30.8, 140.2);\n\t\tPosition b = Position.create(-31.7, 142.6);\n\t\tPosition p = grid.nextPoint(a, b);\n\t\tPosition p2 = grid.nextPoint(p, b);\n\t\tassertEquals(-...
{ "fields": [ { "declarator": "log = Logger.getLogger(GridTraversor.class)", "modifier": "private static", "original_string": "private static Logger log = Logger.getLogger(GridTraversor.class);", "type": "Logger", "var_name": "log" }, { "declarator": "SMALL_INCREMENT_DE...
{ "body": "public Position nextPoint(Position a, Position b) {\n\t\tif (a.equals(b))\n\t\t\treturn b;\n\t\tdouble bearingDegrees = bearingDegrees(a, b);\n\n\t\t// if on left edge heading left or top edge heading up then nudge into\n\t\t// next cell\n\t\t// TODO is this required?\n\t\tCell cell1 = Cell.cellAt(a.getLat...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_169
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/util/SixBitTest.java", "identifier": "SixBitTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testGetSignedValueMax() {\n\t\tboolean[] bits = { true, true, true };\n\t\tassertEquals(-1, SixBit.getSignedValue(0, 3, bits));\n\t}", "class_method_signature": "SixBitTest.testGetSignedValueMax()", "constructor": false, "full_signature": "@Test public void testGetSignedValueMax(...
{ "fields": [ { "declarator": "INT_TO_SIX_BIT = createIntToSixBit()", "modifier": "private static final", "original_string": "private static final int[] INT_TO_SIX_BIT = createIntToSixBit();", "type": "int[]", "var_name": "INT_TO_SIX_BIT" } ], "file": "ais/src/main/java/au/go...
{ "body": "public static long getSignedValue(int from, int to, boolean[] bitSet) {\n\t\tif (to > bitSet.length) {\n\t\t\tthrow new SixBitException(bitSet.length + \" is not enough bits. At least \" + to\n\t\t\t + \" expected.\");\n\t\t}\n\t\tlong val = 0;\n\t\tlong powMask = 1;\n\n\t\tfor (int i = to - 1; i >=...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_217
{ "fields": [ { "declarator": "ACCEPTABLE_DISTANCE_PRECISION = 3", "modifier": "private static final", "original_string": "private static final int ACCEPTABLE_DISTANCE_PRECISION = 3;", "type": "int", "var_name": "ACCEPTABLE_DISTANCE_PRECISION" }, { "declarator": "PRECIS...
{ "body": "@Test\n\tpublic final void testIsWithin() {\n\t\tfinal List<Position> testRegion;\n\t\t// square polygon with v cut out shape\n\t\ttestRegion = Lists.newArrayList();\n\t\ttestRegion.add(new Position(-20, 130));\n\t\ttestRegion.add(new Position(-20, 140));\n\t\ttestRegion.add(new Position(-30, 140));\n\t\tt...
{ "fields": [ { "declarator": "lat", "modifier": "private final", "original_string": "private final double lat;", "type": "double", "var_name": "lat" }, { "declarator": "lon", "modifier": "private final", "original_string": "private final double lon;", ...
{ "body": "public final boolean isWithin(List<Position> positions) {\n\t\tPolygon polygon = new Polygon();\n\t\tfor (Position p : positions) {\n\t\t\tpolygon.addPoint(degreesToArbitraryInteger(p.lon),\n\t\t\t\t\tdegreesToArbitraryInteger(p.lat));\n\t\t}\n\t\tint x = degreesToArbitraryInteger(this.lon);\n\t\tint y = d...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_5
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/NmeaMessageExactEarthTimestampTest.java", "identifier": "NmeaMessageExactEarthTimestampTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIsPghpLineIsTrueWhenHasTagBlock() {\n\t\tassertTrue(isPghp(\"\\\\hello\\\\$PGHP\"));\n\t}", "class_method_signature": "NmeaMessageExactEarthTimestampTest.testIsPghpLineIsTrueWhenHasTagBlock()", "constructor": false, "full_signature": "@Test public void testIsPghpLineIsTrueWhe...
{ "fields": [ { "declarator": "nmea", "modifier": "private final", "original_string": "private final NmeaMessage nmea;", "type": "NmeaMessage", "var_name": "nmea" }, { "declarator": "time", "modifier": "private final", "original_string": "private final long ...
{ "body": "@VisibleForTesting\n\tstatic boolean isPghp(String line) {\n\t\tif (line == null)\n\t\t\treturn false;\n\t\telse\n\t\t\t// return Pattern.matches(\"^(\\\\\\\\.*\\\\\\\\)?\\\\$PGHP.*$\", line);\n\t\t\treturn pghpPattern.matcher(line).matches();\n\t}", "class_method_signature": "NmeaMessageExactEarthTimest...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_283
{ "fields": [ { "declarator": "PRECISION = 0.0000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.0000001;", "type": "double", "var_name": "PRECISION" }, { "declarator": "DRIFT_SPEED_KNOTS = (float) ((DriftDetector....
{ "body": "@Test\n public void testRule6DrifterNonDrifterDrifterOverNonDriftingThreshold() {\n long t = 0;\n // drifter\n Fix f1 = createFix(90, DRIFT_SPEED_KNOTS, t);\n // non-drifter\n Fix f2 = createFix(1, DRIFT_SPEED_KNOTS, t += 1);\n // drifter\n Fix f3 = creat...
{ "fields": [], "file": "behaviour-detector/src/main/java/au/gov/amsa/navigation/DriftDetector.java", "identifier": "DriftDetector", "interfaces": "", "methods": [ { "class_method_signature": "DriftDetector.getCandidates(Observable<HasFix> o, Options options)", "constructor": false, "ful...
{ "body": "public static Observable<DriftCandidate> getCandidates(Observable<HasFix> o, Options options) {\n return o.compose(new DriftDetectorTransformer(options));\n }", "class_method_signature": "DriftDetector.getCandidates(Observable<HasFix> o, Options options)", "constructor": false, "full_signat...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_145
{ "fields": [ { "declarator": "MESSAGE = \"GPGSA,A,2,29,19,28,,,,,,,,,,23.4,12.1,20.0\"", "modifier": "private static final", "original_string": "private static final String MESSAGE = \"GPGSA,A,2,29,19,28,,,,,,,,,,23.4,12.1,20.0\";", "type": "String", "var_name": "MESSAGE" }, ...
{ "body": "@Test\n public void testIsValid() {\n assertTrue(NmeaUtil.isValid(MESSAGE + CHECKSUM_DELIMITER + CHECKSUM));\n }", "class_method_signature": "NmeaUtilTest.testIsValid()", "constructor": false, "full_signature": "@Test public void testIsValid()", "identifier": "testIsValid", "invocati...
{ "fields": [ { "declarator": "BACKSLASH = '\\\\'", "modifier": "private static final", "original_string": "private static final char BACKSLASH = '\\\\';", "type": "char", "var_name": "BACKSLASH" }, { "declarator": "invalidFieldCharacters = Sets.newHashSet(33, 36, 42, 4...
{ "body": "public static boolean isValid(String sentence) {\n // Compare the characters after the asterisk to the calculation\n\n try {\n return sentence.substring(sentence.lastIndexOf(\"*\") + 1)\n .equalsIgnoreCase(getChecksum(sentence));\n } catch (AisParseExcepti...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_88
{ "fields": [ { "declarator": "PRECISION = 0.0000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.0000001;", "type": "double", "var_name": "PRECISION" }, { "declarator": "NMEA_RESOURCE = \"/nmea-timestamped.txt\"", ...
{ "body": "@Test\n public void testExtract() throws IOException {\n InputStream is = StreamsTest.class.getResourceAsStream(\"/exact-earth-with-tag-block.txt\");\n int count = Streams.extract(Streams.nmeaFrom(is)).count().toBlocking().single();\n assertEquals(200, count);\n is.close();\n...
{ "fields": [ { "declarator": "BUFFER_SIZE = 100", "modifier": "public static final", "original_string": "public static final int BUFFER_SIZE = 100;", "type": "int", "var_name": "BUFFER_SIZE" }, { "declarator": "UTF8 = Charset.forName(\"UTF-8\")", "modifier": "pri...
{ "body": "public static Observable<TimestampedAndLine<AisMessage>> extract(\n Observable<String> rawAisNmea) {\n return rawAisNmea\n // parse nmea\n .map(LINE_TO_NMEA_MESSAGE)\n // if error filter out\n .compose(Streams.<NmeaMessage> value...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_67
{ "fields": [ { "declarator": "PRECISION = 0.00001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.00001;", "type": "double", "var_name": "PRECISION" } ], "file": "ais/src/test/java/au/gov/amsa/ais/message/AisPositionBTest.j...
{ "body": "@Test\n public void testExtractLongitude() {\n AisExtractor ex = createMock(AisExtractor.class);\n expect(ex.getSignedValue(anyInt(), anyInt())).andReturn(108600000).atLeastOnce();\n replay(ex);\n Double longitude = AisPositionB.extractLongitude(ex);\n assertEquals(nul...
{ "fields": [ { "declarator": "TRUE_HEADING_NOT_AVAILABLE = 511", "modifier": "private static final", "original_string": "private static final Integer TRUE_HEADING_NOT_AVAILABLE = 511;", "type": "Integer", "var_name": "TRUE_HEADING_NOT_AVAILABLE" }, { "declarator": "COG...
{ "body": "static Double extractLongitude(AisExtractor extractor) {\n int val = extractor.getSignedValue(57, 85);\n if (val == LONGITUDE_NOT_AVAILABLE) {\n return null;\n } else {\n Util.checkLong(val / 600000.0);\n return val / 600000.0;\n }\n }", "cl...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_112
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/NmeaStreamProcessorTest.java", "identifier": "NmeaStreamProcessorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLogLineGetsCalled() {\n NmeaStreamProcessorListenerRecording recorder = new NmeaStreamProcessorListenerRecording();\n // pass 1 as log count frequency so every line gets a log call\n NmeaStreamProcessor p = new NmeaStreamProcessor(recorder, true, 1);\n ...
{ "fields": [ { "declarator": "DEFAULT_NMEA_BUFFER_SIZE = 100", "modifier": "private static final", "original_string": "private static final int DEFAULT_NMEA_BUFFER_SIZE = 100;", "type": "int", "var_name": "DEFAULT_NMEA_BUFFER_SIZE" }, { "declarator": "DEFAULT_LOG_COUNT...
{ "body": "public void line(String line) {\n\t\tline(line, System.currentTimeMillis());\n\t}", "class_method_signature": "NmeaStreamProcessor.line(String line)", "constructor": false, "full_signature": "public void line(String line)", "identifier": "line", "invocations": [ "line", "currentTimeMillis...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_30
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testConvert6BitToAscii() {\n\t\tByte value = Util.convert6BitCharToStandardAscii((byte) 65);\n\t\tassertTrue(value.equals((byte) 0));\n\t}", "class_method_signature": "UtilTest.testConvert6BitToAscii()", "constructor": false, "full_signature": "@Test public void testConvert6BitTo...
{ "fields": [ { "declarator": "TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\")", "modifier": "static", "original_string": "static TimeZone TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "TIME_ZONE_UTC" }, { "declarator": "ASCII_8_BIT_CHAR...
{ "body": "@VisibleForTesting\n\tstatic byte convert6BitCharToStandardAscii(byte byteToConvert) {\n\n\t\tbyte b = 0;\n\t\tif (byteToConvert < 32) {\n\t\t\tb = (byte) (byteToConvert + 64);\n\t\t} else if (byteToConvert < 63) {\n\t\t\tb = byteToConvert;\n\t\t}\n\n\t\treturn b;\n\t}", "class_method_signature": "Util.c...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_104
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/AisMessageParserTest.java", "identifier": "AisMessageParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAisPositionB() {\n AisMessageParser p = new AisMessageParser();\n AisMessage m = p.parse(\"B7P@fj00RJVpbIuUhlF93wm5WP06\", 0);\n\n assertTrue(m instanceof AisPositionB);\n }", "class_method_signature": "AisMessageParserTest.testAisPositionB()", "constr...
{ "fields": [ { "declarator": "factory", "modifier": "private final", "original_string": "private final AisExtractorFactory factory;", "type": "AisExtractorFactory", "var_name": "factory" } ], "file": "ais/src/main/java/au/gov/amsa/ais/AisMessageParser.java", "identifier": ...
{ "body": "public AisMessage parse(String message, int padBits) {\n\t\treturn parse(message, null, padBits);\n\t}", "class_method_signature": "AisMessageParser.parse(String message, int padBits)", "constructor": false, "full_signature": "public AisMessage parse(String message, int padBits)", "identifier": "pa...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_26
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = AisParseException.class)\n\tpublic void testAscii8To6BitBinaryIllegalCharacterLowThrowsException() {\n\t\tUtil.ascii8To6bitBin(new byte[] { 0 });\n\t}", "class_method_signature": "UtilTest.testAscii8To6BitBinaryIllegalCharacterLowThrowsException()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\")", "modifier": "static", "original_string": "static TimeZone TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "TIME_ZONE_UTC" }, { "declarator": "ASCII_8_BIT_CHAR...
{ "body": "@VisibleForTesting\n\tstatic byte[] ascii8To6bitBin(byte[] toDecBytes) {\n\n\t\tbyte[] convertedBytes = new byte[toDecBytes.length];\n\t\tint sum = 0;\n\t\tint _6bitBin = 0;\n\n\t\tfor (int i = 0; i < toDecBytes.length; i++) {\n\t\t\tsum = 0;\n\t\t\t_6bitBin = 0;\n\n\t\t\tif (toDecBytes[i] < 48) {\n\t\t\t\...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_153
{ "fields": [ { "declarator": "MESSAGE = \"GPGSA,A,2,29,19,28,,,,,,,,,,23.4,12.1,20.0\"", "modifier": "private static final", "original_string": "private static final String MESSAGE = \"GPGSA,A,2,29,19,28,,,,,,,,,,23.4,12.1,20.0\";", "type": "String", "var_name": "MESSAGE" }, ...
{ "body": "@Test\n public void testGetTalkerDescription() {\n assertEquals(\"Independent AIS Base Station\", NmeaUtil.getTalker(\"AB\").getDescription());\n }", "class_method_signature": "NmeaUtilTest.testGetTalkerDescription()", "constructor": false, "full_signature": "@Test public void testGetTal...
{ "fields": [ { "declarator": "BACKSLASH = '\\\\'", "modifier": "private static final", "original_string": "private static final char BACKSLASH = '\\\\';", "type": "char", "var_name": "BACKSLASH" }, { "declarator": "invalidFieldCharacters = Sets.newHashSet(33, 36, 42, 4...
{ "body": "public static Talker getTalker(String s) {\n if (s == null)\n return null;\n else {\n try {\n return Talker.valueOf(s);\n } catch (RuntimeException e) {\n return Talker.UNKNOWN;\n }\n }\n }", "class_method_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_71
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/message/AisBStaticDataReportPartBTest.java", "identifier": "AisBStaticDataReportPartBTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testTypeOfShipAndCargoType() {\n\t\tfinal Integer typeOfShip = Integer.valueOf(123);\n\t\t\n\t\tAisExtractor ex = createMock(AisExtractor.class);\n\t\texpect(ex.getValue(anyInt(), anyInt())).andReturn(typeOfShip).atLeastOnce();\n\t\treplay(ex);\n\t\tInteger result = AisBStaticDataRepor...
{ "fields": [ { "declarator": "MESSAGE_LENGTH = 168", "modifier": "private final static", "original_string": "private final static int MESSAGE_LENGTH = 168;", "type": "int", "var_name": "MESSAGE_LENGTH" }, { "declarator": "CALL_SIGN_NOT_AVAILABLE = \"@@@@@@@\"", "...
{ "body": "@VisibleForTesting\n static int extractShipType(AisExtractor extractor) {\n \treturn extractor.getValue(40, 48);\n }", "class_method_signature": "AisBStaticDataReportPartB.extractShipType(AisExtractor extractor)", "constructor": false, "full_signature": "@VisibleForTesting static int extract...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_124
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/InternationalizationTest.java", "identifier": "InternationalizationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testInstantiation() {\n\t\tassertNotNull(AisParseException.INVALID_CHARACTER);\n\t\tInternationalization.forTestCoverageOnly();\n\t}", "class_method_signature": "InternationalizationTest.testInstantiation()", "constructor": false, "full_signature": "@Test public void testInstanti...
{ "fields": [ { "declarator": "BUNDLE_NAME = \"au.gov.amsa.ais.messages\"", "modifier": "private static final", "original_string": "private static final String BUNDLE_NAME = \"au.gov.amsa.ais.messages\";", "type": "String", "var_name": "BUNDLE_NAME" }, { "declarator": "...
{ "body": "static void forTestCoverageOnly() {\n\t\tnew Internationalization();\n\t}", "class_method_signature": "Internationalization.forTestCoverageOnly()", "constructor": false, "full_signature": "static void forTestCoverageOnly()", "identifier": "forTestCoverageOnly", "invocations": [], "modifiers": "...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_51
{ "fields": [ { "declarator": "PRECISION = 0.0001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.0001;", "type": "double", "var_name": "PRECISION" } ], "file": "ais/src/test/java/au/gov/amsa/ais/message/AisPositionATest.jav...
{ "body": "@Test\n public void testExtractTrueHeading() {\n AisExtractor ex = createMock(AisExtractor.class);\n expect(ex.getValue(anyInt(), anyInt())).andReturn(511).atLeastOnce();\n replay(ex);\n Integer heading = AisPositionA.extractTrueHeading(ex);\n assertEquals(null, headin...
{ "fields": [ { "declarator": "TRUE_HEADING_NOT_AVAILABLE = 511", "modifier": "private static final", "original_string": "private static final Integer TRUE_HEADING_NOT_AVAILABLE = 511;", "type": "Integer", "var_name": "TRUE_HEADING_NOT_AVAILABLE" }, { "declarator": "COG...
{ "body": "static Integer extractTrueHeading(AisExtractor extractor) {\n try {\n int val = extractor.getValue(128, 137);\n if (val == TRUE_HEADING_NOT_AVAILABLE)\n return null;\n else if (val > 359) {\n // have seen 404, might be corrupted message\...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_173
{ "fields": [ { "declarator": "builder = Options.builder()\n\t\t\t.originLat(0).originLon(0).cellSizeDegrees(0.1)\n\t\t\t.bounds(new Bounds(0, 100, -60, 175))\n\t\t\t.filterBounds(new Bounds(0, 100, -60, 175))", "modifier": "private static final", "original_string": "private static final Options...
{ "body": "@Test\n\tpublic void testCellAtIfLonRightOfBoundsThrowsException() {\n\t\tGrid grid = new Grid(options);\n\t\tassertFalse(grid.cellAt(-1, 176).isPresent());\n\t}", "class_method_signature": "GridTest.testCellAtIfLonRightOfBoundsThrowsException()", "constructor": false, "full_signature": "@Test public...
{ "fields": [ { "declarator": "log = Logger.getLogger(Grid.class)", "modifier": "private static", "original_string": "private static Logger log = Logger.getLogger(Grid.class);", "type": "Logger", "var_name": "log" }, { "declarator": "lats", "modifier": "private fi...
{ "body": "public Optional<Cell> cellAt(double lat, double lon) {\n\t\tif (!options.getFilterBounds().contains(lat, lon))\n\t\t\treturn Optional.absent();\n\t\telse {\n\t\t\tLong latIndex = latIndexes.get(lats.ceiling(lat));\n\t\t\tLong lonIndex = lonIndexes.get(lons.floor(lon));\n\t\t\treturn Optional.of(new Cell(la...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_47
{ "fields": [ { "declarator": "PRECISION = 0.0001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.0001;", "type": "double", "var_name": "PRECISION" } ], "file": "ais/src/test/java/au/gov/amsa/ais/message/AisPositionATest.jav...
{ "body": "@Test\n public void testCommicationsWithTime() {\n String m = \"177KQJ5000G?tO`K>RA1wUbN0TKH\";\n AisPositionA p = new AisPositionA(m, 0);\n Communications comms = p.getCommunications();\n assertEquals(1, comms.getSyncState());\n assertEquals(1, comms.getSlotTimeout())...
{ "fields": [ { "declarator": "TRUE_HEADING_NOT_AVAILABLE = 511", "modifier": "private static final", "original_string": "private static final Integer TRUE_HEADING_NOT_AVAILABLE = 511;", "type": "Integer", "var_name": "TRUE_HEADING_NOT_AVAILABLE" }, { "declarator": "COG...
{ "body": "@Override\n public Communications getCommunications() {\n return new Communications(extractor, 149);\n }", "class_method_signature": "AisPositionA.getCommunications()", "constructor": false, "full_signature": "@Override public Communications getCommunications()", "identifier": "getComm...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_165
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/util/SixBitTest.java", "identifier": "SixBitTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testGetSignedValueFirstBitNotSet() {\n\t\tboolean[] bits = { false, true, false };\n\t\tassertEquals(2, SixBit.getSignedValue(0, 3, bits));\n\t}", "class_method_signature": "SixBitTest.testGetSignedValueFirstBitNotSet()", "constructor": false, "full_signature": "@Test public void...
{ "fields": [ { "declarator": "INT_TO_SIX_BIT = createIntToSixBit()", "modifier": "private static final", "original_string": "private static final int[] INT_TO_SIX_BIT = createIntToSixBit();", "type": "int[]", "var_name": "INT_TO_SIX_BIT" } ], "file": "ais/src/main/java/au/go...
{ "body": "public static long getSignedValue(int from, int to, boolean[] bitSet) {\n\t\tif (to > bitSet.length) {\n\t\t\tthrow new SixBitException(bitSet.length + \" is not enough bits. At least \" + to\n\t\t\t + \" expected.\");\n\t\t}\n\t\tlong val = 0;\n\t\tlong powMask = 1;\n\n\t\tfor (int i = to - 1; i >=...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_10
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testCheckLatLonNegative() {\n\t\tUtil.checkLatLong(-20, -10);\n\t}", "class_method_signature": "UtilTest.testCheckLatLonNegative()", "constructor": false, "full_signature": "@Test public void testCheckLatLonNegative()", "identifier": "testCheckLatLonNegative", "invocations": ...
{ "fields": [ { "declarator": "TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\")", "modifier": "static", "original_string": "static TimeZone TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "TIME_ZONE_UTC" }, { "declarator": "ASCII_8_BIT_CHAR...
{ "body": "public static void checkLatLong(double lat, double lon) {\n\t\tcheckArgument(lon <= 181.0, \"longitude out of range \" + lon);\n\t\tcheckArgument(lon > -180.0, \"longitude out of range \" + lon);\n\t\tcheckArgument(lat <= 91.0, \"latitude out of range \" + lat);\n\t\tcheckArgument(lat > -90.0, \"latitude o...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_132
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/util/nmea/NmeaMessageParserTest.java", "identifier": "NmeaMessageParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBadSentenceInfoDoesNotThrowException() {\n String msg = \"!ABVDM,2,2,,,88888888800000000000000000000,4*50\";\n new NmeaMessageParser().parse(msg);\n }", "class_method_signature": "NmeaMessageParserTest.testBadSentenceInfoDoesNotThrowException()", "constructor...
{ "fields": [ { "declarator": "CHECKSUM_DELIMITER = \"*\"", "modifier": "private static final", "original_string": "private static final String CHECKSUM_DELIMITER = \"*\";", "type": "String", "var_name": "CHECKSUM_DELIMITER" }, { "declarator": "PARAMETER_DELIMITER = \",...
{ "body": "public NmeaMessage parse(String line) {\n LinkedHashMap<String, String> tags = Maps.newLinkedHashMap();\n\n String remaining;\n if (line.startsWith(\"\\\\\")) {\n int tagFinish = line.lastIndexOf('\\\\', line.length() - 1);\n if (tagFinish == -1)\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_9
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/UtilTest.java", "identifier": "UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testCheckLatLon() {\n\t\tUtil.checkLatLong(0, 0);\n\t}", "class_method_signature": "UtilTest.testCheckLatLon()", "constructor": false, "full_signature": "@Test public void testCheckLatLon()", "identifier": "testCheckLatLon", "invocations": [ "checkLatLong" ], "modifie...
{ "fields": [ { "declarator": "TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\")", "modifier": "static", "original_string": "static TimeZone TIME_ZONE_UTC = TimeZone.getTimeZone(\"UTC\");", "type": "TimeZone", "var_name": "TIME_ZONE_UTC" }, { "declarator": "ASCII_8_BIT_CHAR...
{ "body": "public static void checkLatLong(double lat, double lon) {\n\t\tcheckArgument(lon <= 181.0, \"longitude out of range \" + lon);\n\t\tcheckArgument(lon > -180.0, \"longitude out of range \" + lon);\n\t\tcheckArgument(lat <= 91.0, \"latitude out of range \" + lat);\n\t\tcheckArgument(lat > -90.0, \"latitude o...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_84
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/AisNmeaMessageTest.java", "identifier": "AisNmeaMessageTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTimeObtainsTimeFromTagBlock() {\n String line = \"\\\\g:1-2-1234,s:r3669961,c:1120959341*51\\\\$BSVDM,2,2,5,B,00000000008,2*33\";\n AisNmeaMessage m = new AisNmeaMessage(line);\n assertEquals(1120959341000L, (long) m.getTime());\n }", "class_method_si...
{ "fields": [ { "declarator": "aisParser = new AisMessageParser(\n\t Util.getAisExtractorFactory())", "modifier": "private static final", "original_string": "private static final AisMessageParser aisParser = new AisMessageParser(\n\t Util.getAisExtractorFactory());", "type": ...
{ "body": "public Long getTime() {\n\t\treturn nmea.getUnixTimeMillis();\n\t}", "class_method_signature": "AisNmeaMessage.getTime()", "constructor": false, "full_signature": "public Long getTime()", "identifier": "getTime", "invocations": [ "getUnixTimeMillis" ], "modifiers": "public", "parameters...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_149
{ "fields": [ { "declarator": "MESSAGE = \"GPGSA,A,2,29,19,28,,,,,,,,,,23.4,12.1,20.0\"", "modifier": "private static final", "original_string": "private static final String MESSAGE = \"GPGSA,A,2,29,19,28,,,,,,,,,,23.4,12.1,20.0\";", "type": "String", "var_name": "MESSAGE" }, ...
{ "body": "@Test\n public void testValidCharacterSymbol() {\n assertTrue(NmeaUtil.isValidCharacterSymbol('A'));\n assertTrue(NmeaUtil.isValidCharacterSymbol('a'));\n assertTrue(NmeaUtil.isValidCharacterSymbol('B'));\n assertFalse(NmeaUtil.isValidCharacterSymbol('b'));\n }", "class_...
{ "fields": [ { "declarator": "BACKSLASH = '\\\\'", "modifier": "private static final", "original_string": "private static final char BACKSLASH = '\\\\';", "type": "char", "var_name": "BACKSLASH" }, { "declarator": "invalidFieldCharacters = Sets.newHashSet(33, 36, 42, 4...
{ "body": "static boolean isValidCharacterSymbol(char ch) {\n return validCharacterSymbols.contains(ch);\n }", "class_method_signature": "NmeaUtil.isValidCharacterSymbol(char ch)", "constructor": false, "full_signature": "static boolean isValidCharacterSymbol(char ch)", "identifier": "isValidCharact...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_260
{ "fields": [], "file": "geotools-extras/src/test/java/au/gov/amsa/gt/ShapesTest.java", "identifier": "ShapesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPointInNeitherSrrNorInCoralSeaAtba() {\n assertTrue(new Shapes().containing(30, 100).collect(Collectors.toList()).isEmpty());\n }", "class_method_signature": "ShapesTest.testPointInNeitherSrrNorInCoralSeaAtba()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(Shapes.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(Shapes.class);", "type": "Logger", "var_name": "log" }, { "declarator": "shapes...
{ "body": "public Stream<String> containing(double lat, double lon) {\n\t\treturn shapes.keySet().stream()\n\t\t// select if contains lat lon\n\t\t\t\t.filter(name -> shapes.get(name).contains(lat, lon));\n\t}", "class_method_signature": "Shapes.containing(double lat, double lon)", "constructor": false, "full_s...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_237
{ "fields": [ { "declarator": "PRECISION = 0.000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.000001;", "type": "double", "var_name": "PRECISION" } ], "file": "formats/src/test/java/au/gov/amsa/risky/format/BinaryFixes...
{ "body": "@Test\n public void testWriteAndReadBinaryFixesWithMmsi() throws IOException {\n File trace = new File(\"target/many-craft.fix\");\n int numFixes = 10000;\n writeTrace(trace, numFixes, BinaryFixesFormat.WITH_MMSI);\n\n System.out.println(\"wrote \" + numFixes + \" fixes\");\n...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(BinaryFixes.class)", "modifier": "private static", "original_string": "private static Logger log = LoggerFactory.getLogger(BinaryFixes.class);", "type": "Logger", "var_name": "log" }, { "declarator": "BINARY_F...
{ "body": "public static Observable<Fix> from(File file) {\n return from(file, false);\n }", "class_method_signature": "BinaryFixes.from(File file)", "constructor": false, "full_signature": "public static Observable<Fix> from(File file)", "identifier": "from", "invocations": [ "from" ], "m...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_108
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/AisMessageParserTest.java", "identifier": "AisMessageParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStaticDataReportPartB() {\n AisMessageParser p = new AisMessageParser();\n AisMessage m = p.parse(\"H7PJ@:4UCBD6f6<57hhh001H5220\", 0);\n\n assertTrue(m instanceof AisBStaticDataReportPartB);\n }", "class_method_signature": "AisMessageParserTest.testStat...
{ "fields": [ { "declarator": "factory", "modifier": "private final", "original_string": "private final AisExtractorFactory factory;", "type": "AisExtractorFactory", "var_name": "factory" } ], "file": "ais/src/main/java/au/gov/amsa/ais/AisMessageParser.java", "identifier": ...
{ "body": "public AisMessage parse(String message, int padBits) {\n\t\treturn parse(message, null, padBits);\n\t}", "class_method_signature": "AisMessageParser.parse(String message, int padBits)", "constructor": false, "full_signature": "public AisMessage parse(String message, int padBits)", "identifier": "pa...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_221
{ "fields": [ { "declarator": "ACCEPTABLE_DISTANCE_PRECISION = 3", "modifier": "private static final", "original_string": "private static final int ACCEPTABLE_DISTANCE_PRECISION = 3;", "type": "int", "var_name": "ACCEPTABLE_DISTANCE_PRECISION" }, { "declarator": "PRECIS...
{ "body": "@Test(expected = RuntimeException.class)\n\tpublic void testGetDistanceToPathKm5() {\n\t\t// empty initialized list\n\t\tList<Position> path = new ArrayList<Position>();\n\n\t\t// positions to test\n\t\tPosition p = new Position(-10, 150);\n\n\t\tp.getDistanceToPathKm(path);\n\n\t}", "class_method_signat...
{ "fields": [ { "declarator": "lat", "modifier": "private final", "original_string": "private final double lat;", "type": "double", "var_name": "lat" }, { "declarator": "lon", "modifier": "private final", "original_string": "private final double lon;", ...
{ "body": "public final double getDistanceToPathKm(List<Position> positions) {\n\t\tif (positions.size() == 0)\n\t\t\tthrow new RuntimeException(\"positions must not be empty\");\n\t\telse if (positions.size() == 1)\n\t\t\treturn this.getDistanceToKm(positions.get(0));\n\t\telse {\n\t\t\tDouble distance = null;\n\t\t...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_92
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/ShipTypeDecoderTest.java", "identifier": "ShipTypeDecoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testNull() {\n\t\tassertNull(getShipType((Integer) null));\n\t}", "class_method_signature": "ShipTypeDecoderTest.testNull()", "constructor": false, "full_signature": "@Test public void testNull()", "identifier": "testNull", "invocations": [ "assertNull", "getShipType"...
{ "fields": [ { "declarator": "vesselTypes = { \"Fishing\", \"Towing\", \"Towing Long/Large\",\n \"Engaged in dredging or underwater operations\", \"Engaged in diving operations\",\n \"Engaged in military operations\", \"Sailing\", \"Pleasure craft\", \"Reserved\", \"Reserved\" }", ...
{ "body": "public static String getShipType(BigInteger ts) {\n if (ts == null)\n return null;\n else\n return getShipType(ts.intValue());\n }", "class_method_signature": "ShipTypeDecoder.getShipType(BigInteger ts)", "constructor": false, "full_signature": "public static St...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_276
{ "fields": [ { "declarator": "PRECISION = 0.0000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.0000001;", "type": "double", "var_name": "PRECISION" }, { "declarator": "DRIFT_SPEED_KNOTS = (float) ((DriftDetector....
{ "body": "@Test\n public void testRule2TwoDrifters() {\n long t = 0;\n // drifter\n Fix f1 = createFix(90, DRIFT_SPEED_KNOTS, t);\n // drifter\n Fix f2 = createFix(91, DRIFT_SPEED_KNOTS, t += 1);\n List<DriftCandidate> list = getCandidates(Observable.just(f1, f2));\n ...
{ "fields": [], "file": "behaviour-detector/src/main/java/au/gov/amsa/navigation/DriftDetector.java", "identifier": "DriftDetector", "interfaces": "", "methods": [ { "class_method_signature": "DriftDetector.getCandidates(Observable<HasFix> o, Options options)", "constructor": false, "ful...
{ "body": "public static Observable<DriftCandidate> getCandidates(Observable<HasFix> o, Options options) {\n return o.compose(new DriftDetectorTransformer(options));\n }", "class_method_signature": "DriftDetector.getCandidates(Observable<HasFix> o, Options options)", "constructor": false, "full_signat...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_277
{ "fields": [ { "declarator": "PRECISION = 0.0000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.0000001;", "type": "double", "var_name": "PRECISION" }, { "declarator": "DRIFT_SPEED_KNOTS = (float) ((DriftDetector....
{ "body": "@Test\n public void testRule2TwoDriftersBigTimeGap() {\n long t = 0;\n // drifter\n Fix f1 = createFix(90, DRIFT_SPEED_KNOTS, t);\n // drifter\n Fix f2 = createFix(91, DRIFT_SPEED_KNOTS, t += TimeUnit.DAYS.toMillis(1));\n List<DriftCandidate> list = getCandidate...
{ "fields": [], "file": "behaviour-detector/src/main/java/au/gov/amsa/navigation/DriftDetector.java", "identifier": "DriftDetector", "interfaces": "", "methods": [ { "class_method_signature": "DriftDetector.getCandidates(Observable<HasFix> o, Options options)", "constructor": false, "ful...
{ "body": "public static Observable<DriftCandidate> getCandidates(Observable<HasFix> o, Options options) {\n return o.compose(new DriftDetectorTransformer(options));\n }", "class_method_signature": "DriftDetector.getCandidates(Observable<HasFix> o, Options options)", "constructor": false, "full_signat...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_93
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/ShipTypeDecoderTest.java", "identifier": "ShipTypeDecoderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testBigIntegerNull() {\n\t\tassertNull(getShipType((BigInteger) null));\n\t}", "class_method_signature": "ShipTypeDecoderTest.testBigIntegerNull()", "constructor": false, "full_signature": "@Test public void testBigIntegerNull()", "identifier": "testBigIntegerNull", "invocati...
{ "fields": [ { "declarator": "vesselTypes = { \"Fishing\", \"Towing\", \"Towing Long/Large\",\n \"Engaged in dredging or underwater operations\", \"Engaged in diving operations\",\n \"Engaged in military operations\", \"Sailing\", \"Pleasure craft\", \"Reserved\", \"Reserved\" }", ...
{ "body": "public static String getShipType(BigInteger ts) {\n if (ts == null)\n return null;\n else\n return getShipType(ts.intValue());\n }", "class_method_signature": "ShipTypeDecoder.getShipType(BigInteger ts)", "constructor": false, "full_signature": "public static St...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_220
{ "fields": [ { "declarator": "ACCEPTABLE_DISTANCE_PRECISION = 3", "modifier": "private static final", "original_string": "private static final int ACCEPTABLE_DISTANCE_PRECISION = 3;", "type": "int", "var_name": "ACCEPTABLE_DISTANCE_PRECISION" }, { "declarator": "PRECIS...
{ "body": "@Test\n\tpublic void testGetDistanceToPathKm4() {\n\t\t// positions to test\n\t\tPosition p = new Position(-10, 150);\n\n\t\t// segment positions constituting a path\n\t\tPosition sp1 = new Position(-30, 100);\n\t\tPosition sp2 = new Position(-20, 120);\n\t\tPosition sp3 = new Position(-30, 140);\n\n\t\t//...
{ "fields": [ { "declarator": "lat", "modifier": "private final", "original_string": "private final double lat;", "type": "double", "var_name": "lat" }, { "declarator": "lon", "modifier": "private final", "original_string": "private final double lon;", ...
{ "body": "public final double getDistanceToPathKm(List<Position> positions) {\n\t\tif (positions.size() == 0)\n\t\t\tthrow new RuntimeException(\"positions must not be empty\");\n\t\telse if (positions.size() == 1)\n\t\t\treturn this.getDistanceToKm(positions.get(0));\n\t\telse {\n\t\t\tDouble distance = null;\n\t\t...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_109
{ "fields": [], "file": "ais/src/test/java/au/gov/amsa/ais/AisMessageParserTest.java", "identifier": "AisMessageParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = AisParseException.class) \n public void testParseStaticDataReportWithInvalidPartNumberException() {\n\n\t\tAisExtractorFactory factory = createMock(AisExtractorFactory.class);\n \t\n \tAisMessageParser p = new AisMessageParser();\n \t\n \tp.parseStaticDataReport(-1, 24, \"H7P...
{ "fields": [ { "declarator": "factory", "modifier": "private final", "original_string": "private final AisExtractorFactory factory;", "type": "AisExtractorFactory", "var_name": "factory" } ], "file": "ais/src/main/java/au/gov/amsa/ais/AisMessageParser.java", "identifier": ...
{ "body": "AisMessage parseStaticDataReport(int partNumber, int id, String message, String source, int padBits) {\n\t\t\n if (partNumber == AbstractAisBStaticDataReport.PART_NUMBER_A) {\n return new AisBStaticDataReportPartA(message, source, padBits);\n } else if (partNumber == AbstractAisBSt...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_236
{ "fields": [ { "declarator": "PRECISION = 0.000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.000001;", "type": "double", "var_name": "PRECISION" } ], "file": "formats/src/test/java/au/gov/amsa/risky/format/BinaryFixes...
{ "body": "@Test\n public void testWriteAndReadBinaryFixes() throws IOException {\n File trace = new File(\"target/123456789.track\");\n int numFixes = 2;\n writeTrace(trace, numFixes, BinaryFixesFormat.WITHOUT_MMSI);\n\n System.out.println(\"wrote \" + numFixes + \" fixes\");\n\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(BinaryFixes.class)", "modifier": "private static", "original_string": "private static Logger log = LoggerFactory.getLogger(BinaryFixes.class);", "type": "Logger", "var_name": "log" }, { "declarator": "BINARY_F...
{ "body": "public static Observable<Fix> from(File file) {\n return from(file, false);\n }", "class_method_signature": "BinaryFixes.from(File file)", "constructor": false, "full_signature": "public static Observable<Fix> from(File file)", "identifier": "from", "invocations": [ "from" ], "m...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }
22981257_261
{ "fields": [ { "declarator": "PRECISION = 0.000001", "modifier": "private static final", "original_string": "private static final double PRECISION = 0.000001;", "type": "double", "var_name": "PRECISION" } ], "file": "ihs-reader/src/test/java/au/gov/amsa/ihs/reader/IhsReaderT...
{ "body": "@Test\n public void testReaderFromInputStream() {\n IhsReader r = new IhsReader();\n Observable<Ship> o = r\n .from(IhsReaderTest.class.getResourceAsStream(\"/ShipData.xml\"), \"ShipData\")\n .map(IhsReader::toShip);\n Ship ship = o.last().toBlocking()....
{ "fields": [], "file": "ihs-reader/src/main/java/au/gov/amsa/ihs/reader/IhsReader.java", "identifier": "IhsReader", "interfaces": "", "methods": [ { "class_method_signature": "IhsReader.from(InputStream is, String parentElementName)", "constructor": false, "full_signature": "public Obse...
{ "body": "public Observable<Map<String, String>> from(InputStream is, String parentElementName) {\n return Observable.just(is).lift(new OperatorIhsReader(parentElementName));\n }", "class_method_signature": "IhsReader.from(InputStream is, String parentElementName)", "constructor": false, "full_signat...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 22981257, "size": 16917, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/amsa-code/risky" }