id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
36490910_0
{ "fields": [], "file": "WheelIndicatorView/src/test/java/com/dlazaro66/wheelindicatorview/WheelIndicatorItemTest.java", "identifier": "WheelIndicatorItemTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void setterShouldThrowExceptionWhenWeightIsNegative(){\n WheelIndicatorItem item = new WheelIndicatorItem();\n item.setWeight(-1);\n }", "class_method_signature": "WheelIndicatorItemTest.setterShouldThrowExceptionWhenWeightIsNe...
{ "fields": [ { "declarator": "weight", "modifier": "private", "original_string": "private float weight;", "type": "float", "var_name": "weight" }, { "declarator": "color", "modifier": "private", "original_string": "private int color;", "type": "int", ...
{ "body": "public void setWeight(float weight) {\n if (weight < 0 )\n throw new IllegalArgumentException(\"weight value should be positive\");\n\n this.weight = weight;\n }", "class_method_signature": "WheelIndicatorItem.setWeight(float weight)", "constructor": false, "full_signature...
{ "created": null, "fork": null, "fork_count": 66, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 36490910, "size": 898, "stargazer_count": 402, "stars": null, "updates": null, "url": "https://github.com/dlazaro66/WheelIndicatorView" }
44431891_5
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void getTrackBackground_whenEmpty() throws Exception {\n assertThat(mPreferencesHelper.getTrackBackground()).isEqualTo(true);\n }", "class_method_signature": "PreferencesHelperTest.getTrackBackground_whenEmpty()", "constructor": false, "full_signature": "@Test public void ...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public boolean getTrackBackground() {\n return mSettingsPref.getBoolean(mResources.getString(R.string.preferences_settings_key_track_background), true);\n }", "class_method_signature": "PreferencesHelper.getTrackBackground()", "constructor": false, "full_signature": "public boolean getTrack...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_8
{ "fields": [], "file": "app/src/test/java/com/lowwor/realtimebus/utils/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemoveDuplicate() throws Exception {\n\n List<String> items = new ArrayList<>();\n items.add(\"3A\");\n items.add(\"3A\");\n\n CollectionUtils.removeDuplicateWithOrder(items);\n\n assertThat(items).hasSize(1);\n }", "class_method_signature"...
{ "fields": [], "file": "app/src/main/java/com/lowwor/realtimebus/utils/CollectionUtils.java", "identifier": "CollectionUtils", "interfaces": "", "methods": [ { "class_method_signature": "CollectionUtils.removeDuplicateWithOrder(List list)", "constructor": false, "full_signature": "publi...
{ "body": "public static void removeDuplicateWithOrder(List list) {\n Set set = new HashSet();\n List newList = new ArrayList();\n for (Iterator iter = list.iterator(); iter.hasNext(); ) {\n Object element = iter.next();\n if (set.add(element))\n newList.add(e...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_4
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void getShowNotification_whenEmpty() throws Exception {\n assertThat(mPreferencesHelper.getShowNotification()).isEqualTo(true);\n }", "class_method_signature": "PreferencesHelperTest.getShowNotification_whenEmpty()", "constructor": false, "full_signature": "@Test public vo...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public boolean getShowNotification() {\n return mSettingsPref.getBoolean(mResources.getString(R.string.preferences_settings_key_notification), true);\n }", "class_method_signature": "PreferencesHelper.getShowNotification()", "constructor": false, "full_signature": "public boolean getShowNot...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_3
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void getLastQueryLine_whenEmpty() throws Exception {\n assertThat(mPreferencesHelper.getLastQueryLine()).isEqualTo(\"3A\");\n }", "class_method_signature": "PreferencesHelperTest.getLastQueryLine_whenEmpty()", "constructor": false, "full_signature": "@Test public void getL...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public String getLastQueryLine() {\n return mPref.getString(PREF_KEY_LAST_QUERY, \"3A\");\n }", "class_method_signature": "PreferencesHelper.getLastQueryLine()", "constructor": false, "full_signature": "public String getLastQueryLine()", "identifier": "getLastQueryLine", "invocations": ...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_2
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void getAutoCompleteAsObservable_whenEmpty_default3A() throws Exception {\n\n // default 3A\n TestObserver<List<String>> testObserver = mPreferencesHelper.getAutoCompleteAsObservable().test();\n // null is not allow in RxJava2\n testObserver.assertValues(Collec...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public Observable<List<String>> getAutoCompleteAsObservable() {\n\n return mRxSharedPreferences.getString(PREF_KEY_AUTO_COMPLETE_LIST, getDefaultAutoCompleteString()).asObservable()\n .map(new Function<String, List<String>>() {\n @Override\n publi...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_1
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void getAutoCompleteAsObservable() throws Exception {\n\n TestObserver<List<String>> testObserver = mPreferencesHelper.getAutoCompleteAsObservable().test();\n // default 3A\n testObserver.assertValues(Collections.singletonList(\"3A\"));\n\n // add 4A\n m...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public Observable<List<String>> getAutoCompleteAsObservable() {\n\n return mRxSharedPreferences.getString(PREF_KEY_AUTO_COMPLETE_LIST, getDefaultAutoCompleteString()).asObservable()\n .map(new Function<String, List<String>>() {\n @Override\n publi...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_0
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void getStartFromFirst_whenEmpty() throws Exception {\n assertThat(mPreferencesHelper.getIsStartFromFirst()).isEqualTo(true);\n }", "class_method_signature": "PreferencesHelperTest.getStartFromFirst_whenEmpty()", "constructor": false, "full_signature": "@Test public void g...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public boolean getIsStartFromFirst() {\n return mPref.getBoolean(PREF_KEY_START_FROM, true);\n }", "class_method_signature": "PreferencesHelper.getIsStartFromFirst()", "constructor": false, "full_signature": "public boolean getIsStartFromFirst()", "identifier": "getIsStartFromFirst", "i...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_7
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void testGetAutoRefreshInterval() throws Exception {\n assertThat(mPreferencesHelper.getAutoRefreshInterval()).isEqualTo(3);\n\n }", "class_method_signature": "PreferencesHelperTest.testGetAutoRefreshInterval()", "constructor": false, "full_signature": "@Test public void t...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public int getAutoRefreshInterval() {\n return Integer.valueOf(mSettingsPref.getString(mResources.getString(R.string.preferences_settings_key_auto_refresh_interval), \"3\"));\n }", "class_method_signature": "PreferencesHelper.getAutoRefreshInterval()", "constructor": false, "full_signature"...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
44431891_6
{ "fields": [ { "declarator": "mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application)", "modifier": "final", "original_string": "final PreferencesHelper mPreferencesHelper = new PreferencesHelper(RuntimeEnvironment.application);", "type": "PreferencesHelper", "var...
{ "body": "@Test\n public void getShowPopupNotification_whenEmpty() throws Exception {\n assertThat(mPreferencesHelper.getShowPopupNotification()).isEqualTo(true);\n }", "class_method_signature": "PreferencesHelperTest.getShowPopupNotification_whenEmpty()", "constructor": false, "full_signature": "...
{ "fields": [ { "declarator": "PREF_FILE_APP = \"pref_file_app\"", "modifier": "public static final", "original_string": "public static final String PREF_FILE_APP = \"pref_file_app\";", "type": "String", "var_name": "PREF_FILE_APP" }, { "declarator": "PREF_KEY_AUTO_COMP...
{ "body": "public boolean getShowPopupNotification() {\n return mSettingsPref.getBoolean(mResources.getString(R.string.preferences_settings_key_pop_up_notification), true);\n }", "class_method_signature": "PreferencesHelper.getShowPopupNotification()", "constructor": false, "full_signature": "public b...
{ "created": null, "fork": null, "fork_count": 4, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 44431891, "size": 2376, "stargazer_count": 14, "stars": null, "updates": null, "url": "https://github.com/lowwor/Realtime-Bus" }
21600105_12
{ "fields": [ { "declarator": "service", "modifier": "@Inject", "original_string": "@Inject\n StreamService service;", "type": "StreamService", "var_name": "service" }, { "declarator": "repositoryService", "modifier": "@Inject", "original_string": "@Injec...
{ "body": "@Test\n public void testRestoreSnapshot() throws Exception {\n Stream stream = service.createStream(repository, \"test\");\n // create test file\n\n Path testFile = repository.getWorkingDirectory(stream).resolve(\n \"test.txt\");\n Files.copy(new ByteArrayInput...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(StreamService.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(StreamService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "btrfsService", "modifier": ...
{ "body": "public void restoreSnapshot(Stream stream, int snapshotNr) {\n TreeMap<Integer, Snapshot> snapshots = getSnapshots(stream);\n Snapshot snapshot = snapshots.get(snapshotNr);\n if (snapshot == null) {\n throw new DisplayException(\"Cannot restore snapshot. Stream \"\n ...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_1
{ "fields": [ { "declarator": "transferService", "modifier": "@Inject", "original_string": "@Inject\n SnapshotTransferService transferService;", "type": "SnapshotTransferService", "var_name": "transferService" }, { "declarator": "repositoryService", "modifier":...
{ "body": "@Test\n public void transferSnapshotPush() throws Exception {\n Stream stream = streamService.createStream(repo1, \"test\");\n Stream targetStream = streamService.createStream(repo2, \"test2\");\n\n Path testFile = repo1.getWorkingDirectory(stream).resolve(\"test.txt\");\n Fi...
{ "fields": [ { "declarator": "READY_INDICATOR = \"BtrBck READY\"", "modifier": "public static final", "original_string": "public static final String READY_INDICATOR = \"BtrBck READY\";", "type": "String", "var_name": "READY_INDICATOR" }, { "declarator": "START_COMMAND ...
{ "body": "public void push(Stream stream, RemoteRepository repo,\n String remoteStreamName, boolean createRemoteIfNecessary) {\n try {\n SshConnection process = sshService.receiveSnapshots(repo,\n remoteStreamName, createRemoteIfNecessary);\n InputStream inp...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_0
{ "fields": [ { "declarator": "service", "modifier": "@Inject", "original_string": "@Inject\n StreamRepositoryService service;", "type": "StreamRepositoryService", "var_name": "service" }, { "declarator": "repoPath", "modifier": "", "original_string": "Pa...
{ "body": "@Test\n public void testReadRepository() throws Exception {\n Path path = testRepoCreate(BackupStreamRepository.class);\n StreamRepository repo = service.readRepository(path);\n assertThat(repo instanceof BackupStreamRepository, is(true));\n assertThat(repo.rootDirectory, equ...
{ "fields": [ { "declarator": "ctx", "modifier": "@Inject", "original_string": "@Inject\n JAXBContext ctx;", "type": "JAXBContext", "var_name": "ctx" } ], "file": "impl/src/main/java/com/github/ruediste1/btrbck/StreamRepositoryService.java", "identifier": "StreamReposito...
{ "body": "public StreamRepository readRepository(Path rootDir) {\n try {\n {\n StreamRepository repo = new ApplicationStreamRepository();\n repo.rootDirectory = rootDir;\n if (Files.exists(repo.getRepositoryXmlFile())) {\n repo = (Stre...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_13
{ "fields": [ { "declarator": "service", "modifier": "@Inject", "original_string": "@Inject\n StreamService service;", "type": "StreamService", "var_name": "service" }, { "declarator": "repositoryService", "modifier": "@Inject", "original_string": "@Injec...
{ "body": "@Test\n public void testPruneSnapshots() throws Exception {\n DateTimeUtils.setCurrentMillisFixed(new DateTime(2014, 1, 1, 0, 0, 0)\n .getMillis());\n Stream stream = service.createStream(repository, \"test\");\n Snapshot snapshot = service.takeSnapshot(stream);\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(StreamService.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(StreamService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "btrfsService", "modifier": ...
{ "body": "public void pruneSnapshots(Stream stream) {\n if (stream.initialRetentionPeriod == null\n && stream.retentions.isEmpty()) {\n // no retentions, do not prune\n return;\n }\n\n DateTime now = new DateTime(ISOChronology.getInstanceUTC());\n Tree...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_18
{ "fields": [ { "declarator": "streamRepositoryService", "modifier": "@Inject", "original_string": "@Inject\n\tStreamRepositoryService streamRepositoryService;", "type": "StreamRepositoryService", "var_name": "streamRepositoryService" }, { "declarator": "streamService",...
{ "body": "@Test\n\tpublic void testCmdSnapshot() throws Exception {\n\t\tPath location = createRepoLocation();\n\t\tApplicationStreamRepository repo = streamRepositoryService\n\t\t\t\t.createRepository(ApplicationStreamRepository.class, location);\n\t\tStream stream = streamService.createStream(repo, \"test\");\n\n\...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(CliMain.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(CliMain.class);", "type": "Logger", "var_name": "log" }, { "declarator": "repositoryLocation", "modifier": "@Opti...
{ "body": "private void cmdSnapshot() {\n\t\tif (arguments.size() == 1) {\n\t\t\tStreamRepository repo = readAndLockRepository();\n\t\t\tfor (String streamName : streamService.getStreamNames(repo)) {\n\t\t\t\tStream stream = streamService.readStream(repo, streamName);\n\t\t\t\tstreamService.takeSnapshot(stream);\n\t\...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_7
{ "fields": [], "file": "impl/src/test/java/com/github/ruediste1/btrbck/dom/VersionHistoryTest.java", "identifier": "VersionHistoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEquals() throws Exception {\n VersionHistory history1 = new VersionHistory();\n VersionHistory history2 = new VersionHistory();\n UUID id = UUID.randomUUID();\n\n assertEquals(history1, history2);\n history1.addVersion(id);\n\n assertNotE...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "version = 1", "modifier": "@XmlAttr...
{ "body": "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (obj.getClass() != getClass()) {\n return false;\n }\n VersionHistory other = (VersionHistory) obj;\n return entries.equals(other.entries);\n }...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_14
{ "fields": [ { "declarator": "service", "modifier": "private", "original_string": "private SyncService service;", "type": "SyncService", "var_name": "service" } ], "file": "impl/src/test/java/com/github/ruediste1/btrbck/SyncServiceTest.java", "identifier": "SyncServiceTest...
{ "body": "@Test\n public void testCalculateMissingSnapshots() throws Exception {\n\n ArrayList<Snapshot> snapshots = new ArrayList<>();\n snapshots.add(new Snapshot(1, null, null));\n Snapshot snapshot3 = new Snapshot(3, null, null);\n snapshots.add(snapshot3);\n\n Set<SnapshotE...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SyncService.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(SyncService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "streamService", "modifier": "@I...
{ "body": "List<Snapshot> calculateMissingSnapshots(\n Collection<Snapshot> sourceSnapshots,\n Set<SnapshotEntry> availableSnapshots) {\n List<Snapshot> result = new ArrayList<>();\n HashSet<Integer> availableSnapshotNrs = new HashSet<>();\n for (SnapshotEntry e : availableS...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_15
{ "fields": [ { "declarator": "service", "modifier": "private", "original_string": "private SyncService service;", "type": "SyncService", "var_name": "service" } ], "file": "impl/src/test/java/com/github/ruediste1/btrbck/SyncServiceTest.java", "identifier": "SyncServiceTest...
{ "body": "@Test\n public void testCalculateNextSnapshotNr() throws Exception {\n Snapshot snapshot = new Snapshot(3, null, null);\n TreeSet<Integer> available = new TreeSet<>();\n available.add(2);\n assertThat(service.calculateNextSnapshotNr(snapshot, available),\n is(n...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SyncService.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(SyncService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "streamService", "modifier": "@I...
{ "body": "Integer calculateNextSnapshotNr(Snapshot snapshot,\n TreeSet<Integer> availableCloneSources) {\n return availableCloneSources.higher(snapshot.nr);\n }", "class_method_signature": "SyncService.calculateNextSnapshotNr(Snapshot snapshot,\n TreeSet<Integer> availableCloneSourc...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_6
{ "fields": [ { "declarator": "name = \"4_1970-01-06T11:48:17.456+05:00\"", "modifier": "private static final", "original_string": "private static final String name = \"4_1970-01-06T11:48:17.456+05:00\";", "type": "String", "var_name": "name" }, { "declarator": "date", ...
{ "body": "@Test\n public void testParse() throws Exception {\n Stream stream = new Stream();\n Snapshot snapshot = Snapshot.parse(stream, name);\n assertEquals(4, snapshot.nr);\n assertEquals(date, snapshot.date);\n assertSame(stream, snapshot.stream);\n }", "class_method_s...
{ "fields": [ { "declarator": "COMPARATOR_NR = new Comparator<Snapshot>() {\n\n @Override\n public int compare(Snapshot o1, Snapshot o2) {\n return Integer.compare(o1.nr, o2.nr);\n }\n }", "modifier": "public static final", "original_string": "public static fin...
{ "body": "public static Snapshot parse(Stream stream, String name) {\n Snapshot snapshot = new Snapshot();\n snapshot.stream = stream;\n int idx = name.indexOf(\"_\");\n snapshot.date = ISODateTimeFormat.dateTimeParser().withOffsetParsed()\n .parseDateTime(name.substring(id...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_5
{ "fields": [ { "declarator": "name = \"4_1970-01-06T11:48:17.456+05:00\"", "modifier": "private static final", "original_string": "private static final String name = \"4_1970-01-06T11:48:17.456+05:00\";", "type": "String", "var_name": "name" }, { "declarator": "date", ...
{ "body": "@Test\n public void testGetSnapshotName() throws Exception {\n Snapshot s = new Snapshot();\n s.nr = 4;\n s.date = date;\n assertEquals(name, s.getSnapshotName());\n }", "class_method_signature": "SnapshotTest.testGetSnapshotName()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "COMPARATOR_NR = new Comparator<Snapshot>() {\n\n @Override\n public int compare(Snapshot o1, Snapshot o2) {\n return Integer.compare(o1.nr, o2.nr);\n }\n }", "modifier": "public static final", "original_string": "public static fin...
{ "body": "public String getSnapshotName() {\n return String.format(\"%d_%s\", nr,\n date.toString(ISODateTimeFormat.dateTime()));\n }", "class_method_signature": "Snapshot.getSnapshotName()", "constructor": false, "full_signature": "public String getSnapshotName()", "identifier": "ge...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_9
{ "fields": [], "file": "impl/src/test/java/com/github/ruediste1/btrbck/dom/VersionHistoryTest.java", "identifier": "VersionHistoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCalculateNodes() throws Exception {\n VersionHistory history = new VersionHistory();\n UUID id = UUID.randomUUID();\n\n history.addVersion(id);\n history.addRestore(id, 0);\n history.addVersion(id);\n history.addRestore(id, 0);\n h...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "version = 1", "modifier": "@XmlAttr...
{ "body": "public TreeMap<Integer, HistoryNode> calculateNodes() {\n TreeMap<Integer, HistoryNode> result = new TreeMap<>();\n\n // construct nodes\n HashSet<Integer> parents = new HashSet<>();\n int snapshotNr = 0;\n for (VersionHistoryEntry entry : entries) {\n if (entr...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_16
{ "fields": [ { "declarator": "service", "modifier": "private", "original_string": "private SyncService service;", "type": "SyncService", "var_name": "service" } ], "file": "impl/src/test/java/com/github/ruediste1/btrbck/SyncServiceTest.java", "identifier": "SyncServiceTest...
{ "body": "@Test\n public void testCalculateAncestorNrs() throws Exception {\n Snapshot snapshot = new Snapshot(3, null, null);\n VersionHistory versionHistory = new VersionHistory();\n UUID id = UUID.randomUUID();\n TreeSet<Integer> available = new TreeSet<>();\n\n versionHistor...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SyncService.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(SyncService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "streamService", "modifier": "@I...
{ "body": "Set<Integer> calculateAncestorNrs(Snapshot snapshot,\n VersionHistory versionHistory,\n TreeSet<Integer> availableCloneSources) {\n Set<Integer> result = new HashSet<>();\n TreeMap<Integer, HistoryNode> nodes = versionHistory.calculateNodes();\n // log.debug(\"Nod...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_17
{ "fields": [ { "declarator": "service", "modifier": "private", "original_string": "private SyncService service;", "type": "SyncService", "var_name": "service" } ], "file": "impl/src/test/java/com/github/ruediste1/btrbck/SyncServiceTest.java", "identifier": "SyncServiceTest...
{ "body": "@Test\n public void testDetermineSendFiles() {\n VersionHistory versionHistory = new VersionHistory();\n UUID id = UUID.randomUUID();\n Set<SnapshotEntry> targetSnapshots = new HashSet<>();\n TreeMap<Integer, Snapshot> sourceSnapshots = new TreeMap<>();\n\n // snapshot...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SyncService.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(SyncService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "streamService", "modifier": "@I...
{ "body": "public List<SendFileSpec> determineSendFiles(Stream sourceStream,\n StreamState stateOfTarget) {\n TreeMap<Integer, Snapshot> sourceSnapshots = streamService\n .getSnapshots(sourceStream);\n VersionHistory versionHistory = sourceStream.versionHistory;\n\n Set<...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_8
{ "fields": [], "file": "impl/src/test/java/com/github/ruediste1/btrbck/dom/VersionHistoryTest.java", "identifier": "VersionHistoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAddVersion() throws Exception {\n VersionHistory history = new VersionHistory();\n UUID id = UUID.randomUUID();\n\n assertTrue(history.entries.isEmpty());\n assertTrue(history.getVersionCount() == 0);\n\n history.addVersion(id);\n\n asser...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "version = 1", "modifier": "@XmlAttr...
{ "body": "public void addVersion(UUID streamId) {\n VersionHistoryEntry entry = getLastEntry();\n if (entry == null || (!entry.streamId.equals(streamId))\n || (!(entry instanceof SnapshotVersionHistoryEntry))) {\n entries.add(new SnapshotVersionHistoryEntry(streamId));\n ...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_4
{ "fields": [ { "declarator": "transferService", "modifier": "@Inject", "original_string": "@Inject\n SnapshotTransferService transferService;", "type": "SnapshotTransferService", "var_name": "transferService" }, { "declarator": "repositoryService", "modifier":...
{ "body": "@Test(expected = DisplayException.class)\n public void transferSnapshotVersionConflict() throws Exception {\n Stream stream = streamService.createStream(repo1, \"test\");\n // take and transfer first snapshot\n streamService.takeSnapshot(stream);\n transferService.push(stream...
{ "fields": [ { "declarator": "READY_INDICATOR = \"BtrBck READY\"", "modifier": "public static final", "original_string": "public static final String READY_INDICATOR = \"BtrBck READY\";", "type": "String", "var_name": "READY_INDICATOR" }, { "declarator": "START_COMMAND ...
{ "body": "public void push(Stream stream, RemoteRepository repo,\n String remoteStreamName, boolean createRemoteIfNecessary) {\n try {\n SshConnection process = sshService.receiveSnapshots(repo,\n remoteStreamName, createRemoteIfNecessary);\n InputStream inp...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_10
{ "fields": [], "file": "impl/src/test/java/com/github/ruediste1/btrbck/dom/VersionHistoryTest.java", "identifier": "VersionHistoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsAncestorOf() throws Exception {\n VersionHistory h1 = new VersionHistory();\n VersionHistory h2 = new VersionHistory();\n UUID id1 = UUID.randomUUID();\n UUID id2 = UUID.randomUUID();\n\n assertTrue(h1.isAncestorOf(h2));\n assertTrue(h2...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "version = 1", "modifier": "@XmlAttr...
{ "body": "public boolean isAncestorOf(VersionHistory child) {\n SnapshotIterator itParent = new SnapshotIterator(this);\n SnapshotIterator itChild = new SnapshotIterator(child);\n\n while (itParent.hasNext() && itChild.hasNext()) {\n if (!itParent.nextUuid().equals(itChild.nextUuid())...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_3
{ "fields": [ { "declarator": "transferService", "modifier": "@Inject", "original_string": "@Inject\n SnapshotTransferService transferService;", "type": "SnapshotTransferService", "var_name": "transferService" }, { "declarator": "repositoryService", "modifier":...
{ "body": "@Test\n public void transferSnapshotCreateStream() throws Exception {\n Stream stream = streamService.createStream(repo1, \"test\");\n transferService.push(stream, null, \"test2\", true);\n Stream targetStream = streamService.tryReadStream(repo2, \"test2\");\n assertThat(targ...
{ "fields": [ { "declarator": "READY_INDICATOR = \"BtrBck READY\"", "modifier": "public static final", "original_string": "public static final String READY_INDICATOR = \"BtrBck READY\";", "type": "String", "var_name": "READY_INDICATOR" }, { "declarator": "START_COMMAND ...
{ "body": "public void push(Stream stream, RemoteRepository repo,\n String remoteStreamName, boolean createRemoteIfNecessary) {\n try {\n SshConnection process = sshService.receiveSnapshots(repo,\n remoteStreamName, createRemoteIfNecessary);\n InputStream inp...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_2
{ "fields": [ { "declarator": "transferService", "modifier": "@Inject", "original_string": "@Inject\n SnapshotTransferService transferService;", "type": "SnapshotTransferService", "var_name": "transferService" }, { "declarator": "repositoryService", "modifier":...
{ "body": "@Test\n public void transferSnapshotPull() throws Exception {\n transferService.sshService = new SshServiceTestDouble(repo1);\n transferService.sshService.setSudoRemoteBtrfs(true);\n\n Stream stream = streamService.createStream(repo1, \"test\");\n Stream targetStream = stream...
{ "fields": [ { "declarator": "READY_INDICATOR = \"BtrBck READY\"", "modifier": "public static final", "original_string": "public static final String READY_INDICATOR = \"BtrBck READY\";", "type": "String", "var_name": "READY_INDICATOR" }, { "declarator": "START_COMMAND ...
{ "body": "public void pull(StreamRepository localRepo, String localStreamName,\n RemoteRepository remoteRepo, String remoteStreamName,\n boolean createStreamIfNecessary) {\n try {\n Stream stream = streamService.tryReadStream(localRepo,\n localStreamName);\n...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21600105_11
{ "fields": [ { "declarator": "service", "modifier": "@Inject", "original_string": "@Inject\n StreamService service;", "type": "StreamService", "var_name": "service" }, { "declarator": "repositoryService", "modifier": "@Inject", "original_string": "@Injec...
{ "body": "@Test\n public void testGetStreamNames() throws Exception {\n assertTrue(service.getStreamNames(repository).isEmpty());\n\n service.createStream(repository, \"test\");\n\n Set<String> streamNames = service.getStreamNames(repository);\n assertEquals(1, streamNames.size());\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(StreamService.class)", "modifier": "", "original_string": "Logger log = LoggerFactory.getLogger(StreamService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "btrfsService", "modifier": ...
{ "body": "public Set<String> getStreamNames(StreamRepository repository) {\n return Util.getDirectoryNames(repository.getBaseDirectory());\n }", "class_method_signature": "StreamService.getStreamNames(StreamRepository repository)", "constructor": false, "full_signature": "public Set<String> getStream...
{ "created": null, "fork": null, "fork_count": 8, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21600105, "size": 2442, "stargazer_count": 61, "stars": null, "updates": null, "url": "https://github.com/ruediste/btrbck" }
21910720_18
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveGroupMembers() throws GeneralSecurityException, IOException {\n List<Member> members = GoogleAppsSdkUtils.retrieveGroupMembers(directoryClient, TEST_GROUP);\n assertTrue(members.size() > 0);\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.testRe...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static List<Member> retrieveGroupMembers(Directory directoryClient, String groupKey) throws IOException {\n LOG.debug(\"retrieveGroupMembers() - {}\", groupKey);\n\n final List<Member> groupMembers = new ArrayList<Member>();\n\n Directory.Members.List request = null;\n tr...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_22
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRemoveUser() throws GeneralSecurityException, IOException {\n GoogleAppsSdkUtils.removeUser(directoryClient, TEST_USER);\n assertTrue(GoogleAppsSdkUtils.retrieveUser(directoryClient, TEST_USER) == null);\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.t...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static void removeUser(Directory directoryClient, String userKey) throws IOException {\n LOG.debug(\"removeUser() - {}\", userKey);\n\n Directory.Users.Delete request = null;\n\n try {\n request = directoryClient.users().delete(userKey);\n } catch (IOException ...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_14
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveGroup() throws GeneralSecurityException, IOException {\n Group group = GoogleAppsSdkUtils.retrieveGroup(directoryClient, TEST_GROUP);\n assertEquals(\"Test Group\", group.getName());\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.testRetrieveGr...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static Group retrieveGroup(Directory directoryClient, String groupKey) throws IOException {\n LOG.debug(\"retrieveGroup() - {}\", groupKey);\n\n Directory.Groups.Get request = null;\n\n try {\n request = directoryClient.groups().get(groupKey);\n } catch (IOExce...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_1
{ "fields": [ { "declarator": "groupName = \"qsuob:testStem:test\"", "modifier": "private static final", "original_string": "private static final String groupName = \"qsuob:testStem:test\";", "type": "String", "var_name": "groupName" }, { "declarator": "groupDisplayName...
{ "body": "@Test\n public void testProcessGroupAdd() throws GeneralSecurityException, IOException {\n ChangeLogEntry addEntry = mock(ChangeLogEntry.class);\n when(addEntry.getChangeLogType()).thenReturn(new ChangeLogType(\"group\", \"addGroup\", \"\"));\n when(addEntry.retrieveValueForLabel(Ch...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "protected void processGroupAdd(GoogleAppsChangeLogConsumer consumer, ChangeLogEntry changeLogEntry) {\n\n LOG.debug(\"Google Apps Consumer '{}' - Change log entry '{}' Processing group add.\", consumerName, toString(changeLogEntry));\n\n final String groupName = changeLogEntry.retrieveValueFo...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_0
{ "fields": [], "file": "grouper-misc/grouper-pspng/src/test/java/edu/internet2/middleware/grouper/pspng/PspUtilsTest.java", "identifier": "PspUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void formatWithSignificantDigits() {\n assertEquals(\"1.2\", PspUtils.formatWithSignificantDigits(1.23314, 2));\n assertEquals(\"1.2\", PspUtils.formatWithSignificantDigits(1.1532, 2));\n assertEquals(\"120\", PspUtils.formatWithSignificantDigits(123.314, 2));\n assertEquals(\"0...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PspUtils.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(PspUtils.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "TH...
{ "body": "public static String formatWithSignificantDigits(double number, int significantDigits) {\n BigDecimal bdNumber = new BigDecimal(number);\n BigDecimal bdRounded = bdNumber.round(new MathContext(significantDigits));\n double rounded = bdRounded.doubleValue();\n\n // This is from https://s...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_15
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveGroupSettings() throws GeneralSecurityException, IOException {\n com.google.api.services.groupssettings.model.Groups groupsSettings = GoogleAppsSdkUtils.retrieveGroupSettings(groupssettingsClient, TEST_GROUP);\n assertEquals(\"Test Group\", groupsSettings.ge...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static com.google.api.services.groupssettings.model.Groups retrieveGroupSettings(Groupssettings groupssettingClient, String groupKey) throws IOException {\n LOG.debug(\"retrieveGroupssettings() - {}\", groupKey);\n\n Groupssettings.Groups.Get request = null;\n\n try {\n ...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_23
{ "fields": [], "file": "grouper-ws/grouper-ws-scim/src/test/java/edu/internet2/middleware/grouper/ws/scim/RestApplicationTest.java", "identifier": "RestApplicationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void classesAreLoadedWhenGrouperWsScimIsSetToTrueInGrouperHibernateProperties() {\n // given\n GrouperConfig.retrieveConfig().propertiesOverrideMap().put(\"grouper.is.scim\", \"true\");\n RestApplication restApplication = new RestApplication();\n \n // when\n Set<Class<?>>...
{ "fields": [], "file": "grouper-ws/grouper-ws-scim/src/main/java/edu/internet2/middleware/grouper/ws/scim/RestApplication.java", "identifier": "RestApplication", "interfaces": "", "methods": [ { "class_method_signature": "RestApplication.getClasses()", "constructor": false, "full_signat...
{ "body": "@Override\n public Set<Class<?>> getClasses() {\n Set<Class<?>> clazzes = new HashSet<Class<?>>();\n \n boolean runGrouperWsScim = GrouperHibernateConfig.retrieveConfig().propertyValueBoolean(\"grouper.is.scim\", false);\n \n if (runGrouperWsScim) {\n clazzes.addAll(ScimResourceHelper....
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_19
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testUpdateGroup() throws GeneralSecurityException, IOException {\n Group group = GoogleAppsSdkUtils.retrieveGroup(directoryClient, TEST_GROUP);\n group.setName(\"test\");\n\n Group result = GoogleAppsSdkUtils.updateGroup(directoryClient, TEST_GROUP, group);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static Group updateGroup(Directory directoryClient, String groupKey, Group group) throws IOException {\n LOG.debug(\"updateGooGroup() - {}\", group);\n\n Directory.Groups.Update request = null;\n\n try {\n request = directoryClient.groups().update(groupKey, group);\n ...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_12
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveMissingUser() throws GeneralSecurityException, IOException {\n User user = GoogleAppsSdkUtils.retrieveUser(directoryClient, \"missing-\" + TEST_USER);\n assertTrue(user == null);\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.testRetrieveMissin...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static User retrieveUser(Directory directoryClient, String userKey) throws IOException {\n LOG.debug(\"retrieveUser() - {}\", userKey);\n\n Directory.Users.Get request = null;\n\n try {\n request = directoryClient.users().get(userKey);\n } catch (IOException e)...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_7
{ "fields": [ { "declarator": "groupName = \"qsuob:testStem:test\"", "modifier": "private static final", "original_string": "private static final String groupName = \"qsuob:testStem:test\";", "type": "String", "var_name": "groupName" }, { "declarator": "groupDisplayName...
{ "body": "@Test\n public void testProcessGroupDelete() throws GeneralSecurityException, IOException {\n createTestGroup(groupDisplayName, groupName);\n\n ChangeLogEntry deleteEntry = mock(ChangeLogEntry.class);\n when(deleteEntry.getChangeLogType()).thenReturn(new ChangeLogType(\"group\", \"d...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "protected void processGroupDelete(GoogleAppsChangeLogConsumer consumer, ChangeLogEntry changeLogEntry) {\n\n LOG.debug(\"Google Apps Consumer '{}' - Change log entry '{}' Processing group delete.\", consumerName, toString(changeLogEntry));\n\n final String groupName = changeLogEntry.retrieveV...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_24
{ "fields": [], "file": "grouper-ws/grouper-ws-scim/src/test/java/edu/internet2/middleware/grouper/ws/scim/RestApplicationTest.java", "identifier": "RestApplicationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void noClassesAreLoadedWhenGrouperWsScimIsSetToFalseInGrouperHibernateProperties() {\n // given\n GrouperConfig.retrieveConfig().propertiesOverrideMap().put(\"grouper.is.scim\", \"false\");\n RestApplication restApplication = new RestApplication();\n \n // when\n Set<Class...
{ "fields": [], "file": "grouper-ws/grouper-ws-scim/src/main/java/edu/internet2/middleware/grouper/ws/scim/RestApplication.java", "identifier": "RestApplication", "interfaces": "", "methods": [ { "class_method_signature": "RestApplication.getClasses()", "constructor": false, "full_signat...
{ "body": "@Override\n public Set<Class<?>> getClasses() {\n Set<Class<?>> clazzes = new HashSet<Class<?>>();\n \n boolean runGrouperWsScim = GrouperHibernateConfig.retrieveConfig().propertyValueBoolean(\"grouper.is.scim\", false);\n \n if (runGrouperWsScim) {\n clazzes.addAll(ScimResourceHelper....
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_6
{ "fields": [ { "declarator": "groupName = \"qsuob:testStem:test\"", "modifier": "private static final", "original_string": "private static final String groupName = \"qsuob:testStem:test\";", "type": "String", "var_name": "groupName" }, { "declarator": "groupDisplayName...
{ "body": "@Test\n public void testProcessGroupsStemChange() throws GeneralSecurityException, IOException {\n try {\n createTestGroup(groupDisplayName, groupName + \"Change\");\n } catch (Exception ex) {}\n\n ChangeLogEntry addEntry = mock(ChangeLogEntry.class);\n when(addEnt...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "@Override\n public long processChangeLogEntries(final List<ChangeLogEntry> changeLogEntryList,\n ChangeLogProcessorMetadata changeLogProcessorMetadata) {\n\n LOG.debug(\"Google Apps Consumer - waking up\");\n\n // the change log sequence number to ret...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_13
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveAllGroups() throws GeneralSecurityException, IOException {\n List<Group> allGroups = GoogleAppsSdkUtils.retrieveAllGroups(directoryClient);\n assertTrue(allGroups.size() > 0);\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.testRetrieveAllGroups...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static List<Group> retrieveAllGroups(Directory directoryClient) throws IOException {\n LOG.debug(\"retrieveAllGroups()\");\n\n final List<Group> allGroups = new ArrayList<Group>();\n\n Directory.Groups.List request = null;\n try {\n request = directoryClient.gr...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_5
{ "fields": [ { "declarator": "groupName = \"qsuob:testStem:test\"", "modifier": "private static final", "original_string": "private static final String groupName = \"qsuob:testStem:test\";", "type": "String", "var_name": "groupName" }, { "declarator": "groupDisplayName...
{ "body": "@Test\n public void testProcessGroupMemberRemove() throws GeneralSecurityException, IOException {\n //User already exists in Google\n Group group = createTestGroup(groupDisplayName, groupName);\n createTestUser(buildSubjectAddress(subjectId), \"Fiona\", \"Windsor\");\n\n Memb...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "@Override\n public long processChangeLogEntries(final List<ChangeLogEntry> changeLogEntryList,\n ChangeLogProcessorMetadata changeLogProcessorMetadata) {\n\n LOG.debug(\"Google Apps Consumer - waking up\");\n\n // the change log sequence number to ret...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_10
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveAllUsers() throws GeneralSecurityException, IOException {\n List<User> allUsers = GoogleAppsSdkUtils.retrieveAllUsers(directoryClient);\n assertTrue(allUsers.size() > 0);\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.testRetrieveAllUsers()", ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static List<User> retrieveAllUsers(Directory directoryClient) throws IOException {\n LOG.debug(\"retrieveAllUsers()\");\n\n List<User> allUsers = new ArrayList<User>();\n\n Directory.Users.List request = null;\n try {\n request = directoryClient.users().list()....
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_9
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testCreateGroup() throws GeneralSecurityException, IOException {\n Group group = new Group();\n group.setName(\"Test Group\")\n .setEmail(TEST_GROUP);\n\n Group currentGroup = GoogleAppsSdkUtils.addGroup(directoryClient, group);\n assertEquals(\...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static Group addGroup(Directory directoryClient, Group group) throws IOException {\n LOG.debug(\"addGroup() - {}\", group);\n\n Directory.Groups.Insert request = null;\n\n try {\n request = directoryClient.groups().insert(group);\n } catch (IOException e) {\n ...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_8
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testCreateUser() throws GeneralSecurityException, IOException {\n User user = new User();\n user.setName(new UserName().setFamilyName(\"Gasper\").setGivenName(\"Test\"))\n .setPrimaryEmail(TEST_USER)\n .setPassword(new BigInteger(130, new S...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static User addUser(Directory directoryClient, User user) throws IOException {\n LOG.debug(\"addUser() - {}\", user);\n\n Directory.Users.Insert request = null;\n\n try {\n request = directoryClient.users().insert(user);\n } catch (IOException e) {\n ...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_11
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveUser() throws GeneralSecurityException, IOException {\n User user = GoogleAppsSdkUtils.retrieveUser(directoryClient, TEST_USER);\n assertEquals(\"Test\", user.getName().getGivenName());\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.testRetriev...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static User retrieveUser(Directory directoryClient, String userKey) throws IOException {\n LOG.debug(\"retrieveUser() - {}\", userKey);\n\n Directory.Users.Get request = null;\n\n try {\n request = directoryClient.users().get(userKey);\n } catch (IOException e)...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_4
{ "fields": [ { "declarator": "groupName = \"qsuob:testStem:test\"", "modifier": "private static final", "original_string": "private static final String groupName = \"qsuob:testStem:test\";", "type": "String", "var_name": "groupName" }, { "declarator": "groupDisplayName...
{ "body": "@Test\n public void testProcessGroupMemberAddNewUserWithProvisioning() throws GeneralSecurityException, IOException {\n //User doesn't exists in Google\n createTestGroup(groupDisplayName, groupName);\n\n ChangeLogEntry addEntry = mock(ChangeLogEntry.class);\n when(addEntry.ge...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "@Override\n public long processChangeLogEntries(final List<ChangeLogEntry> changeLogEntryList,\n ChangeLogProcessorMetadata changeLogProcessorMetadata) {\n\n LOG.debug(\"Google Apps Consumer - waking up\");\n\n // the change log sequence number to ret...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_20
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testUpdateGroupSettings() throws GeneralSecurityException, IOException {\n Groups groupSettings = GoogleAppsSdkUtils.retrieveGroupSettings(groupssettingsClient, TEST_GROUP);\n groupSettings.setShowInGroupDirectory(\"false\");\n\n Groups result = GoogleAppsSdkUtil...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static com.google.api.services.groupssettings.model.Groups updateGroupSettings(Groupssettings groupssettingsClient, String groupKey, com.google.api.services.groupssettings.model.Groups groupSettings) throws IOException {\n LOG.debug(\"updateGroupssettings() - {}\", groupKey);\n\n Group...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_3
{ "fields": [ { "declarator": "groupName = \"qsuob:testStem:test\"", "modifier": "private static final", "original_string": "private static final String groupName = \"qsuob:testStem:test\";", "type": "String", "var_name": "groupName" }, { "declarator": "groupDisplayName...
{ "body": "@Test\n public void testProcessGroupMemberAddExistingUser() throws GeneralSecurityException, IOException {\n //User already exists in Google\n createTestGroup(groupDisplayName, groupName);\n createTestUser(buildSubjectAddress(subjectId), \"Fiona\", \"Windsor\");\n\n ChangeLog...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "@Override\n public long processChangeLogEntries(final List<ChangeLogEntry> changeLogEntryList,\n ChangeLogProcessorMetadata changeLogProcessorMetadata) {\n\n LOG.debug(\"Google Apps Consumer - waking up\");\n\n // the change log sequence number to ret...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_16
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRetrieveMissingGroup() throws GeneralSecurityException, IOException {\n Group group = GoogleAppsSdkUtils.retrieveGroup(directoryClient, \"missing-\" + TEST_GROUP);\n assertTrue(group == null);\n }", "class_method_signature": "GoogleAppsSdkUtilsTest.testRetrieve...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static Group retrieveGroup(Directory directoryClient, String groupKey) throws IOException {\n LOG.debug(\"retrieveGroup() - {}\", groupKey);\n\n Directory.Groups.Get request = null;\n\n try {\n request = directoryClient.groups().get(groupKey);\n } catch (IOExce...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_17
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testAddMember() throws GeneralSecurityException, IOException {\n Member member = new Member();\n member.setRole(\"MEMBER\")\n .setEmail(TEST_USER);\n\n Member currentMember = GoogleAppsSdkUtils.addGroupMember(directoryClient, TEST_GROUP, member);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static Member addGroupMember(Directory directoryClient, String groupKey, Member member) throws IOException {\n LOG.debug(\"addGroupMember() - add {} to {}\", member, groupKey);\n\n Directory.Members.Insert request = null;\n\n try {\n request = directoryClient.members(...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_2
{ "fields": [ { "declarator": "groupName = \"qsuob:testStem:test\"", "modifier": "private static final", "original_string": "private static final String groupName = \"qsuob:testStem:test\";", "type": "String", "var_name": "groupName" }, { "declarator": "groupDisplayName...
{ "body": "@Test\n public void testProcessGroupUpdate() throws GeneralSecurityException, IOException {\n final String NEW_TEST = \"newTest\";\n\n createTestGroup(groupDisplayName, groupName);\n\n ChangeLogEntry addEntry = mock(ChangeLogEntry.class);\n when(addEntry.getChangeLogType()).t...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "protected void processGroupUpdate(GoogleAppsChangeLogConsumer consumer, ChangeLogEntry changeLogEntry) {\n\n LOG.debug(\"Google Apps Consumer '{}' - Change log entry '{}' Processing group update.\", consumerName, toString(changeLogEntry));\n\n final String groupName = changeLogEntry.retrieveV...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
21910720_21
{ "fields": [ { "declarator": "TEST_USER", "modifier": "private static", "original_string": "private static String TEST_USER;", "type": "String", "var_name": "TEST_USER" }, { "declarator": "TEST_GROUP", "modifier": "private static", "original_string": "priva...
{ "body": "@Test\n public void testRemoveGroup() throws GeneralSecurityException, IOException {\n GoogleAppsSdkUtils.removeGroup(directoryClient, TEST_GROUP);\n assertTrue(GoogleAppsSdkUtils.retrieveGroup(directoryClient, TEST_GROUP) == null);\n }", "class_method_signature": "GoogleAppsSdkUtilsT...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GoogleAppsChangeLogConsumer.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static void removeGroup(Directory directoryClient, String groupKey) throws IOException {\n LOG.debug(\"removeGroup() - {}\", groupKey);\n\n Directory.Groups.Delete request = null;\n\n try {\n request = directoryClient.groups().delete(groupKey);\n } catch (IOExc...
{ "created": "7/16/2014 5:42:37 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 21910720, "size": null, "stargazer_count": null, "stars": 45, "updates": "2020-01-26T23:11:22+00:00", "url": "https://github.com/Internet2/grouper...
160999_56
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/common/FileKeyStoreLoaderBuilderProviderTest.java", "identifier": "FileKeyStoreLoaderBuilderProviderTest", "interfaces": "", "superclass": "extends ZKTestCase" }
{ "body": "@Test\n public void testGetBuilderForPEMFileType() {\n FileKeyStoreLoader.Builder<?> builder = FileKeyStoreLoaderBuilderProvider.getBuilderForKeyStoreFileType(KeyStoreFileType.PEM);\n assertTrue(builder instanceof PEMFileLoader.Builder);\n }", "class_method_signature": "FileKeyStoreLo...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/common/FileKeyStoreLoaderBuilderProvider.java", "identifier": "FileKeyStoreLoaderBuilderProvider", "interfaces": "", "methods": [ { "class_method_signature": "FileKeyStoreLoaderBuilderProvider.getBuilderForKeyStoreFileType(...
{ "body": "static FileKeyStoreLoader.Builder<? extends FileKeyStoreLoader> getBuilderForKeyStoreFileType(KeyStoreFileType type) {\n switch (Objects.requireNonNull(type)) {\n case JKS:\n return new JKSFileLoader.Builder();\n case PEM:\n return new PEMFileLoader.Builder();\n ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_149
{ "fields": [ { "declarator": "testCounterSet", "modifier": "private", "original_string": "private AvgMinMaxCounterSet testCounterSet;", "type": "AvgMinMaxCounterSet", "var_name": "testCounterSet" } ], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/metric...
{ "body": "@Test\n public void testReset() {\n addDataPoints();\n testCounterSet.reset();\n\n Map<String, Object> values = testCounterSet.values();\n\n assertEquals(10, values.size(), \"There should be 10 values in the set\");\n\n assertEquals(0D, values.get(\"avg_key1_test\"), \...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "counters = new ConcurrentHashMap<>()", "modifier": "private", "original_string": "pri...
{ "body": "public void reset() {\n for (Map.Entry<String, AvgMinMaxCounter> entry : counters.entrySet()) {\n entry.getValue().reset();\n }\n }", "class_method_signature": "AvgMinMaxCounterSet.reset()", "constructor": false, "full_signature": "public void reset()", "identifier": "re...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_17
{ "fields": [ { "declarator": "port = 1234", "modifier": "private", "original_string": "private Integer port = 1234;", "type": "Integer", "var_name": "port" }, { "declarator": "v4addr = \"127.0.0.1\"", "modifier": "private", "original_string": "private Strin...
{ "body": "@Test\n public void tetGetIPV6HostAndPort_EmptyStringArrayIfDoesNotStartWithBracket() {\n String[] ipv6HostAndPort =\n NetUtils.getIPV6HostAndPort(\"2001:0db8:85a3:0000:0000:8a2e:0370:7334]\");\n assertEquals(0, ipv6HostAndPort.length);\n }", "class_method_signature": "NetU...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/common/NetUtils.java", "identifier": "NetUtils", "interfaces": "", "methods": [ { "class_method_signature": "NetUtils.formatInetAddr(InetSocketAddress addr)", "constructor": false, "full_signature": "public stat...
{ "body": "public static String[] getIPV6HostAndPort(String hostPort) {\n if (hostPort.startsWith(\"[\")) {\n int i = hostPort.lastIndexOf(']');\n if (i < 0) {\n throw new IllegalArgumentException(\n hostPort + \" starts with '[' but has no matching ']'\"...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_108
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(WatcherCleanerTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(WatcherCleanerTest.class);", "type": "Logger", "var_name": "LOG" } ], "fi...
{ "body": "@Test\n public void testDeadWatcherMetrics() {\n ServerMetrics.getMetrics().resetAll();\n MyDeadWatcherListener listener = new MyDeadWatcherListener();\n WatcherCleaner cleaner = new WatcherCleaner(listener, 1, 1, 1, 1);\n listener.setDelayMs(20);\n cleaner.start();\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(WatcherCleaner.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(WatcherCleaner.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public void addDeadWatcher(int watcherBit) {\n // Wait if there are too many watchers waiting to be closed,\n // this is will slow down the socket packet processing and\n // the adding watches in the ZK pipeline.\n while (maxInProcessingDeadWatchers > 0 && !stopped && totalDeadW...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_40
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/common/PathUtilsTest.java", "identifier": "PathUtilsTest", "interfaces": "", "superclass": "extends ZKTestCase" }
{ "body": "@Test\n public void testValidatePath_ContainsNullCharacter() {\n assertThrows(IllegalArgumentException.class, () -> {\n PathUtils.validatePath(\"/test\\u0000\");\n });\n }", "class_method_signature": "PathUtilsTest.testValidatePath_ContainsNullCharacter()", "constructor":...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/common/PathUtils.java", "identifier": "PathUtils", "interfaces": "", "methods": [ { "class_method_signature": "PathUtils.validatePath(String path, boolean isSequential)", "constructor": false, "full_signature": ...
{ "body": "public static void validatePath(String path, boolean isSequential) throws IllegalArgumentException {\n validatePath(isSequential ? path + \"1\" : path);\n }", "class_method_signature": "PathUtils.validatePath(String path, boolean isSequential)", "constructor": false, "full_signature": "pu...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_221
{ "fields": [], "file": "zookeeper-jute/src/test/java/org/apache/jute/BinaryInputArchiveTest.java", "identifier": "BinaryInputArchiveTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReadStringForRecordsHavingLengthLessThanMaxAllowedSize()\n throws IOException {\n int maxBufferSize = 2000;\n int extraMaxBufferSize = 1025;\n int recordSize = maxBufferSize + extraMaxBufferSize - 100;\n //Exception is not expected as record size is less than the a...
{ "fields": [ { "declarator": "UNREASONBLE_LENGTH = \"Unreasonable length = \"", "modifier": "public static final", "original_string": "public static final String UNREASONBLE_LENGTH = \"Unreasonable length = \";", "type": "String", "var_name": "UNREASONBLE_LENGTH" }, { ...
{ "body": "public String readString(String tag) throws IOException {\n int len = in.readInt();\n if (len == -1) {\n return null;\n }\n checkLength(len);\n byte[] b = new byte[len];\n in.readFully(b);\n return new String(b, StandardCharsets.UTF_8);\n }", ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_173
{ "fields": [ { "declarator": "testData = new File(System.getProperty(\"test.data.dir\", \"src/test/resources/data\"))", "modifier": "private static final", "original_string": "private static final File testData = new File(System.getProperty(\"test.data.dir\", \"src/test/resources/data\"));", ...
{ "body": "@Test\n public void shouldTryMultipleAddresses() throws Exception {\n System.setProperty(QuorumPeer.CONFIG_KEY_MULTI_ADDRESS_ENABLED, \"true\");\n TestLearner learner = new TestLearner();\n learner.self = new QuorumPeer();\n learner.self.setTickTime(2000);\n learner.se...
{ "fields": [ { "declarator": "self", "modifier": "", "original_string": "QuorumPeer self;", "type": "QuorumPeer", "var_name": "self" }, { "declarator": "zk", "modifier": "", "original_string": "LearnerZooKeeperServer zk;", "type": "LearnerZooKeeperSer...
{ "body": "protected void connectToLeader(MultipleAddresses multiAddr, String hostname) throws IOException {\n\n this.leaderAddr = multiAddr;\n Set<InetSocketAddress> addresses;\n if (self.isMultiAddressReachabilityCheckEnabled()) {\n // even if none of the addresses are reachable, we ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_83
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/util/ConfigUtilsTest.java", "identifier": "ConfigUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetHostAndPortWithoutPortAfterColon() {\n assertThrows(ConfigException.class, () -> {\n String[] nsa = ConfigUtils.getHostAndPort(\"[2001:db8:1::242:ac11:2]:\");\n });\n }", "class_method_signature": "ConfigUtilsTest.testGetHostAndPortWithoutPortAfte...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/server/util/ConfigUtils.java", "identifier": "ConfigUtils", "interfaces": "", "methods": [ { "class_method_signature": "ConfigUtils.getClientConfigStr(String configData)", "constructor": false, "full_signature":...
{ "body": "public static String[] getHostAndPort(String s) throws ConfigException {\n if (s.startsWith(\"[\")) {\n int i = s.indexOf(\"]\");\n if (i < 0) {\n throw new ConfigException(s + \" starts with '[' but has no matching ']:'\");\n }\n if (i + 2 ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_124
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZooKeeperServerMainTest.class)", "modifier": "protected static final", "original_string": "protected static final Logger LOG = LoggerFactory.getLogger(ZooKeeperServerMainTest.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Test\n public void testFaultyMetricsProviderOnStop() throws Exception {\n ClientBase.setupTestEnv();\n\n final int CLIENT_PORT = PortAssignment.unique();\n MetricsProviderWithErrorInStop.stopCalled.set(false);\n final String configs = \"metricsProvider.className=\" + Metrics...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZooKeeperServerMain.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperServerMain.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "protected void shutdown() {\n if (containerManager != null) {\n containerManager.stop();\n }\n if (cnxnFactory != null) {\n cnxnFactory.shutdown();\n }\n if (secureCnxnFactory != null) {\n secureCnxnFactory.shutdown();\n }\n ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_95
{ "fields": [ { "declarator": "testACLs = new ArrayList<ACL>()", "modifier": "private", "original_string": "private List<ACL> testACLs = new ArrayList<ACL>();", "type": "List<ACL>", "var_name": "testACLs" }, { "declarator": "responseRecord = new Record[1]", "modif...
{ "body": "@Test\n public void testACLDigestHashHiding_NoAuth_NoWorld() {\n // Arrange\n testACLs.remove(2);\n\n // Act\n Request r = new Request(cnxn, 0, 0, ZooDefs.OpCode.getACL, bb, new ArrayList<Id>());\n processor.processRequest(r);\n\n // Assert\n assertThat(K...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FinalRequestProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(FinalRequestProcessor.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public void processRequest(Request request) {\n LOG.debug(\"Processing request:: {}\", request);\n\n if (LOG.isTraceEnabled()) {\n long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK;\n if (request.type == OpCode.ping) {\n traceMask = ZooTrace.SERVER_PING_...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_132
{ "fields": [ { "declarator": "testData = new File(System.getProperty(\"test.data.dir\", \"src/test/resources/data\"))", "modifier": "private static final", "original_string": "private static final File testData = new File(System.getProperty(\"test.data.dir\", \"src/test/resources/data\"));", ...
{ "body": "@Test\n public void testDumpMode() throws Exception {\n // Arrange\n File logfile = new File(new File(mySnapDir, \"version-2\"), \"log.274\");\n TxnLogToolkit lt = new TxnLogToolkit(false, false, logfile.toString(), true);\n\n // Act\n lt.dump(null);\n\n // Asse...
{ "fields": [ { "declarator": "txnLogFile", "modifier": "private", "original_string": "private File txnLogFile;", "type": "File", "var_name": "txnLogFile" }, { "declarator": "recoveryMode = false", "modifier": "private", "original_string": "private boolean r...
{ "body": "public void dump(Scanner scanner) throws Exception {\n crcFixed = 0;\n\n FileHeader fhdr = new FileHeader();\n fhdr.deserialize(logStream, \"fileheader\");\n if (fhdr.getMagic() != TXNLOG_MAGIC) {\n throw new TxnLogToolkitException(\n ExitCode.INVALID_I...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_165
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumBeanTest.java", "identifier": "QuorumBeanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetNameProperty() {\n QuorumPeer qpMock = mock(QuorumPeer.class);\n when(qpMock.getId()).thenReturn(1L);\n QuorumBean qb = new QuorumBean(qpMock);\n\n assertThat(\"getName property should return Bean name in the right format\", qb.getName(), equalTo(\"...
{ "fields": [ { "declarator": "peer", "modifier": "private final", "original_string": "private final QuorumPeer peer;", "type": "QuorumPeer", "var_name": "peer" }, { "declarator": "name", "modifier": "private final", "original_string": "private final String ...
{ "body": "@Override\n public String getName() {\n return name;\n }", "class_method_signature": "QuorumBean.getName()", "constructor": false, "full_signature": "@Override public String getName()", "identifier": "getName", "invocations": [], "modifiers": "@Override public", "parameters": "()...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_112
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PrepRequestProcessorTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(PrepRequestProcessorTest.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Test\n public void testPRequest() throws Exception {\n pLatch = new CountDownLatch(1);\n processor = new PrepRequestProcessor(zks, new MyRequestProcessor());\n Request foo = new Request(null, 1L, 1, OpCode.create, ByteBuffer.allocate(3), null);\n processor.pRequest(foo);\n\n...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PrepRequestProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(PrepRequestProcessor.class);", "type": "Logger", "var_name": "LOG" }, {...
{ "body": "protected void pRequest(Request request) throws RequestProcessorException {\n // LOG.info(\"Prep>>> cxid = \" + request.cxid + \" type = \" +\n // request.type + \" id = 0x\" + Long.toHexString(request.sessionId));\n request.setHdr(null);\n request.setTxn(null);\n\n if (!...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_145
{ "fields": [ { "declarator": "testCounterSet", "modifier": "private", "original_string": "private AvgMinMaxPercentileCounterSet testCounterSet;", "type": "AvgMinMaxPercentileCounterSet", "var_name": "testCounterSet" } ], "file": "zookeeper-server/src/test/java/org/apache/zoo...
{ "body": "@Test\n public void testReset() {\n addDataPoints();\n testCounterSet.reset();\n\n Map<String, Object> values = testCounterSet.values();\n\n assertEquals(0D, values.get(\"avg_key1_test\"), \"avg_key1_test should =0\");\n assertEquals(0L, values.get(\"min_key1_test\"), ...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "counters = new ConcurrentHashMap<>()", "modifier": "private", "original_string": "pri...
{ "body": "public void reset() {\n for (Map.Entry<String, AvgMinMaxPercentileCounter> entry : counters.entrySet()) {\n entry.getValue().reset();\n }\n }", "class_method_signature": "AvgMinMaxPercentileCounterSet.reset()", "constructor": false, "full_signature": "public void reset()",...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_2
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/util/TestCircularBlockingQueue.java", "identifier": "TestCircularBlockingQueue", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCircularBlockingQueue() throws InterruptedException {\n final CircularBlockingQueue<Integer> testQueue =\n new CircularBlockingQueue<>(2);\n\n testQueue.offer(1);\n testQueue.offer(2);\n testQueue.offer(3);\n\n assertEquals(2, testQueue.size());\n\n assertE...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(CircularBlockingQueue.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(CircularBlockingQueue.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public CircularBlockingQueue(int queueSize) {\n this.queue = new ArrayDeque<>(queueSize);\n this.maxSize = queueSize;\n\n this.lock = new ReentrantLock();\n this.notEmpty = this.lock.newCondition();\n this.droppedCount = 0L;\n }", "class_method_signature": "CircularBlockingQueue.Circular...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_153
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LearnerHandlerTest.class)", "modifier": "protected static final", "original_string": "protected static final Logger LOG = LoggerFactory.getLogger(LearnerHandlerTest.class);", "type": "Logger", "var_name": "LOG" }, {...
{ "body": "@Test\n public void testTxnLogProposalIteratorClosure() throws Exception {\n long peerZxid;\n\n // CommmitedLog is empty, we will use txnlog up to lastProcessZxid\n db = new MockZKDatabase(null) {\n @Override\n public Iterator<Proposal> getProposalsFromTxnLog(l...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(LearnerHandler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(LearnerHandler.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "boolean syncFollower(long peerLastZxid, LearnerMaster learnerMaster) {\n /*\n * When leader election is completed, the leader will set its\n * lastProcessedZxid to be (epoch < 32). There will be no txn associated\n * with this zxid.\n *\n * The learner will se...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_104
{ "fields": [ { "declarator": "m", "modifier": "private", "original_string": "private Map<Long, Set<String>> m;", "type": "Map<Long, Set<String>>", "var_name": "m" }, { "declarator": "r", "modifier": "private", "original_string": "private WatchesReport r;", ...
{ "body": "@Test\n public void testToMap() {\n assertEquals(m, r.toMap());\n }", "class_method_signature": "WatchesReportTest.testToMap()", "constructor": false, "full_signature": "@Test public void testToMap()", "identifier": "testToMap", "invocations": [ "assertEquals", "toMap" ], ...
{ "fields": [ { "declarator": "id2paths", "modifier": "private final", "original_string": "private final Map<Long, Set<String>> id2paths;", "type": "Map<Long, Set<String>>", "var_name": "id2paths" } ], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/server/watch/...
{ "body": "public Map<Long, Set<String>> toMap() {\n return deepCopy(id2paths);\n }", "class_method_signature": "WatchesReport.toMap()", "constructor": false, "full_signature": "public Map<Long, Set<String>> toMap()", "identifier": "toMap", "invocations": [ "deepCopy" ], "modifiers": "publ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_190
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/RemotePeerBeanTest.java", "identifier": "RemotePeerBeanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetClientAddressShouldReturnEmptyStringWhenClientAddressIsNull() {\n InetSocketAddress peerCommunicationAddress = null;\n // Here peerCommunicationAddress is null, also clientAddr is null\n QuorumServer peer = new QuorumServer(1, peerCommunicationAddress);\n ...
{ "fields": [ { "declarator": "peer", "modifier": "private", "original_string": "private QuorumPeer.QuorumServer peer;", "type": "QuorumPeer.QuorumServer", "var_name": "peer" }, { "declarator": "localPeer", "modifier": "private final", "original_string": "pr...
{ "body": "public String getClientAddress() {\n if (null == peer.clientAddr) {\n return \"\";\n }\n return peer.clientAddr.getHostString() + \":\" + peer.clientAddr.getPort();\n }", "class_method_signature": "RemotePeerBean.getClientAddress()", "constructor": false, "full_sign...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_37
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/common/PathUtilsTest.java", "identifier": "PathUtilsTest", "interfaces": "", "superclass": "extends ZKTestCase" }
{ "body": "@Test\n public void testValidatePath_EmptyString() {\n assertThrows(IllegalArgumentException.class, () -> {\n PathUtils.validatePath(\"\");\n });\n }", "class_method_signature": "PathUtilsTest.testValidatePath_EmptyString()", "constructor": false, "full_signature": "@Te...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/common/PathUtils.java", "identifier": "PathUtils", "interfaces": "", "methods": [ { "class_method_signature": "PathUtils.validatePath(String path, boolean isSequential)", "constructor": false, "full_signature": ...
{ "body": "public static void validatePath(String path, boolean isSequential) throws IllegalArgumentException {\n validatePath(isSequential ? path + \"1\" : path);\n }", "class_method_signature": "PathUtils.validatePath(String path, boolean isSequential)", "constructor": false, "full_signature": "pu...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_201
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RequestThrottlerTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RequestThrottlerTest.class);", "type": "Logger", "var_name": "LOG" }, {...
{ "body": "@Test\n public void testLargeRequestThrottling() throws Exception {\n ServerMetrics.getMetrics().resetAll();\n\n AsyncCallback.StringCallback createCallback = (rc, path, ctx, name) -> {\n if (KeeperException.Code.get(rc) == KeeperException.Code.CONNECTIONLOSS) {\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RequestThrottler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RequestThrottler.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public static void setMaxRequests(int requests) {\n maxRequests = requests;\n }", "class_method_signature": "RequestThrottler.setMaxRequests(int requests)", "constructor": false, "full_signature": "public static void setMaxRequests(int requests)", "identifier": "setMaxRequests", "invoca...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_128
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZooKeeperServerMainTest.class)", "modifier": "protected static final", "original_string": "protected static final Logger LOG = LoggerFactory.getLogger(ZooKeeperServerMainTest.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Test\n public void testMinMaxSessionTimeOut() throws Exception {\n ClientBase.setupTestEnv();\n\n final int CLIENT_PORT = PortAssignment.unique();\n final int tickTime = 2000;\n final int minSessionTimeout = tickTime * 2 - 100;\n final int maxSessionTimeout = 20 * tic...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZooKeeperServerMain.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperServerMain.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "protected void shutdown() {\n if (containerManager != null) {\n containerManager.stop();\n }\n if (cnxnFactory != null) {\n cnxnFactory.shutdown();\n }\n if (secureCnxnFactory != null) {\n secureCnxnFactory.shutdown();\n }\n ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_60
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/MultiResponseTest.java", "identifier": "MultiResponseTest", "interfaces": "", "superclass": "extends ZKTestCase" }
{ "body": "@Test\n public void testEmptyRoundTrip() throws IOException {\n MultiResponse result = new MultiResponse();\n MultiResponse decodedResult = codeDecode(result);\n\n assertEquals(result, decodedResult);\n assertEquals(result.hashCode(), decodedResult.hashCode());\n }", "cl...
{ "fields": [ { "declarator": "results = new ArrayList<OpResult>()", "modifier": "private", "original_string": "private List<OpResult> results = new ArrayList<OpResult>();", "type": "List<OpResult>", "var_name": "results" } ], "file": "zookeeper-server/src/main/java/org/apach...
{ "body": "@Override\n public int hashCode() {\n int hash = results.size();\n for (OpResult result : results) {\n hash = (hash * 35) + result.hashCode();\n }\n return hash;\n }", "class_method_signature": "MultiResponse.hashCode()", "constructor": false, "full_signat...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_217
{ "fields": [], "file": "zookeeper-jute/src/test/java/org/apache/jute/BinaryInputArchiveTest.java", "identifier": "BinaryInputArchiveTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFloat() {\n final float expected = 3.14159f;\n final String tag = \"tag1\";\n final float delta = 1e-10f;\n checkWriterAndReader(\n (oa) -> oa.writeFloat(expected, tag),\n (ia) -> {\n float actual = ia.r...
{ "fields": [ { "declarator": "UNREASONBLE_LENGTH = \"Unreasonable length = \"", "modifier": "public static final", "original_string": "public static final String UNREASONBLE_LENGTH = \"Unreasonable length = \";", "type": "String", "var_name": "UNREASONBLE_LENGTH" }, { ...
{ "body": "public float readFloat(String tag) throws IOException {\n return in.readFloat();\n }", "class_method_signature": "BinaryInputArchive.readFloat(String tag)", "constructor": false, "full_signature": "public float readFloat(String tag)", "identifier": "readFloat", "invocations": [ "rea...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_99
{ "fields": [ { "declarator": "testACLs = new ArrayList<ACL>()", "modifier": "private", "original_string": "private List<ACL> testACLs = new ArrayList<ACL>();", "type": "List<ACL>", "var_name": "testACLs" }, { "declarator": "responseRecord = new Record[1]", "modif...
{ "body": "@Test\n public void testACLDigestHashHiding_OnlyAdmin() {\n // Arrange\n testACLs.clear();\n testACLs.addAll(Arrays.asList(new ACL(ZooDefs.Perms.READ, new Id(\"digest\", \"user:secrethash\")), new ACL(ZooDefs.Perms.ADMIN, new Id(\"digest\", \"adminuser:adminsecret\"))));\n Li...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FinalRequestProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(FinalRequestProcessor.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public void processRequest(Request request) {\n LOG.debug(\"Processing request:: {}\", request);\n\n if (LOG.isTraceEnabled()) {\n long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK;\n if (request.type == OpCode.ping) {\n traceMask = ZooTrace.SERVER_PING_...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_76
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/util/AuthUtilTest.java", "identifier": "AuthUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetUserFromAllAuthenticationScheme() {\n String user = \"zkUser\";\n Id id = new Id(\"digest\", user + \":password\");\n String result = AuthUtil.getUser(id);\n assertEquals(user, result);\n\n String principal = \"zkCli/hadoop.hadoop.com\";\n ...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/server/util/AuthUtil.java", "identifier": "AuthUtil", "interfaces": "", "methods": [ { "class_method_signature": "AuthUtil.AuthUtil()", "constructor": true, "full_signature": "private AuthUtil()", "identi...
{ "body": "public static String getUser(Id id) {\n AuthenticationProvider provider = ProviderRegistry.getProvider(id.getScheme());\n return provider == null ? null : provider.getUserName(id.getId());\n }", "class_method_signature": "AuthUtil.getUser(Id id)", "constructor": false, "full_signatur...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_186
{ "fields": [ { "declarator": "PORTS_AMOUNT = 10", "modifier": "public static final", "original_string": "public static final int PORTS_AMOUNT = 10;", "type": "int", "var_name": "PORTS_AMOUNT" } ], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/Mul...
{ "body": "@Test\n public void testGetAllReachableAddressesOrAllWhenSomeReachable() throws Exception {\n InetSocketAddress reachableHost1 = new InetSocketAddress(\"127.0.0.1\", 1234);\n InetSocketAddress reachableHost2 = new InetSocketAddress(\"127.0.0.1\", 2345);\n InetSocketAddress unreachab...
{ "fields": [ { "declarator": "DEFAULT_TIMEOUT = Duration.ofMillis(1000)", "modifier": "public static final", "original_string": "public static final Duration DEFAULT_TIMEOUT = Duration.ofMillis(1000);", "type": "Duration", "var_name": "DEFAULT_TIMEOUT" }, { "declarator...
{ "body": "public Set<InetSocketAddress> getAllReachableAddressesOrAll() {\n // if there is only a single address provided then we don't need to do any reachability check\n if (addresses.size() == 1) {\n return getAllAddresses();\n }\n\n Set<InetSocketAddress> allReachable = get...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_169
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumBeanTest.java", "identifier": "QuorumBeanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPortUnificationProperty() {\n QuorumPeer qpMock = mock(QuorumPeer.class);\n QuorumBean qb = new QuorumBean(qpMock);\n\n when(qpMock.shouldUsePortUnification()).thenReturn(true);\n assertThat(\"isPortUnification property should return value of peer.shou...
{ "fields": [ { "declarator": "peer", "modifier": "private final", "original_string": "private final QuorumPeer peer;", "type": "QuorumPeer", "var_name": "peer" }, { "declarator": "name", "modifier": "private final", "original_string": "private final String ...
{ "body": "@Override\n public boolean isPortUnification() {\n return peer.shouldUsePortUnification();\n }", "class_method_signature": "QuorumBean.isPortUnification()", "constructor": false, "full_signature": "@Override public boolean isPortUnification()", "identifier": "isPortUnification", "inv...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_21
{ "fields": [ { "declarator": "keyPair", "modifier": "private static", "original_string": "private static KeyPair keyPair;", "type": "KeyPair", "var_name": "keyPair" }, { "declarator": "mockX509ExtendedTrustManager", "modifier": "private", "original_string":...
{ "body": "@Test\n public void testServerHostnameVerificationWithHostnameVerificationDisabled() throws Exception {\n ZKTrustManager zkTrustManager = new ZKTrustManager(mockX509ExtendedTrustManager, false, false);\n\n X509Certificate[] certificateChain = createSelfSignedCertifcateChain(IP_ADDRESS, HOS...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZKTrustManager.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZKTrustManager.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Override\n public void checkServerTrusted(\n X509Certificate[] chain,\n String authType,\n Socket socket) throws CertificateException {\n x509ExtendedTrustManager.checkServerTrusted(chain, authType, socket);\n if (serverHostnameVerificationEnabled) {\n perf...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_187
{ "fields": [ { "declarator": "PORTS_AMOUNT = 10", "modifier": "public static final", "original_string": "public static final int PORTS_AMOUNT = 10;", "type": "int", "var_name": "PORTS_AMOUNT" } ], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/Mul...
{ "body": "@Test\n public void testGetAllReachableAddressesOrAllWhenNoneReachable() throws Exception {\n InetSocketAddress unreachableHost1 = new InetSocketAddress(\"unreachable1.address.zookeeper.apache.com\", 1234);\n InetSocketAddress unreachableHost2 = new InetSocketAddress(\"unreachable2.address...
{ "fields": [ { "declarator": "DEFAULT_TIMEOUT = Duration.ofMillis(1000)", "modifier": "public static final", "original_string": "public static final Duration DEFAULT_TIMEOUT = Duration.ofMillis(1000);", "type": "Duration", "var_name": "DEFAULT_TIMEOUT" }, { "declarator...
{ "body": "public Set<InetSocketAddress> getAllReachableAddressesOrAll() {\n // if there is only a single address provided then we don't need to do any reachability check\n if (addresses.size() == 1) {\n return getAllAddresses();\n }\n\n Set<InetSocketAddress> allReachable = get...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_168
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/QuorumBeanTest.java", "identifier": "QuorumBeanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSslQuorumProperty() {\n QuorumPeer qpMock = mock(QuorumPeer.class);\n QuorumBean qb = new QuorumBean(qpMock);\n\n when(qpMock.isSslQuorum()).thenReturn(true);\n assertThat(\"isSslQuorum property should return value of peer.isSslQuorum()\", qb.isSslQuor...
{ "fields": [ { "declarator": "peer", "modifier": "private final", "original_string": "private final QuorumPeer peer;", "type": "QuorumPeer", "var_name": "peer" }, { "declarator": "name", "modifier": "private final", "original_string": "private final String ...
{ "body": "@Override\n public boolean isSslQuorum() {\n return peer.isSslQuorum();\n }", "class_method_signature": "QuorumBean.isSslQuorum()", "constructor": false, "full_signature": "@Override public boolean isSslQuorum()", "identifier": "isSslQuorum", "invocations": [ "isSslQuorum" ], ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_20
{ "fields": [ { "declarator": "impl", "modifier": "private", "original_string": "private ZKHostnameVerifier impl;", "type": "ZKHostnameVerifier", "var_name": "impl" } ], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/common/ZKHostnameVerifierTest.java", "ident...
{ "body": "@Test\n public void testVerify() throws Exception {\n final CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n InputStream in;\n X509Certificate x509;\n in = new ByteArrayInputStream(CertificatesToPlayWith.X509_FOO);\n x509 = (X509Certificate) cf.gene...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ZKHostnameVerifier.class)", "modifier": "private final", "original_string": "private final Logger log = LoggerFactory.getLogger(ZKHostnameVerifier.class);", "type": "Logger", "var_name": "log" } ], "file": "zookeepe...
{ "body": "@Override\n public boolean verify(final String host, final SSLSession session) {\n try {\n final Certificate[] certs = session.getPeerCertificates();\n final X509Certificate x509 = (X509Certificate) certs[0];\n verify(host, x509);\n return true;\n ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_98
{ "fields": [ { "declarator": "testACLs = new ArrayList<ACL>()", "modifier": "private", "original_string": "private List<ACL> testACLs = new ArrayList<ACL>();", "type": "List<ACL>", "var_name": "testACLs" }, { "declarator": "responseRecord = new Record[1]", "modif...
{ "body": "@Test\n public void testACLDigestHashHiding_AdminUser() {\n // Arrange\n List<Id> authInfo = new ArrayList<Id>();\n authInfo.add(new Id(\"digest\", \"adminuser:adminsecret\"));\n\n // Act\n Request r = new Request(cnxn, 0, 0, ZooDefs.OpCode.getACL, bb, authInfo);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FinalRequestProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(FinalRequestProcessor.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public void processRequest(Request request) {\n LOG.debug(\"Processing request:: {}\", request);\n\n if (LOG.isTraceEnabled()) {\n long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK;\n if (request.type == OpCode.ping) {\n traceMask = ZooTrace.SERVER_PING_...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_77
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/util/AuthUtilTest.java", "identifier": "AuthUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetUserShouldReturnNullIfAuthenticationNotConfigured() {\n Id id = new Id(\"invalid Authentication Scheme\", \"user\");\n String result = AuthUtil.getUser(id);\n assertNull(result);\n }", "class_method_signature": "AuthUtilTest.testGetUserShouldReturnNul...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/server/util/AuthUtil.java", "identifier": "AuthUtil", "interfaces": "", "methods": [ { "class_method_signature": "AuthUtil.AuthUtil()", "constructor": true, "full_signature": "private AuthUtil()", "identi...
{ "body": "public static String getUser(Id id) {\n AuthenticationProvider provider = ProviderRegistry.getProvider(id.getScheme());\n return provider == null ? null : provider.getUserName(id.getId());\n }", "class_method_signature": "AuthUtil.getUser(Id id)", "constructor": false, "full_signatur...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_216
{ "fields": [], "file": "zookeeper-jute/src/test/java/org/apache/jute/BinaryInputArchiveTest.java", "identifier": "BinaryInputArchiveTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testString() {\n final String expected = \"hello\";\n final String tag = \"tag1\";\n checkWriterAndReader(\n (oa) -> oa.writeString(expected, tag),\n (ia) -> {\n String actual = ia.readString(tag);\n ...
{ "fields": [ { "declarator": "UNREASONBLE_LENGTH = \"Unreasonable length = \"", "modifier": "public static final", "original_string": "public static final String UNREASONBLE_LENGTH = \"Unreasonable length = \";", "type": "String", "var_name": "UNREASONBLE_LENGTH" }, { ...
{ "body": "public String readString(String tag) throws IOException {\n int len = in.readInt();\n if (len == -1) {\n return null;\n }\n checkLength(len);\n byte[] b = new byte[len];\n in.readFully(b);\n return new String(b, StandardCharsets.UTF_8);\n }", ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_129
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZooKeeperServerMainTest.class)", "modifier": "protected static final", "original_string": "protected static final Logger LOG = LoggerFactory.getLogger(ZooKeeperServerMainTest.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Test\n public void testJMXRegistrationWithNIO() throws Exception {\n ClientBase.setupTestEnv();\n File tmpDir_1 = ClientBase.createTmpDir();\n ServerCnxnFactory server_1 = startServer(tmpDir_1);\n File tmpDir_2 = ClientBase.createTmpDir();\n ServerCnxnFactory server_2...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZooKeeperServerMain.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperServerMain.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "protected void shutdown() {\n if (containerManager != null) {\n containerManager.stop();\n }\n if (cnxnFactory != null) {\n cnxnFactory.shutdown();\n }\n if (secureCnxnFactory != null) {\n secureCnxnFactory.shutdown();\n }\n ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_61
{ "fields": [ { "declarator": "LINE_SEPARATOR = System.getProperty(\"line.separator\", \"\\n\")", "modifier": "private static final", "original_string": "private static final String LINE_SEPARATOR = System.getProperty(\"line.separator\", \"\\n\");", "type": "String", "var_name": "LIN...
{ "body": "@Test\n public void testDelete() throws Exception {\n final ZooKeeper zk = createClient();\n ZooKeeperMain zkMain = new ZooKeeperMain(zk);\n String cmdstring1 = \"create -e /node2 data\";\n String cmdstring2 = \"delete /node2\";\n String cmdstring3 = \"ls /node2\";\n ...
{ "fields": [ { "declarator": "ZOOKEEPER_CLIENT_CNXN_SOCKET = \"zookeeper.clientCnxnSocket\"", "modifier": "@Deprecated\n public static final", "original_string": "@Deprecated\n public static final String ZOOKEEPER_CLIENT_CNXN_SOCKET = \"zookeeper.clientCnxnSocket\";", "type": "Strin...
{ "body": "public void delete(final String path, int version) throws InterruptedException, KeeperException {\n final String clientPath = path;\n PathUtils.validatePath(clientPath);\n\n final String serverPath;\n\n // maintain semantics even in chroot case\n // specifically - root ca...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_200
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RequestThrottlerTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RequestThrottlerTest.class);", "type": "Logger", "var_name": "LOG" }, {...
{ "body": "@Test\n public void testRequestThrottler() throws Exception {\n ServerMetrics.getMetrics().resetAll();\n\n // we only allow two requests in the pipeline\n RequestThrottler.setMaxRequests(2);\n\n RequestThrottler.setStallTime(STALL_TIME);\n RequestThrottler.setDropStale...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RequestThrottler.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RequestThrottler.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public RequestThrottler(ZooKeeperServer zks) {\n super(\"RequestThrottler\", zks.getZooKeeperServerListener());\n this.zks = zks;\n this.stopping = false;\n this.killed = false;\n }", "class_method_signature": "RequestThrottler.RequestThrottler(ZooKeeperServer zks)", "con...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_191
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/RemotePeerBeanTest.java", "identifier": "RemotePeerBeanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n public void testIsLeader() {\n long peerId = 7;\n QuorumPeer.QuorumServer quorumServerMock = mock(QuorumPeer.QuorumServer.class);\n when(quorumServerMock.getId()).thenReturn(peerId);\n QuorumPeer peerMock = mock(QuorumPeer.class);...
{ "fields": [ { "declarator": "peer", "modifier": "private", "original_string": "private QuorumPeer.QuorumServer peer;", "type": "QuorumPeer.QuorumServer", "var_name": "peer" }, { "declarator": "localPeer", "modifier": "private final", "original_string": "pr...
{ "body": "@Override\n public boolean isLeader() {\n return localPeer.isLeader(peer.getId());\n }", "class_method_signature": "RemotePeerBean.isLeader()", "constructor": false, "full_signature": "@Override public boolean isLeader()", "identifier": "isLeader", "invocations": [ "isLeader", ...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_36
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/common/PathUtilsTest.java", "identifier": "PathUtilsTest", "interfaces": "", "superclass": "extends ZKTestCase" }
{ "body": "@Test\n public void testValidatePath_Null() {\n assertThrows(IllegalArgumentException.class, () -> {\n PathUtils.validatePath(null);\n });\n }", "class_method_signature": "PathUtilsTest.testValidatePath_Null()", "constructor": false, "full_signature": "@Test public void...
{ "fields": [], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/common/PathUtils.java", "identifier": "PathUtils", "interfaces": "", "methods": [ { "class_method_signature": "PathUtils.validatePath(String path, boolean isSequential)", "constructor": false, "full_signature": ...
{ "body": "public static void validatePath(String path, boolean isSequential) throws IllegalArgumentException {\n validatePath(isSequential ? path + \"1\" : path);\n }", "class_method_signature": "PathUtils.validatePath(String path, boolean isSequential)", "constructor": false, "full_signature": "pu...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_105
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(WatcherCleanerTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(WatcherCleanerTest.class);", "type": "Logger", "var_name": "LOG" } ], "fi...
{ "body": "@Test\n public void testProcessDeadWatchersBasedOnThreshold() {\n MyDeadWatcherListener listener = new MyDeadWatcherListener();\n int threshold = 3;\n WatcherCleaner cleaner = new WatcherCleaner(listener, threshold, 60, 1, 10);\n cleaner.start();\n\n int i = 0;\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(WatcherCleaner.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(WatcherCleaner.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "public void addDeadWatcher(int watcherBit) {\n // Wait if there are too many watchers waiting to be closed,\n // this is will slow down the socket packet processing and\n // the adding watches in the ZK pipeline.\n while (maxInProcessingDeadWatchers > 0 && !stopped && totalDeadW...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_152
{ "fields": [ { "declarator": "providerMock", "modifier": "private", "original_string": "private ServerStats.Provider providerMock;", "type": "ServerStats.Provider", "var_name": "providerMock" } ], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/ServerStat...
{ "body": "@Test\n public void testReset() {\n // Given ...\n ServerStats serverStats = new ServerStats(providerMock);\n\n assertAllPacketsZero(serverStats);\n assertAllLatencyZero(serverStats);\n\n // When ...\n Request fakeRequest = new Request(0, 0, 0, null, null, 0);\n...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ServerStats.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ServerStats.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public void reset() {\n resetLatency();\n resetRequestCounters();\n clientResponseStats.reset();\n ServerMetrics.getMetrics().resetAll();\n }", "class_method_signature": "ServerStats.reset()", "constructor": false, "full_signature": "public void reset()", "identifier"...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_3
{ "fields": [ { "declarator": "testData = new File(System.getProperty(\"test.data.dir\", \"build/test/data\"))", "modifier": "private static final", "original_string": "private static final File testData = new File(System.getProperty(\"test.data.dir\", \"build/test/data\"));", "type": "Fil...
{ "body": "@Test\n public void testValidateFileInput() throws IOException {\n File file = File.createTempFile(\"test\", \".junit\", testData);\n file.deleteOnExit();\n String absolutePath = file.getAbsolutePath();\n String error = ZKUtil.validateFileInput(absolutePath);\n assertN...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZKUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZKUtil.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "permCa...
{ "body": "public static String validateFileInput(String filePath) {\n File file = new File(filePath);\n if (!file.exists()) {\n return \"File '\" + file.getAbsolutePath() + \"' does not exist.\";\n }\n if (!file.canRead()) {\n return \"Read permission is denied on th...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_144
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/DataNodeTest.java", "identifier": "DataNodeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetChildrenReturnsImmutableEmptySet() {\n DataNode dataNode = new DataNode();\n Set<String> children = dataNode.getChildren();\n try {\n children.add(\"new child\");\n fail(\"UnsupportedOperationException is expected\");\n } catch...
{ "fields": [ { "declarator": "digest", "modifier": "private volatile", "original_string": "private volatile long digest;", "type": "long", "var_name": "digest" }, { "declarator": "digestCached", "modifier": "volatile", "original_string": "volatile boolean d...
{ "body": "public synchronized Set<String> getChildren() {\n if (children == null) {\n return EMPTY_SET;\n }\n\n return Collections.unmodifiableSet(children);\n }", "class_method_signature": "DataNode.getChildren()", "constructor": false, "full_signature": "public synchronized...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_113
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PrepRequestProcessorTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(PrepRequestProcessorTest.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Test\n public void testReconfigWithAnotherOutstandingChange() throws Exception {\n QuorumPeerConfig.setReconfigEnabled(true);\n QuorumPeerConfig.setStandaloneEnabled(false);\n\n QuorumPeer qp = new QuorumPeer();\n QuorumVerifier quorumVerifierMock = mock(QuorumVerifier.class...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PrepRequestProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(PrepRequestProcessor.class);", "type": "Logger", "var_name": "LOG" }, {...
{ "body": "protected void pRequest(Request request) throws RequestProcessorException {\n // LOG.info(\"Prep>>> cxid = \" + request.cxid + \" type = \" +\n // request.type + \" id = 0x\" + Long.toHexString(request.sessionId));\n request.setHdr(null);\n request.setTxn(null);\n\n if (!...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_164
{ "fields": [], "file": "zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/LocalPeerBeanTest.java", "identifier": "LocalPeerBeanTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLocalPeerIsNotLeader() throws Exception {\n long localPeerId = 7;\n QuorumPeer peer = mock(QuorumPeer.class);\n when(peer.getId()).thenReturn(localPeerId);\n when(peer.isLeader(eq(localPeerId))).thenReturn(false);\n LocalPeerBean localPeerBean =...
{ "fields": [ { "declarator": "peer", "modifier": "private final", "original_string": "private final QuorumPeer peer;", "type": "QuorumPeer", "var_name": "peer" } ], "file": "zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LocalPeerBean.java", "identifier"...
{ "body": "@Override\n public boolean isLeader() {\n return peer.isLeader(peer.getId());\n }", "class_method_signature": "LocalPeerBean.isLeader()", "constructor": false, "full_signature": "@Override public boolean isLeader()", "identifier": "isLeader", "invocations": [ "isLeader", "get...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...
160999_94
{ "fields": [ { "declarator": "testACLs = new ArrayList<ACL>()", "modifier": "private", "original_string": "private List<ACL> testACLs = new ArrayList<ACL>();", "type": "List<ACL>", "var_name": "testACLs" }, { "declarator": "responseRecord = new Record[1]", "modif...
{ "body": "@Test\n public void testACLDigestHashHiding_NoAuth_WorldCanRead() {\n // Arrange\n\n // Act\n Request r = new Request(cnxn, 0, 0, ZooDefs.OpCode.getACL, bb, new ArrayList<Id>());\n processor.processRequest(r);\n\n // Assert\n assertMasked(true);\n }", "clas...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(FinalRequestProcessor.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(FinalRequestProcessor.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public void processRequest(Request request) {\n LOG.debug(\"Processing request:: {}\", request);\n\n if (LOG.isTraceEnabled()) {\n long traceMask = ZooTrace.CLIENT_REQUEST_TRACE_MASK;\n if (request.type == OpCode.ping) {\n traceMask = ZooTrace.SERVER_PING_...
{ "created": "3/27/2009 3:41:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 160999, "size": null, "stargazer_count": null, "stars": 7612, "updates": "2020-01-27T13:06:42+00:00", "url": "https://github.com/apache/zookeeper"...