id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
47810463_4
{ "fields": [], "file": "bootique-job/src/test/java/io/bootique/job/value/CronTest.java", "identifier": "CronTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void expressionEquals() {\n String expression1 = \"* * 8 0 * *\";\n String expression2 = \"* * 8 * 0 *\";\n String expression3 = \"* * 8 0 * *\";\n\n Cron cron1 = new Cron(expression1);\n Cron cron2 = new Cron(expression2);\n Cron cron3 = new Cron...
{ "fields": [ { "declarator": "expression", "modifier": "private", "original_string": "private String expression;", "type": "String", "var_name": "expression" } ], "file": "bootique-job/src/main/java/io/bootique/job/value/Cron.java", "identifier": "Cron", "interfaces": ""...
{ "body": "@Override\n\tpublic boolean equals(Object o) {\n\t\tif (this == o) return true;\n\t\tif (o == null || getClass() != o.getClass()) return false;\n\t\tCron cron = (Cron) o;\n\t\treturn Objects.equals(expression, cron.expression);\n\t}", "class_method_signature": "Cron.equals(Object o)", "constructor": fa...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 47810463, "size": 543, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/bootique/bootique-job" }
47810463_3
{ "fields": [], "file": "bootique-job/src/test/java/io/bootique/job/value/CronTest.java", "identifier": "CronTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void expressionTest() {\n String expression = \"* * 8 0 * *\";\n Cron cron = new Cron(expression);\n assertEquals( \"Cron {\" +\n \"expression='\" + expression + '\\'' +\n '}', cron.toString());\n\n }", "class_method_signature": "Cro...
{ "fields": [ { "declarator": "expression", "modifier": "private", "original_string": "private String expression;", "type": "String", "var_name": "expression" } ], "file": "bootique-job/src/main/java/io/bootique/job/value/Cron.java", "identifier": "Cron", "interfaces": ""...
{ "body": "@Override\n\tpublic String toString() {\n\t\treturn \"Cron {\" +\n\t\t\t\t\"expression='\" + expression + '\\'' +\n\t\t\t\t'}';\n\t}", "class_method_signature": "Cron.toString()", "constructor": false, "full_signature": "@Override public String toString()", "identifier": "toString", "invocations"...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 47810463, "size": 543, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/bootique/bootique-job" }
47810463_2
{ "fields": [ { "declarator": "metricRegistry", "modifier": "private", "original_string": "private MetricRegistry metricRegistry;", "type": "MetricRegistry", "var_name": "metricRegistry" } ], "file": "bootique-job-instrumented/src/test/java/io/bootique/job/instrumented/Instru...
{ "body": "@Test\n public void testJobsInstrumentation_SuccessResult() {\n FinishEventSource finishEventSource = new FinishEventSource();\n\n InstrumentedJobListener listener = new InstrumentedJobListener(metricRegistry);\n listener.onJobStarted(\"j1\", Collections.emptyMap(), finishEventSourc...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(InstrumentedJobListener.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(InstrumentedJobListener.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@Override\n public void onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource) {\n\n JobMetrics metric = getOrCreateMetrics(jobName);\n\n metric.getActiveCounter().inc();\n Timer.Context requestTimerContext = metric.getTimer().t...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 47810463, "size": 543, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/bootique/bootique-job" }
47810463_1
{ "fields": [ { "declarator": "metricRegistry", "modifier": "private", "original_string": "private MetricRegistry metricRegistry;", "type": "MetricRegistry", "var_name": "metricRegistry" } ], "file": "bootique-job-instrumented/src/test/java/io/bootique/job/instrumented/Instru...
{ "body": "@Test\n public void testJobsInstrumentation_UnknownResult() {\n InstrumentedJobListener listener = new InstrumentedJobListener(metricRegistry);\n\n FinishEventSource f1 = new FinishEventSource();\n listener.onJobStarted(\"j1\", Collections.emptyMap(), f1);\n assertHasMetrics(...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(InstrumentedJobListener.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(InstrumentedJobListener.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@Override\n public void onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource) {\n\n JobMetrics metric = getOrCreateMetrics(jobName);\n\n metric.getActiveCounter().inc();\n Timer.Context requestTimerContext = metric.getTimer().t...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 47810463, "size": 543, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/bootique/bootique-job" }
47810463_0
{ "fields": [ { "declarator": "metricRegistry", "modifier": "private", "original_string": "private MetricRegistry metricRegistry;", "type": "MetricRegistry", "var_name": "metricRegistry" } ], "file": "bootique-job-instrumented/src/test/java/io/bootique/job/instrumented/Instru...
{ "body": "@Test\n public void testJobsInstrumentation_ActiveCount_SuccessAndFailureResults() {\n InstrumentedJobListener listener = new InstrumentedJobListener(metricRegistry);\n\n FinishEventSource f1 = new FinishEventSource();\n listener.onJobStarted(\"j1\", Collections.emptyMap(), f1);\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(InstrumentedJobListener.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(InstrumentedJobListener.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@Override\n public void onJobStarted(String jobName, Map<String, Object> parameters, Consumer<Consumer<JobResult>> finishEventSource) {\n\n JobMetrics metric = getOrCreateMetrics(jobName);\n\n metric.getActiveCounter().inc();\n Timer.Context requestTimerContext = metric.getTimer().t...
{ "created": null, "fork": null, "fork_count": 12, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 47810463, "size": 543, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/bootique/bootique-job" }
28598239_25
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void amendInBranch_theResultCommitShouldEqualTheHeadOfTheAttachedBranch() throws IOException {\n writeSomethingToGfs();\n Result result = Gfs.commit(gfs).amend(true).execute();\n assertEquals(repo.resolve(gfs.getStatusProvider().branch()), result.getCommit());\n }", "class_metho...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit amend(boolean amend) {\n this.amend = amend;\n return this;\n }", "class_method_signature": "GfsCommit.amend(boolean amend)", "constructor": false, "full_signature": "@Nonnull public GfsCommit amend(boolean amend)", "identifier": "amend", "invocations": [], "...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_33
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/BranchUtilsTest.java", "identifier": "BranchUtilsTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void getBranchHeadCommitTest() throws IOException {\n AnyObjectId firstCommit = initRepository();\n assertEquals(firstCommit, BranchUtils.getHeadCommit(Constants.MASTER, repo));\n writeToCache(\"a.txt\");\n String branchName = \"second\";\n AnyObjectId branchCommit = commitTo...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/BranchUtils.java", "identifier": "BranchUtils", "interfaces": "", "methods": [ { "class_method_signature": "BranchUtils.getHistory(String name, Repository repo)", "constructor": false, "full_signature...
{ "body": "@Nonnull\n public static RevCommit getHeadCommit(String name, Repository repo) throws IOException {\n Ref ref = RefUtils.getBranchRef(name, repo);\n return getCommit(ref.getObjectId(), repo);\n }", "class_method_signature": "BranchUtils.getHeadCommit(String name, Repository repo)", "constructor...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_29
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/utils/GfsUriUtilsTest.java", "identifier": "GfsUriUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = ProviderMismatchException.class)\n public void checkSchemeTest() {\n GfsUriUtils.checkScheme(URI.create(\"/somepath\"));\n }", "class_method_signature": "GfsUriUtilsTest.checkSchemeTest()", "constructor": false, "full_signature": "@Test(expected = ProviderMismatchException.class...
{ "fields": [ { "declarator": "SID_KEY = \"sid\"", "modifier": "public final static", "original_string": "public final static String SID_KEY = \"sid\";", "type": "String", "var_name": "SID_KEY" } ], "file": "parallelgit-filesystem/src/main/java/com/beijunyi/parallelgit/filesy...
{ "body": "static void checkScheme(URI uri) throws ProviderMismatchException {\n if(!GitFileSystemProvider.GFS.equalsIgnoreCase(uri.getScheme()))\n throw new ProviderMismatchException(uri.getScheme());\n }", "class_method_signature": "GfsUriUtils.checkScheme(URI uri)", "constructor": false, "full_signa...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_13
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsResetTest.java", "identifier": "GfsResetTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void resetToRevision_fileSystemRootTreeShouldBecomeTheSameAsRevisionRootTree() throws IOException {\n writeSomethingToCache();\n RevCommit revision = commit();\n writeSomethingToGfs();\n GfsReset.Result result = Gfs.reset(gfs).revision(revision.getName()).execute();\n\n asser...
{ "fields": [ { "declarator": "soft = false", "modifier": "private", "original_string": "private boolean soft = false;", "type": "boolean", "var_name": "soft" }, { "declarator": "hard = false", "modifier": "private", "original_string": "private boolean hard ...
{ "body": "@Nonnull\n public GfsReset revision(String revision) {\n this.revision = revision;\n return this;\n }", "class_method_signature": "GfsReset.revision(String revision)", "constructor": false, "full_signature": "@Nonnull public GfsReset revision(String revision)", "identifier": "revision", "...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_7
{ "fields": [ { "declarator": "FILE_DATA = encodeASCII(\"18 bytes test data\")", "modifier": "private static final", "original_string": "private static final byte[] FILE_DATA = encodeASCII(\"18 bytes test data\");", "type": "byte[]", "var_name": "FILE_DATA" }, { "declar...
{ "body": "@Test\n public void readFromChannelOpenedWithReadOption_shouldStreamTheFileData() throws IOException {\n try(SeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(READ))) {\n ByteBuffer buffer = ByteBuffer.allocate(FILE_DATA.length);\n channel.read(buffer);\n assertArr...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final FileNode file;", "type": "FileNode", "var_name": "file" }, { "declarator": "readable", "modifier": "private final", "original_string": "private final boolean...
{ "body": "@Override\n public int read(ByteBuffer dst) throws ClosedChannelException {\n checkClosed();\n checkReadAccess();\n synchronized(this) {\n if (!buffer.hasRemaining()) {\n return -1;\n }\n return copyBytes(dst, buffer);\n }\n }", "class_method_signature": "GfsSeekableBy...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_6
{ "fields": [ { "declarator": "FILE_DATA = encodeASCII(\"18 bytes test data\")", "modifier": "private static final", "original_string": "private static final byte[] FILE_DATA = encodeASCII(\"18 bytes test data\");", "type": "byte[]", "var_name": "FILE_DATA" }, { "declar...
{ "body": "@Test\n public void positionOfNewChannel_shouldReturnZero() throws IOException {\n try(SeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(READ))) {\n assertEquals(0, channel.position());\n }\n }", "class_method_signature": "GfsSeekableByteChannelTest.positionOfNewChanne...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final FileNode file;", "type": "FileNode", "var_name": "file" }, { "declarator": "readable", "modifier": "private final", "original_string": "private final boolean...
{ "body": "@Override\n public long position() throws ClosedChannelException {\n checkClosed();\n return buffer.position();\n }", "class_method_signature": "GfsSeekableByteChannel.position()", "constructor": false, "full_signature": "@Override public long position()", "identifier": "position", "invoc...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_12
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsResetTest.java", "identifier": "GfsResetTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void resetToRevisionWhenThereIsNoLocalChange_branchHeadShouldBecomeTheSpecifiedRevision() throws IOException {\n writeSomethingToCache();\n ObjectId expected = commit();\n GfsReset.Result result = Gfs.reset(gfs).revision(expected.getName()).execute();\n\n assertTrue(result.isSuc...
{ "fields": [ { "declarator": "soft = false", "modifier": "private", "original_string": "private boolean soft = false;", "type": "boolean", "var_name": "soft" }, { "declarator": "hard = false", "modifier": "private", "original_string": "private boolean hard ...
{ "body": "@Nonnull\n public GfsReset revision(String revision) {\n this.revision = revision;\n return this;\n }", "class_method_signature": "GfsReset.revision(String revision)", "constructor": false, "full_signature": "@Nonnull public GfsReset revision(String revision)", "identifier": "revision", "...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_28
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/utils/GfsConfigurationTest.java", "identifier": "GfsConfigurationTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void buildWithRevisionString() throws IOException {\n writeSomethingToCache();\n AnyObjectId commit = commitToMaster();\n GitFileSystem gfs = Gfs.newFileSystem(commit.getName(), repo);\n assertEquals(commit, gfs.getStatusProvider().commit());\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "repo", "modifier": "private final", "original_string": "private final Repository repo;", "type": "Repository", "var_name": "repo" }, { "declarator": "branch", "modifier": "private", "original_string": "private String branch;", ...
{ "body": "@Nonnull\n public GfsConfiguration commit(RevCommit commit) {\n if(branch != null || this.commit != null)\n throw new HeadAlreadyDefinedException();\n this.commit = commit;\n return this;\n }", "class_method_signature": "GfsConfiguration.commit(RevCommit commit)", "constructor": false, ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_32
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/utils/GfsUriUtilsTest.java", "identifier": "GfsUriUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getFile() {\n assertEquals(\"/\", GfsUriUtils.getFile(URI.create(\"gfs:/repo#/\")));\n assertEquals(\"/\", GfsUriUtils.getFile(URI.create(\"gfs:/repo#\")));\n assertEquals(\"/a.txt\", GfsUriUtils.getFile(URI.create(\"gfs:/repo#/a.txt\")));\n assertEquals(\"/a/b.txt\", GfsUr...
{ "fields": [ { "declarator": "SID_KEY = \"sid\"", "modifier": "public final static", "original_string": "public final static String SID_KEY = \"sid\";", "type": "String", "var_name": "SID_KEY" } ], "file": "parallelgit-filesystem/src/main/java/com/beijunyi/parallelgit/filesy...
{ "body": "@Nonnull\n public static String getFile(URI uri) throws ProviderMismatchException {\n checkScheme(uri);\n String fragment = uri.getFragment();\n if(fragment == null)\n fragment = \"\";\n if(!fragment.startsWith(\"/\"))\n fragment = \"/\" + fragment;\n if(fragment.length() > 1 && f...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_24
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void amendCommit_theResultCommitShouldHaveTheSameParentsAsTheAmendedCommit() throws IOException {\n RevCommit[] parents = gfs.getStatusProvider().commit().getParents();\n writeSomethingToGfs();\n Result result = Gfs.commit(gfs).amend(true).execute();\n assertArrayEquals(parents,...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit amend(boolean amend) {\n this.amend = amend;\n return this;\n }", "class_method_signature": "GfsCommit.amend(boolean amend)", "constructor": false, "full_signature": "@Nonnull public GfsCommit amend(boolean amend)", "identifier": "amend", "invocations": [], "...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_39
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/RefUtilsTest.java", "identifier": "RefUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ensureBranchRefNameWhenInputIsFullRefName_shouldReturnTheFullRefName() {\n assertEquals(\"refs/heads/test\", RefUtils.fullBranchName(\"refs/heads/test\"));\n }", "class_method_signature": "RefUtilsTest.ensureBranchRefNameWhenInputIsFullRefName_shouldReturnTheFullRefName()", "co...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/RefUtils.java", "identifier": "RefUtils", "interfaces": "", "methods": [ { "class_method_signature": "RefUtils.matchesPrefix(String name, String prefix)", "constructor": false, "full_signature": "priv...
{ "body": "@Nonnull\n public static String fullBranchName(String name) {\n return appendPrefix(name, R_HEADS);\n }", "class_method_signature": "RefUtils.fullBranchName(String name)", "constructor": false, "full_signature": "@Nonnull public static String fullBranchName(String name)", "identifier": "fullBr...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_15
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsResetTest.java", "identifier": "GfsResetTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void resetWithHardOptionWhenThereIsMerge_mergeNoteShouldBeCleared() throws IOException {\n writeSomethingToCache();\n commitToBranch(\"some_branch\");\n Gfs.merge(gfs).source(\"some_branch\").commit(false).execute();\n GfsReset.Result result = Gfs.reset(gfs).hard(true).execute()...
{ "fields": [ { "declarator": "soft = false", "modifier": "private", "original_string": "private boolean soft = false;", "type": "boolean", "var_name": "soft" }, { "declarator": "hard = false", "modifier": "private", "original_string": "private boolean hard ...
{ "body": "@Nonnull\n public GfsReset hard(boolean hard) {\n this.hard = hard;\n return this;\n }", "class_method_signature": "GfsReset.hard(boolean hard)", "constructor": false, "full_signature": "@Nonnull public GfsReset hard(boolean hard)", "identifier": "hard", "invocations": [], "modifiers": ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_1
{ "fields": [ { "declarator": "iterator", "modifier": "private", "original_string": "private GfsTreeIterator iterator;", "type": "GfsTreeIterator", "var_name": "iterator" } ], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/io/GfsTreeIterator...
{ "body": "@Test\n public void forwardFour_iteratorShouldBePositionedToTheFifthEntry() throws IOException {\n iterator.next(4);\n assertEquals(\"file5.txt\", iterator.getEntryPathString());\n }", "class_method_signature": "GfsTreeIteratorTest.forwardFour_iteratorShouldBePositionedToTheFifthEntry()", "cons...
{ "fields": [ { "declarator": "files", "modifier": "private final", "original_string": "private final List<GfsTreeEntry> files;", "type": "List<GfsTreeEntry>", "var_name": "files" }, { "declarator": "index = -1", "modifier": "private", "original_string": "pr...
{ "body": "@Override\n public void next(int delta) {\n index = Math.min(files.size(), index + delta);\n if(!eof()) readEntry();\n }", "class_method_signature": "GfsTreeIterator.next(int delta)", "constructor": false, "full_signature": "@Override public void next(int delta)", "identifier": "next", "i...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_23
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void commitWithCommitterOnly_theResultCommitAuthorShouldDefaultToBeTheSameAsTheSpecifiedCommitter() throws IOException {\n writeSomethingToGfs();\n PersonIdent committer = new PersonIdent(\"test_committer_name\", \"test_committer@email.com\");\n Result result = Gfs.commit(gfs).comm...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit committer(@Nullable PersonIdent committer) {\n this.committer = committer;\n return this;\n }", "class_method_signature": "GfsCommit.committer(@Nullable PersonIdent committer)", "constructor": false, "full_signature": "@Nonnull public GfsCommit committer(@Nullable ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_35
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/TreeUtilsTest.java", "identifier": "TreeUtilsTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void existsTest() throws IOException {\n writeToCache(\"a/b.txt\");\n RevTree tree = commitToMaster().getTree();\n assertTrue(TreeUtils.exists(\"a\", tree, repo));\n assertTrue(TreeUtils.exists(\"a/b.txt\", tree, repo));\n assertFalse(TreeUtils.exists(\"a/b\", tree, repo));\n...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/TreeUtils.java", "identifier": "TreeUtils", "interfaces": "", "methods": [ { "class_method_signature": "TreeUtils.normalizeNodePath(String path)", "constructor": false, "full_signature": "@Nonnull pub...
{ "body": "public static boolean exists(String path, AnyObjectId tree, ObjectReader reader) throws IOException {\n return forPath(path, tree, reader) != null;\n }", "class_method_signature": "TreeUtils.exists(String path, AnyObjectId tree, ObjectReader reader)", "constructor": false, "full_signature": "publ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_19
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void commitNoChangeWithAllowEmptyOption_theResultCommitShouldHaveTheSameTree() throws IOException {\n RevCommit currentHead = gfs.getStatusProvider().commit();\n Result result = Gfs.commit(gfs).allowEmpty(true).execute();\n assertEquals(currentHead.getTree(), result.getCommit().get...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit allowEmpty(boolean allowEmpty) {\n this.allowEmpty = allowEmpty;\n return this;\n }", "class_method_signature": "GfsCommit.allowEmpty(boolean allowEmpty)", "constructor": false, "full_signature": "@Nonnull public GfsCommit allowEmpty(boolean allowEmpty)", "identi...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_18
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void commitNoChangeWithAllowEmptyOption_newCommitShouldBeCreated() throws IOException {\n RevCommit currentHead = gfs.getStatusProvider().commit();\n Result result = Gfs.commit(gfs).allowEmpty(true).execute();\n assertNotEquals(currentHead, result.getCommit());\n }", "class_meth...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit allowEmpty(boolean allowEmpty) {\n this.allowEmpty = allowEmpty;\n return this;\n }", "class_method_signature": "GfsCommit.allowEmpty(boolean allowEmpty)", "constructor": false, "full_signature": "@Nonnull public GfsCommit allowEmpty(boolean allowEmpty)", "identi...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_34
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/BranchUtilsTest.java", "identifier": "BranchUtilsTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void resetBranchHeadTest() throws IOException {\n AnyObjectId firstCommit = initRepository();\n writeToCache(\"a.txt\");\n String branchName = \"second\";\n AnyObjectId branchCommit = commitToBranch(branchName, firstCommit);\n BranchUtils.resetBranchHead(Constants.MASTER, bra...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/BranchUtils.java", "identifier": "BranchUtils", "interfaces": "", "methods": [ { "class_method_signature": "BranchUtils.getHistory(String name, Repository repo)", "constructor": false, "full_signature...
{ "body": "public static void resetBranchHead(String name, AnyObjectId commitId, Repository repo) throws IOException {\n setBranchHead(name, commitId, repo, makeRefLogMessage(fullBranchName(name), \"updating HEAD\"), true);\n }", "class_method_signature": "BranchUtils.resetBranchHead(String name, AnyObjectId co...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_22
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void commitWithCommitter_theResultCommitShouldHaveTheSpecifiedCommitter() throws IOException {\n writeSomethingToGfs();\n PersonIdent committer = new PersonIdent(\"test_committer_name\", \"test_committer@email.com\");\n Result result = Gfs.commit(gfs).committer(committer).execute()...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit committer(@Nullable PersonIdent committer) {\n this.committer = committer;\n return this;\n }", "class_method_signature": "GfsCommit.committer(@Nullable PersonIdent committer)", "constructor": false, "full_signature": "@Nonnull public GfsCommit committer(@Nullable ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_0
{ "fields": [ { "declarator": "iterator", "modifier": "private", "original_string": "private GfsTreeIterator iterator;", "type": "GfsTreeIterator", "var_name": "iterator" } ], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/io/GfsTreeIterator...
{ "body": "@Test\n public void createNewIterator_iteratorShouldStartFromTheFirstEntry() throws IOException {\n assertTrue(iterator.first());\n }", "class_method_signature": "GfsTreeIteratorTest.createNewIterator_iteratorShouldStartFromTheFirstEntry()", "constructor": false, "full_signature": "@Test public ...
{ "fields": [ { "declarator": "files", "modifier": "private final", "original_string": "private final List<GfsTreeEntry> files;", "type": "List<GfsTreeEntry>", "var_name": "files" }, { "declarator": "index = -1", "modifier": "private", "original_string": "pr...
{ "body": "@Override\n public boolean first() {\n return index == 0;\n }", "class_method_signature": "GfsTreeIterator.first()", "constructor": false, "full_signature": "@Override public boolean first()", "identifier": "first", "invocations": [], "modifiers": "@Override public", "parameters": "()", ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_14
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsResetTest.java", "identifier": "GfsResetTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void resetToRevisionWhenThereAreLocalChanges_branchHeadShouldBecomeTheSpecifiedRevision() throws IOException {\n writeSomethingToCache();\n ObjectId expected = commit();\n writeSomethingToGfs();\n GfsReset.Result result = Gfs.reset(gfs).revision(expected.getName()).execute();\n\...
{ "fields": [ { "declarator": "soft = false", "modifier": "private", "original_string": "private boolean soft = false;", "type": "boolean", "var_name": "soft" }, { "declarator": "hard = false", "modifier": "private", "original_string": "private boolean hard ...
{ "body": "@Nonnull\n public GfsReset revision(String revision) {\n this.revision = revision;\n return this;\n }", "class_method_signature": "GfsReset.revision(String revision)", "constructor": false, "full_signature": "@Nonnull public GfsReset revision(String revision)", "identifier": "revision", "...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_38
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/RefUtilsTest.java", "identifier": "RefUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void ensureBranchRefNameWhenInputIsShortName_shouldReturnTheFullRefName() {\n assertEquals(\"refs/heads/test\", RefUtils.fullBranchName(\"test\"));\n }", "class_method_signature": "RefUtilsTest.ensureBranchRefNameWhenInputIsShortName_shouldReturnTheFullRefName()", "constructor": fal...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/RefUtils.java", "identifier": "RefUtils", "interfaces": "", "methods": [ { "class_method_signature": "RefUtils.matchesPrefix(String name, String prefix)", "constructor": false, "full_signature": "priv...
{ "body": "@Nonnull\n public static String fullBranchName(String name) {\n return appendPrefix(name, R_HEADS);\n }", "class_method_signature": "RefUtils.fullBranchName(String name)", "constructor": false, "full_signature": "@Nonnull public static String fullBranchName(String name)", "identifier": "fullBr...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_3
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/io/GfsDirectoryStreamTest.java", "identifier": "GfsDirectoryStreamTest", "interfaces": "", "superclass": "extends AbstractGitFileSystemTest" }
{ "body": "@Test(expected = NoSuchElementException.class)\n public void directoryStreamOfDirectoryNoSuchElementTest() throws IOException {\n initRepository();\n writeToCache(\"/dir/file.txt\");\n commitToMaster();\n initGitFileSystem();\n try(DirectoryStream<Path> ds = Files.newDirectoryStream(gfs.get...
{ "fields": [ { "declarator": "parent", "modifier": "private final", "original_string": "private final GitPath parent;", "type": "GitPath", "var_name": "parent" }, { "declarator": "children", "modifier": "private final", "original_string": "private final Lis...
{ "body": "@Nonnull\n @Override\n public Iterator<Path> iterator() {\n final Iterator<String> childrenIt = children.iterator();\n return new Iterator<Path>() {\n\n private Path next;\n\n private boolean findNext() {\n while(childrenIt.hasNext()) {\n String child = childrenIt.next();\...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_40
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/RefUtilsTest.java", "identifier": "RefUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void ensureBranchRefNameWhenInputIsTag_shouldThrowIllegalArgumentException() {\n RefUtils.fullBranchName(\"refs/tags/test\");\n }", "class_method_signature": "RefUtilsTest.ensureBranchRefNameWhenInputIsTag_shouldThrowIllegalArgumentException(...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/RefUtils.java", "identifier": "RefUtils", "interfaces": "", "methods": [ { "class_method_signature": "RefUtils.matchesPrefix(String name, String prefix)", "constructor": false, "full_signature": "priv...
{ "body": "@Nonnull\n public static String fullBranchName(String name) {\n return appendPrefix(name, R_HEADS);\n }", "class_method_signature": "RefUtils.fullBranchName(String name)", "constructor": false, "full_signature": "@Nonnull public static String fullBranchName(String name)", "identifier": "fullBr...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_17
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void commitNoChangeWithAllowEmptyOption_theResultsShouldBeSuccessful() throws IOException {\n Result result = Gfs.commit(gfs).allowEmpty(true).execute();\n assertTrue(result.isSuccessful());\n }", "class_method_signature": "GfsCommitTest.commitNoChangeWithAllowEmptyOption_theResult...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit allowEmpty(boolean allowEmpty) {\n this.allowEmpty = allowEmpty;\n return this;\n }", "class_method_signature": "GfsCommit.allowEmpty(boolean allowEmpty)", "constructor": false, "full_signature": "@Nonnull public GfsCommit allowEmpty(boolean allowEmpty)", "identi...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_37
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/TreeUtilsTest.java", "identifier": "TreeUtilsTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void isDirectoryTest() throws IOException {\n writeToCache(\"a/b.txt\");\n RevTree tree = commitToMaster().getTree();\n assertTrue(TreeUtils.isDirectory(\"a\", tree, repo));\n assertFalse(TreeUtils.isDirectory(\"a/b.txt\", tree, repo));\n assertFalse(TreeUtils.isDirectory(\"a...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/TreeUtils.java", "identifier": "TreeUtils", "interfaces": "", "methods": [ { "class_method_signature": "TreeUtils.normalizeNodePath(String path)", "constructor": false, "full_signature": "@Nonnull pub...
{ "body": "public static boolean isDirectory(TreeWalk tw) {\n return TREE.equals(getFileMode(tw));\n }", "class_method_signature": "TreeUtils.isDirectory(TreeWalk tw)", "constructor": false, "full_signature": "public static boolean isDirectory(TreeWalk tw)", "identifier": "isDirectory", "invocations": [...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_21
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void commitWithAuthor_theResultCommitShouldHaveTheSpecifiedAuthor() throws IOException {\n writeSomethingToGfs();\n PersonIdent author = new PersonIdent(\"test_author_name\", \"test_author@email.com\");\n Result result = Gfs.commit(gfs).author(author).execute();\n assertEquals(a...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit author(@Nullable PersonIdent author) {\n this.author = author;\n return this;\n }", "class_method_signature": "GfsCommit.author(@Nullable PersonIdent author)", "constructor": false, "full_signature": "@Nonnull public GfsCommit author(@Nullable PersonIdent author)",...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_20
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsCommitTest.java", "identifier": "GfsCommitTest", "interfaces": "", "superclass": "extends PreSetupGitFileSystemTest" }
{ "body": "@Test\n public void commitWithMessage_theResultCommitShouldHaveTheSpecifiedMessage() throws IOException {\n writeSomethingToGfs();\n Result result = Gfs.commit(gfs).message(\"test_message\").execute();\n assertEquals(\"test_message\", result.getCommit().getFullMessage());\n }", "class_method_s...
{ "fields": [ { "declarator": "author", "modifier": "private", "original_string": "private PersonIdent author;", "type": "PersonIdent", "var_name": "author" }, { "declarator": "committer", "modifier": "private", "original_string": "private PersonIdent commit...
{ "body": "@Nonnull\n public GfsCommit message(@Nullable String message) {\n this.message = message;\n return this;\n }", "class_method_signature": "GfsCommit.message(@Nullable String message)", "constructor": false, "full_signature": "@Nonnull public GfsCommit message(@Nullable String message)", "ide...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_36
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/TreeUtilsTest.java", "identifier": "TreeUtilsTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void getObjectIdTest() throws IOException {\n AnyObjectId objectId = writeToCache(\"a/b.txt\");\n RevTree tree = commitToMaster().getTree();\n assertEquals(objectId, TreeUtils.getObjectId(\"a/b.txt\", tree, repo));\n }", "class_method_signature": "TreeUtilsTest.getObjectIdTest()...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/TreeUtils.java", "identifier": "TreeUtils", "interfaces": "", "methods": [ { "class_method_signature": "TreeUtils.normalizeNodePath(String path)", "constructor": false, "full_signature": "@Nonnull pub...
{ "body": "@Nullable\n public static ObjectId getObjectId(TreeWalk tw) {\n return tw.getObjectId(0);\n }", "class_method_signature": "TreeUtils.getObjectId(TreeWalk tw)", "constructor": false, "full_signature": "@Nullable public static ObjectId getObjectId(TreeWalk tw)", "identifier": "getObjectId", "i...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_16
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/commands/GfsApplyStashTest.java", "identifier": "GfsApplyStashTest", "interfaces": "", "superclass": "extends AbstractGitFileSystemTest" }
{ "body": "@Test\n public void applySpecificStash_theCorrespondingStashedChangesShouldAppearInTheFileSystem() throws IOException {\n byte[] expected = someBytes();\n writeToGfs(\"/test_file.txt\", expected);\n createStash(gfs).execute();\n reset(gfs).execute();\n\n writeSomethingToGfs();\n createSt...
{ "fields": [ { "declarator": "LAST_STASH = makeStashId(0)", "modifier": "private static final", "original_string": "private static final String LAST_STASH = makeStashId(0);", "type": "String", "var_name": "LAST_STASH" }, { "declarator": "strategy = RECURSIVE", "m...
{ "body": "@Nonnull\n public GfsApplyStash stash(String id) throws IOException {\n this.stashId = id;\n return this;\n }", "class_method_signature": "GfsApplyStash.stash(String id)", "constructor": false, "full_signature": "@Nonnull public GfsApplyStash stash(String id)", "identifier": "stash", "inv...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_41
{ "fields": [], "file": "parallelgit-utils/src/test/java/com/beijunyi/parallelgit/utils/RefUtilsTest.java", "identifier": "RefUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void ensureBranchRefNameWhenInputHasSpecialCharacter_shouldThrowIllegalArgumentException() {\n RefUtils.fullBranchName(\"test?\");\n }", "class_method_signature": "RefUtilsTest.ensureBranchRefNameWhenInputHasSpecialCharacter_shouldThrowIllega...
{ "fields": [], "file": "parallelgit-utils/src/main/java/com/beijunyi/parallelgit/utils/RefUtils.java", "identifier": "RefUtils", "interfaces": "", "methods": [ { "class_method_signature": "RefUtils.matchesPrefix(String name, String prefix)", "constructor": false, "full_signature": "priv...
{ "body": "@Nonnull\n public static String fullBranchName(String name) {\n return appendPrefix(name, R_HEADS);\n }", "class_method_signature": "RefUtils.fullBranchName(String name)", "constructor": false, "full_signature": "@Nonnull public static String fullBranchName(String name)", "identifier": "fullBr...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_2
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/io/GfsDirectoryStreamTest.java", "identifier": "GfsDirectoryStreamTest", "interfaces": "", "superclass": "extends AbstractGitFileSystemTest" }
{ "body": "@Test\n public void directoryStreamOfDirectoryTest() throws IOException {\n initRepository();\n String[] files = new String[] {\"/a/b.txt\", \"/a/c/c1.txt\", \"/a/d/d1.txt\", \"/a/d/d2.txt\", \"/a/e.txt\", \"/f.txt\", \"/g/h.txt\"};\n for(String file : files)\n writeToCache(file);\n commi...
{ "fields": [ { "declarator": "parent", "modifier": "private final", "original_string": "private final GitPath parent;", "type": "GitPath", "var_name": "parent" }, { "declarator": "children", "modifier": "private final", "original_string": "private final Lis...
{ "body": "@Nonnull\n @Override\n public Iterator<Path> iterator() {\n final Iterator<String> childrenIt = children.iterator();\n return new Iterator<Path>() {\n\n private Path next;\n\n private boolean findNext() {\n while(childrenIt.hasNext()) {\n String child = childrenIt.next();\...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_9
{ "fields": [ { "declarator": "FILE_DATA = encodeASCII(\"18 bytes test data\")", "modifier": "private static final", "original_string": "private static final byte[] FILE_DATA = encodeASCII(\"18 bytes test data\");", "type": "byte[]", "var_name": "FILE_DATA" }, { "declar...
{ "body": "@Test(expected = NonWritableChannelException.class)\n public void writeToChannelOpenedWithoutReadOption_shouldThrowNonWritableChannelException() throws IOException {\n try(SeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(READ))) {\n channel.write(ByteBuffer.wrap(someBytes()...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final FileNode file;", "type": "FileNode", "var_name": "file" }, { "declarator": "readable", "modifier": "private final", "original_string": "private final boolean...
{ "body": "@Override\n public int write(ByteBuffer src) throws ClosedChannelException {\n checkClosed();\n checkWriteAccess();\n synchronized(this) {\n if(buffer.remaining() < src.remaining()) {\n int position = buffer.position();\n byte[] bytes = new byte[position + src.remaining()];\n ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_31
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/utils/GfsUriUtilsTest.java", "identifier": "GfsUriUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getRepository_dosFormat() {\n assertEquals(\"/c:/\", GfsUriUtils.getRepository(URI.create(\"gfs:/c:/\")));\n assertEquals(\"/c:/windows/path\", GfsUriUtils.getRepository(URI.create(\"gfs:/c:/windows/path\")));\n assertEquals(\"/c:/windows/path\", GfsUriUtils.getRepository(URI....
{ "fields": [ { "declarator": "SID_KEY = \"sid\"", "modifier": "public final static", "original_string": "public final static String SID_KEY = \"sid\";", "type": "String", "var_name": "SID_KEY" } ], "file": "parallelgit-filesystem/src/main/java/com/beijunyi/parallelgit/filesy...
{ "body": "@Nonnull\n public static String getRepository(URI uri) {\n checkScheme(uri);\n String path = uri.getPath();\n if(path.length() > 1 && path.endsWith(\"/\") && !path.endsWith(\":/\"))\n path = path.substring(0, path.length() - 1);\n return path;\n }", "class_method_signature": "GfsUriUti...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_27
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/utils/GfsConfigurationTest.java", "identifier": "GfsConfigurationTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void buildWithRevision() throws IOException {\n writeSomethingToCache();\n AnyObjectId commit = commitToMaster();\n GitFileSystem gfs = Gfs.newFileSystem(commit, repo);\n assertEquals(commit, gfs.getStatusProvider().commit());\n }", "class_method_signature": "GfsConfiguration...
{ "fields": [ { "declarator": "repo", "modifier": "private final", "original_string": "private final Repository repo;", "type": "Repository", "var_name": "repo" }, { "declarator": "branch", "modifier": "private", "original_string": "private String branch;", ...
{ "body": "@Nonnull\n public GfsConfiguration commit(RevCommit commit) {\n if(branch != null || this.commit != null)\n throw new HeadAlreadyDefinedException();\n this.commit = commit;\n return this;\n }", "class_method_signature": "GfsConfiguration.commit(RevCommit commit)", "constructor": false, ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_5
{ "fields": [ { "declarator": "FILE_DATA = encodeASCII(\"18 bytes test data\")", "modifier": "private static final", "original_string": "private static final byte[] FILE_DATA = encodeASCII(\"18 bytes test data\");", "type": "byte[]", "var_name": "FILE_DATA" }, { "declar...
{ "body": "@Test\n public void testsIsOpenOnNewChannel_shouldReturnTrue() throws IOException {\n try(SeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(READ))) {\n assertTrue(channel.isOpen());\n }\n }", "class_method_signature": "GfsSeekableByteChannelTest.testsIsOpenOnNewChannel...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final FileNode file;", "type": "FileNode", "var_name": "file" }, { "declarator": "readable", "modifier": "private final", "original_string": "private final boolean...
{ "body": "@Override\n public boolean isOpen() {\n return !closed;\n }", "class_method_signature": "GfsSeekableByteChannel.isOpen()", "constructor": false, "full_signature": "@Override public boolean isOpen()", "identifier": "isOpen", "invocations": [], "modifiers": "@Override public", "parameters"...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_11
{ "fields": [ { "declarator": "FILE_DATA = encodeASCII(\"18 bytes test data\")", "modifier": "private static final", "original_string": "private static final byte[] FILE_DATA = encodeASCII(\"18 bytes test data\");", "type": "byte[]", "var_name": "FILE_DATA" }, { "declar...
{ "body": "@Test\n public void getSizeOfNewChannel_shouldReturnTheLengthOfTheInputByteArray() throws IOException {\n try(SeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(READ))) {\n assertEquals(FILE_DATA.length, channel.size());\n }\n }", "class_method_signature": "GfsSeekableB...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final FileNode file;", "type": "FileNode", "var_name": "file" }, { "declarator": "readable", "modifier": "private final", "original_string": "private final boolean...
{ "body": "@Override\n public long size() throws ClosedChannelException {\n checkClosed();\n return buffer.limit();\n }", "class_method_signature": "GfsSeekableByteChannel.size()", "constructor": false, "full_signature": "@Override public long size()", "identifier": "size", "invocations": [ "che...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_10
{ "fields": [ { "declarator": "FILE_DATA = encodeASCII(\"18 bytes test data\")", "modifier": "private static final", "original_string": "private static final byte[] FILE_DATA = encodeASCII(\"18 bytes test data\");", "type": "byte[]", "var_name": "FILE_DATA" }, { "declar...
{ "body": "@Test\n public void getBytesOfNewChannel_shouldReturnTheSameDataAsTheInput() throws IOException {\n try(GfsSeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(READ))) {\n assertArrayEquals(FILE_DATA, channel.getBytes());\n }\n }", "class_method_signature": "GfsSeekableBy...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final FileNode file;", "type": "FileNode", "var_name": "file" }, { "declarator": "readable", "modifier": "private final", "original_string": "private final boolean...
{ "body": "@Nonnull\n public byte[] getBytes() {\n synchronized(this) {\n byte[] bytes = new byte[buffer.limit()];\n arraycopy(buffer.array(), 0, bytes, 0, bytes.length);\n return bytes;\n }\n\n }", "class_method_signature": "GfsSeekableByteChannel.getBytes()", "constructor": false, "full...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_4
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/io/GfsDirectoryStreamTest.java", "identifier": "GfsDirectoryStreamTest", "interfaces": "", "superclass": "extends AbstractGitFileSystemTest" }
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void directoryStreamOfDirectoryRemoveTest() throws IOException {\n initRepository();\n writeToCache(\"/dir/file.txt\");\n commitToMaster();\n initGitFileSystem();\n try(DirectoryStream<Path> ds = Files.newDirectoryStream(gfs.get...
{ "fields": [ { "declarator": "parent", "modifier": "private final", "original_string": "private final GitPath parent;", "type": "GitPath", "var_name": "parent" }, { "declarator": "children", "modifier": "private final", "original_string": "private final Lis...
{ "body": "@Nonnull\n @Override\n public Iterator<Path> iterator() {\n final Iterator<String> childrenIt = children.iterator();\n return new Iterator<Path>() {\n\n private Path next;\n\n private boolean findNext() {\n while(childrenIt.hasNext()) {\n String child = childrenIt.next();\...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_26
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/utils/GfsConfigurationTest.java", "identifier": "GfsConfigurationTest", "interfaces": "", "superclass": "extends AbstractParallelGitTest" }
{ "body": "@Test\n public void buildWithBranch() throws IOException {\n GitFileSystem gfs = Gfs.newFileSystem(\"test_branch\", repo);\n assertEquals(\"test_branch\", gfs.getStatusProvider().branch());\n }", "class_method_signature": "GfsConfigurationTest.buildWithBranch()", "constructor": false, "full_s...
{ "fields": [ { "declarator": "repo", "modifier": "private final", "original_string": "private final Repository repo;", "type": "Repository", "var_name": "repo" }, { "declarator": "branch", "modifier": "private", "original_string": "private String branch;", ...
{ "body": "@Nonnull\n public GfsConfiguration branch(String name) throws IOException {\n if(commit != null)\n throw new HeadAlreadyDefinedException();\n if(!branchExists(name, repo) && exists(name, repo))\n commit = getCommit(name, repo);\n else {\n branch = RefUtils.fullBranchName(name);\n ...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_30
{ "fields": [], "file": "parallelgit-filesystem/src/test/java/com/beijunyi/parallelgit/filesystem/utils/GfsUriUtilsTest.java", "identifier": "GfsUriUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getRepository_unixFormat() {\n assertEquals(\"/\", GfsUriUtils.getRepository(URI.create(\"gfs:/\")));\n assertEquals(\"/unix/path\", GfsUriUtils.getRepository(URI.create(\"gfs:/unix/path\")));\n assertEquals(\"/unix/path\", GfsUriUtils.getRepository(URI.create(\"gfs:/unix/path...
{ "fields": [ { "declarator": "SID_KEY = \"sid\"", "modifier": "public final static", "original_string": "public final static String SID_KEY = \"sid\";", "type": "String", "var_name": "SID_KEY" } ], "file": "parallelgit-filesystem/src/main/java/com/beijunyi/parallelgit/filesy...
{ "body": "@Nonnull\n public static String getRepository(URI uri) {\n checkScheme(uri);\n String path = uri.getPath();\n if(path.length() > 1 && path.endsWith(\"/\") && !path.endsWith(\":/\"))\n path = path.substring(0, path.length() - 1);\n return path;\n }", "class_method_signature": "GfsUriUti...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
28598239_8
{ "fields": [ { "declarator": "FILE_DATA = encodeASCII(\"18 bytes test data\")", "modifier": "private static final", "original_string": "private static final byte[] FILE_DATA = encodeASCII(\"18 bytes test data\");", "type": "byte[]", "var_name": "FILE_DATA" }, { "declar...
{ "body": "@Test(expected = NonReadableChannelException.class)\n public void readFromChannelOpenedWithoutReadOption_shouldThrowNonReadableChannelException() throws IOException {\n try(SeekableByteChannel channel = new GfsSeekableByteChannel(file, singleton(WRITE))) {\n channel.read(ByteBuffer.allocate(FILE_D...
{ "fields": [ { "declarator": "file", "modifier": "private final", "original_string": "private final FileNode file;", "type": "FileNode", "var_name": "file" }, { "declarator": "readable", "modifier": "private final", "original_string": "private final boolean...
{ "body": "@Override\n public int read(ByteBuffer dst) throws ClosedChannelException {\n checkClosed();\n checkReadAccess();\n synchronized(this) {\n if (!buffer.hasRemaining()) {\n return -1;\n }\n return copyBytes(dst, buffer);\n }\n }", "class_method_signature": "GfsSeekableBy...
{ "created": null, "fork": null, "fork_count": 22, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 28598239, "size": 2548, "stargazer_count": 110, "stars": null, "updates": null, "url": "https://github.com/beijunyi/ParallelGit" }
8143599_22
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendBytesWithExcessiveCountReducesCount() {\n\t\tbuffer.appendBytes(new byte[] { t_bite }, 1234);\n\t\tassertBufferMatches(t_bite);\n\t}", "class_method_signature": "ByteBufferTest.testAppendBytesWithExcessiveCountReducesCount()", "constructor": false, "full_signature": "@T...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendBytes(ByteBuffer bytes, int count) throws NotEnoughDataInByteBufferException {\n\t\tif (count > 0) {\n\t\t\tif (bytes == null) {\n\t\t\t\tthrow new NotEnoughDataInByteBufferException(0, count);\n\t\t\t}\n\t\t\tif (bytes.length() < count) {\n\t\t\t\tthrow new NotEnoughDataInByteBufferExcep...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_75
{ "fields": [ { "declarator": "TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t}", "modifier": "private static final", "original_string": "private static final byte[] TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t};", "type": "byte[]"...
{ "body": "@Test\n\tpublic void testSetNpi() {\n\t\tfor (byte npi : NPIS) {\n\t\t\taddress.setNpi(npi);\n\t\t\tassertEquals(npi, address.getNpi());\n\t\t}\n\t}", "class_method_signature": "AddressTest.testSetNpi()", "constructor": false, "full_signature": "@Test public void testSetNpi()", "identifier": "testS...
{ "fields": [ { "declarator": "ton = Data.DFLT_GSM_TON", "modifier": "private", "original_string": "private byte ton = Data.DFLT_GSM_TON;", "type": "byte", "var_name": "ton" }, { "declarator": "npi = Data.DFLT_GSM_NPI", "modifier": "private", "original_strin...
{ "body": "public void setNpi(byte npi) {\n\t\tthis.npi = npi;\n\t}", "class_method_signature": "Address.setNpi(byte npi)", "constructor": false, "full_signature": "public void setNpi(byte npi)", "identifier": "setNpi", "invocations": [], "modifiers": "public", "parameters": "(byte npi)", "return": "v...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_63
{ "fields": [ { "declarator": "OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\n\t}", "modifier": "private static final", "original_string": "private static final Object OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\...
{ "body": "@Test\n\tpublic void testEnterWithName() {\n\t\tdebug.enter(0, OBJECT, NAME);\n\t\tassertEquals(\"-> OBJECT NAME\" + newLine, out.toString());\n\t}", "class_method_signature": "DefaultDebugTest.testEnterWithName()", "constructor": false, "full_signature": "@Test public void testEnterWithName()", "i...
{ "fields": [ { "declarator": "indent = 0", "modifier": "private", "original_string": "private int indent = 0;", "type": "int", "var_name": "indent" }, { "declarator": "active = false", "modifier": "private", "original_string": "private boolean active = fals...
{ "body": "public void enter(int group, Object from, String name) {\n\t\tenter(from, name);\n\t}", "class_method_signature": "DefaultDebug.enter(int group, Object from, String name)", "constructor": false, "full_signature": "public void enter(int group, Object from, String name)", "identifier": "enter", "in...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_34
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveShortRemovesFirstShort() throws Exception {\n\t\tbuffer = bufferOf((byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04);\n\t\tshort s = buffer.removeShort();\n\t\tassertEquals((1 << 8) + 2, s);\n\t}", "class_method_signature": "ByteBufferTest.testRemoveShortRemovesFirstShort...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public short removeShort() throws NotEnoughDataInByteBufferException {\n\t\tshort result = 0;\n\t\tbyte[] resBuff = removeBytes(SZ_SHORT).getBuffer();\n\t\tresult |= resBuff[0] & 0xff;\n\t\tresult <<= 8;\n\t\tresult |= resBuff[1] & 0xff;\n\t\treturn result;\n\t}", "class_method_signature": "ByteBuffer.re...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_18
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendStringWithExcessiveCountThrowsException() throws Exception {\n\t\tthrown.expect(StringIndexOutOfBoundsException.class);\n\t\tbuffer.appendString(ABC, 4);\n\t}", "class_method_signature": "ByteBufferTest.testAppendStringWithExcessiveCountThrowsException()", "constructor": ...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendString(String string) {\n\t\ttry {\n\t\t\tappendString(string, Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n // this can't happen as we use ASCII encoding\n // whatever is in the buffer it gets interpreted as ascii\n\t\t}\...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_59
{ "fields": [ { "declarator": "out", "modifier": "private", "original_string": "private ByteArrayOutputStream out;", "type": "ByteArrayOutputStream", "var_name": "out" }, { "declarator": "event", "modifier": "private", "original_string": "private DefaultEven...
{ "body": "@Test\n\tpublic void testInactiveByDefault() {\n\t\tevent = new DefaultEvent();\n\t\tevent.write(\"HELLO\");\n\t\tassertEquals(\"\", out.toString());\n\t}", "class_method_signature": "DefaultEventTest.testInactiveByDefault()", "constructor": false, "full_signature": "@Test public void testInactiveByD...
{ "fields": [ { "declarator": "active = false", "modifier": "private", "original_string": "private boolean active = false;", "type": "boolean", "var_name": "active" } ], "file": "core/src/main/java/org/smpp/debug/DefaultEvent.java", "identifier": "DefaultEvent", "interfac...
{ "body": "public void write(String msg) {\n\t\tif (active) {\n\t\t\tSystem.out.println(msg);\n\t\t}\n\t}", "class_method_signature": "DefaultEvent.write(String msg)", "constructor": false, "full_signature": "public void write(String msg)", "identifier": "write", "invocations": [ "println" ], "modif...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_79
{ "fields": [ { "declarator": "CLAZZ = ByteData.class", "modifier": "private static", "original_string": "private static Class<?> CLAZZ = ByteData.class;", "type": "Class<?>", "var_name": "CLAZZ" }, { "declarator": "thrown = ExpectedException.none()", "modifier": ...
{ "body": "@Test\n\tpublic void testCheckStringOneZero() throws Exception {\n\t\tthrown.expect(stringLengthException(0, 0, 1));\n\t\tcheckString(\" \", 0);\n\t}", "class_method_signature": "ByteDataTest.testCheckStringOneZero()", "constructor": false, "full_signature": "@Test public void testCheckStringOneZero(...
{ "fields": [ { "declarator": "SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\"", "modifier": "private static final", "original_string": "private static final String SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\";", "type": "String", "var_name": "SMPP_TIME_DATE_FORMAT" }, { "declarat...
{ "body": "protected static void checkString(String string, int max) throws WrongLengthOfStringException {\n\t\tcheckString(string, 0, max);\n\t}", "class_method_signature": "ByteData.checkString(String string, int max)", "constructor": false, "full_signature": "protected static void checkString(String string, ...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_80
{ "fields": [ { "declarator": "CLAZZ = ByteData.class", "modifier": "private static", "original_string": "private static Class<?> CLAZZ = ByteData.class;", "type": "Class<?>", "var_name": "CLAZZ" }, { "declarator": "thrown = ExpectedException.none()", "modifier": ...
{ "body": "@Test\n\tpublic void testCheckStringUTF16() throws Exception {\n\t\tthrown.expect(stringLengthException(0, 1, 4));\n\t\tcheckString(\" \", 1, \"UTF-16\");\n\t}", "class_method_signature": "ByteDataTest.testCheckStringUTF16()", "constructor": false, "full_signature": "@Test public void testCheckString...
{ "fields": [ { "declarator": "SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\"", "modifier": "private static final", "original_string": "private static final String SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\";", "type": "String", "var_name": "SMPP_TIME_DATE_FORMAT" }, { "declarat...
{ "body": "protected static void checkString(String string, int max) throws WrongLengthOfStringException {\n\t\tcheckString(string, 0, max);\n\t}", "class_method_signature": "ByteData.checkString(String string, int max)", "constructor": false, "full_signature": "protected static void checkString(String string, ...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_38
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveIntFromNullThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(4, 0));\n\n\t\tbuffer.removeInt();\n\t}", "class_method_signature": "ByteBufferTest.testRemoveIntFromNullThrowsException()", "con...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public int removeInt() throws NotEnoughDataInByteBufferException {\n\t\tint result = readInt();\n\t\tremoveBytes0(SZ_INT);\n\t\treturn result;\n\t}", "class_method_signature": "ByteBuffer.removeInt()", "constructor": false, "full_signature": "public int removeInt()", "identifier": "removeInt", "i...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_43
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveCStringWithSingleNonTerminatorThrowsException() throws Exception {\n\t\tthrown.expect(TerminatingZeroNotFoundException.class);\n\n\t\tbuffer = bufferOf((byte) 0x01);\n\t\tbuffer.removeCString();\n\t}", "class_method_signature": "ByteBufferTest.testRemoveCStringWithSingleNon...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeCString() throws NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException {\n\t\ttry {\n\t\t\treturn removeCString(Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// this can't happen as we use ASCII encoding\n\t\t\t// whatever is in the buffer it get...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_14
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendCStringWithInvalidEncodingThrowsException() throws Exception {\n\t\tthrown.expect(UnsupportedEncodingException.class);\n\t\tbuffer.appendCString(ABC, INVALID);\n\t}", "class_method_signature": "ByteBufferTest.testAppendCStringWithInvalidEncodingThrowsException()", "constr...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendCString(String string) {\n\t\ttry {\n\t\t\tappendString0(string, true, Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n // this can't happen as we use ASCII encoding\n // whatever is in the buffer it gets interpreted as ascii...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_0
{ "fields": [ { "declarator": "charset", "modifier": "private", "original_string": "private Charset charset;", "type": "Charset", "var_name": "charset" } ], "file": "charset/src/test/java/org/smpp/charset/Gsm7BitCharsetTest.java", "identifier": "Gsm7BitCharsetTest", "inte...
{ "body": "@Test\n\tpublic void testEncoderOverflow() {\n\t\tassertEquals(CoderResult.OVERFLOW, charset.newEncoder().encode(CharBuffer.wrap(\"00\"), ByteBuffer.wrap(new byte[1]), true));\n\t}", "class_method_signature": "Gsm7BitCharsetTest.testEncoderOverflow()", "constructor": false, "full_signature": "@Test p...
{ "fields": [ { "declarator": "debug = false", "modifier": "private", "original_string": "private boolean debug = false;", "type": "boolean", "var_name": "debug" }, { "declarator": "defaultEncodeMap = new HashMap<String, Byte>()", "modifier": "protected static", ...
{ "body": "public CharsetEncoder newEncoder() {\n\t\treturn new Gsm7BitEncoder(this);\n\t}", "class_method_signature": "Gsm7BitCharset.newEncoder()", "constructor": false, "full_signature": "public CharsetEncoder newEncoder()", "identifier": "newEncoder", "invocations": [], "modifiers": "public", "param...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_55
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testHexDump() {\n\t\tassertEquals(\"414243\", bufferOf(A, B, C).getHexDump());\n\t}", "class_method_signature": "ByteBufferTest.testHexDump()", "constructor": false, "full_signature": "@Test public void testHexDump()", "identifier": "testHexDump", "invocations": [ "assert...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String getHexDump() {\n\t\tStringBuffer dump = new StringBuffer();\n\t\ttry {\n\t\t\tint dataLen = length();\n\t\t\tbyte[] buffer = getBuffer();\n\t\t\tfor (int i=0; i<dataLen; i++) {\n\t\t\t\tdump.append(Character.forDigit((buffer[i] >> 4) & 0x0f, 16));\n\t\t\t\tdump.append(Character.forDigit(buffe...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_54
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveBufferWithExcessiveSizeThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(10, 1));\n\n\t\tbuffer = bufferOf(NULL);\n\t\tbuffer.removeBuffer(10);\n\t}", "class_method_signature": "ByteBufferTest...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public ByteBuffer removeBuffer(int count) throws NotEnoughDataInByteBufferException {\n\t\treturn removeBytes(count);\n\t}", "class_method_signature": "ByteBuffer.removeBuffer(int count)", "constructor": false, "full_signature": "public ByteBuffer removeBuffer(int count)", "identifier": "removeBuff...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_1
{ "fields": [ { "declarator": "charset", "modifier": "private", "original_string": "private Charset charset;", "type": "Charset", "var_name": "charset" } ], "file": "charset/src/test/java/org/smpp/charset/Gsm7BitCharsetTest.java", "identifier": "Gsm7BitCharsetTest", "inte...
{ "body": "@Test\n\tpublic void testDecoderOverflow() {\n\t\tassertEquals(CoderResult.OVERFLOW, charset.newDecoder().decode(ByteBuffer.wrap(new byte[] { 0x30, 0x30 }), CharBuffer.allocate(1), true));\n\t}", "class_method_signature": "Gsm7BitCharsetTest.testDecoderOverflow()", "constructor": false, "full_signatu...
{ "fields": [ { "declarator": "debug = false", "modifier": "private", "original_string": "private boolean debug = false;", "type": "boolean", "var_name": "debug" }, { "declarator": "defaultEncodeMap = new HashMap<String, Byte>()", "modifier": "protected static", ...
{ "body": "public CharsetDecoder newDecoder() {\n\t\treturn new Gsm7BitDecoder(this);\n\t}", "class_method_signature": "Gsm7BitCharset.newDecoder()", "constructor": false, "full_signature": "public CharsetDecoder newDecoder()", "identifier": "newDecoder", "invocations": [], "modifiers": "public", "param...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_15
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendString() {\n\t\tbuffer.appendString(ABC);\n\t\tassertBufferMatches(A, B, C);\n\t}", "class_method_signature": "ByteBufferTest.testAppendString()", "constructor": false, "full_signature": "@Test public void testAppendString()", "identifier": "testAppendString", "invo...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendString(String string) {\n\t\ttry {\n\t\t\tappendString(string, Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n // this can't happen as we use ASCII encoding\n // whatever is in the buffer it gets interpreted as ascii\n\t\t}\...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_42
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveCStringFromEmptyThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(1, 0));\n\n\t\tbuffer = new ByteBuffer(new byte[] {});\n\t\tbuffer.removeCString();\n\t}", "class_method_signature": "ByteBuff...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeCString() throws NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException {\n\t\ttry {\n\t\t\treturn removeCString(Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// this can't happen as we use ASCII encoding\n\t\t\t// whatever is in the buffer it get...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_39
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveIntFromSmallBufferThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(4, 2));\n\n\t\tbuffer = bufferOf(NULL, NULL);\n\t\tbuffer.removeInt();\n\t}", "class_method_signature": "ByteBufferTest.test...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public int removeInt() throws NotEnoughDataInByteBufferException {\n\t\tint result = readInt();\n\t\tremoveBytes0(SZ_INT);\n\t\treturn result;\n\t}", "class_method_signature": "ByteBuffer.removeInt()", "constructor": false, "full_signature": "public int removeInt()", "identifier": "removeInt", "i...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_81
{ "fields": [ { "declarator": "CLAZZ = ByteData.class", "modifier": "private static", "original_string": "private static Class<?> CLAZZ = ByteData.class;", "type": "Class<?>", "var_name": "CLAZZ" }, { "declarator": "thrown = ExpectedException.none()", "modifier": ...
{ "body": "@Test\n\tpublic void testCheckStringInvalidEncoding() throws Exception {\n\t\tthrown.expect(UnsupportedEncodingException.class);\n\t\tcheckString(\" \", 1, \"UTF-17\");\n\t}", "class_method_signature": "ByteDataTest.testCheckStringInvalidEncoding()", "constructor": false, "full_signature": "@Test pub...
{ "fields": [ { "declarator": "SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\"", "modifier": "private static final", "original_string": "private static final String SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\";", "type": "String", "var_name": "SMPP_TIME_DATE_FORMAT" }, { "declarat...
{ "body": "protected static void checkString(String string, int max) throws WrongLengthOfStringException {\n\t\tcheckString(string, 0, max);\n\t}", "class_method_signature": "ByteData.checkString(String string, int max)", "constructor": false, "full_signature": "protected static void checkString(String string, ...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_78
{ "fields": [ { "declarator": "CLAZZ = ByteData.class", "modifier": "private static", "original_string": "private static Class<?> CLAZZ = ByteData.class;", "type": "Class<?>", "var_name": "CLAZZ" }, { "declarator": "thrown = ExpectedException.none()", "modifier": ...
{ "body": "@Test\n\tpublic void testCheckStringNonZero() throws Exception {\n\t\tcheckString(\" \", 1);\n\t}", "class_method_signature": "ByteDataTest.testCheckStringNonZero()", "constructor": false, "full_signature": "@Test public void testCheckStringNonZero()", "identifier": "testCheckStringNonZero", "inv...
{ "fields": [ { "declarator": "SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\"", "modifier": "private static final", "original_string": "private static final String SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\";", "type": "String", "var_name": "SMPP_TIME_DATE_FORMAT" }, { "declarat...
{ "body": "protected static void checkString(String string, int max) throws WrongLengthOfStringException {\n\t\tcheckString(string, 0, max);\n\t}", "class_method_signature": "ByteData.checkString(String string, int max)", "constructor": false, "full_signature": "protected static void checkString(String string, ...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_58
{ "fields": [ { "declarator": "unprocessed", "modifier": "private", "original_string": "private Unprocessed unprocessed;", "type": "Unprocessed", "var_name": "unprocessed" } ], "file": "core/src/test/java/org/smpp/util/UnprocessedTest.java", "identifier": "UnprocessedTest",...
{ "body": "@Test\n\tpublic void testSetExpected() {\n\t\tunprocessed.setExpected(1234);\n\t\tassertEquals(1234, unprocessed.getExpected());\n\t}", "class_method_signature": "UnprocessedTest.testSetExpected()", "constructor": false, "full_signature": "@Test public void testSetExpected()", "identifier": "testSe...
{ "fields": [ { "declarator": "unprocessed = new ByteBuffer()", "modifier": "private", "original_string": "private ByteBuffer unprocessed = new ByteBuffer();", "type": "ByteBuffer", "var_name": "unprocessed" }, { "declarator": "expected = 0", "modifier": "private"...
{ "body": "public void setExpected(int value) {\n\t\texpected = value;\n\t}", "class_method_signature": "Unprocessed.setExpected(int value)", "constructor": false, "full_signature": "public void setExpected(int value)", "identifier": "setExpected", "invocations": [], "modifiers": "public", "parameters":...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_19
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppenStringWithCountAndInvalidEncodingThrowsException() throws Exception {\n\t\tthrown.expect(UnsupportedEncodingException.class);\n\t\tbuffer.appendString(ABC, 1, INVALID);\n\t}", "class_method_signature": "ByteBufferTest.testAppenStringWithCountAndInvalidEncodingThrowsException...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendString(String string) {\n\t\ttry {\n\t\t\tappendString(string, Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n // this can't happen as we use ASCII encoding\n // whatever is in the buffer it gets interpreted as ascii\n\t\t}\...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_35
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testReadIntFromNullThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(4, 0));\n\n\t\tbuffer.readInt();\n\t}", "class_method_signature": "ByteBufferTest.testReadIntFromNullThrowsException()", "construct...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public int readInt() throws NotEnoughDataInByteBufferException {\n\t\tint result = 0;\n\t\tint len = length();\n\t\tif (len >= SZ_INT) {\n\t\t\tresult |= buffer[0] & 0xff;\n\t\t\tresult <<= 8;\n\t\t\tresult |= buffer[1] & 0xff;\n\t\t\tresult <<= 8;\n\t\t\tresult |= buffer[2] & 0xff;\n\t\t\tresult <<= 8;\n\...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_62
{ "fields": [ { "declarator": "out", "modifier": "private", "original_string": "private ByteArrayOutputStream out;", "type": "ByteArrayOutputStream", "var_name": "out" }, { "declarator": "event", "modifier": "private", "original_string": "private DefaultEven...
{ "body": "@Test\n\tpublic void testDeactivate() {\n\t\tevent.deactivate();\n\t\tevent.write(\"HELLO\");\n\t\tassertEquals(\"\", out.toString());\n\t}", "class_method_signature": "DefaultEventTest.testDeactivate()", "constructor": false, "full_signature": "@Test public void testDeactivate()", "identifier": "t...
{ "fields": [ { "declarator": "active = false", "modifier": "private", "original_string": "private boolean active = false;", "type": "boolean", "var_name": "active" } ], "file": "core/src/main/java/org/smpp/debug/DefaultEvent.java", "identifier": "DefaultEvent", "interfac...
{ "body": "public void deactivate() {\n\t\tactive = false;\n\t}", "class_method_signature": "DefaultEvent.deactivate()", "constructor": false, "full_signature": "public void deactivate()", "identifier": "deactivate", "invocations": [], "modifiers": "public", "parameters": "()", "return": "void", "si...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_74
{ "fields": [ { "declarator": "TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t}", "modifier": "private static final", "original_string": "private static final byte[] TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t};", "type": "byte[]"...
{ "body": "@Test\n\tpublic void testSetTon() {\n\t\tfor (byte ton : TONS) {\n\t\t\taddress.setTon(ton);\n\t\t\tassertEquals(ton, address.getTon());\n\t\t}\n\t}", "class_method_signature": "AddressTest.testSetTon()", "constructor": false, "full_signature": "@Test public void testSetTon()", "identifier": "testS...
{ "fields": [ { "declarator": "ton = Data.DFLT_GSM_TON", "modifier": "private", "original_string": "private byte ton = Data.DFLT_GSM_TON;", "type": "byte", "var_name": "ton" }, { "declarator": "npi = Data.DFLT_GSM_NPI", "modifier": "private", "original_strin...
{ "body": "public void setTon(byte ton) {\n\t\tthis.ton = ton;\n\t}", "class_method_signature": "Address.setTon(byte ton)", "constructor": false, "full_signature": "public void setTon(byte ton)", "identifier": "setTon", "invocations": [], "modifiers": "public", "parameters": "(byte ton)", "return": "v...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_23
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendByteBufferWithNullThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(1234, 0));\n\n\t\tbuffer.appendBytes((ByteBuffer) null, 1234);\n\t}", "class_method_signature": "ByteBufferTest.testAppendBy...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendBytes(ByteBuffer bytes, int count) throws NotEnoughDataInByteBufferException {\n\t\tif (count > 0) {\n\t\t\tif (bytes == null) {\n\t\t\t\tthrow new NotEnoughDataInByteBufferException(0, count);\n\t\t\t}\n\t\t\tif (bytes.length() < count) {\n\t\t\t\tthrow new NotEnoughDataInByteBufferExcep...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_28
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testReadBytesWithExcessiveCountThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(1, 0));\n\n\t\tbuffer.readBytes(1);\n\t}", "class_method_signature": "ByteBufferTest.testReadBytesWithExcessiveCountThrow...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public ByteBuffer readBytes(int count) throws NotEnoughDataInByteBufferException {\n\t\tint len = length();\n\t\tByteBuffer result = null;\n\t\tif (count > 0) {\n\t\t\tif (len >= count) {\n\t\t\t\tbyte[] resBuf = new byte[count];\n\t\t\t\tSystem.arraycopy(buffer, 0, resBuf, 0, count);\n\t\t\t\tresult = new...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_90
{ "fields": [], "file": "core/src/test/java/org/smpp/SmppObjectTest.java", "identifier": "SmppObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testDefaultDebug() {\n\t\tassertEquals(DefaultDebug.class, SmppObject.getDebug().getClass());\n\t}", "class_method_signature": "SmppObjectTest.testDefaultDebug()", "constructor": false, "full_signature": "@Test public void testDefaultDebug()", "identifier": "testDefaultDebug", ...
{ "fields": [ { "declarator": "debug", "modifier": "static protected", "original_string": "static protected Debug debug;", "type": "Debug", "var_name": "debug" }, { "declarator": "event", "modifier": "static protected", "original_string": "static protected E...
{ "body": "static public Debug getDebug() {\n\t\treturn debug;\n\t}", "class_method_signature": "SmppObject.getDebug()", "constructor": false, "full_signature": "static public Debug getDebug()", "identifier": "getDebug", "invocations": [], "modifiers": "static public", "parameters": "()", "return": "D...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_69
{ "fields": [ { "declarator": "TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t}", "modifier": "private static final", "original_string": "private static final byte[] TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t};", "type": "byte[]"...
{ "body": "@Test\n\tpublic void testConstructorStringSpecifiesAddress() throws Exception {\n\t\tassertEquals(\"1234\", new Address(\"1234\").getAddress());\n\t}", "class_method_signature": "AddressTest.testConstructorStringSpecifiesAddress()", "constructor": false, "full_signature": "@Test public void testConst...
{ "fields": [ { "declarator": "ton = Data.DFLT_GSM_TON", "modifier": "private", "original_string": "private byte ton = Data.DFLT_GSM_TON;", "type": "byte", "var_name": "ton" }, { "declarator": "npi = Data.DFLT_GSM_NPI", "modifier": "private", "original_strin...
{ "body": "public String getAddress() {\n\t\treturn address;\n\t}", "class_method_signature": "Address.getAddress()", "constructor": false, "full_signature": "public String getAddress()", "identifier": "getAddress", "invocations": [], "modifiers": "public", "parameters": "()", "return": "String", "s...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_86
{ "fields": [ { "declarator": "CLAZZ = ByteData.class", "modifier": "private static", "original_string": "private static Class<?> CLAZZ = ByteData.class;", "type": "Class<?>", "var_name": "CLAZZ" }, { "declarator": "thrown = ExpectedException.none()", "modifier": ...
{ "body": "@Test\n\tpublic void testDecodeUnsignedByte() throws Exception {\n\t\tassertEquals(0, decodeUnsigned((byte) 0x00));\n\t\tassertEquals(127, decodeUnsigned((byte) 0x7f));\n\t\tassertEquals(255, decodeUnsigned((byte) 0xff));\n\t}", "class_method_signature": "ByteDataTest.testDecodeUnsignedByte()", "constr...
{ "fields": [ { "declarator": "SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\"", "modifier": "private static final", "original_string": "private static final String SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\";", "type": "String", "var_name": "SMPP_TIME_DATE_FORMAT" }, { "declarat...
{ "body": "protected static short decodeUnsigned(byte signed) {\n\t\tif (signed >= 0) {\n\t\t\treturn signed;\n\t\t} else {\n\t\t\treturn (short) (256 + (short) signed);\n\t\t}\n\t}", "class_method_signature": "ByteData.decodeUnsigned(byte signed)", "constructor": false, "full_signature": "protected static shor...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_45
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveCStringRemovesFirstString() throws Exception {\n\t\tbuffer = bufferOf(A, B, NULL, C, NULL);\n\t\tassertEquals(\"AB\", buffer.removeCString());\n\t}", "class_method_signature": "ByteBufferTest.testRemoveCStringRemovesFirstString()", "constructor": false, "full_signature"...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeCString() throws NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException {\n\t\ttry {\n\t\t\treturn removeCString(Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// this can't happen as we use ASCII encoding\n\t\t\t// whatever is in the buffer it get...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_12
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendCString0() {\n\t\tbuffer.appendCString(ABC);\n\t\tassertBufferMatches(A, B, C, NULL);\n\t}", "class_method_signature": "ByteBufferTest.testAppendCString0()", "constructor": false, "full_signature": "@Test public void testAppendCString0()", "identifier": "testAppendCSt...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendCString(String string) {\n\t\ttry {\n\t\t\tappendString0(string, true, Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n // this can't happen as we use ASCII encoding\n // whatever is in the buffer it gets interpreted as ascii...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_6
{ "fields": [ { "declarator": "queue", "modifier": "private", "original_string": "private Queue queue;", "type": "Queue", "var_name": "queue" }, { "declarator": "thrown = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\t...
{ "body": "@Test\n\tpublic void testFind() {\n\t\tObject a = new Object();\n\t\tObject b = new Object();\n\t\tObject c = new Object();\n\n\t\tqueue.enqueue(a);\n\t\tqueue.enqueue(b);\n\t\tqueue.enqueue(c);\n\n\t\tassertEquals(3, queue.size());\n\t\tassertSame(a, queue.find(a));\n\t\tassertSame(b, queue.find(b));\n\t\...
{ "fields": [ { "declarator": "maxQueueSize = 0", "modifier": "private", "original_string": "private int maxQueueSize = 0;", "type": "int", "var_name": "maxQueueSize" }, { "declarator": "queueData = new LinkedList<Object>()", "modifier": "private", "original...
{ "body": "public Object find(Object obj) {\n\t\tsynchronized (mutex) {\n\t\t\tObject current;\n\t\t\tListIterator<Object> iter = queueData.listIterator(0);\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tcurrent = iter.next();\n\t\t\t\tif (current.equals(obj)) {\n\t\t\t\t\treturn current;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tre...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_53
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveBufferFromNullThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(1, 0));\n\n\t\tbuffer.readBytes(1);\n\t}", "class_method_signature": "ByteBufferTest.testRemoveBufferFromNullThrowsException()",...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public ByteBuffer readBytes(int count) throws NotEnoughDataInByteBufferException {\n\t\tint len = length();\n\t\tByteBuffer result = null;\n\t\tif (count > 0) {\n\t\t\tif (len >= count) {\n\t\t\t\tbyte[] resBuf = new byte[count];\n\t\t\t\tSystem.arraycopy(buffer, 0, resBuf, 0, count);\n\t\t\t\tresult = new...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_24
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendByteBufferWithExcessiveCountThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(2, 1));\n\n\t\tbuffer.appendBytes(bufferOf(t_bite), 2);\n\t}", "class_method_signature": "ByteBufferTest.testAppen...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendBytes(ByteBuffer bytes, int count) throws NotEnoughDataInByteBufferException {\n\t\tif (count > 0) {\n\t\t\tif (bytes == null) {\n\t\t\t\tthrow new NotEnoughDataInByteBufferException(0, count);\n\t\t\t}\n\t\t\tif (bytes.length() < count) {\n\t\t\t\tthrow new NotEnoughDataInByteBufferExcep...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_73
{ "fields": [ { "declarator": "TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t}", "modifier": "private static final", "original_string": "private static final byte[] TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t};", "type": "byte[]"...
{ "body": "@Test\n\tpublic void testGetData() throws Exception {\n\t\tfor (byte ton : TONS) {\n\t\t\tfor (byte npi : NPIS) {\n\t\t\t\tfor (int len = 1; len <= MAX_ADDRESS_LENGTH; len++) {\n\t\t\t\t\tString a = address(len);\n\t\t\t\t\taddress = new Address(ton, npi, a, len + 1);\n\t\t\t\t\tByteBuffer buffer = address...
{ "fields": [ { "declarator": "ton = Data.DFLT_GSM_TON", "modifier": "private", "original_string": "private byte ton = Data.DFLT_GSM_TON;", "type": "byte", "var_name": "ton" }, { "declarator": "npi = Data.DFLT_GSM_NPI", "modifier": "private", "original_strin...
{ "body": "public ByteBuffer getData() {\n\t\tByteBuffer addressBuf = new ByteBuffer();\n\t\taddressBuf.appendByte(getTon());\n\t\taddressBuf.appendByte(getNpi());\n\t\ttry {\n\t\t\taddressBuf.appendCString(getAddress(), Data.ENC_ASCII);\n\t\t} catch(UnsupportedEncodingException e) {\n\t\t\t// can't happen, ascii is ...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_65
{ "fields": [ { "declarator": "OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\n\t}", "modifier": "private static final", "original_string": "private static final Object OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\...
{ "body": "@Test\n\tpublic void testExit() {\n\t\tdebug.exit(0, OBJECT);\n\t\tassertEquals(\"<- OBJECT\" + newLine, out.toString());\n\t}", "class_method_signature": "DefaultDebugTest.testExit()", "constructor": false, "full_signature": "@Test public void testExit()", "identifier": "testExit", "invocations"...
{ "fields": [ { "declarator": "indent = 0", "modifier": "private", "original_string": "private int indent = 0;", "type": "int", "var_name": "indent" }, { "declarator": "active = false", "modifier": "private", "original_string": "private boolean active = fals...
{ "body": "public void exit(int group, Object from) {\n\t\texit(from);\n\t}", "class_method_signature": "DefaultDebug.exit(int group, Object from)", "constructor": false, "full_signature": "public void exit(int group, Object from)", "identifier": "exit", "invocations": [ "exit" ], "modifiers": "publ...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_32
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveShortFromNullThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(2, 0));\n\n\t\tbuffer.removeShort();\n\t}", "class_method_signature": "ByteBufferTest.testRemoveShortFromNullThrowsException()", ...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public short removeShort() throws NotEnoughDataInByteBufferException {\n\t\tshort result = 0;\n\t\tbyte[] resBuff = removeBytes(SZ_SHORT).getBuffer();\n\t\tresult |= resBuff[0] & 0xff;\n\t\tresult <<= 8;\n\t\tresult |= resBuff[1] & 0xff;\n\t\treturn result;\n\t}", "class_method_signature": "ByteBuffer.re...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_49
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveStringZeroLength() throws Exception {\n\t\tassertEquals(\"\", buffer.removeString(0, ASCII));\n\t}", "class_method_signature": "ByteBufferTest.testRemoveStringZeroLength()", "constructor": false, "full_signature": "@Test public void testRemoveStringZeroLength()", "ide...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeString(int size, String encoding)\n\t\tthrows NotEnoughDataInByteBufferException, UnsupportedEncodingException {\n\t\tint len = length();\n\t\tif (len < size) {\n\t\t\tthrow new NotEnoughDataInByteBufferException(len, size);\n\t\t}\n\t\tUnsupportedEncodingException encodingException = n...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_48
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveStringWithNullThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(1, 0));\n\n\t\tbuffer.removeString(1, ASCII);\n\t}", "class_method_signature": "ByteBufferTest.testRemoveStringWithNullThrowsExc...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeString(int size, String encoding)\n\t\tthrows NotEnoughDataInByteBufferException, UnsupportedEncodingException {\n\t\tint len = length();\n\t\tif (len < size) {\n\t\t\tthrow new NotEnoughDataInByteBufferException(len, size);\n\t\t}\n\t\tUnsupportedEncodingException encodingException = n...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_33
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveShortFromSmallBufferThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(2, 1));\n\n\t\tbuffer = bufferOf(NULL);\n\t\tbuffer.removeShort();\n\t}", "class_method_signature": "ByteBufferTest.testRe...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public short removeShort() throws NotEnoughDataInByteBufferException {\n\t\tshort result = 0;\n\t\tbyte[] resBuff = removeBytes(SZ_SHORT).getBuffer();\n\t\tresult |= resBuff[0] & 0xff;\n\t\tresult <<= 8;\n\t\tresult |= resBuff[1] & 0xff;\n\t\treturn result;\n\t}", "class_method_signature": "ByteBuffer.re...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_64
{ "fields": [ { "declarator": "OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\n\t}", "modifier": "private static final", "original_string": "private static final Object OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\...
{ "body": "@Test\n\tpublic void testEnterWithoutName() {\n\t\tdebug.enter(0, OBJECT, EMPTY);\n\t\tassertEquals(\"-> OBJECT\" + newLine, out.toString());\n\t}", "class_method_signature": "DefaultDebugTest.testEnterWithoutName()", "constructor": false, "full_signature": "@Test public void testEnterWithoutName()",...
{ "fields": [ { "declarator": "indent = 0", "modifier": "private", "original_string": "private int indent = 0;", "type": "int", "var_name": "indent" }, { "declarator": "active = false", "modifier": "private", "original_string": "private boolean active = fals...
{ "body": "public void enter(int group, Object from, String name) {\n\t\tenter(from, name);\n\t}", "class_method_signature": "DefaultDebug.enter(int group, Object from, String name)", "constructor": false, "full_signature": "public void enter(int group, Object from, String name)", "identifier": "enter", "in...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_72
{ "fields": [ { "declarator": "TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t}", "modifier": "private static final", "original_string": "private static final byte[] TONS = new byte[] {\n\t\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07\n\t};", "type": "byte[]"...
{ "body": "@Test\n\tpublic void testSetData() throws Exception {\n\t\tByteBuffer buffer = mock(ByteBuffer.class);\n\t\twhen(buffer.removeByte()).thenReturn((byte) 0x01, (byte) 0x02);\n\t\twhen(buffer.removeCString()).thenReturn(\"1234567890\");\n\n\t\taddress.setData(buffer);\n\t\tassertEquals(0x01, address.getTon())...
{ "fields": [ { "declarator": "ton = Data.DFLT_GSM_TON", "modifier": "private", "original_string": "private byte ton = Data.DFLT_GSM_TON;", "type": "byte", "var_name": "ton" }, { "declarator": "npi = Data.DFLT_GSM_NPI", "modifier": "private", "original_strin...
{ "body": "public void setData(ByteBuffer buffer)\n\t\tthrows NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException, WrongLengthOfStringException {\n\t\tbyte ton = buffer.removeByte();\n\t\tbyte npi = buffer.removeByte();\n\t\tString address = buffer.removeCString();\n\t\tsetAddress(address);\n\t\tsetT...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_25
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendBufferWithNullDoesNothing() {\n\t\tbuffer = bufferOf(NULL);\n\t\tbuffer.appendBuffer(null);\n\t\tassertBufferMatches(NULL);\n\t}", "class_method_signature": "ByteBufferTest.testAppendBufferWithNullDoesNothing()", "constructor": false, "full_signature": "@Test public voi...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendBuffer(ByteBuffer buf) {\n\t\tif (buf != null) {\n\t\t\ttry {\n\t\t\t\tappendBytes(buf, buf.length());\n\t\t\t} catch (NotEnoughDataInByteBufferException e) {\n\t\t\t\t// can't happen as appendBytes only complains\n\t\t\t\t// when count>buf.length\n\t\t\t}\n\t\t}\n\t}", "class_method_si...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_52
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveStringWithNullEncoding() throws Exception {\n\t\tbuffer = bufferOf(A, B, C);\n\t\tassertEquals(ABC, buffer.removeString(3, null));\n\t}", "class_method_signature": "ByteBufferTest.testRemoveStringWithNullEncoding()", "constructor": false, "full_signature": "@Test public...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeString(int size, String encoding)\n\t\tthrows NotEnoughDataInByteBufferException, UnsupportedEncodingException {\n\t\tint len = length();\n\t\tif (len < size) {\n\t\t\tthrow new NotEnoughDataInByteBufferException(len, size);\n\t\t}\n\t\tUnsupportedEncodingException encodingException = n...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_7
{ "fields": [ { "declarator": "queue", "modifier": "private", "original_string": "private Queue queue;", "type": "Queue", "var_name": "queue" }, { "declarator": "thrown = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\t...
{ "body": "@Test\n\tpublic void testDequeueReturnsNullWhenEmpty() {\n\t\tassertNull(queue.dequeue());\n\t}", "class_method_signature": "QueueTest.testDequeueReturnsNullWhenEmpty()", "constructor": false, "full_signature": "@Test public void testDequeueReturnsNullWhenEmpty()", "identifier": "testDequeueReturns...
{ "fields": [ { "declarator": "maxQueueSize = 0", "modifier": "private", "original_string": "private int maxQueueSize = 0;", "type": "int", "var_name": "maxQueueSize" }, { "declarator": "queueData = new LinkedList<Object>()", "modifier": "private", "original...
{ "body": "public Object dequeue() {\n\t\tsynchronized (mutex) {\n\t\t\tObject first = null;\n\t\t\tif (size() > 0) {\n\t\t\t\tfirst = queueData.removeFirst();\n\t\t\t}\n\t\t\treturn first;\n\t\t}\n\t}", "class_method_signature": "Queue.dequeue()", "constructor": false, "full_signature": "public Object dequeue(...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_13
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testAppendCStringWithNullAppendsNull() {\n\t\tbuffer.appendCString(null);\n\t\tassertBufferMatches(NULL);\n\t}", "class_method_signature": "ByteBufferTest.testAppendCStringWithNullAppendsNull()", "constructor": false, "full_signature": "@Test public void testAppendCStringWithNull...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public void appendCString(String string) {\n\t\ttry {\n\t\t\tappendString0(string, true, Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n // this can't happen as we use ASCII encoding\n // whatever is in the buffer it gets interpreted as ascii...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_44
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveCStringWithMultipleNonTerminatorThrowsException() throws Exception {\n\t\tthrown.expect(TerminatingZeroNotFoundException.class);\n\n\t\tbuffer = bufferOf((byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01);\n\t\tbuffer.removeCString();\n\t}", "class_method_signature": "Byte...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeCString() throws NotEnoughDataInByteBufferException, TerminatingZeroNotFoundException {\n\t\ttry {\n\t\t\treturn removeCString(Data.ENC_ASCII);\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// this can't happen as we use ASCII encoding\n\t\t\t// whatever is in the buffer it get...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_68
{ "fields": [ { "declarator": "OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\n\t}", "modifier": "private static final", "original_string": "private static final Object OBJECT = new Object() {\n\t\t@Override public String toString() { return \"OBJECT\"; }\...
{ "body": "@Test\n\tpublic void testDeactivate() {\n\t\tdebug.deactivate();\n\t\tdebug.write(0, \"HELLO\");\n\t\tassertEquals(\"\", out.toString());\n\t}", "class_method_signature": "DefaultDebugTest.testDeactivate()", "constructor": false, "full_signature": "@Test public void testDeactivate()", "identifier":...
{ "fields": [ { "declarator": "indent = 0", "modifier": "private", "original_string": "private int indent = 0;", "type": "int", "var_name": "indent" }, { "declarator": "active = false", "modifier": "private", "original_string": "private boolean active = fals...
{ "body": "public void deactivate() {\n\t\tactive = false;\n\t}", "class_method_signature": "DefaultDebug.deactivate()", "constructor": false, "full_signature": "public void deactivate()", "identifier": "deactivate", "invocations": [], "modifiers": "public", "parameters": "()", "return": "void", "si...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_87
{ "fields": [ { "declarator": "CLAZZ = ByteData.class", "modifier": "private static", "original_string": "private static Class<?> CLAZZ = ByteData.class;", "type": "Class<?>", "var_name": "CLAZZ" }, { "declarator": "thrown = ExpectedException.none()", "modifier": ...
{ "body": "@Test\n\tpublic void testDecodeUnsignedShort() throws Exception {\n\t\tassertEquals(0, decodeUnsigned((short) 0));\n\t\tassertEquals(32768, decodeUnsigned((short) 32768));\n\t}", "class_method_signature": "ByteDataTest.testDecodeUnsignedShort()", "constructor": false, "full_signature": "@Test public ...
{ "fields": [ { "declarator": "SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\"", "modifier": "private static final", "original_string": "private static final String SMPP_TIME_DATE_FORMAT = \"yyMMddHHmmss\";", "type": "String", "var_name": "SMPP_TIME_DATE_FORMAT" }, { "declarat...
{ "body": "protected static short decodeUnsigned(byte signed) {\n\t\tif (signed >= 0) {\n\t\t\treturn signed;\n\t\t} else {\n\t\t\treturn (short) (256 + (short) signed);\n\t\t}\n\t}", "class_method_signature": "ByteData.decodeUnsigned(byte signed)", "constructor": false, "full_signature": "protected static shor...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_91
{ "fields": [], "file": "core/src/test/java/org/smpp/SmppObjectTest.java", "identifier": "SmppObjectTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testDefaultEvent() {\n\t\tassertEquals(DefaultEvent.class, SmppObject.getEvent().getClass());\n\t}", "class_method_signature": "SmppObjectTest.testDefaultEvent()", "constructor": false, "full_signature": "@Test public void testDefaultEvent()", "identifier": "testDefaultEvent", ...
{ "fields": [ { "declarator": "debug", "modifier": "static protected", "original_string": "static protected Debug debug;", "type": "Debug", "var_name": "debug" }, { "declarator": "event", "modifier": "static protected", "original_string": "static protected E...
{ "body": "static public Event getEvent() {\n\t\treturn event;\n\t}", "class_method_signature": "SmppObject.getEvent()", "constructor": false, "full_signature": "static public Event getEvent()", "identifier": "getEvent", "invocations": [], "modifiers": "static public", "parameters": "()", "return": "E...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_29
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveByteFromNullThrowsException() throws Exception {\n\t\tthrown.expect(NotEnoughDataInByteBufferException.class);\n\t\tthrown.expect(notEnoughData(1, 0));\n\n\t\tbuffer.removeByte();\n\t}", "class_method_signature": "ByteBufferTest.testRemoveByteFromNullThrowsException()", "...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public byte removeByte() throws NotEnoughDataInByteBufferException {\n\t\tbyte result = 0;\n\t\tbyte[] resBuff = removeBytes(SZ_BYTE).getBuffer();\n\t\tresult = resBuff[0];\n\t\treturn result;\n\t}", "class_method_signature": "ByteBuffer.removeByte()", "constructor": false, "full_signature": "public ...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }
8143599_51
{ "fields": [ { "declarator": "ABC = \"ABC\"", "modifier": "private static final", "original_string": "private static final String ABC = \"ABC\";", "type": "String", "var_name": "ABC" }, { "declarator": "ASCII = \"ASCII\"", "modifier": "private static final", ...
{ "body": "@Test\n\tpublic void testRemoveStringWithEncodingAscii() throws Exception {\n\t\tbuffer = bufferOf(A, B, C);\n\t\tassertEquals(ABC, buffer.removeString(3, ASCII));\n\t}", "class_method_signature": "ByteBufferTest.testRemoveStringWithEncodingAscii()", "constructor": false, "full_signature": "@Test pub...
{ "fields": [ { "declarator": "buffer", "modifier": "private", "original_string": "private byte[] buffer;", "type": "byte[]", "var_name": "buffer" }, { "declarator": "SZ_BYTE = 1", "modifier": "private static final", "original_string": "private static final ...
{ "body": "public String removeString(int size, String encoding)\n\t\tthrows NotEnoughDataInByteBufferException, UnsupportedEncodingException {\n\t\tint len = length();\n\t\tif (len < size) {\n\t\t\tthrow new NotEnoughDataInByteBufferException(len, size);\n\t\t}\n\t\tUnsupportedEncodingException encodingException = n...
{ "created": null, "fork": null, "fork_count": 139, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 8143599, "size": 2751, "stargazer_count": 141, "stars": null, "updates": null, "url": "https://github.com/OpenSmpp/opensmpp" }