id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
133447770_492 | {
"fields": [
{
"declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)",
"modifier": "private static final",
"original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ... | {
"body": "@Test\n public void testSelectTracksPreferHigherSampleRateBeforeBitrate()\n throws Exception {\n Format higherSampleRateLowerBitrateFormat =\n Format.createAudioSampleFormat(\"audioFormat\", MimeTypes.AUDIO_AAC, null, 15000,\n Format.NO_VALUE, 2, 44100, null, null, 0, null);\n ... | {
"fields": [
{
"declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f",
"modifier": "private static final",
"original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;",
"type": "float",
"var_name": "FRACTION_TO_CONSIDER_FULLSCREEN"
},
{
"de... | {
"body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_168 | {
"fields": [
{
"declarator": "EMPTY_FILE = \"subrip/empty\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_FILE = \"subrip/empty\";",
"type": "String",
"var_name": "EMPTY_FILE"
},
{
"declarator": "TYPICAL_FILE = \"subrip/typ... | {
"body": "@Test\n public void testDecodeTypicalExtraBlankLine() throws IOException {\n SubripDecoder decoder = new SubripDecoder();\n byte[] bytes =\n TestUtil.getByteArray(\n ApplicationProvider.getApplicationContext(), TYPICAL_EXTRA_BLANK_LINE);\n SubripSubtitle subtitle = decoder.decod... | {
"fields": [
{
"declarator": "START_FRACTION = 0.08f",
"modifier": "static final",
"original_string": "static final float START_FRACTION = 0.08f;",
"type": "float",
"var_name": "START_FRACTION"
},
{
"declarator": "END_FRACTION = 1 - START_FRACTION",
"modifier": "... | {
"body": "@Override\n protected SubripSubtitle decode(byte[] bytes, int length, boolean reset) {\n ArrayList<Cue> cues = new ArrayList<>();\n LongArray cueTimesUs = new LongArray();\n ParsableByteArray subripData = new ParsableByteArray(bytes, length);\n String currentLine;\n\n while ((currentLine = ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_241 | {
"fields": [
{
"declarator": "TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0}",
"modifier": "private static final",
"original_string": "private static final byte[] TAG_HEADER = new byte[] {'I', 'D', '3', 4, 0, 0, 0, 0, 0, 0};",
"type": "byte[]",
"var_name": "TAG_HEADER"... | {
"body": "@Test\n public void testDecodeTxxxFrame() {\n byte[] rawId3 = buildSingleFrameTag(\"TXXX\", new byte[] {3, 0, 109, 100, 105, 97, 108, 111, 103,\n 95, 86, 73, 78, 68, 73, 67, 79, 49, 53, 50, 55, 54, 54, 52, 95, 115, 116, 97, 114, 116, 0});\n Id3Decoder decoder = new Id3Decoder();\n Metadata... | {
"fields": [
{
"declarator": "NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false",
"modifier": "public static final",
"original_string": "public static final FramePredicate NO_FRAMES_PREDICATE =\n (majorVersion, id0, id1, id2, id3) -> false;",
"type": "FramePred... | {
"body": "private static @Nullable TextInformationFrame decodeTxxxFrame(\n ParsableByteArray id3Data, int frameSize) throws UnsupportedEncodingException {\n if (frameSize < 1) {\n // Frame is malformed.\n return null;\n }\n\n int encoding = id3Data.readUnsignedByte();\n String charset = ge... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_304 | {
"fields": [
{
"declarator": "SIMULATED_TRANSFER_COUNT = 100",
"modifier": "private static final",
"original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;",
"type": "int",
"var_name": "SIMULATED_TRANSFER_COUNT"
},
{
"declarator": "FAST_COUNTRY_ISO ... | {
"body": "@Test\n public void\n defaultInitialBitrateEstimate_for4g_forFastCountry_isGreaterThanEstimateForSlowCountry() {\n setActiveNetworkInfo(networkInfo4g);\n setNetworkCountryIso(FAST_COUNTRY_ISO);\n DefaultBandwidthMeter bandwidthMeterFast =\n new DefaultBandwidthMeter.Builder(Applicatio... | {
"fields": [
{
"declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()",
"modifier": "public static final",
"original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG... | {
"body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }",
"class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()",
"constructor": false,
"full_signature": "@Override public synchronized long getBitrateEstimate()",
"identifier": "getBitrateEstima... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_216 | {
"fields": [
{
"declarator": "NO_SUBTITLE = \"tx3g/no_subtitle\"",
"modifier": "private static final",
"original_string": "private static final String NO_SUBTITLE = \"tx3g/no_subtitle\";",
"type": "String",
"var_name": "NO_SUBTITLE"
},
{
"declarator": "SAMPLE_JUST_TEXT... | {
"body": "@Test\n public void testInitializationDecodeWithTbox() throws IOException, SubtitleDecoderException {\n byte[] initBytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), INITIALIZATION);\n Tx3gDecoder decoder = new Tx3gDecoder(Collections.singletonList(initBytes));\n ... | {
"fields": [
{
"declarator": "BOM_UTF16_BE = '\\uFEFF'",
"modifier": "private static final",
"original_string": "private static final char BOM_UTF16_BE = '\\uFEFF';",
"type": "char",
"var_name": "BOM_UTF16_BE"
},
{
"declarator": "BOM_UTF16_LE = '\\uFFFE'",
"modif... | {
"body": "@Override\n protected Subtitle decode(byte[] bytes, int length, boolean reset)\n throws SubtitleDecoderException {\n parsableByteArray.reset(bytes, length);\n String cueTextString = readSubtitleText(parsableByteArray);\n if (cueTextString.isEmpty()) {\n return Tx3gSubtitle.EMPTY;\n }... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_353 | {
"fields": [
{
"declarator": "mediaSource",
"modifier": "private",
"original_string": "private ConcatenatingMediaSource mediaSource;",
"type": "ConcatenatingMediaSource",
"var_name": "mediaSource"
},
{
"declarator": "testRunner",
"modifier": "private",
"ori... | {
"body": "@Test\n public void testChildSourceIsPreparedWithLazyPreparationAfterPeriodCreation() throws IOException {\n FakeMediaSource[] childSources = createMediaSources(/* count= */ 2);\n mediaSource =\n new ConcatenatingMediaSource(\n /* isAtomic= */ false,\n /* useLazyPreparat... | {
"fields": [
{
"declarator": "MSG_ADD = 0",
"modifier": "private static final",
"original_string": "private static final int MSG_ADD = 0;",
"type": "int",
"var_name": "MSG_ADD"
},
{
"declarator": "MSG_REMOVE = 1",
"modifier": "private static final",
"origin... | {
"body": "@Override\n public final MediaPeriod createPeriod(\n MediaPeriodId id, Allocator allocator, long startPositionUs) {\n Object mediaSourceHolderUid = getMediaSourceHolderUid(id.periodUid);\n MediaSourceHolder holder = mediaSourceByUid.get(mediaSourceHolderUid);\n if (holder == null) {\n /... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_200 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java",
"identifier": "WebvttCueParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseInvalidVoidSlash() {\n Spanned text = parseCueText(\"blah <b/.st1.st2 trailing stuff> blah\");\n\n assertThat(text.toString()).isEqualTo(\"blah blah\");\n StyleSpan[] spans = getSpans(text, StyleSpan.class);\n assertThat(spans).hasLength(0);\n }",
"class_method... | {
"fields": [
{
"declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")",
"modifier": "public static final",
"original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",... | {
"body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_345 | {
"fields": [
{
"declarator": "mediaSource",
"modifier": "private",
"original_string": "private ConcatenatingMediaSource mediaSource;",
"type": "ConcatenatingMediaSource",
"var_name": "mediaSource"
},
{
"declarator": "testRunner",
"modifier": "private",
"ori... | {
"body": "@Test\n public void testCustomCallbackAfterPreparationAddSingle() throws IOException {\n DummyMainThread dummyMainThread = new DummyMainThread();\n try {\n testRunner.prepareSource();\n final TimelineGrabber timelineGrabber = new TimelineGrabber(testRunner);\n dummyMainThread.runOnMai... | {
"fields": [
{
"declarator": "MSG_ADD = 0",
"modifier": "private static final",
"original_string": "private static final int MSG_ADD = 0;",
"type": "int",
"var_name": "MSG_ADD"
},
{
"declarator": "MSG_REMOVE = 1",
"modifier": "private static final",
"origin... | {
"body": "public final synchronized void addMediaSource(MediaSource mediaSource) {\n addMediaSource(mediaSourcesPublic.size(), mediaSource);\n }",
"class_method_signature": "ConcatenatingMediaSource.addMediaSource(MediaSource mediaSource)",
"constructor": false,
"full_signature": "public final synchronized... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_191 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java",
"identifier": "WebvttCueParserTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseCloseNonExistingTag() throws Exception {\n Spanned text = parseCueText(\"blah<b>blah</i>blah</b>blah\");\n assertThat(text.toString()).isEqualTo(\"blahblahblahblah\");\n\n StyleSpan[] spans = getSpans(text, StyleSpan.class);\n assertThat(spans).hasLength(1);\n a... | {
"fields": [
{
"declarator": "CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\")",
"modifier": "public static final",
"original_string": "public static final Pattern CUE_HEADER_PATTERN = Pattern\n .compile(\"^(\\\\S+)\\\\s+-->\\\\s+(\\\\S+)(.*)?$\");",... | {
"body": "static void parseCueText(String id, String markup, WebvttCue.Builder builder,\n List<WebvttCssStyle> styles) {\n SpannableStringBuilder spannedText = new SpannableStringBuilder();\n ArrayDeque<StartTag> startTagStack = new ArrayDeque<>();\n List<StyleMatch> scratchStyleMatches = new ArrayList... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_484 | {
"fields": [
{
"declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)",
"modifier": "private static final",
"original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ... | {
"body": "@Test\n public void testSelectTracksSelectTrackWithSelectionFlag() throws Exception {\n Format audioFormat =\n buildAudioFormatWithLanguageAndFlags(\n \"audio\", /* language= */ null, /* selectionFlags= */ 0);\n Format formatWithSelectionFlag =\n buildAudioFormatWithLanguage... | {
"fields": [
{
"declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f",
"modifier": "private static final",
"original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;",
"type": "float",
"var_name": "FRACTION_TO_CONSIDER_FULLSCREEN"
},
{
"de... | {
"body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_257 | {
"fields": [
{
"declarator": "mockCache",
"modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private",
"original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;",
"type": "AbstractFakeCache",
"var_name": "mockCache"
},
{
"... | {
"body": "@Test\n public void testGenerateKey() {\n assertThat(CacheUtil.generateKey(Uri.EMPTY)).isNotNull();\n\n Uri testUri = Uri.parse(\"test\");\n String key = CacheUtil.generateKey(testUri);\n assertThat(key).isNotNull();\n\n // Should generate the same key for the same input.\n assertThat(Ca... | {
"fields": [
{
"declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;",
"type": "int",
"var_name": "DEFAULT_BUFFER_SIZE_BYTES"
},
{
"declarator": "DE... | {
"body": "public static String generateKey(Uri uri) {\n return uri.toString();\n }",
"class_method_signature": "CacheUtil.generateKey(Uri uri)",
"constructor": false,
"full_signature": "public static String generateKey(Uri uri)",
"identifier": "generateKey",
"invocations": [
"toString"
],
"modi... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_312 | {
"fields": [
{
"declarator": "SIMULATED_TRANSFER_COUNT = 100",
"modifier": "private static final",
"original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;",
"type": "int",
"var_name": "SIMULATED_TRANSFER_COUNT"
},
{
"declarator": "FAST_COUNTRY_ISO ... | {
"body": "@Test\n public void\n initialBitrateEstimateOverwrite_for2G_whileConnectedToOtherNetwork_doesNotSetInitialEstimate() {\n setActiveNetworkInfo(networkInfoWifi);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n ... | {
"fields": [
{
"declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()",
"modifier": "public static final",
"original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG... | {
"body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }",
"class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()",
"constructor": false,
"full_signature": "@Override public synchronized long getBitrateEstimate()",
"identifier": "getBitrateEstima... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_15 | {
"fields": [
{
"declarator": "OGG_EXTRACTOR_FACTORY = OggExtractor::new",
"modifier": "private static final",
"original_string": "private static final ExtractorFactory OGG_EXTRACTOR_FACTORY = OggExtractor::new;",
"type": "ExtractorFactory",
"var_name": "OGG_EXTRACTOR_FACTORY"
}
... | {
"body": "@Test\n public void testSniffVorbis() throws Exception {\n byte[] data =\n TestUtil.joinByteArrays(\n OggTestData.buildOggHeader(0x02, 0, 1000, 1),\n TestUtil.createByteArray(7), // Laces\n new byte[] {0x01, 'v', 'o', 'r', 'b', 'i', 's'});\n assertThat(sniff(d... | {
"fields": [
{
"declarator": "FACTORY = () -> new Extractor[] {new OggExtractor()}",
"modifier": "public static final",
"original_string": "public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new OggExtractor()};",
"type": "ExtractorsFactory",
"var_name": "FACTORY... | {
"body": "@Override\n public boolean sniff(ExtractorInput input) throws IOException, InterruptedException {\n try {\n return sniffInternal(input);\n } catch (ParserException e) {\n return false;\n }\n }",
"class_method_signature": "OggExtractor.sniff(ExtractorInput input)",
"constructor": fa... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_105 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UriUtilTest.java",
"identifier": "UriUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testResolveAbnormalAdditional() {\n assertThat(resolve(\"http://a/b\", \"c:d/../e\")).isEqualTo(\"c:e\");\n assertThat(resolve(\"a:b\", \"../c\")).isEqualTo(\"a:c\");\n }",
"class_method_signature": "UriUtilTest.testResolveAbnormalAdditional()",
"constructor": false,
"full... | {
"fields": [
{
"declarator": "INDEX_COUNT = 4",
"modifier": "private static final",
"original_string": "private static final int INDEX_COUNT = 4;",
"type": "int",
"var_name": "INDEX_COUNT"
},
{
"declarator": "SCHEME_COLON = 0",
"modifier": "private static final",... | {
"body": "public static String resolve(String baseUri, String referenceUri) {\n StringBuilder uri = new StringBuilder();\n\n // Map null onto empty string, to make the following logic simpler.\n baseUri = baseUri == null ? \"\" : baseUri;\n referenceUri = referenceUri == null ? \"\" : referenceUri;\n\n ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_410 | {
"fields": [
{
"declarator": "NOW_MS = 1234",
"modifier": "private static final",
"original_string": "private static final long NOW_MS = 1234;",
"type": "long",
"var_name": "NOW_MS"
},
{
"declarator": "tempFile",
"modifier": "private",
"original_string": "p... | {
"body": "@Test\n public void mergeRequest_addNewDownloadAsCompleted() throws IOException {\n StreamKey streamKey1 =\n new StreamKey(/* periodIndex= */ 3, /* groupIndex= */ 4, /* trackIndex= */ 5);\n StreamKey streamKey2 =\n new StreamKey(/* periodIndex= */ 0, /* groupIndex= */ 1, /* trackIndex=... | {
"fields": [],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/offline/ActionFileUpgradeUtil.java",
"identifier": "ActionFileUpgradeUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ActionFileUpgradeUtil.ActionFileUpgradeUtil()",
"constructor": true,
... | {
"body": "static void mergeRequest(\n DownloadRequest request,\n DefaultDownloadIndex downloadIndex,\n boolean addNewDownloadAsCompleted,\n long nowMs)\n throws IOException {\n Download download = downloadIndex.getDownload(request.id);\n if (download != null) {\n download = Downlo... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_369 | {
"fields": [
{
"declarator": "window",
"modifier": "private",
"original_string": "private Window window;",
"type": "Window",
"var_name": "window"
},
{
"declarator": "period",
"modifier": "private",
"original_string": "private Period period;",
"type": ... | {
"body": "@Test\n public void testGetPeriodPositionDynamicWindowKnownDuration() {\n long windowDurationUs = 1000;\n SinglePeriodTimeline timeline =\n new SinglePeriodTimeline(\n windowDurationUs,\n windowDurationUs,\n /* windowPositionInPeriodUs= */ 0,\n /* w... | {
"fields": [
{
"declarator": "UID = new Object()",
"modifier": "private static final",
"original_string": "private static final Object UID = new Object();",
"type": "Object",
"var_name": "UID"
},
{
"declarator": "presentationStartTimeMs",
"modifier": "private fin... | {
"body": "@Override\n public Object getUidOfPeriod(int periodIndex) {\n Assertions.checkIndex(periodIndex, 0, 1);\n return UID;\n }",
"class_method_signature": "SinglePeriodTimeline.getUidOfPeriod(int periodIndex)",
"constructor": false,
"full_signature": "@Override public Object getUidOfPeriod(int per... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_81 | {
"fields": [
{
"declarator": "TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0x5F, (byte) 0x01,\n (byte) 0xFF, (byte) 0x14, (byte) 0x60, (byte) 0x99}",
"modifier": "private static final",
"original_string": "private static final byte[] TEST_DATA = new byte[] {0x3C, (byte) 0xD2, (byte) 0... | {
"body": "@Test\n public void testReadBits() {\n assertThat(testArray.readBits(5)).isEqualTo(getTestDataBits(0, 5));\n assertThat(testArray.readBits(0)).isEqualTo(getTestDataBits(5, 0));\n assertThat(testArray.readBits(3)).isEqualTo(getTestDataBits(5, 3));\n assertThat(testArray.readBits(16)).isEqualTo(... | {
"fields": [
{
"declarator": "data",
"modifier": "public",
"original_string": "public byte[] data;",
"type": "byte[]",
"var_name": "data"
},
{
"declarator": "byteOffset",
"modifier": "private",
"original_string": "private int byteOffset;",
"type": "in... | {
"body": "public int readBits(int numBits) {\n if (numBits == 0) {\n return 0;\n }\n int returnValue = 0;\n bitOffset += numBits;\n while (bitOffset > 8) {\n bitOffset -= 8;\n returnValue |= (data[byteOffset++] & 0xFF) << bitOffset;\n }\n returnValue |= (data[byteOffset] & 0xFF) >... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_386 | {
"fields": [
{
"declarator": "ALLOCATION_SIZE = 16",
"modifier": "private static final",
"original_string": "private static final int ALLOCATION_SIZE = 16;",
"type": "int",
"var_name": "ALLOCATION_SIZE"
},
{
"declarator": "FORMAT_1 = Format.createSampleFormat(\"1\", \"... | {
"body": "@Test\n public void testSplice() {\n writeTestData();\n sampleQueue.splice();\n // Splice should succeed, replacing the last 4 samples with the sample being written.\n long spliceSampleTimeUs = SAMPLE_TIMESTAMPS[4];\n writeSample(DATA, spliceSampleTimeUs, FORMAT_SPLICED, C.BUFFER_FLAG_KEY_F... | {
"fields": [
{
"declarator": "ADVANCE_FAILED = -1",
"modifier": "public static final",
"original_string": "public static final int ADVANCE_FAILED = -1;",
"type": "int",
"var_name": "ADVANCE_FAILED"
},
{
"declarator": "INITIAL_SCRATCH_SIZE = 32",
"modifier": "priv... | {
"body": "public void splice() {\n pendingSplice = true;\n }",
"class_method_signature": "SampleQueue.splice()",
"constructor": false,
"full_signature": "public void splice()",
"identifier": "splice",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_152 | {
"fields": [
{
"declarator": "SPEED = 1f",
"modifier": "private static final",
"original_string": "private static final float SPEED = 1f;",
"type": "float",
"var_name": "SPEED"
},
{
"declarator": "MIN_BUFFER_US = C.msToUs(DefaultLoadControl.DEFAULT_MIN_BUFFER_MS)",
... | {
"body": "@Test\n public void testShouldContinueLoading_untilMaxBufferExceeded() {\n createDefaultLoadControl();\n assertThat(loadControl.shouldContinueLoading(/* bufferedDurationUs= */ 0, SPEED)).isTrue();\n assertThat(loadControl.shouldContinueLoading(MIN_BUFFER_US, SPEED)).isTrue();\n assertThat(load... | {
"fields": [
{
"declarator": "DEFAULT_MIN_BUFFER_MS = 15000",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_MIN_BUFFER_MS = 15000;",
"type": "int",
"var_name": "DEFAULT_MIN_BUFFER_MS"
},
{
"declarator": "DEFAULT_MAX_BUFFER_MS = ... | {
"body": "@Override\n public boolean shouldContinueLoading(long bufferedDurationUs, float playbackSpeed) {\n boolean targetBufferSizeReached = allocator.getTotalBytesAllocated() >= targetBufferSize;\n long minBufferUs = hasVideo ? minBufferVideoUs : minBufferAudioUs;\n if (playbackSpeed > 1) {\n // Th... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_502 | {
"fields": [
{
"declarator": "THREE_EMPTY_MEDIA_CHUNK_ITERATORS =\n new MediaChunkIterator[] {\n MediaChunkIterator.EMPTY, MediaChunkIterator.EMPTY, MediaChunkIterator.EMPTY\n }",
"modifier": "private static final",
"original_string": "private static final MediaChunkIterator[] ... | {
"body": "@Test\n @SuppressWarnings(\"deprecation\")\n public void testFactoryUsesInitiallyProvidedBandwidthMeter() {\n BandwidthMeter initialBandwidthMeter = mock(BandwidthMeter.class);\n BandwidthMeter injectedBandwidthMeter = mock(BandwidthMeter.class);\n Format format1 = videoFormat(/* bitrate= */ 500... | {
"fields": [
{
"declarator": "DEFAULT_MIN_DURATION_FOR_QUALITY_INCREASE_MS = 10000",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_MIN_DURATION_FOR_QUALITY_INCREASE_MS = 10000;",
"type": "int",
"var_name": "DEFAULT_MIN_DURATION_FOR_QUALITY_IN... | {
"body": "@Override\n public void updateSelectedTrack(\n long playbackPositionUs,\n long bufferedDurationUs,\n long availableDurationUs,\n List<? extends MediaChunk> queue,\n MediaChunkIterator[] mediaChunkIterators) {\n long nowMs = clock.elapsedRealtime();\n\n // Update the estimate... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_1 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/extractor/ogg/VorbisUtilTest.java",
"identifier": "VorbisUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadIdHeader() throws Exception {\n byte[] data = OggTestData.getIdentificationHeaderData();\n ParsableByteArray headerData = new ParsableByteArray(data, data.length);\n VorbisUtil.VorbisIdHeader vorbisIdHeader =\n VorbisUtil.readVorbisIdentificationHeader(headerDat... | {
"fields": [
{
"declarator": "TAG = \"VorbisUtil\"",
"modifier": "private static final",
"original_string": "private static final String TAG = \"VorbisUtil\";",
"type": "String",
"var_name": "TAG"
}
],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/ext... | {
"body": "public static VorbisIdHeader readVorbisIdentificationHeader(ParsableByteArray headerData)\n throws ParserException {\n\n verifyVorbisHeaderCapturePattern(0x01, headerData, false);\n\n long version = headerData.readLittleEndianUnsignedInt();\n int channels = headerData.readUnsignedByte();\n ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_447 | {
"fields": [
{
"declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND",
"modifier": "public static final",
"original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;",
"type": "long",
"var_name": "MAX_DURATION_US"
}
],
"file": "videoplayer-co... | {
"body": "@Test\n public void getAverageBitrate_emptyIterator_returnsNoValue() {\n assertThat(TrackSelectionUtil.getAverageBitrate(MediaChunkIterator.EMPTY, MAX_DURATION_US))\n .isEqualTo(Format.NO_VALUE);\n }",
"class_method_signature": "TrackSelectionUtilTest.getAverageBitrate_emptyIterator_returnsNo... | {
"fields": [],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java",
"identifier": "TrackSelectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()",
"constructor": true,
"f... | {
"body": "public static int getAverageBitrate(MediaChunkIterator iterator, long maxDurationUs) {\n long totalDurationUs = 0;\n long totalLength = 0;\n while (iterator.next()) {\n long chunkLength = iterator.getDataSpec().length;\n if (chunkLength == C.LENGTH_UNSET) {\n break;\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_294 | {
"fields": [
{
"declarator": "SIMULATED_TRANSFER_COUNT = 100",
"modifier": "private static final",
"original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;",
"type": "int",
"var_name": "SIMULATED_TRANSFER_COUNT"
},
{
"declarator": "FAST_COUNTRY_ISO ... | {
"body": "@Test\n public void defaultInitialBitrateEstimate_forEthernet_isGreaterThanEstimateFor2G() {\n setActiveNetworkInfo(networkInfoEthernet);\n DefaultBandwidthMeter bandwidthMeterEthernet =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build();\n long initia... | {
"fields": [
{
"declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()",
"modifier": "public static final",
"original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG... | {
"body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }",
"class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()",
"constructor": false,
"full_signature": "@Override public synchronized long getBitrateEstimate()",
"identifier": "getBitrateEstima... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_144 | {
"fields": [
{
"declarator": "TEST_DATA =\n new byte[] {0x0F, (byte) 0xFF, (byte) 0x42, (byte) 0x0F, 0x00, 0x00, 0x00, 0x00}",
"modifier": "private static final",
"original_string": "private static final byte[] TEST_DATA =\n new byte[] {0x0F, (byte) 0xFF, (byte) 0x42, (byte) 0x0F, 0x0... | {
"body": "@Test\n public void testReadTwoLinesWithCrFollowedByLf() {\n byte[] bytes = new byte[] {\n 'f', 'o', 'o', '\\r', '\\n', 'b', 'a', 'r'\n };\n ParsableByteArray parser = new ParsableByteArray(bytes);\n assertThat(parser.readLine()).isEqualTo(\"foo\");\n assertThat(parser.readLine()).isEq... | {
"fields": [
{
"declarator": "data",
"modifier": "public",
"original_string": "public byte[] data;",
"type": "byte[]",
"var_name": "data"
},
{
"declarator": "position",
"modifier": "private",
"original_string": "private int position;",
"type": "int",
... | {
"body": "public @Nullable String readLine() {\n if (bytesLeft() == 0) {\n return null;\n }\n int lineLimit = position;\n while (lineLimit < limit && !Util.isLinebreak(data[lineLimit])) {\n lineLimit++;\n }\n if (lineLimit - position >= 3 && data[position] == (byte) 0xEF\n && data[... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_451 | {
"fields": [
{
"declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND",
"modifier": "public static final",
"original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;",
"type": "long",
"var_name": "MAX_DURATION_US"
}
],
"file": "videoplayer-co... | {
"body": "@Test\n public void getAverageBitrate_firstChunkLengthUnset_returnsNoValue() {\n long[] chunkTimeBoundariesSec = {0, 5, 15, 30};\n long[] chunkLengths = {C.LENGTH_UNSET, 20, 30};\n\n FakeMediaChunkIterator iterator =\n new FakeMediaChunkIterator(chunkTimeBoundariesSec, chunkLengths);\n\n ... | {
"fields": [],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java",
"identifier": "TrackSelectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()",
"constructor": true,
"f... | {
"body": "public static int getAverageBitrate(MediaChunkIterator iterator, long maxDurationUs) {\n long totalDurationUs = 0;\n long totalLength = 0;\n while (iterator.next()) {\n long chunkLength = iterator.getDataSpec().length;\n if (chunkLength == C.LENGTH_UNSET) {\n break;\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_328 | {
"fields": [
{
"declarator": "NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK",
"modifier": "private static final",
"original_string": "private static final int NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK;",
"type": "int",
"var_name": "NO_COMMAND_RECEIVED"
},... | {
"body": "@Test\n @Config(maxSdk = 25)\n public void onAudioFocusChange_withAudioFocusLost_sendsDoNotPlayAndAbandondsFocus() {\n // Ensure that AUDIOFOCUS_LOSS causes AudioFocusManager to pause playback and abandon audio\n // focus.\n AudioAttributes media =\n new AudioAttributes.Builder()\n ... | {
"fields": [
{
"declarator": "PLAYER_COMMAND_DO_NOT_PLAY = -1",
"modifier": "public static final",
"original_string": "public static final int PLAYER_COMMAND_DO_NOT_PLAY = -1;",
"type": "int",
"var_name": "PLAYER_COMMAND_DO_NOT_PLAY"
},
{
"declarator": "PLAYER_COMMAND_... | {
"body": "@PlayerCommand\n public int setAudioAttributes(\n @Nullable AudioAttributes audioAttributes, boolean playWhenReady, int playerState) {\n if (!Util.areEqual(this.audioAttributes, audioAttributes)) {\n this.audioAttributes = audioAttributes;\n focusGain = convertAudioAttributesToFocusGain(... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_390 | {
"fields": [
{
"declarator": "tempFile",
"modifier": "private",
"original_string": "private File tempFile;",
"type": "File",
"var_name": "tempFile"
},
{
"declarator": "expectedAction1",
"modifier": "private",
"original_string": "private DownloadRequest expe... | {
"body": "@Test\n public void testLoadNoDataThrowsIOException() throws Exception {\n ActionFile actionFile = getActionFile(\"offline/action_file_no_data.exi\");\n try {\n actionFile.load();\n Assert.fail();\n } catch (IOException e) {\n // Expected exception.\n }\n }",
"class_method_si... | {
"fields": [
{
"declarator": "VERSION = 0",
"modifier": "private static final",
"original_string": "private static final int VERSION = 0;",
"type": "int",
"var_name": "VERSION"
},
{
"declarator": "atomicFile",
"modifier": "private final",
"original_string":... | {
"body": "public DownloadRequest[] load() throws IOException {\n if (!exists()) {\n return new DownloadRequest[0];\n }\n InputStream inputStream = null;\n try {\n inputStream = atomicFile.openRead();\n DataInputStream dataInputStream = new DataInputStream(inputStream);\n int version =... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_97 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UtilTest.java",
"identifier": "UtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseXsDateTime() throws Exception {\n assertThat(parseXsDateTime(\"2014-06-19T23:07:42\")).isEqualTo(1403219262000L);\n assertThat(parseXsDateTime(\"2014-08-06T11:00:00Z\")).isEqualTo(1407322800000L);\n assertThat(parseXsDateTime(\"2014-08-06T11:00:00,000Z\")).isEqualTo(1... | {
"fields": [
{
"declarator": "SDK_INT = Build.VERSION.SDK_INT",
"modifier": "public static final",
"original_string": "public static final int SDK_INT = Build.VERSION.SDK_INT;",
"type": "int",
"var_name": "SDK_INT"
},
{
"declarator": "DEVICE = Build.DEVICE",
"mod... | {
"body": "public static long parseXsDateTime(String value) throws ParserException {\n Matcher matcher = XS_DATE_TIME_PATTERN.matcher(value);\n if (!matcher.matches()) {\n throw new ParserException(\"Invalid date/time format: \" + value);\n }\n\n int timezoneShift;\n if (matcher.group(9) == null) ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_308 | {
"fields": [
{
"declarator": "SIMULATED_TRANSFER_COUNT = 100",
"modifier": "private static final",
"original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;",
"type": "int",
"var_name": "SIMULATED_TRANSFER_COUNT"
},
{
"declarator": "FAST_COUNTRY_ISO ... | {
"body": "@Test\n public void\n initialBitrateEstimateOverwrite_forWifi_whileConnectedToOtherNetwork_doesNotSetInitialEstimate() {\n setActiveNetworkInfo(networkInfo2g);\n DefaultBandwidthMeter bandwidthMeter =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext())\n ... | {
"fields": [
{
"declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()",
"modifier": "public static final",
"original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG... | {
"body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }",
"class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()",
"constructor": false,
"full_signature": "@Override public synchronized long getBitrateEstimate()",
"identifier": "getBitrateEstima... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_471 | {
"fields": [
{
"declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND",
"modifier": "public static final",
"original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;",
"type": "long",
"var_name": "MAX_DURATION_US"
}
],
"file": "videoplayer-co... | {
"body": "@Test\n public void getBitratesUsingPastInfo_multipleTracks_returnsBitrates() {\n FakeMediaChunk chunk =\n createChunk(\n createFormatWithBitrate(10),\n /* length= */ 10,\n /* startTimeSec= */ 0,\n /* endTimeSec= */ 10);\n\n int[] bitrates =\n ... | {
"fields": [],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java",
"identifier": "TrackSelectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()",
"constructor": true,
"f... | {
"body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_164 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtilTest.java",
"identifier": "TtmlRenderUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testResolveStyleOnlyInlineStyle() {\n TtmlStyle inlineStyle = new TtmlStyle();\n assertThat(TtmlRenderUtil.resolveStyle(inlineStyle, null, null)).isSameAs(inlineStyle);\n }",
"class_method_signature": "TtmlRenderUtilTest.testResolveStyleOnlyInlineStyle()",
"constructor": fal... | {
"fields": [],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java",
"identifier": "TtmlRenderUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "TtmlRenderUtil.resolveStyle(TtmlStyle style, String[] styleIds,\n Map<String, TtmlSty... | {
"body": "public static TtmlStyle resolveStyle(TtmlStyle style, String[] styleIds,\n Map<String, TtmlStyle> globalStyles) {\n if (style == null && styleIds == null) {\n // No styles at all.\n return null;\n } else if (style == null && styleIds.length == 1) {\n // Only one single referential... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_58 | {
"fields": [
{
"declarator": "packetPayload",
"modifier": "private",
"original_string": "private byte[] packetPayload;",
"type": "byte[]",
"var_name": "packetPayload"
},
{
"declarator": "payloadReader",
"modifier": "private",
"original_string": "private Cus... | {
"body": "@Test\n public void testLongSectionAcrossFourPackets() {\n packetPayload[0] = 13; // The first packet includes a pointer_field.\n insertTableSection(1, (byte) 106, 10); // First section. Should be skipped.\n // Second section spread across four packets. Should be consumed.\n insertTableSection... | {
"fields": [
{
"declarator": "SECTION_HEADER_LENGTH = 3",
"modifier": "private static final",
"original_string": "private static final int SECTION_HEADER_LENGTH = 3;",
"type": "int",
"var_name": "SECTION_HEADER_LENGTH"
},
{
"declarator": "DEFAULT_SECTION_BUFFER_LENGTH ... | {
"body": "@Override\n public void consume(ParsableByteArray data, @Flags int flags) {\n boolean payloadUnitStartIndicator = (flags & FLAG_PAYLOAD_UNIT_START_INDICATOR) != 0;\n int payloadStartPosition = C.POSITION_UNSET;\n if (payloadUnitStartIndicator) {\n int payloadStartOffset = data.readUnsignedBy... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_349 | {
"fields": [
{
"declarator": "mediaSource",
"modifier": "private",
"original_string": "private ConcatenatingMediaSource mediaSource;",
"type": "ConcatenatingMediaSource",
"var_name": "mediaSource"
},
{
"declarator": "testRunner",
"modifier": "private",
"ori... | {
"body": "@Test\n public void testPeriodCreationWithAds() throws IOException, InterruptedException {\n // Create concatenated media source with ad child source.\n Timeline timelineContentOnly =\n new FakeTimeline(\n new TimelineWindowDefinition(2, 111, true, false, 10 * C.MICROS_PER_SECOND))... | {
"fields": [
{
"declarator": "MSG_ADD = 0",
"modifier": "private static final",
"original_string": "private static final int MSG_ADD = 0;",
"type": "int",
"var_name": "MSG_ADD"
},
{
"declarator": "MSG_REMOVE = 1",
"modifier": "private static final",
"origin... | {
"body": "public final synchronized void addMediaSource(MediaSource mediaSource) {\n addMediaSource(mediaSourcesPublic.size(), mediaSource);\n }",
"class_method_signature": "ConcatenatingMediaSource.addMediaSource(MediaSource mediaSource)",
"constructor": false,
"full_signature": "public final synchronized... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_430 | {
"fields": [
{
"declarator": "CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND",
"modifier": "private static final",
"original_string": "private static final long CONTENT_DURATION_US = 30 * C.MICROS_PER_SECOND;",
"type": "long",
"var_name": "CONTENT_DURATION_US"
},
{
"de... | {
"body": "@Test\n public void\n updateQueuedPeriods_withDurationChangeBeforeReadingPeriod_doesntHandleChangeAndRemovesPeriodsAfterChangedPeriod() {\n setupTimeline(\n /* initialPositionUs= */ 0,\n /* adGroupTimesUs= */ FIRST_AD_START_TIME_US,\n SECOND_AD_START_TIME_US);\n setAdGroupL... | {
"fields": [
{
"declarator": "MAXIMUM_BUFFER_AHEAD_PERIODS = 100",
"modifier": "private static final",
"original_string": "private static final int MAXIMUM_BUFFER_AHEAD_PERIODS = 100;",
"type": "int",
"var_name": "MAXIMUM_BUFFER_AHEAD_PERIODS"
},
{
"declarator": "perio... | {
"body": "public boolean updateQueuedPeriods(long rendererPositionUs, long maxRendererReadPositionUs) {\n // TODO: Merge this into setTimeline so that the queue gets updated as soon as the new timeline\n // is set, once all cases handled by ExoPlayerImplInternal.handleSourceInfoRefreshed can be\n // handled... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_19 | {
"fields": [
{
"declarator": "OGG_EXTRACTOR_FACTORY = OggExtractor::new",
"modifier": "private static final",
"original_string": "private static final ExtractorFactory OGG_EXTRACTOR_FACTORY = OggExtractor::new;",
"type": "ExtractorFactory",
"var_name": "OGG_EXTRACTOR_FACTORY"
}
... | {
"body": "@Test\n public void testSniffInvalidHeader() throws Exception {\n byte[] data =\n TestUtil.joinByteArrays(\n OggTestData.buildOggHeader(0x02, 0, 1000, 1),\n TestUtil.createByteArray(7), // Laces\n new byte[] {0x7F, 'X', 'o', 'r', 'b', 'i', 's'});\n assertThat(... | {
"fields": [
{
"declarator": "FACTORY = () -> new Extractor[] {new OggExtractor()}",
"modifier": "public static final",
"original_string": "public static final ExtractorsFactory FACTORY = () -> new Extractor[] {new OggExtractor()};",
"type": "ExtractorsFactory",
"var_name": "FACTORY... | {
"body": "@Override\n public boolean sniff(ExtractorInput input) throws IOException, InterruptedException {\n try {\n return sniffInternal(input);\n } catch (ParserException e) {\n return false;\n }\n }",
"class_method_signature": "OggExtractor.sniff(ExtractorInput input)",
"constructor": fa... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_467 | {
"fields": [
{
"declarator": "MAX_DURATION_US = 30 * C.MICROS_PER_SECOND",
"modifier": "public static final",
"original_string": "public static final long MAX_DURATION_US = 30 * C.MICROS_PER_SECOND;",
"type": "long",
"var_name": "MAX_DURATION_US"
}
],
"file": "videoplayer-co... | {
"body": "@Test\n public void getBitratesUsingPastInfo_zeroMaxDuration_returnsNoValue() {\n Format format = createFormatWithBitrate(10);\n FakeMediaChunk chunk =\n createChunk(format, /* length= */ 10, /* startTimeSec= */ 0, /* endTimeSec= */ 10);\n\n int[] bitrates =\n TrackSelectionUtil.get... | {
"fields": [],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java",
"identifier": "TrackSelectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "TrackSelectionUtil.TrackSelectionUtil()",
"constructor": true,
"f... | {
"body": "@VisibleForTesting\n /* package */ static int[] getBitratesUsingPastInfo(\n List<? extends MediaChunk> queue,\n Format[] formats,\n long maxDurationUs,\n @Nullable int[] bitrates) {\n if (bitrates == null) {\n bitrates = new int[formats.length];\n Arrays.fill(bitrates, For... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_488 | {
"fields": [
{
"declarator": "ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n new FakeRendererCapabilities(C.TRACK_TYPE_AUDIO)",
"modifier": "private static final",
"original_string": "private static final RendererCapabilities ALL_AUDIO_FORMAT_SUPPORTED_RENDERER_CAPABILITIES =\n ... | {
"body": "@Test\n public void testSelectTracksWithinCapabilitiesSelectHigherNumChannel()\n throws Exception {\n Format higherChannelFormat =\n Format.createAudioSampleFormat(\n \"audioFormat\",\n MimeTypes.AUDIO_AAC,\n null,\n Format.NO_VALUE,\n ... | {
"fields": [
{
"declarator": "FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f",
"modifier": "private static final",
"original_string": "private static final float FRACTION_TO_CONSIDER_FULLSCREEN = 0.98f;",
"type": "float",
"var_name": "FRACTION_TO_CONSIDER_FULLSCREEN"
},
{
"de... | {
"body": "@Override\n protected final Pair<@NullableType RendererConfiguration[], @NullableType TrackSelection[]>\n selectTracks(\n MappedTrackInfo mappedTrackInfo,\n int[][][] rendererFormatSupports,\n int[] rendererMixedMimeTypeAdaptationSupports)\n throws ExoPlaybackExcep... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_172 | {
"fields": [
{
"declarator": "EMPTY_FILE = \"subrip/empty\"",
"modifier": "private static final",
"original_string": "private static final String EMPTY_FILE = \"subrip/empty\";",
"type": "String",
"var_name": "EMPTY_FILE"
},
{
"declarator": "TYPICAL_FILE = \"subrip/typ... | {
"body": "@Test\n public void testDecodeTypicalUnexpectedEnd() throws IOException {\n // Parsing should succeed, parsing the first and second cues only.\n SubripDecoder decoder = new SubripDecoder();\n byte[] bytes =\n TestUtil.getByteArray(ApplicationProvider.getApplicationContext(), TYPICAL_UNEXPE... | {
"fields": [
{
"declarator": "START_FRACTION = 0.08f",
"modifier": "static final",
"original_string": "static final float START_FRACTION = 0.08f;",
"type": "float",
"var_name": "START_FRACTION"
},
{
"declarator": "END_FRACTION = 1 - START_FRACTION",
"modifier": "... | {
"body": "@Override\n protected SubripSubtitle decode(byte[] bytes, int length, boolean reset) {\n ArrayList<Cue> cues = new ArrayList<>();\n LongArray cueTimesUs = new LongArray();\n ParsableByteArray subripData = new ParsableByteArray(bytes, length);\n String currentLine;\n\n while ((currentLine = ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_365 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/source/CompositeSequenceableLoaderTest.java",
"identifier": "CompositeSequenceableLoaderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContinueLoadingOnlyNotAllowEndOfSourceLoaderToLoad() {\n FakeSequenceableLoader loader1 =\n new FakeSequenceableLoader(\n /* bufferedPositionUs */ 1000, /* nextLoadPositionUs */ C.TIME_END_OF_SOURCE);\n FakeSequenceableLoader loader2 =\n new FakeSeque... | {
"fields": [
{
"declarator": "loaders",
"modifier": "protected final",
"original_string": "protected final SequenceableLoader[] loaders;",
"type": "SequenceableLoader[]",
"var_name": "loaders"
}
],
"file": "videoplayer-core/src/main/java/com/google/android/exoplayer2/source/... | {
"body": "@Override\n public boolean continueLoading(long positionUs) {\n boolean madeProgress = false;\n boolean madeProgressThisIteration;\n do {\n madeProgressThisIteration = false;\n long nextLoadPositionUs = getNextLoadPositionUs();\n if (nextLoadPositionUs == C.TIME_END_OF_SOURCE) {\n ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_220 | {
"fields": [
{
"declarator": "TEST_POSITION_US = 123456789012345678L",
"modifier": "private static final",
"original_string": "private static final long TEST_POSITION_US = 123456789012345678L;",
"type": "long",
"var_name": "TEST_POSITION_US"
},
{
"declarator": "SLEEP_T... | {
"body": "@Test\n public void standaloneStart_shouldStartClock() throws Exception {\n mediaClock.start();\n assertClockIsRunning();\n }",
"class_method_signature": "DefaultMediaClockTest.standaloneStart_shouldStartClock()",
"constructor": false,
"full_signature": "@Test public void standaloneStart_shou... | {
"fields": [
{
"declarator": "standaloneMediaClock",
"modifier": "private final",
"original_string": "private final StandaloneMediaClock standaloneMediaClock;",
"type": "StandaloneMediaClock",
"var_name": "standaloneMediaClock"
},
{
"declarator": "listener",
"mod... | {
"body": "public void start() {\n standaloneMediaClock.start();\n }",
"class_method_signature": "DefaultMediaClock.start()",
"constructor": false,
"full_signature": "public void start()",
"identifier": "start",
"invocations": [
"start"
],
"modifiers": "public",
"parameters": "()",
"return":... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_109 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/util/UriUtilTest.java",
"identifier": "UriUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void removeLastQueryParameter() {\n Uri uri = Uri.parse(\"http://uri?first=value1&query=value\");\n assertThat(removeQueryParameter(uri, \"query\").toString()).isEqualTo(\"http://uri?first=value1\");\n }",
"class_method_signature": "UriUtilTest.removeLastQueryParameter()",
"const... | {
"fields": [
{
"declarator": "INDEX_COUNT = 4",
"modifier": "private static final",
"original_string": "private static final int INDEX_COUNT = 4;",
"type": "int",
"var_name": "INDEX_COUNT"
},
{
"declarator": "SCHEME_COLON = 0",
"modifier": "private static final",... | {
"body": "public static Uri removeQueryParameter(Uri uri, String queryParameterName) {\n Uri.Builder builder = uri.buildUpon();\n builder.clearQuery();\n for (String key : uri.getQueryParameterNames()) {\n if (!key.equals(queryParameterName)) {\n for (String value : uri.getQueryParameters(key)) ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_332 | {
"fields": [
{
"declarator": "CHANNEL_COUNT_MONO = 1",
"modifier": "private static final",
"original_string": "private static final int CHANNEL_COUNT_MONO = 1;",
"type": "int",
"var_name": "CHANNEL_COUNT_MONO"
},
{
"declarator": "CHANNEL_COUNT_STEREO = 2",
"modif... | {
"body": "@Test\n public void trimsStartFrames() throws Exception {\n configureDefaultAudioSink(\n CHANNEL_COUNT_STEREO,\n /* trimStartFrames= */ TRIM_100_MS_FRAME_COUNT,\n /* trimEndFrames= */ 0);\n defaultAudioSink.handleBuffer(createDefaultSilenceBuffer(), /* presentationTimeUs= */ 0);... | {
"fields": [
{
"declarator": "MIN_BUFFER_DURATION_US = 250000",
"modifier": "private static final",
"original_string": "private static final long MIN_BUFFER_DURATION_US = 250000;",
"type": "long",
"var_name": "MIN_BUFFER_DURATION_US"
},
{
"declarator": "MAX_BUFFER_DURA... | {
"body": "@Override\n @SuppressWarnings(\"ReferenceEquality\")\n public boolean handleBuffer(ByteBuffer buffer, long presentationTimeUs)\n throws InitializationException, WriteException {\n Assertions.checkArgument(inputBuffer == null || buffer == inputBuffer);\n\n if (pendingConfiguration != null) {\n ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_298 | {
"fields": [
{
"declarator": "SIMULATED_TRANSFER_COUNT = 100",
"modifier": "private static final",
"original_string": "private static final int SIMULATED_TRANSFER_COUNT = 100;",
"type": "int",
"var_name": "SIMULATED_TRANSFER_COUNT"
},
{
"declarator": "FAST_COUNTRY_ISO ... | {
"body": "@Test\n public void defaultInitialBitrateEstimate_for3G_isGreaterThanEstimateFor2G() {\n setActiveNetworkInfo(networkInfo3g);\n DefaultBandwidthMeter bandwidthMeter3g =\n new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build();\n long initialEstimate3g = band... | {
"fields": [
{
"declarator": "DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryGroupAssignment()",
"modifier": "public static final",
"original_string": "public static final Map<String, int[]> DEFAULT_INITIAL_BITRATE_COUNTRY_GROUPS =\n createInitialBitrateCountryG... | {
"body": "@Override\n public synchronized long getBitrateEstimate() {\n return bitrateEstimate;\n }",
"class_method_signature": "DefaultBandwidthMeter.getBitrateEstimate()",
"constructor": false,
"full_signature": "@Override public synchronized long getBitrateEstimate()",
"identifier": "getBitrateEstima... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_35 | {
"fields": [
{
"declarator": "TEST_URI = \"http://www.google.com\"",
"modifier": "private static final",
"original_string": "private static final String TEST_URI = \"http://www.google.com\";",
"type": "String",
"var_name": "TEST_URI"
},
{
"declarator": "TEST_DATA = new... | {
"body": "@Test\n public void testPeekFullyAtEndOfStreamWithAllowEndOfInputSucceeds() throws Exception {\n DefaultExtractorInput input = createDefaultExtractorInput();\n byte[] target = new byte[TEST_DATA.length];\n\n // Check peeking up to the end of input succeeds.\n assertThat(input.peekFully(target,... | {
"fields": [
{
"declarator": "PEEK_MIN_FREE_SPACE_AFTER_RESIZE = 64 * 1024",
"modifier": "private static final",
"original_string": "private static final int PEEK_MIN_FREE_SPACE_AFTER_RESIZE = 64 * 1024;",
"type": "int",
"var_name": "PEEK_MIN_FREE_SPACE_AFTER_RESIZE"
},
{
... | {
"body": "@Override\n public boolean peekFully(byte[] target, int offset, int length, boolean allowEndOfInput)\n throws IOException, InterruptedException {\n if (!advancePeekPosition(length, allowEndOfInput)) {\n return false;\n }\n System.arraycopy(peekBuffer, peekBufferPosition - length, target... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_277 | {
"fields": [
{
"declarator": "KEY_1 = \"key1\"",
"modifier": "private static final",
"original_string": "private static final String KEY_1 = \"key1\";",
"type": "String",
"var_name": "KEY_1"
},
{
"declarator": "KEY_2 = \"key2\"",
"modifier": "private static final... | {
"body": "@Test\n public void testCacheInitializationError() throws IOException {\n // Creating a file where the cache should be will cause an error during initialization.\n assertThat(cacheDir.createNewFile()).isTrue();\n\n // Cache initialization should not throw an exception, but no UID will be generate... | {
"fields": [
{
"declarator": "TAG = \"SimpleCache\"",
"modifier": "private static final",
"original_string": "private static final String TAG = \"SimpleCache\";",
"type": "String",
"var_name": "TAG"
},
{
"declarator": "SUBDIRECTORY_COUNT = 10",
"modifier": "priva... | {
"body": "@Override\n public synchronized long getUid() {\n return uid;\n }",
"class_method_signature": "SimpleCache.getUid()",
"constructor": false,
"full_signature": "@Override public synchronized long getUid()",
"identifier": "getUid",
"invocations": [],
"modifiers": "@Override public synchronize... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_324 | {
"fields": [
{
"declarator": "NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK",
"modifier": "private static final",
"original_string": "private static final int NO_COMMAND_RECEIVED = ~PLAYER_COMMAND_WAIT_FOR_CALLBACK;",
"type": "int",
"var_name": "NO_COMMAND_RECEIVED"
},... | {
"body": "@Test\n @Config(minSdk = 26)\n public void setAudioAttributes_withNullUsage_releasesAudioFocus_v26() {\n // Create attributes and request audio focus.\n AudioAttributes media = new AudioAttributes.Builder().setUsage(C.USAGE_MEDIA).build();\n Shadows.shadowOf(audioManager)\n .setNextFocusR... | {
"fields": [
{
"declarator": "PLAYER_COMMAND_DO_NOT_PLAY = -1",
"modifier": "public static final",
"original_string": "public static final int PLAYER_COMMAND_DO_NOT_PLAY = -1;",
"type": "int",
"var_name": "PLAYER_COMMAND_DO_NOT_PLAY"
},
{
"declarator": "PLAYER_COMMAND_... | {
"body": "@PlayerCommand\n public int setAudioAttributes(\n @Nullable AudioAttributes audioAttributes, boolean playWhenReady, int playerState) {\n if (!Util.areEqual(this.audioAttributes, audioAttributes)) {\n this.audioAttributes = audioAttributes;\n focusGain = convertAudioAttributesToFocusGain(... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_261 | {
"fields": [
{
"declarator": "mockCache",
"modifier": "@Mock(answer = Answers.CALLS_REAL_METHODS) private",
"original_string": "@Mock(answer = Answers.CALLS_REAL_METHODS) private AbstractFakeCache mockCache;",
"type": "AbstractFakeCache",
"var_name": "mockCache"
},
{
"... | {
"body": "@Test\n public void testGetCachedNoDataKnownLength() {\n mockCache.contentLength = 1000;\n Pair<Long, Long> contentLengthAndBytesCached =\n CacheUtil.getCached(\n new DataSpec(Uri.parse(\"test\")), mockCache, /* cacheKeyFactory= */ null);\n\n assertThat(contentLengthAndBytesCach... | {
"fields": [
{
"declarator": "DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_BUFFER_SIZE_BYTES = 128 * 1024;",
"type": "int",
"var_name": "DEFAULT_BUFFER_SIZE_BYTES"
},
{
"declarator": "DE... | {
"body": "public static Pair<Long, Long> getCached(\n DataSpec dataSpec, Cache cache, @Nullable CacheKeyFactory cacheKeyFactory) {\n String key = buildCacheKey(dataSpec, cacheKeyFactory);\n long position = dataSpec.absoluteStreamPosition;\n long requestLength;\n if (dataSpec.length != C.LENGTH_UNSET... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_148 | {
"fields": [
{
"declarator": "initData",
"modifier": "private static final",
"original_string": "private static final List<byte[]> initData;",
"type": "List<byte[]>",
"var_name": "initData"
}
],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/FormatTest... | {
"body": "@Test\n public void testParcelable() {\n DrmInitData.SchemeData drmData1 = new DrmInitData.SchemeData(WIDEVINE_UUID, VIDEO_MP4,\n TestUtil.buildTestData(128, 1 /* data seed */));\n DrmInitData.SchemeData drmData2 = new DrmInitData.SchemeData(C.UUID_NIL, VIDEO_WEBM,\n TestUtil.buildTest... | {
"fields": [
{
"declarator": "NO_VALUE = -1",
"modifier": "public static final",
"original_string": "public static final int NO_VALUE = -1;",
"type": "int",
"var_name": "NO_VALUE"
},
{
"declarator": "OFFSET_SAMPLE_RELATIVE = Long.MAX_VALUE",
"modifier": "public s... | {
"body": "@Override\n public void writeToParcel(Parcel dest, int flags) {\n dest.writeString(id);\n dest.writeString(label);\n dest.writeInt(selectionFlags);\n dest.writeInt(roleFlags);\n dest.writeInt(bitrate);\n dest.writeString(codecs);\n dest.writeParcelable(metadata, 0);\n // Container ... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_373 | {
"fields": [
{
"declarator": "ALLOCATION_SIZE = 16",
"modifier": "private static final",
"original_string": "private static final int ALLOCATION_SIZE = 16;",
"type": "int",
"var_name": "ALLOCATION_SIZE"
},
{
"declarator": "FORMAT_1 = Format.createSampleFormat(\"1\", \"... | {
"body": "@Test\n public void testReadMultiSamplesTwice() {\n writeTestData();\n writeTestData();\n assertAllocationCount(20);\n assertReadTestData(FORMAT_2);\n assertReadTestData(FORMAT_2);\n assertAllocationCount(20);\n sampleQueue.discardToRead();\n assertAllocationCount(0);\n }",
"cla... | {
"fields": [
{
"declarator": "ADVANCE_FAILED = -1",
"modifier": "public static final",
"original_string": "public static final int ADVANCE_FAILED = -1;",
"type": "int",
"var_name": "ADVANCE_FAILED"
},
{
"declarator": "INITIAL_SCRATCH_SIZE = 32",
"modifier": "priv... | {
"body": "public void discardToRead() {\n discardDownstreamTo(metadataQueue.discardToRead());\n }",
"class_method_signature": "SampleQueue.discardToRead()",
"constructor": false,
"full_signature": "public void discardToRead()",
"identifier": "discardToRead",
"invocations": [
"discardDownstreamTo",
... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
133447770_236 | {
"fields": [],
"file": "videoplayer-core/src/test/java/com/google/android/exoplayer2/metadata/icy/IcyDecoderTest.java",
"identifier": "IcyDecoderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void decode_quoteInTitle() {\n IcyDecoder decoder = new IcyDecoder();\n Metadata metadata = decoder.decode(\"StreamTitle='test' title';StreamURL='test_url';\");\n\n assertThat(metadata.length()).isEqualTo(1);\n IcyInfo streamInfo = (IcyInfo) metadata.get(0);\n assertThat(stre... | {
"fields": [
{
"declarator": "TAG = \"IcyDecoder\"",
"modifier": "private static final",
"original_string": "private static final String TAG = \"IcyDecoder\";",
"type": "String",
"var_name": "TAG"
},
{
"declarator": "METADATA_ELEMENT = Pattern.compile(\"(.+?)='(.+?)';\... | {
"body": "@Override\n @Nullable\n @SuppressWarnings(\"ByteBufferBackingArray\")\n public Metadata decode(MetadataInputBuffer inputBuffer) {\n ByteBuffer buffer = inputBuffer.data;\n byte[] data = buffer.array();\n int length = buffer.limit();\n return decode(Util.fromUtf8Bytes(data, 0, length));\n }"... | {
"created": null,
"fork": null,
"fork_count": 4,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 133447770,
"size": 39077,
"stargazer_count": 20,
"stars": null,
"updates": null,
"url": "https://github.com/ybj366533/YY-VideoPlayer"
} |
79145090_1 | {
"fields": [
{
"declarator": "TIMEOUT_MS = 200",
"modifier": "private static final",
"original_string": "private static final int TIMEOUT_MS = 200;",
"type": "int",
"var_name": "TIMEOUT_MS"
},
{
"declarator": "PARALLEL_COUNT = 1000",
"modifier": "private static f... | {
"body": "@Test\n public void testFinishesAsynchronously() throws InterruptedException {\n JobService.Binder binder =\n (JobService.Binder) Robolectric.buildService(NoopAsyncJobService.class).create().get().onBind(null);\n\n final CountDownLatch doneSignal = new CountDownLatch(1);\n ... | {
"fields": [
{
"declarator": "binder",
"modifier": "private",
"original_string": "private Binder binder;",
"type": "Binder",
"var_name": "binder"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/JobService.java",
"identifier": "JobService",
"interfaces": ... | {
"body": "@NonNull\n @Override\n public final IBinder onBind(Intent intent) {\n if (binder == null) {\n binder = new Binder(this);\n }\n return binder;\n }",
"class_method_signature": "JobService.onBind(Intent intent)",
"constructor": false,
"full_signature": "@NonNull ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_15 | {
"fields": [
{
"declarator": "component",
"modifier": "private",
"original_string": "private ComponentName component;",
"type": "ComponentName",
"var_name": "component"
}
],
"file": "library/src/test/java/com/doist/jobschedulercompat/JobInfoTest.java",
"identifier": "JobIn... | {
"body": "@Test\n public void testMinPeriod() {\n long invalidPeriodicity = 0;\n JobInfo job = new JobInfo.Builder(0, component).setPeriodic(invalidPeriodicity).build();\n assertThat(job.getIntervalMillis(), greaterThan(invalidPeriodicity));\n }",
"class_method_signature": "JobInfoTest.t... | {
"fields": [
{
"declarator": "LOG_TAG = \"JobInfoCompat\"",
"modifier": "private static final",
"original_string": "private static final String LOG_TAG = \"JobInfoCompat\";",
"type": "String",
"var_name": "LOG_TAG"
},
{
"declarator": "NETWORK_TYPE_NONE = 0",
"mod... | {
"body": "public long getIntervalMillis() {\n final long minInterval = getMinPeriodMillis();\n return intervalMillis >= minInterval ? intervalMillis : minInterval;\n }",
"class_method_signature": "JobInfo.getIntervalMillis()",
"constructor": false,
"full_signature": "public long getIntervalMil... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_23 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "job",
"modifier": "private",
"original_string": "private JobInfo j... | {
"body": "@Test\n public void testCancelAllRunsService() {\n scheduler.cancelAll();\n\n assertEquals(shadowOf(application).getNextStartedService().getComponent().getClassName(),\n AlarmJobService.class.getName());\n }",
"class_method_signature": "AlarmSchedulerTest.testCance... | {
"fields": [
{
"declarator": "TAG = \"AlarmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"AlarmScheduler\";",
"type": "String",
"var_name": "TAG"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/schedul... | {
"body": "@Override\n public void cancelAll() {\n AlarmJobService.start(context);\n }",
"class_method_signature": "AlarmScheduler.cancelAll()",
"constructor": false,
"full_signature": "@Override public void cancelAll()",
"identifier": "cancelAll",
"invocations": [
"start"
],
"modifiers... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_19 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "scheduler",
"modifier": "private",
"original_string": "private Gcm... | {
"body": "@Test\n public void testCancelBroadcasts() {\n scheduler.cancel(0);\n\n Intent intent = getLastBroadcastIntent();\n assertNotNull(intent);\n assertEquals(GcmScheduler.ACTION_SCHEDULE, intent.getAction());\n assertEquals(GcmScheduler.PACKAGE_GMS, intent.getPackage());\n... | {
"fields": [
{
"declarator": "TAG = \"GcmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"GcmScheduler\";",
"type": "String",
"var_name": "TAG"
},
{
"declarator": "PACKAGE_GMS = \"com.google.android.gms\"",
"... | {
"body": "@Override\n public void cancel(int jobId) {\n context.sendBroadcast(getCancelIntent(jobId));\n }",
"class_method_signature": "GcmScheduler.cancel(int jobId)",
"constructor": false,
"full_signature": "@Override public void cancel(int jobId)",
"identifier": "cancel",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_18 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "scheduler",
"modifier": "private",
"original_string": "private Gcm... | {
"body": "@Test\n public void testScheduleBroadcasts() {\n JobInfo job = JobCreator.create(application)\n .setMinimumLatency(TimeUnit.HOURS.toMillis(2))\n .setOverrideDeadline(TimeUnit.DAYS.toMillis(1))\n .setRequi... | {
"fields": [
{
"declarator": "TAG = \"GcmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"GcmScheduler\";",
"type": "String",
"var_name": "TAG"
},
{
"declarator": "PACKAGE_GMS = \"com.google.android.gms\"",
"... | {
"body": "@Override\n public int schedule(JobInfo job) {\n context.sendBroadcast(getScheduleIntent(job));\n return RESULT_SUCCESS;\n }",
"class_method_signature": "GcmScheduler.schedule(JobInfo job)",
"constructor": false,
"full_signature": "@Override public int schedule(JobInfo job)",
"i... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_22 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "job",
"modifier": "private",
"original_string": "private JobInfo j... | {
"body": "@Test\n public void testCancelRunsService() {\n scheduler.cancel(0);\n\n assertEquals(shadowOf(application).getNextStartedService().getComponent().getClassName(),\n AlarmJobService.class.getName());\n }",
"class_method_signature": "AlarmSchedulerTest.testCancelRuns... | {
"fields": [
{
"declarator": "TAG = \"AlarmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"AlarmScheduler\";",
"type": "String",
"var_name": "TAG"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/schedul... | {
"body": "@Override\n public void cancel(int jobId) {\n AlarmJobService.start(context);\n }",
"class_method_signature": "AlarmScheduler.cancel(int jobId)",
"constructor": false,
"full_signature": "@Override public void cancel(int jobId)",
"identifier": "cancel",
"invocations": [
"start"
... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_14 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testSchedulerForUnknownTagShouldFail() {\n jobScheduler.getSchedulerForTag(application, \"unknown\");\n }",
"class_method_signature": "JobSchedulerTest.testSchedulerForUnknownTagShouldFail()",
"constructor": false,
"full_sign... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n Scheduler getSchedulerForTag(Context context, String tag) {\n Scheduler scheduler = schedulers.get(tag);\n if (scheduler == null) {\n switch (tag) {\n case JobSchedulerSchedulerV28.TAG:\n scheduler = new J... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_0 | {
"fields": [
{
"declarator": "TIMEOUT_MS = 200",
"modifier": "private static final",
"original_string": "private static final int TIMEOUT_MS = 200;",
"type": "int",
"var_name": "TIMEOUT_MS"
},
{
"declarator": "PARALLEL_COUNT = 1000",
"modifier": "private static f... | {
"body": "@Test\n public void testFinishesSynchronously() {\n JobService.Binder binder =\n (JobService.Binder) Robolectric.buildService(NoopJobService.class).create().get().onBind(null);\n\n assertFalse(binder.startJob(params, null));\n }",
"class_method_signature": "JobServiceTe... | {
"fields": [
{
"declarator": "binder",
"modifier": "private",
"original_string": "private Binder binder;",
"type": "Binder",
"var_name": "binder"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/JobService.java",
"identifier": "JobService",
"interfaces": ... | {
"body": "@NonNull\n @Override\n public final IBinder onBind(Intent intent) {\n if (binder == null) {\n binder = new Binder(this);\n }\n return binder;\n }",
"class_method_signature": "JobService.onBind(Intent intent)",
"constructor": false,
"full_signature": "@NonNull ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_25 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "job",
"modifier": "private",
"original_string": "private JobInfo j... | {
"body": "@Test\n public void testJobRescheduledPassesUriAuthorityForward() {\n Uri changedUri = job.getTriggerContentUris()[0].getUri();\n String changedAuthority = changedUri.getAuthority();\n\n JobStatus failedJobStatus = new JobStatus(job, AlarmScheduler.TAG, 0, 0);\n failedJobStat... | {
"fields": [
{
"declarator": "TAG = \"AlarmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"AlarmScheduler\";",
"type": "String",
"var_name": "TAG"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/schedul... | {
"body": "@Override\n public void onJobRescheduled(JobStatus newJob, JobStatus failedJob) {\n if (failedJob.hasContentTriggerConstraint() && newJob.hasContentTriggerConstraint()) {\n newJob.changedAuthorities = failedJob.changedAuthorities;\n newJob.changedUris = failedJob.changedUris... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_7 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n public void testCancelAll() {\n JobInfo job = JobCreator.create(application).setMinimumLatency(TimeUnit.HOURS.toMillis(1)).build();\n jobScheduler.schedule(job);\n JobInfo job2 = JobCreator.create(application).setMinimumLatency(TimeUnit.HOURS.toMillis(1)).build();\n j... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "public void cancelAll() {\n synchronized (JobStore.LOCK) {\n Set<String> tags = new HashSet<>();\n for (JobStatus jobStatus : jobStore.getJobs()) {\n tags.add(jobStatus.getSchedulerTag());\n }\n jobStore.clear();\n for (String tag... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_13 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n public void testSchedulerForTag() {\n assertThat(jobScheduler.getSchedulerForTag(application, JobSchedulerSchedulerV26.TAG),\n instanceOf(JobSchedulerSchedulerV26.class));\n assertThat(jobScheduler.getSchedulerForTag(application, JobSchedulerSchedulerV24.TAG),\n ... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n Scheduler getSchedulerForTag(Context context, String tag) {\n Scheduler scheduler = schedulers.get(tag);\n if (scheduler == null) {\n switch (tag) {\n case JobSchedulerSchedulerV28.TAG:\n scheduler = new J... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_12 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n @Config(sdk = Build.VERSION_CODES.KITKAT, shadows = {ShadowGoogleApiAvailability.class})\n public void testSchedulerInApi19() {\n JobInfo api21Job = JobCreator.create(application).setRequiresCharging(true).build();\n JobInfo api24Job = JobCreator.create(application).setPeriodic(... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n Scheduler getSchedulerForJob(Context context, JobInfo job) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n return getSchedulerForTag(context, JobSchedulerSchedulerV28.TAG);\n }\n\n if (Build.VERSION.SDK_INT >= Build.VERS... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_6 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n public void testCancel() {\n JobInfo job = JobCreator.create(application).setRequiresDeviceIdle(true).build();\n jobScheduler.schedule(job);\n JobInfo job2 = JobCreator.create(application).setRequiresDeviceIdle(true).build();\n jobScheduler.schedule(job2);\n\n ... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "public void cancel(int jobId) {\n synchronized (JobStore.LOCK) {\n JobStatus jobStatus = jobStore.getJob(jobId);\n if (jobStatus != null) {\n jobStore.remove(jobId);\n getSchedulerForTag(context, jobStatus.getSchedulerTag()).cancel(jobId);\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_24 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "job",
"modifier": "private",
"original_string": "private JobInfo j... | {
"body": "@Test\n public void testJobFinishedRunsService() {\n scheduler.onJobCompleted(0, false);\n\n assertEquals(shadowOf(application).getNextStartedService().getComponent().getClassName(),\n AlarmJobService.class.getName());\n\n scheduler.onJobCompleted(0, true);\n\n ... | {
"fields": [
{
"declarator": "TAG = \"AlarmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"AlarmScheduler\";",
"type": "String",
"var_name": "TAG"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/schedul... | {
"body": "@Override\n public void onJobCompleted(int jobId, boolean needsReschedule) {\n AlarmJobService.start(context);\n }",
"class_method_signature": "AlarmScheduler.onJobCompleted(int jobId, boolean needsReschedule)",
"constructor": false,
"full_signature": "@Override public void onJobComplete... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_9 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n @Config(sdk = {Build.VERSION_CODES.O, Build.VERSION_CODES.P}, shadows = {ShadowGoogleApiAvailability.class})\n public void testSchedulerInApi26() {\n JobInfo api21Job = JobCreator.create(application).setRequiresCharging(true).build();\n JobInfo api24Job = JobCreator.create(appli... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n Scheduler getSchedulerForJob(Context context, JobInfo job) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n return getSchedulerForTag(context, JobSchedulerSchedulerV28.TAG);\n }\n\n if (Build.VERSION.SDK_INT >= Build.VERS... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_27 | {
"fields": [
{
"declarator": "LATENCY_MS = TimeUnit.HOURS.toMillis(1)",
"modifier": "private static final",
"original_string": "private static final long LATENCY_MS = TimeUnit.HOURS.toMillis(1);",
"type": "long",
"var_name": "LATENCY_MS"
},
{
"declarator": "application... | {
"body": "@Test\n public void testStopJobStopsJob() {\n DeviceTestUtils.setCharging(application, true);\n JobInfo job = JobCreator.create(application, 2000).setRequiresCharging(true).build();\n JobStatus jobStatus = JobStatus.createFromJobInfo(job, getSchedulerTag());\n jobStore.add(jo... | {
"fields": [
{
"declarator": "LOG_TAG = \"PlatformJobService\"",
"modifier": "private static final",
"original_string": "private static final String LOG_TAG = \"PlatformJobService\";",
"type": "String",
"var_name": "LOG_TAG"
},
{
"declarator": "jobScheduler",
"mo... | {
"body": "@Override\n public boolean onStopJob(android.app.job.JobParameters params) {\n Connection connection = connections.get(params.getJobId());\n if (connection != null) {\n JobService.Binder binder = connection.binder;\n boolean needsReschedule = binder != null\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_11 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n @Config(sdk = Build.VERSION_CODES.LOLLIPOP, shadows = {ShadowGoogleApiAvailability.class})\n public void testSchedulerInApi21() {\n JobInfo api21Job = JobCreator.create(application).setRequiresCharging(true).build();\n JobInfo api24Job = JobCreator.create(application).setPeriodi... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n Scheduler getSchedulerForJob(Context context, JobInfo job) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n return getSchedulerForTag(context, JobSchedulerSchedulerV28.TAG);\n }\n\n if (Build.VERSION.SDK_INT >= Build.VERS... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_5 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test(expected = IllegalStateException.class)\n public void testScheduleHasUpperLimit() {\n for (int i = 0; i <= JobScheduler.MAX_JOBS + 1; i++) {\n jobScheduler.schedule(\n JobCreator.create(application, 2000).setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY).build()... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "public int schedule(JobInfo job) {\n synchronized (JobStore.LOCK) {\n if (jobStore.size() > MAX_JOBS) {\n throw new IllegalStateException(\"Apps may not schedule more than \" + MAX_JOBS + \" distinct jobs\");\n }\n Scheduler scheduler = getSchedulerFor... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_4 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n public void testSchedule() {\n JobInfo job = JobCreator.create(application).setRequiresCharging(true).build();\n jobScheduler.schedule(job);\n\n assertJobSchedulerContains(job.getId());\n\n JobInfo job2 = JobCreator.create(application).setRequiresCharging(true).build(... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "public int schedule(JobInfo job) {\n synchronized (JobStore.LOCK) {\n if (jobStore.size() > MAX_JOBS) {\n throw new IllegalStateException(\"Apps may not schedule more than \" + MAX_JOBS + \" distinct jobs\");\n }\n Scheduler scheduler = getSchedulerFor... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_10 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n @Config(sdk = Build.VERSION_CODES.N, shadows = {ShadowGoogleApiAvailability.class})\n public void testSchedulerInApi24() {\n JobInfo api21Job = JobCreator.create(application).setRequiresCharging(true).build();\n JobInfo api24Job = JobCreator.create(application).setPeriodic(15 * ... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n Scheduler getSchedulerForJob(Context context, JobInfo job) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {\n return getSchedulerForTag(context, JobSchedulerSchedulerV28.TAG);\n }\n\n if (Build.VERSION.SDK_INT >= Build.VERS... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_26 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "packageManager",
"modifier": "private",
"original_string": "privat... | {
"body": "@SuppressWarnings(\"deprecation\")\n @Test\n public void testReceiversStartService() {\n new AlarmReceiver().onReceive(application, new Intent(Intent.ACTION_BOOT_COMPLETED));\n\n assertEquals(shadowOf(application).getNextStartedService().getComponent().getClassName(),\n ... | {
"fields": [],
"file": "library/src/main/java/com/doist/jobschedulercompat/scheduler/alarm/AlarmReceiver.java",
"identifier": "AlarmReceiver",
"interfaces": "",
"methods": [
{
"class_method_signature": "AlarmReceiver.onReceive(Context context, Intent intent)",
"constructor": false,
"ful... | {
"body": "@Override\n public void onReceive(Context context, Intent intent) {\n AlarmJobService.start(context);\n }",
"class_method_signature": "AlarmReceiver.onReceive(Context context, Intent intent)",
"constructor": false,
"full_signature": "@Override public void onReceive(Context context, Inten... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_8 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "jobScheduler",
"modifier": "private",
"original_string": "private ... | {
"body": "@Test\n public void testJobFinishedSuccess() {\n JobInfo job = JobCreator.create(application).setRequiresCharging(true).build();\n JobStatus jobStatus = JobStatus.createFromJobInfo(job, noopScheduler.getTag());\n jobStore.add(jobStatus);\n\n jobScheduler.onJobCompleted(job.ge... | {
"fields": [
{
"declarator": "RESULT_FAILURE = 0",
"modifier": "public static final",
"original_string": "public static final int RESULT_FAILURE = 0;",
"type": "int",
"var_name": "RESULT_FAILURE"
},
{
"declarator": "RESULT_SUCCESS = 1",
"modifier": "public static... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n public void onJobCompleted(int jobId, boolean needsReschedule) {\n synchronized (JobStore.LOCK) {\n JobStatus jobStatus = jobStore.getJob(jobId);\n if (jobStatus != null) {\n jobStore.remove(jobId);\n if (... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_17 | {
"fields": [],
"file": "library/src/test/java/com/doist/jobschedulercompat/PersistableBundleTest.java",
"identifier": "PersistableBundleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMapConversion() {\n PersistableBundle bundle = getFilledBundle(10);\n PersistableBundle convertedBundle = new PersistableBundle(bundle.toMap(10), 10);\n\n assertEquals(bundle.toMap(10), convertedBundle.toMap(10));\n }",
"class_method_signature": "Persist... | {
"fields": [
{
"declarator": "LOG_TAG = \"PersistableBundleCompat\"",
"modifier": "private static final",
"original_string": "private static final String LOG_TAG = \"PersistableBundleCompat\";",
"type": "String",
"var_name": "LOG_TAG"
},
{
"declarator": "PREFIX_BOOLEAN... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n public Map<String, ?> toMap(int depth) {\n if (depth <= 0) {\n return null;\n }\n Map<String, Object> map = new HashMap<>(this.map);\n for (String key : map.keySet()) {\n Object object = map.get(key);\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_3 | {
"fields": [
{
"declarator": "TIMEOUT_MS = 200",
"modifier": "private static final",
"original_string": "private static final int TIMEOUT_MS = 200;",
"type": "int",
"var_name": "TIMEOUT_MS"
},
{
"declarator": "PARALLEL_COUNT = 1000",
"modifier": "private static f... | {
"body": "@Test\n public void testMultipleFinish() throws InterruptedException {\n JobService.Binder binder =\n (JobService.Binder) Robolectric.buildService(NoopAsyncJobService.class).create().get().onBind(null);\n\n final CountDownLatch doneSignal = new CountDownLatch(PARALLEL_COUNT)... | {
"fields": [
{
"declarator": "binder",
"modifier": "private",
"original_string": "private Binder binder;",
"type": "Binder",
"var_name": "binder"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/JobService.java",
"identifier": "JobService",
"interfaces": ... | {
"body": "@NonNull\n @Override\n public final IBinder onBind(Intent intent) {\n if (binder == null) {\n binder = new Binder(this);\n }\n return binder;\n }",
"class_method_signature": "JobService.onBind(Intent intent)",
"constructor": false,
"full_signature": "@NonNull ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_21 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "job",
"modifier": "private",
"original_string": "private JobInfo j... | {
"body": "@Test\n public void testScheduleRunsService() {\n scheduler.schedule(job);\n\n assertEquals(shadowOf(application).getNextStartedService().getComponent().getClassName(),\n AlarmJobService.class.getName());\n }",
"class_method_signature": "AlarmSchedulerTest.testSche... | {
"fields": [
{
"declarator": "TAG = \"AlarmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"AlarmScheduler\";",
"type": "String",
"var_name": "TAG"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/schedul... | {
"body": "@Override\n public int schedule(JobInfo job) {\n AlarmJobService.start(context);\n return RESULT_SUCCESS;\n }",
"class_method_signature": "AlarmScheduler.schedule(JobInfo job)",
"constructor": false,
"full_signature": "@Override public int schedule(JobInfo job)",
"identifier": "... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_20 | {
"fields": [
{
"declarator": "application",
"modifier": "private",
"original_string": "private Application application;",
"type": "Application",
"var_name": "application"
},
{
"declarator": "scheduler",
"modifier": "private",
"original_string": "private Gcm... | {
"body": "@Test\n public void testCancelAllBroadcasts() {\n scheduler.cancelAll();\n\n Intent intent = getLastBroadcastIntent();\n assertNotNull(intent);\n assertEquals(GcmScheduler.ACTION_SCHEDULE, intent.getAction());\n assertEquals(GcmScheduler.PACKAGE_GMS, intent.getPackage(... | {
"fields": [
{
"declarator": "TAG = \"GcmScheduler\"",
"modifier": "public static final",
"original_string": "public static final String TAG = \"GcmScheduler\";",
"type": "String",
"var_name": "TAG"
},
{
"declarator": "PACKAGE_GMS = \"com.google.android.gms\"",
"... | {
"body": "@Override\n public void cancelAll() {\n context.sendBroadcast(getCancelAllIntent());\n }",
"class_method_signature": "GcmScheduler.cancelAll()",
"constructor": false,
"full_signature": "@Override public void cancelAll()",
"identifier": "cancelAll",
"invocations": [
"sendBroadcast... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_2 | {
"fields": [
{
"declarator": "TIMEOUT_MS = 200",
"modifier": "private static final",
"original_string": "private static final int TIMEOUT_MS = 200;",
"type": "int",
"var_name": "TIMEOUT_MS"
},
{
"declarator": "PARALLEL_COUNT = 1000",
"modifier": "private static f... | {
"body": "@Test\n public void testDoesntFinishIfStopped() throws InterruptedException {\n JobService.Binder binder =\n (JobService.Binder) Robolectric.buildService(NoopAsyncJobService.class).create().get().onBind(null);\n\n final CountDownLatch doneSignal = new CountDownLatch(1);\n ... | {
"fields": [
{
"declarator": "binder",
"modifier": "private",
"original_string": "private Binder binder;",
"type": "Binder",
"var_name": "binder"
}
],
"file": "library/src/main/java/com/doist/jobschedulercompat/JobService.java",
"identifier": "JobService",
"interfaces": ... | {
"body": "@NonNull\n @Override\n public final IBinder onBind(Intent intent) {\n if (binder == null) {\n binder = new Binder(this);\n }\n return binder;\n }",
"class_method_signature": "JobService.onBind(Intent intent)",
"constructor": false,
"full_signature": "@NonNull ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
79145090_16 | {
"fields": [],
"file": "library/src/test/java/com/doist/jobschedulercompat/PersistableBundleTest.java",
"identifier": "PersistableBundleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCopyConstructor() {\n PersistableBundle bundle = getFilledBundle(10);\n PersistableBundle copy = new PersistableBundle(bundle);\n\n assertEquals(bundle.toMap(10), copy.toMap(10));\n }",
"class_method_signature": "PersistableBundleTest.testCopyConstructor... | {
"fields": [
{
"declarator": "LOG_TAG = \"PersistableBundleCompat\"",
"modifier": "private static final",
"original_string": "private static final String LOG_TAG = \"PersistableBundleCompat\";",
"type": "String",
"var_name": "LOG_TAG"
},
{
"declarator": "PREFIX_BOOLEAN... | {
"body": "@RestrictTo(RestrictTo.Scope.LIBRARY)\n public Map<String, ?> toMap(int depth) {\n if (depth <= 0) {\n return null;\n }\n Map<String, Object> map = new HashMap<>(this.map);\n for (String key : map.keySet()) {\n Object object = map.get(key);\n ... | {
"created": null,
"fork": null,
"fork_count": 10,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 79145090,
"size": 281,
"stargazer_count": 114,
"stars": null,
"updates": null,
"url": "https://github.com/Doist/JobSchedulerCompat"
} |
44764619_0 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(ShmackUtilsTest.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(ShmackUtilsTest.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Test\n\tpublic void canFindScripts() {\n\t\tFile fileInScriptDir = new File(ShmackUtils.determineScriptDir() + \"shmack_env\");\n\t\tassertTrue(\"File \" + fileInScriptDir + \"must exist\", fileInScriptDir.exists());\n\t}",
"class_method_signature": "ShmackUtilsTest.canFindScripts()",
"constructor": f... | {
"fields": [
{
"declarator": "scriptDir",
"modifier": "private static",
"original_string": "private static String scriptDir;",
"type": "String",
"var_name": "scriptDir"
}
],
"file": "sparkjobs/src/main/java/com/zuehlke/shmack/sparkjobs/infrastructure/ShmackUtils.java",
"id... | {
"body": "public static String determineScriptDir() {\n\t\tif (scriptDir == null){\n\t\t\ttry {\n\t\t\t\tString workingDir = runOnLocalhost(\"/bin/pwd\").getStandardOutput();\n\t\t\t\tint idx = workingDir.indexOf(\"/04_implementation\");\n\t\t\t\tif (idx > 0) {\n\t\t\t\t\tscriptDir = workingDir.substring(0, idx) + \... | {
"created": null,
"fork": null,
"fork_count": 6,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 44764619,
"size": 15935,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/Zuehlke/SHMACK"
} |
44764619_1 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(ShmackUtilsTest.class)",
"modifier": "private final static",
"original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(ShmackUtilsTest.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "@Test\n\tpublic void testRunOnMaster() throws ExecuteException, IOException {\n\t\tExecuteResult result = ShmackUtils.runOnMaster(\"hostname\");\n\t\t// example hostname: ip-10-0-7-102.us-west-1.compute.internal\n\t\tassertTrue(\"Hostname of aws-node: \" + result, result.getStandardOutput().contains(\"comp... | {
"fields": [
{
"declarator": "scriptDir",
"modifier": "private static",
"original_string": "private static String scriptDir;",
"type": "String",
"var_name": "scriptDir"
}
],
"file": "sparkjobs/src/main/java/com/zuehlke/shmack/sparkjobs/infrastructure/ShmackUtils.java",
"id... | {
"body": "public static ExecuteResult runOnMaster(String executable, String... arguments)\n\t\t\tthrows ExecuteException, IOException {\n\t\treturn runOnMaster(ExecExceptionHandling.THROW_EXCEPTION_IF_EXIT_CODE_NOT_0, executable, arguments);\n\t}",
"class_method_signature": "ShmackUtils.runOnMaster(String executab... | {
"created": null,
"fork": null,
"fork_count": 6,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 44764619,
"size": 15935,
"stargazer_count": 18,
"stars": null,
"updates": null,
"url": "https://github.com/Zuehlke/SHMACK"
} |
134362666_40 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RListTest.java",
"identifier": "RListTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void getTtl() {\n\n }",
"class_method_signature": "RListTest.getTtl()",
"constructor": false,
"full_signature": "@Test public void getTtl()",
"identifier": "getTtl",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "vo... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.LIST.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.LIST.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_VALUE_B = KeyEnum.LIST_VALUE.get... | {
"body": "public int getTtl(String key) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n MetaV metaV = getMeta(key_b);\n if (metaV == null) {\n return -1;\n }\n if (metaV.getTimestamp() == -... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_17 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RMapTest.java",
"identifier": "RMapTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void get() {\n\n }",
"class_method_signature": "RMapTest.get()",
"constructor": false,
"full_signature": "@Test public void get()",
"identifier": "get",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void get()",
... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.MAP.getKey()",
"modifier": "protected final static",
"original_string": "protected final static String HEAD = KeyEnum.MAP.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
... | {
"body": "public Map<String, byte[]> get(String key, String... keys) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n DAssert.notEmpty(keys, ErrorType.EMPTY, \"keys is empty\");\n Meta metaV = getMeta(key_b);\n if (m... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_56 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/ZSetTest.java",
"identifier": "ZSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void range() throws KitDBException {\n String head = \"range0\";\n ZSet set = db.getzSet();\n int num = 10 * 10000;\n\n try {\n FList<ZSet.Entry> entries = new FList<>(num);\n for (int i = 0; i < num; i++) {\n entries.add(ne... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.ZSET.getKey()",
"modifier": "public static",
"original_string": "public static String HEAD = KeyEnum.ZSET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modifier": "pub... | {
"body": "public List<Entry> range(String key, long start, long end, int limit) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n\n List<Entry> entries = new ArrayList<>();\n MetaV metaV = getMeta(key_b);\n ZData zDat... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_3 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RSetTest.java",
"identifier": "RSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void iterator() throws KitDBException {\n String head = \"iterator0\";\n RSet set = db.getSet();\n int num = 10 * 10000;\n try {\n Set<String> stringSet = new HashSet<>();\n\n for (int i = 0; i < num; i++) {\n set.add(head, ... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.SET.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.SET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modif... | {
"body": "@Override\n @SuppressWarnings(\"unchecked\")\n public RIterator<RSet> iterator(String key) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n MetaV metaV = getMeta(key_b);\n if (metaV == null) {\n r... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_21 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RMapTest.java",
"identifier": "RMapTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void deleteFast() throws KitDBException {\n String head = \"deleteFast1\";\n RMap map = db.getMap();\n int num = 1000;\n\n for (int i = 0; i < num; i++) {\n map.put(head, \"hello\" + i, (\"world\" + i).getBytes());\n }\n\n map.deleteFas... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.MAP.getKey()",
"modifier": "protected final static",
"original_string": "protected final static String HEAD = KeyEnum.MAP.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
... | {
"body": "public void deleteFast(String key) throws KitDBException {\n checkTxStart();\n try (CloseLock ignored = checkClose()) {\n LockEntity lockEntity = lock(key);\n try {\n byte[] key_b = getKey(key);\n Meta metaV = getMeta(key_b);\n ... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_60 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/ZSetTest.java",
"identifier": "ZSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void getKeyIterator() {\n\n\n }",
"class_method_signature": "ZSetTest.getKeyIterator()",
"constructor": false,
"full_signature": "@Test public void getKeyIterator()",
"identifier": "getKeyIterator",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"re... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.ZSET.getKey()",
"modifier": "public static",
"original_string": "public static String HEAD = KeyEnum.ZSET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modifier": "pub... | {
"body": "@Override\n public KeyIterator getKeyIterator() throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n return getKeyIterator(HEAD_B);\n }\n }",
"class_method_signature": "ZSet.getKeyIterator()",
"constructor": false,
"full_signature": "@Override public Key... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_37 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RListTest.java",
"identifier": "RListTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void isExist() throws Exception {\n String head = \"isExist0\";\n RList list = db.getList();\n int num = 10 * 10000;\n try {\n for (int i = 0; i < num; i++) {\n list.add(head, (\"hello\" + i).getBytes());\n }\n As... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.LIST.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.LIST.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_VALUE_B = KeyEnum.LIST_VALUE.get... | {
"body": "public boolean isExist(String key) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n byte[] k_v = getDB(key_b, SstColumnFamily.META);\n MetaV metaV = addCheck(k_v);\n\n return metaV != null;\n }\n ... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_36 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RListTest.java",
"identifier": "RListTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void brpop() throws Exception {\n String head = \"brpop0\";\n RList list = db.getList();\n try {\n int num = 10 * 10000;\n for (int i = 0; i < num; i++) {\n list.add(head, (\"hello\" + i).getBytes());\n }\n\n ... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.LIST.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.LIST.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_VALUE_B = KeyEnum.LIST_VALUE.get... | {
"body": "public List<byte[]> brpop(String key, int num) throws KitDBException {\n checkTxStart();\n try (CloseLock ignored = checkClose()) {\n LockEntity lockEntity = lock(key);\n try {\n byte[] key_b = getKey(key);\n List<byte[]> list = new ArrayLis... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_61 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/ZSetTest.java",
"identifier": "ZSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void deleteFast() throws KitDBException {\n String head = \"iterator0\";\n ZSet set = db.getzSet();\n int num = 10 * 10000;\n try {\n FList<ZSet.Entry> entries = new FList<>(num);\n for (int i = 0; i < num; i++) {\n entries.... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.ZSET.getKey()",
"modifier": "public static",
"original_string": "public static String HEAD = KeyEnum.ZSET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modifier": "pub... | {
"body": "public void deleteFast(String key) throws KitDBException {\n checkTxStart();\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n LockEntity lockEntity = lock(key);\n\n try {\n byte[] k_v = getDB(key_b, SstColumnFamily.META... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_2 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RSetTest.java",
"identifier": "RSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void remove() throws KitDBException {\n String head = \"remove0\";\n RSet set = db.getSet();\n int num = 10 * 10000;\n try {\n for (int i = 0; i < num; i++) {\n set.add(head, (\"hello world\" + i).getBytes());\n }\n\n ... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.SET.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.SET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modif... | {
"body": "public void remove(String key, byte[]... values) throws KitDBException {\n checkTxStart();\n try (CloseLock ignored = checkClose()) {\n DAssert.notEmpty(values, ErrorType.EMPTY, \"values is empty\");\n LockEntity lockEntity = lock(key);\n try {\n ... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_20 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RMapTest.java",
"identifier": "RMapTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void getKeyIterator() throws KitDBException {\n String head = \"getKeyIterator\";\n RMap map = db.getMap();\n int num = 100;\n Set<String> keys = new HashSet<>();\n try {\n for (int i = 0; i < num; i++) {\n int num2 = 1000;\n ... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.MAP.getKey()",
"modifier": "protected final static",
"original_string": "protected final static String HEAD = KeyEnum.MAP.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
... | {
"body": "@Override\n public KeyIterator getKeyIterator() throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n return getKeyIterator(HEAD_B);\n }\n }",
"class_method_signature": "RMap.getKeyIterator()",
"constructor": false,
"full_signature": "@Override public Key... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_57 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/ZSetTest.java",
"identifier": "ZSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void rangeDel() throws KitDBException {\n String head = \"range0\";\n ZSet set = db.getzSet();\n int num = 10 * 10000;\n\n try {\n FList<ZSet.Entry> entries = new FList<>(num);\n for (int i = 0; i < num; i++) {\n entries.add... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.ZSET.getKey()",
"modifier": "public static",
"original_string": "public static String HEAD = KeyEnum.ZSET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modifier": "pub... | {
"body": "public List<Entry> rangeDel(String key, long start, long end, int limit) throws KitDBException {\n checkTxStart();\n List<Entry> entries = new ArrayList<>();\n byte[] key_b = getKey(key);\n LockEntity lockEntity = lock(key);\n try (CloseLock ignored = checkClose()) {\n\n ... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_16 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RMapTest.java",
"identifier": "RMapTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void putMayTTL() throws Exception {\n String head = \"putMayTTL0\";\n RMap map = db.getMap();\n int num = 10 * 10000;\n for (int i = 0; i < num; i++) {\n map.putMayTTL(head, 3, \"hello\" + i, (\"world\" + i).getBytes());\n if (i == num - 5... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.MAP.getKey()",
"modifier": "protected final static",
"original_string": "protected final static String HEAD = KeyEnum.MAP.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
... | {
"body": "public void putMayTTL(String key, int ttl, Map<String, byte[]> map) throws KitDBException {\n DAssert.notEmpty(map, ErrorType.EMPTY, \"entries is empty\");\n\n Entry[] entries = new Entry[map.keySet().size()];\n int j = 0;\n for (Map.Entry<String, byte[]> entry : map.entrySet())... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_41 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RListTest.java",
"identifier": "RListTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void delete() {\n //Not a necessary test\n }",
"class_method_signature": "RListTest.delete()",
"constructor": false,
"full_signature": "@Test public void delete()",
"identifier": "delete",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"retur... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.LIST.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.LIST.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_VALUE_B = KeyEnum.LIST_VALUE.get... | {
"body": "public void delete(String key) throws KitDBException {\n checkTxRange();\n try (CloseLock ignored = checkClose()) {\n LockEntity lockEntity = lock(key);\n try {\n byte[] key_b = getKey(key);\n MetaV metaV = getMeta(key_b);\n i... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_5 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RSetTest.java",
"identifier": "RSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void getKeyIterator() throws KitDBException {\n String head = \"getKeyIterator0\";\n RSet set = db.getSet();\n int num = 100;\n Set<String> keys = new HashSet<>();\n try {\n for (int i = 0; i < num; i++) {\n int num2 = 1000;\n ... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.SET.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.SET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modif... | {
"body": "@Override\n public KeyIterator getKeyIterator() throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n return getKeyIterator(HEAD_B);\n }\n }",
"class_method_signature": "RSet.getKeyIterator()",
"constructor": false,
"full_signature": "@Override public Key... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_27 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RMapTest.java",
"identifier": "RMapTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void size() {\n\n }",
"class_method_signature": "RMapTest.size()",
"constructor": false,
"full_signature": "@Test public void size()",
"identifier": "size",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void size()... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.MAP.getKey()",
"modifier": "protected final static",
"original_string": "protected final static String HEAD = KeyEnum.MAP.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
... | {
"body": "@Override\n public int size(String key) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n Meta metaV = getMeta(key_b);\n if (metaV == null) {\n return 0;\n }\n return metaV.getSi... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_66 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/ZSetTest.java",
"identifier": "ZSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void score() throws KitDBException {\n\n }",
"class_method_signature": "ZSetTest.score()",
"constructor": false,
"full_signature": "@Test public void score()",
"identifier": "score",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.ZSET.getKey()",
"modifier": "public static",
"original_string": "public static String HEAD = KeyEnum.ZSET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modifier": "pub... | {
"body": "public List<Long> score(String key, byte[]... vs) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n DAssert.notEmpty(vs, ErrorType.EMPTY, \"vs is empty\");\n byte[] key_b = getKey(key);\n MetaV metaV = getMeta(key_b);\n List<Long> scores... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_31 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RListTest.java",
"identifier": "RListTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void size() throws Exception {\n String head = \"sizeA\";\n RList list = db.getList();\n int num = 10 * 10000;\n try {\n JoinFuture<String> joinFuture = JoinFuture.build(executorService, String.class);\n for (int i = 0; i < num; i++) {\n ... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.LIST.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.LIST.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_VALUE_B = KeyEnum.LIST_VALUE.get... | {
"body": "public int size(String key) throws KitDBException {\n try (CloseLock ignored = checkClose()) {\n byte[] key_b = getKey(key);\n MetaV metaV = getMeta(key_b);\n if (metaV == null) {\n return 0;\n }\n return metaV.getSize();\n ... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_9 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RSetTest.java",
"identifier": "RSetTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void ttl() {\n\n }",
"class_method_signature": "RSetTest.ttl()",
"constructor": false,
"full_signature": "@Test public void ttl()",
"identifier": "ttl",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"signature": "void ttl()",
... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.SET.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.SET.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_B = HEAD.getBytes()",
"modif... | {
"body": "@Override\n public void ttl(String key, int ttl) throws KitDBException {\n checkTxStart();\n LockEntity lockEntity = lock(key);\n try (CloseLock ignored = checkClose()) {\n try {\n byte[] key_b = getKey(key);\n MetaV metaV = getMeta(key_b);\n... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
134362666_46 | {
"fields": [],
"file": "store/src/test/java/top/thinkin/lightd/db/RKvTest.java",
"identifier": "RKvTest",
"interfaces": "",
"superclass": "extends BaseTest"
} | {
"body": "@Test\n public void set() throws Exception {\n String head = \"setA\";\n\n RKv kv = db.getrKv();\n try {\n JoinFuture<String> joinFuture = JoinFuture.build(executorService, String.class);\n for (int i = 0; i < 10 * 10000; i++) {\n int fj = i;\n ... | {
"fields": [
{
"declarator": "HEAD = KeyEnum.KV_KEY.getKey()",
"modifier": "public final static",
"original_string": "public final static String HEAD = KeyEnum.KV_KEY.getKey();",
"type": "String",
"var_name": "HEAD"
},
{
"declarator": "HEAD_TTL = KeyEnum.KV_TTL.getByte... | {
"body": "public void set(String key, byte[] value) throws KitDBException {\n checkTxStart();\n try (CloseLock ignored = checkClose()) {\n byte[] keyb = getKey(key);\n LockEntity lockEntity = lock.lock(key);\n try {\n start();\n byte[] key_... | {
"created": "5/22/2018 4:58:26 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 134362666,
"size": null,
"stargazer_count": null,
"stars": 167,
"updates": "2020-01-23T14:18:33+00:00",
"url": "https://github.com/frost373/KitDB"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.