auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private com.google.gerrit.server.account.WatchConfig open ( com.google.gerrit.reviewdb.client.Account.Id accountId ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { org.eclipse.jgit.lib.Repository git = repoManager.openRepository ( allUsersName ) ; com.google.gerrit.server.account.WatchConfig watchConfig = new com.google.gerrit.server.account.WatchConfig ( accountId ) ; watchConfig.load ( git ) ; return watchConfig ; }

Target:
private com.google.gerrit.server.account.WatchConfig read ( com.google.gerrit.reviewdb.client.Account.Id accountId ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { try ( org.eclipse.jgit.lib.Repository git = repoManager.openRepository ( allUsersName ) ) { com.google.gerrit.server.account.WatchConfig watchConfig = new com.google.gerrit.server.account.WatchConfig ( accountId ) ; watchConfig.load ( git ) ; return watchConfig ; } }
Source:
public void testEventSentFailed ( ) throws java.lang.Exception { com.google.gerrit.server.events.Event event = setUpMocksForEvent ( false , "Error" , false ) ; com.google.common.truth.Truth.assertThat ( restForwarder.send ( event ) ) . isFalse ( ) ; }

Target:
public void testEventSentThrowsException ( ) throws java.lang.Exception { com.google.gerrit.server.events.Event event = setUpMocksForEvent ( com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarderTest.FAILED , com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarderTest.EXCEPTION_MSG , com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarderTest.THROW_EXCEPTION ) ; com.google.common.truth.Truth.assertThat ( restForwarder.send ( event ) ) . isFalse ( ) ; }
Source:
public void ownerProject ( ) { com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.Util.ADMIN , "refs/*" ) ; assertAdminsAreOwnersAndDevsAreNot ( ) ; }

Target:
public void denyOwnerProject ( ) { com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.testing.Util.ADMIN , "refs/*" ) ; com.google.gerrit.server.project.testing.Util.deny ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.testing.Util.DEVS , "refs/*" ) ; assertAdminsAreOwnersAndDevsAreNot ( ) ; }
Source:
protected void preDisplay ( final com.google.gerrit.common.data.ProjectList result ) { createProjectLinkPanel.setVisible ( result.canCreateProject ( ) ) ; projects.display ( result.getProjects ( ) ) ; projects.finishDisplay ( ) ; }

Target:
protected void preDisplay ( final com.google.gerrit.client.projects.ProjectMap result ) { projects.display ( result ) ; projects.finishDisplay ( ) ; }
Source:
public void onResize ( com.google.gwt.event.logical.shared.ResizeEvent event ) { adjustCodeMirrorHeight ( ) ; }

Target:
protected void preDisplay ( java.lang.String content ) { initEditor ( content ) ; }
Source:
protected abstract com.google.gerrit.client.ui.Screen createScreen ( ) ;

Target:
public abstract void go ( ) ;
Source:
protected com.google.gerrit.server.git.PerThreadRequestScope continuingContext ( com.google.gerrit.server.git.PerThreadRequestScope ctx ) { return new com.google.gerrit.server.git.PerThreadRequestScope ( ) ; }

Target:
< T > java.util.concurrent.Callable < T > scope ( java.util.concurrent.Callable < T > callable ) ;
Source:
public void onSuccess ( final com.google.gerrit.client.reviewdb.Account result ) { if ( result != null ) { com.google.gerrit.client.Gerrit.myAccount = result ; com.google.gerrit.client.Gerrit.applyUserPreferences ( ) ; } else { com.google.gwt.user.client.Cookies.removeCookie ( com.google.gerrit.client.Gerrit.ACCOUNT_COOKIE ) ; } onModuleLoad3 ( ) ; }

Target:
public void onSuccess ( final com.google.gerrit.client.HostPageData result ) { com.google.gerrit.client.rpc.Common.setGerritConfig ( result.config ) ; if ( ( result.userAccount ) != null ) { com.google.gerrit.client.Gerrit.myAccount = result.userAccount ; com.google.gerrit.client.Gerrit.applyUserPreferences ( ) ; } onModuleLoad2 ( ) ; }
Source:
private void maybeAddTestHelperOp ( com.google.gerrit.server.update.BatchUpdate bu , com.google.gerrit.reviewdb.client.Change.Id changeId ) { if ( ( args.submitInput ) instanceof com.google.gerrit.server.change.Submit.TestSubmitInput ) { bu.addOp ( changeId , new com.google.gerrit.server.git.strategy.TestHelperOp ( changeId , args ) ) ; } }

Target:
private void maybeAddTestHelperOp ( com.google.gerrit.server.update.BatchUpdate bu , com.google.gerrit.reviewdb.client.Change.Id changeId ) { if ( ( args.submitInput ) instanceof com.google.gerrit.server.change.TestSubmitInput ) { bu.addOp ( changeId , new com.google.gerrit.server.git.strategy.TestHelperOp ( changeId , args ) ) ; } }
Source:
void resizeCodeMirror ( ) { int height = getCodeMirrorHeight ( ) ; cmA.setHeight ( height ) ; cmB.setHeight ( height ) ; diffTable.sidePanel.adjustGutters ( cmB ) ; }

Target:
void resizeCodeMirror ( ) { int height = getCodeMirrorHeight ( ) ; cmA.setHeight ( height ) ; cmB.setHeight ( height ) ; diffTable.overview.refresh ( ) ; }
Source:
public com.google.gerrit.extensions.restapi.BinaryResult setCharacterEncoding ( java.lang.String encoding ) { characterEncoding = encoding ; return this ; }

Target:
public com.google.gerrit.extensions.restapi.BinaryResult setCharacterEncoding ( java.nio.charset.Charset encoding ) { characterEncoding = encoding ; return this ; }
Source:
public synchronized com.google.gerrit.server.git.WorkQueue.Executor getDefaultQueue ( ) { if ( ( defaultQueue ) == null ) { defaultQueue = createQueue ( 1 , "WorkQueue" ) ; } return defaultQueue ; }

Target:
public synchronized com.google.gerrit.server.git.WorkQueue.Executor getDefaultQueue ( ) { if ( ( defaultQueue ) == null ) { defaultQueue = createQueue ( defaultQueueSize , "WorkQueue" ) ; } return defaultQueue ; }
Source:
public void starChange ( java.lang.String id ) throws com.google.gerrit.extensions.restapi.RestApiException { throw new com.google.gerrit.extensions.restapi.NotImplementedException ( ) ; }

Target:
public void deleteWatchedProjects ( java.util.List < java.lang.String > in ) throws com.google.gerrit.extensions.restapi.RestApiException { throw new com.google.gerrit.extensions.restapi.NotImplementedException ( ) ; }
Source:
public void addGroup ( com.google.gerrit.reviewdb.client.AccountGroup.UUID id ) { groupsToInspect.add ( id ) ; }

Target:
public void addGroup ( com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid ) { groupsToInspect.add ( uuid ) ; }
Source:
public void onFailure ( java.lang.Throwable caught ) { }

Target:
void load ( int revisionNumber ) { if ( ( revisionNumber > 0 ) && ( loaded.add ( revisionNumber ) ) ) { toLoad.add ( revisionNumber ) ; start ( ) ; } }
Source:
private static org.apache.lucene.index.Term idTerm ( com.google.gerrit.server.project.ProjectState projectState ) { return com.google.gerrit.lucene.LuceneProjectIndex.idTerm ( projectState.getProject ( ) . getNameKey ( ) ) ; }

Target:
private static org.apache.lucene.index.Term idTerm ( com.google.gerrit.server.project.ProjectData projectState ) { return com.google.gerrit.lucene.LuceneProjectIndex.idTerm ( projectState.getProject ( ) . getNameKey ( ) ) ; }
Source:
public void index ( com.google.gerrit.reviewdb.client.Change change ) throws java.io.IOException { index ( new com.google.gerrit.server.query.change.ChangeData ( change ) ) ; }

Target:
public com.google.common.util.concurrent.CheckedFuture < ? , java.io.IOException > indexAsync ( com.google.gerrit.reviewdb.client.Change change ) { return ( executor ) != null ? submit ( new com.google.gerrit.server.index.ChangeIndexer.Task ( change , false ) ) : com.google.common.util.concurrent.Futures.< java.lang.Object , java.io.IOException > immediateCheckedFuture ( null ) ; }
Source:
public static com.google.gerrit.server.query.Predicate < com.google.gerrit.server.account.AccountState > id ( com.google.gerrit.reviewdb.client.Account.Id accountId ) { return new com.google.gerrit.server.query.account.AccountPredicates.AccountPredicate ( com.google.gerrit.server.index.account.AccountField.ID , AccountQueryBuilder.FIELD_ACCOUNT , accountId.toString ( ) ) ; }

Target:
public static com.google.gerrit.index.query.Predicate < com.google.gerrit.server.account.AccountState > id ( com.google.gerrit.reviewdb.client.Account.Id accountId ) { return new com.google.gerrit.server.query.account.AccountPredicates.AccountPredicate ( com.google.gerrit.server.index.account.AccountField.ID , AccountQueryBuilder.FIELD_ACCOUNT , accountId.toString ( ) ) ; }
Source:
public void show ( ) { super . show ( ) ; providerId.selectAll ( ) ; com.google.gwt.user.client.DeferredCommand.addCommand ( new com.google.gwt.user.client.Command ( ) { @ java.lang.Override public void execute ( ) { providerId.setFocus ( true ) ; } } ) ; }

Target:
public void show ( ) { super . show ( ) ; providerId.selectAll ( ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { providerId.setFocus ( true ) ; } } ) ; }
Source:
java.lang.String getPath ( ) { return path ; }

Target:
com.google.gerrit.client.diff.DisplaySide getStartSide ( ) { return startSide ; }
Source:
private java.lang.String getUrl ( ) { final java.lang.String url = gerritConfig.getString ( com.googlesource.gerrit.plugins.hooks.bz.BugzillaItsFacade.ITS_NAME_BUGZILLA , null , com.googlesource.gerrit.plugins.hooks.bz.BugzillaItsFacade.GERRIT_CONFIG_URL ) ; return url ; }

Target:
private java.lang.String getUrl ( ) { final java.lang.String url = gerritConfig.getString ( pluginName , null , com.googlesource.gerrit.plugins.hooks.bz.BugzillaItsFacade.GERRIT_CONFIG_URL ) ; return url ; }
Source:
private static java.io.File resolve ( final java.io.File logs_dir ) { try { return logs_dir.getCanonicalFile ( ) ; } catch ( java.io.IOException e ) { return logs_dir.getAbsoluteFile ( ) ; } }

Target:
private static java.nio.file.Path resolve ( java.nio.file.Path p ) { try { return p.toRealPath ( ) . normalize ( ) ; } catch ( java.io.IOException e ) { return p.toAbsolutePath ( ) . normalize ( ) ; } }
Source:
protected void display ( final com.google.gerrit.reviewdb.client.Account userAccount ) { currentEmail = userAccount.getPreferredEmail ( ) ; nameTxt.setText ( userAccount.getFullName ( ) ) ; save.setEnabled ( false ) ; new com.google.gerrit.client.ui.OnEditEnabler ( save , nameTxt ) ; }

Target:
protected void display ( com.google.gerrit.client.info.AccountInfo account ) { currentEmail = account.email ( ) ; nameTxt.setText ( account.name ( ) ) ; save.setEnabled ( false ) ; new com.google.gerrit.client.ui.OnEditEnabler ( save , nameTxt ) ; }
Source:
BRANCH ( com.google.gerrit.server.config.d0bf01 Allow ) { }

Target:
private com.google.gerrit.extensions.common.UserConfigInfo getUserInfo ( java.lang.String anonymousCowardName ) { com.google.gerrit.extensions.common.UserConfigInfo info = new com.google.gerrit.extensions.common.UserConfigInfo ( ) ; info.anonymousCowardName = anonymousCowardName ; return info ; }
Source:
protected com.google.gerrit.git.RepositoryCache getRepositoryCache ( ) throws com.google.gerrit.server.ssh.AbstractCommand.Failure { final com.google.gerrit.git.RepositoryCache rc = getGerritServer ( ) . getRepositoryCache ( ) ; if ( rc == null ) { throw new com.google.gerrit.server.ssh.AbstractCommand.Failure ( 128 , "fatal: Gerrit repositories are not available" ) ; } return rc ; }

Target:
protected com.google.gerrit.git.RepositoryCache getRepositoryCache ( ) throws com.google.gerrit.server.ssh.AbstractCommand.Failure { final com.google.gerrit.git.RepositoryCache rc = getGerritServer ( ) . getRepositoryCache ( ) ; if ( rc == null ) { throw new com.google.gerrit.server.ssh.AbstractCommand.Failure ( 128 , "fatal: Gerrit repositories are not available" , new java.lang.IllegalStateException ( "git_base_path not set in system_config" ) ) ; } return rc ; }
Source:
protected void configureServlets ( ) { rpc ( com.google.gerrit.httpd.auth.ldap.UserPassAuthServiceImpl.class ) ; }

Target:
protected void configureServlets ( ) { serve ( "/login/*" ) . with ( com.google.gerrit.httpd.auth.ldap.LdapLoginServlet.class ) ; }
Source:
public void onSuccess ( com.google.gwtjsonrpc.client.VoidResult result ) { typeSelect.setEnabled ( true ) ; setType ( newType ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { doExternalSearch ( ) ; }
Source:
protected void configure ( ) { bind ( com.google.gerrit.httpd.GerritUiOptions.class ) . toInstance ( new com.google.gerrit.httpd.GerritUiOptions ( headless ) ) ; if ( test ) { bind ( com.google.gerrit.server.securestore.SecureStore.class ) . toProvider ( com.google.gerrit.pgm.util.SecureStoreProvider.class ) ; } }

Target:
protected void configure ( ) { bind ( com.google.gerrit.httpd.GerritOptions.class ) . toInstance ( new com.google.gerrit.httpd.GerritOptions ( headless ) ) ; if ( test ) { bind ( com.google.gerrit.server.securestore.SecureStore.class ) . toProvider ( com.google.gerrit.pgm.util.SecureStoreProvider.class ) ; } }
Source:
public java.util.Collection < com.googlesrouce.gerrit.plugins.github.git.GitJob > getJobs ( ) { return jobs.values ( ) ; }

Target:
public java.util.Collection < com.googlesource.gerrit.plugins.github.git.GitJob > getJobs ( ) { return jobs.values ( ) ; }
Source:
private void initRevisionsAction ( com.google.gerrit.client.changes.ChangeInfo info , java.lang.String revision ) { revisionsAction = new com.google.gerrit.client.change.RevisionsAction ( info.legacy_id ( ) , revision , style , headerLine , revisions ) ; }

Target:
private void initDownloadAction ( com.google.gerrit.client.changes.ChangeInfo info , java.lang.String revision ) { downloadAction = new com.google.gerrit.client.change.DownloadAction ( info , revision , style , headerLine , download ) ; }
Source:
public com.google.gerrit.common.data.PermissionRange getRange ( java.lang.String permission ) { if ( com.google.gerrit.common.data.Permission.hasRange ( permission ) ) { return toRange ( permission , access ( permission ) ) ; } return null ; }

Target:
public com.google.gerrit.common.data.PermissionRange getRange ( java.lang.String permission , boolean isChangeOwner ) { if ( com.google.gerrit.common.data.Permission.hasRange ( permission ) ) { return toRange ( permission , access ( permission , isChangeOwner ) ) ; } return null ; }
Source:
private java.lang.String encode ( java.lang.String segment ) { return com.google.gwt.http.client.URL.encodeQueryString ( type.replacePathSeparator ( segment ) ) ; }

Target:
private java.lang.String encode ( java.lang.String segment ) { if ( type.isUrlEncode ( ) ) { return com.google.gwt.http.client.URL.encodeQueryString ( type.replacePathSeparator ( segment ) ) ; } else { return segment ; } }
Source:
public java.util.List < com.google.gerrit.server.query.change.ChangeData > byTopic ( java.lang.String topic ) throws com.google.gwtorm.server.OrmException { return query ( com.google.gerrit.server.query.change.InternalChangeQuery.topic ( topic ) ) ; }

Target:
public java.util.List < com.google.gerrit.server.query.change.ChangeData > byTopicOpen ( java.lang.String topic ) throws com.google.gwtorm.server.OrmException { return query ( com.google.gerrit.server.query.Predicate.and ( com.google.gerrit.server.query.change.InternalChangeQuery.topic ( topic ) , com.google.gerrit.server.query.change.ChangeStatusPredicate.open ( ) ) ) ; }
Source:
protected void configure ( ) { bind ( java.io.File.class ) . annotatedWith ( com.google.gerrit.server.config.SitePath.class ) . toProvider ( com.google.gerrit.httpd.SitePathFromSystemConfigProvider.class ) . in ( com.google.inject.Scopes.SINGLETON ) ; }

Target:
protected void configure ( ) { bind ( java.nio.file.Path.class ) . annotatedWith ( com.google.gerrit.server.config.SitePath.class ) . toProvider ( com.google.gerrit.httpd.SitePathFromSystemConfigProvider.class ) . in ( com.google.inject.Scopes.SINGLETON ) ; }
Source:
public static boolean isSignedIn ( ) { return ( com.google.gwt.user.client.Cookies.getCookie ( com.google.gerrit.client.Gerrit.AUTH_COOKIE ) ) != null ; }

Target:
public static boolean isSignedIn ( ) { return ( com.google.gwt.user.client.Cookies.getCookie ( com.google.gerrit.client.Gerrit.ACCOUNT_COOKIE ) ) != null ; }
Source:
public boolean apply ( com.google.gerrit.server.account.ExternalId externalId ) { return ( externalId.isScheme ( AccountExternalId.SCHEME_EXTERNAL ) ) && ( externalId.asAccountExternalId ( ) . getSchemeRest ( ) . startsWith ( OAuthWebFilter.GITHUB_EXT_ID ) ) ; }

Target:
public boolean apply ( com.google.gerrit.server.account.externalids.ExternalId externalId ) { return externalId.key ( ) . get ( ) . startsWith ( IdentifiedUserGitHubLoginProvider.EXTERNAL_ID_PREFIX ) ; }
Source:
public java.util.List < com.google.gerrit.server.query.change.ChangeData > apply ( com.google.gerrit.server.git.BranchBatch batch ) { return batch.changes ( ) ; }

Target:
public java.util.List < com.google.gerrit.server.query.change.ChangeData > apply ( com.google.gerrit.server.git.MergeOp.BranchBatch batch ) { return batch.changes ( ) ; }
Source:
public void onSuccess ( final com.google.gerrit.client.reviewdb.Account result ) { if ( result != null ) { com.google.gerrit.client.Gerrit.myAccount = result ; } else { com.google.gwt.user.client.Cookies.removeCookie ( com.google.gerrit.client.Gerrit.ACCOUNT_COOKIE ) ; } com.google.gerrit.client.Gerrit.refreshMenuBar ( ) ; showInitialScreen ( ) ; }

Target:
public void onSuccess ( final com.google.gerrit.client.reviewdb.Account result ) { if ( result != null ) { com.google.gerrit.client.Gerrit.myAccount = result ; com.google.gerrit.client.Gerrit.applyUserPreferences ( ) ; } else { com.google.gwt.user.client.Cookies.removeCookie ( com.google.gerrit.client.Gerrit.ACCOUNT_COOKIE ) ; } com.google.gerrit.client.Gerrit.refreshMenuBar ( ) ; showInitialScreen ( ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( "@" + ( com.google.gerrit.sshd.CommandName.class . getName ( ) ) ) + "(value=" ) + ( value ( ) ) ) + ")" ; }

Target:
public static com.google.gerrit.sshd.CommandName named ( final java.lang.String value ) { return new com.google.gerrit.sshd.AutoAnnotation_Commands_named ( value ) ; }
Source:
private com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.RateLimit defaultRateLimit ( com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.Type type , int defaultIntervalSeconds , int defaultStoreCount ) { return new com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.RateLimit ( type , ( 1.0 / defaultIntervalSeconds ) , ( defaultIntervalSeconds * defaultStoreCount ) ) ; }

Target:
private com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.RateLimit defaultRateLimit ( com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.Type type ) { return new com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.RateLimit ( type , ( 1.0 / ( com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.DEFAULT_INTERVAL_SECONDS ) ) , ( ( com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.DEFAULT_INTERVAL_SECONDS ) * ( com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.DEFAULT_BURST_COUNT ) ) ) ; }
Source:
public void configure ( ) { listener ( ) . to ( com.google.gerrit.elasticsearch.ElasticVersionManager.class ) ; if ( onlineUpgrade ) { listener ( ) . to ( com.google.gerrit.server.index.OnlineUpgrader.class ) ; } }

Target:
public void configure ( ) { bind ( com.google.gerrit.server.index.VersionManager.class ) . to ( com.google.gerrit.elasticsearch.ElasticVersionManager.class ) ; listener ( ) . to ( com.google.gerrit.elasticsearch.ElasticVersionManager.class ) ; if ( onlineUpgrade ) { listener ( ) . to ( com.google.gerrit.server.index.OnlineUpgrader.class ) ; } }
Source:
private static java.lang.String queryOutGoing ( java.lang.String who ) { return "is:open owner:" + who ; }

Target:
private static java.lang.String queryOutgoing ( java.lang.String who ) { return "is:open owner:" + who ; }
Source:
public void unblockLargerScope_Fails ( ) { com.google.gerrit.server.project.Util.block ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/heads/master" ) ; com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.Util.DEVS ) ; assertCannotUpdate ( "refs/heads/master" , u ) ; }

Target:
public void unblockInLocal_Fails ( ) { com.google.gerrit.server.project.testing.Util.block ( parent , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/heads/*" ) ; com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , fixers , "refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl f = user ( local , fixers ) ; assertCannotUpdate ( "refs/heads/master" , f ) ; }
Source:
public Project.NameKey getProject ( ) { return project ; }

Target:
public static com.google.inject.Module module ( ) { return new com.google.gerrit.extensions.config.FactoryModule ( ) { @ java.lang.Override public void configure ( ) { factory ( ReviewDbBatchUpdate.AssistedFactory.class ) ; } } ; }
Source:
public com.google.gerrit.extensions.api.projects.BranchApi branch ( java.lang.String ref ) { return branchApi.create ( project , ref ) ; }

Target:
public com.google.gerrit.extensions.common.ProjectInfo get ( ) throws com.google.gerrit.extensions.restapi.RestApiException { if ( ( project ) == null ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( name ) ; } return projectJson.format ( project ) ; }
Source:
protected void createSubscription ( org.eclipse.jgit.junit.TestRepository < ? > repo , java.lang.String branch , java.lang.String subscribeToRepo , java.lang.String subscribeToBranch ) throws java.lang.Exception { org.eclipse.jgit.lib.Config config = new org.eclipse.jgit.lib.Config ( ) ; prepareSubscriptionConfigEntry ( config , subscribeToRepo , subscribeToBranch ) ; pushSubscriptionConfig ( repo , branch , config ) ; }

Target:
protected void createSubmoduleSubscription ( org.eclipse.jgit.junit.TestRepository < ? > repo , java.lang.String branch , java.lang.String subscribeToRepo , java.lang.String subscribeToBranch ) throws java.lang.Exception { org.eclipse.jgit.lib.Config config = new org.eclipse.jgit.lib.Config ( ) ; prepareSubmoduleConfigEntry ( config , subscribeToRepo , subscribeToBranch ) ; pushSubmoduleConfig ( repo , branch , config ) ; }
Source:
public java.lang.Object apply ( com.google.gerrit.server.project.ProjectResource resource ) { com.google.gerrit.reviewdb.client.Project project = resource.getControl ( ) . getProject ( ) ; return com.google.common.base.Strings.nullToEmpty ( project.getParentName ( ) ) ; }

Target:
public java.lang.Object apply ( com.google.gerrit.server.project.ProjectResource resource ) { com.google.gerrit.reviewdb.client.Project project = resource.getControl ( ) . getProject ( ) ; com.google.gerrit.reviewdb.client.Project.NameKey parentName = project.getParent ( allProjectsName ) ; return parentName != null ? parentName.get ( ) : "" ; }
Source:
public void setUp ( ) throws java.lang.Exception { handler = new com.ericsson.gerrit.plugins.syncindex.IndexResponseHandler ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { handler = new com.ericsson.gerrit.plugins.multimaster.IndexResponseHandler ( ) ; }
Source:
private void configureCmdLineParser ( ) { factory ( CmdLineParser.Factory.class ) ; registerOptionHandler ( PatchSet.Id.class , com.google.gerrit.server.ssh.commands.PatchSetIdHandler.class ) ; }

Target:
private void configureCmdLineParser ( ) { factory ( CmdLineParser.Factory.class ) ; registerOptionHandler ( PatchSet.Id.class , com.google.gerrit.server.ssh.commands.PatchSetIdHandler.class ) ; registerOptionHandler ( com.google.gerrit.server.project.ProjectControl.class , com.google.gerrit.server.ssh.commands.ProjectControlHandler.class ) ; }
Source:
public com.google.gerrit.server.change.ChangeKind getChangeKind ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet patch ) { return com.google.gerrit.server.change.ChangeKindCacheImpl.getChangeKindInternal ( this , db , change , patch , changeDataFactory , projectCache , repoManager ) ; }

Target:
public com.google.gerrit.server.change.ChangeKind getChangeKind ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.notedb.ChangeNotes notes , com.google.gerrit.reviewdb.client.PatchSet patch ) { return com.google.gerrit.server.change.ChangeKindCacheImpl.getChangeKindInternal ( this , db , notes , patch , changeDataFactory , projectCache , repoManager ) ; }
Source:
public void renameFile ( org.eclipse.jgit.lib.Repository repository , com.google.gerrit.server.edit.ChangeEdit edit , java.lang.String currentFilePath , java.lang.String newFilePath ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.server.project.InvalidChangeOperationException , java.io.IOException { org.eclipse.jgit.revwalk.RevCommit editCommit = edit.getEditCommit ( ) ; modifyTree ( repository , edit , new com.google.gerrit.server.edit.tree.RenameFileModification ( editCommit , currentFilePath , newFilePath ) ) ; }

Target:
public void renameFile ( org.eclipse.jgit.lib.Repository repository , com.google.gerrit.server.project.ChangeControl changeControl , java.lang.String currentFilePath , java.lang.String newFilePath ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.server.project.InvalidChangeOperationException , com.google.gwtorm.server.OrmException , java.io.IOException { modifyTree ( repository , changeControl , new com.google.gerrit.server.edit.tree.RenameFileModification ( currentFilePath , newFilePath ) ) ; }
Source:
int size ( ) { return ( src ) != null ? src.size ( ) : 0 ; }

Target:
void addLine ( int line ) { dst.addLine ( line , src.getLine ( line ) ) ; }
Source:
public void setChangeMessage ( final com.google.gerrit.reviewdb.client.ChangeMessage cm ) { changeMessage = cm ; }

Target:
public void setChangeMessage ( final com.google.gerrit.reviewdb.client.ChangeMessage cm ) { setChangeMessage ( cm.getMessage ( ) , cm.getWrittenOn ( ) ) ; }
Source:
public void resetTime ( ) { com.google.gerrit.testutil.TestTimeUtil.useSystemTime ( ) ; java.lang.System.setProperty ( "user.timezone" , systemTimeZone ) ; }

Target:
public void resetTime ( ) { com.google.gerrit.testing.TestTimeUtil.useSystemTime ( ) ; java.lang.System.setProperty ( "user.timezone" , systemTimeZone ) ; }
Source:
public RefUpdate.Result restoreFile ( com.google.gerrit.server.edit.ChangeEdit edit , java.lang.String file ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.server.project.InvalidChangeOperationException , java.io.IOException { return modify ( com.google.gerrit.server.edit.ChangeEditModifier.TreeOperation.RESTORE_ENTRY , edit , file , null ) ; }

Target:
public RefUpdate.Result renameFile ( com.google.gerrit.server.edit.ChangeEdit edit , java.lang.String file , java.lang.String newFile ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.server.project.InvalidChangeOperationException , java.io.IOException { return modify ( com.google.gerrit.server.edit.ChangeEditModifier.TreeOperation.RENAME_ENTRY , edit , file , newFile , null ) ; }
Source:
private com.google.gerrit.server.notedb.ChangeUpdate newUpdate ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.reviewdb.client.Account account ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { return new com.google.gerrit.server.notedb.ChangeUpdate ( repoManager , accountCache , com.google.gerrit.server.notedb.ChangeNotesTest.LABEL_TYPES , c , account , com.google.gerrit.server.util.TimeUtil.nowTs ( ) , com.google.gerrit.server.notedb.ChangeNotesTest.TZ ) ; }

Target:
private com.google.gerrit.server.notedb.ChangeUpdate newUpdate ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.server.IdentifiedUser user ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { return new com.google.gerrit.server.notedb.ChangeUpdate ( com.google.gerrit.server.notedb.ChangeNotesTest.SERVER_IDENT , repoManager , com.google.gerrit.server.notedb.NotesMigration.allEnabled ( ) , accountCache , null , com.google.gerrit.server.notedb.ChangeNotesTest.LABEL_TYPES , c , com.google.gerrit.server.util.TimeUtil.nowTs ( ) , user ) ; }
Source:
public < V > com.google.gerrit.metrics.CallbackMetric0 < V > newCallbackMetric ( java.lang.String name , java.lang.Class < V > valueClass , com.google.gerrit.metrics.Description desc ) { define ( name , desc ) ; return new com.google.gerrit.metrics.dropwizard.CallbackMetricImpl0 ( name , valueClass ) ; }

Target:
public < V > com.google.gerrit.metrics.CallbackMetric0 < V > newCallbackMetric ( java.lang.String name , java.lang.Class < V > valueClass , com.google.gerrit.metrics.Description desc ) { define ( name , desc ) ; return new com.google.gerrit.metrics.dropwizard.CallbackMetricImpl0 ( this , registry , name , valueClass ) ; }
Source:
public void maxAutomergeVoteDisabledTest_isDisabled ( ) throws java.lang.Exception { defaultSetup ( "alternate.config" ) ; com.google.common.truth.Truth.assertThat ( configLoader.maxAutomergeVoteDisabled ( ) ) . isEqualTo ( true ) ; }

Target:
public void maxAutomergeVoteDisabledTest_isDisabled ( ) throws java.lang.Exception { defaultSetup ( "alternate.config" ) ; com.google.common.truth.Truth.assertThat ( configLoader.maxAutomergeVoteDisabled ( ) ) . isTrue ( ) ; }
Source:
private long readTime ( org.eclipse.jgit.lib.Config cfg , java.lang.String key ) { long time = com.google.gerrit.server.config.ConfigUtil.getTimeUnit ( cfg , com.google.gerrit.server.config.ChangeCleanupConfig.SECTION , null , key , 0 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; return time >= 0 ? time : 0 ; }

Target:
private long readAbandonAfter ( org.eclipse.jgit.lib.Config cfg ) { long abandonAfter = com.google.gerrit.server.config.ConfigUtil.getTimeUnit ( cfg , com.google.gerrit.server.config.ChangeCleanupConfig.SECTION , null , com.google.gerrit.server.config.ChangeCleanupConfig.KEY_ABANDON_AFTER , 0 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; return abandonAfter >= 0 ? abandonAfter : 0 ; }
Source:
java.util.List < com.google.gerrit.reviewdb.client.Account > get ( ) { try { return cache.get ( true ) ; } catch ( java.util.concurrent.ExecutionException e ) { com.google.gerrit.server.change.ReviewerSuggestionCache.log.warn ( "Cannot fetch reviewers from cache" , e ) ; return java.util.Collections.emptyList ( ) ; } }

Target:
private org.apache.lucene.search.IndexSearcher get ( ) { try { return cache.get ( true ) ; } catch ( java.util.concurrent.ExecutionException e ) { com.google.gerrit.server.change.ReviewerSuggestionCache.log.warn ( "Cannot fetch reviewers from cache" , e ) ; return null ; } }
Source:
public com.google.gerrit.server.query.change.ChangeDataSource getSource ( com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > p , int start , int limit ) throws com.google.gerrit.server.query.QueryParseException { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public com.google.gerrit.server.query.change.ChangeDataSource getSource ( com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > p , com.google.gerrit.server.query.change.QueryOptions opts ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
public com.google.common.truth.ComparableSubject < ? , java.sql.Timestamp > date ( ) { isNotNull ( ) ; com.google.gerrit.extensions.common.GitPerson gitPerson = actual ( ) ; return com.google.common.truth.Truth.assertThat ( gitPerson.date ) . named ( "creationDate" ) ; }

Target:
public com.google.common.truth.ComparableSubject < ? , java.sql.Timestamp > date ( ) { isNotNull ( ) ; com.google.gerrit.extensions.common.GitPerson gitPerson = actual ( ) ; return com.google.common.truth.Truth.assertThat ( gitPerson.date ) . named ( "date" ) ; }
Source:
protected void configure ( ) { bind ( ContactStoreConnection.Factory.class ) . toProvider ( com.google.inject.assistedinject.FactoryProvider.newFactory ( ContactStoreConnection.Factory.class , com.google.gerrit.server.contact.HttpContactStoreConnection.class ) ) . in ( com.google.inject.Scopes.SINGLETON ) ; }

Target:
protected void configure ( ) { install ( new com.google.inject.assistedinject.FactoryModuleBuilder ( ) . implement ( com.google.gerrit.server.contact.ContactStoreConnection.class , com.google.gerrit.server.contact.HttpContactStoreConnection.class ) . build ( ContactStoreConnection.Factory.class ) ) ; }
Source:
public boolean readChangeSequence ( ) { return readChanges ; }

Target:
public boolean readChangeSequence ( ) { return readChangeSequence ; }
Source:
public void execute ( ) { try { onResult ( last , false ) ; } finally { RpcStatus.INSTANCE.onRpcComplete ( null ) ; } }

Target:
public void execute ( ) { try { onResult ( lastScript , false ) ; } finally { RpcStatus.INSTANCE.onRpcComplete ( null ) ; } }
Source:
public com.google.gerrit.server.index.QueryOptions withStart ( int newStart ) { return com.google.gerrit.server.index.QueryOptions.create ( config ( ) , newStart , limit ( ) , fields ( ) ) ; }

Target:
public com.google.gerrit.index.QueryOptions withStart ( int newStart ) { return com.google.gerrit.index.QueryOptions.create ( config ( ) , newStart , limit ( ) , fields ( ) ) ; }
Source:
public double doubleValue ( ) { return val ; }

Target:
public long longValue ( ) { return ( ( long ) ( val ) ) ; }
Source:
public UiAction.Description getDescription ( com.google.gerrit.server.project.ProjectResource rsrc ) { return new com.google.gerrit.extensions.webui.UiAction.Description ( ) . setLabel ( "Run GC" ) . setTitle ( "Triggers the Git Garbage Collection for this project." ) ; }

Target:
public UiAction.Description getDescription ( com.google.gerrit.server.project.ProjectResource rsrc ) { return new com.google.gerrit.extensions.webui.UiAction.Description ( ) . setLabel ( "Run GC" ) . setTitle ( "Triggers the Git Garbage Collection for this project." ) . setVisible ( canGC ) ; }
Source:
public void onSuccess ( final com.google.gerrit.common.data.GroupDetail groupDetail ) { saveName.setEnabled ( false ) ; display ( groupDetail ) ; }

Target:
public void onSuccess ( final com.google.gerrit.common.data.GroupDetail groupDetail ) { saveName.setEnabled ( false ) ; setPageTitle ( Util.M.group ( groupDetail.group.getName ( ) ) ) ; display ( groupDetail ) ; }
Source:
protected void preDisplay ( final com.google.gerrit.common.data.ChangeDetail r ) { display ( r ) ; }

Target:
public void onClick ( final com.google.gwt.event.dom.client.ClickEvent event ) { toggleStar ( ) ; }
Source:
void setJarUrl ( final java.lang.String url ) { this . jarUrl = url ; }

Target:
void setJarUrl ( final java.lang.String url ) { this . jarUrl = url ; download = jarUrl.startsWith ( "http" ) ; }
Source:
private void problem ( java.lang.String msg ) { com.google.gerrit.extensions.api.changes.ProblemInfo p = new com.google.gerrit.extensions.api.changes.ProblemInfo ( ) ; p.message = msg ; problems.add ( p ) ; }

Target:
private void problem ( java.lang.String msg ) { com.google.gerrit.extensions.common.ProblemInfo p = new com.google.gerrit.extensions.common.ProblemInfo ( ) ; p.message = msg ; problems.add ( p ) ; }
Source:
private static final com.google.gerrit.client.info.AccountInfo getCurrentUser ( ) { return com.google.gerrit.client.Gerrit.getUserAccountInfo ( ) ; }

Target:
private static final com.google.gerrit.client.info.AccountInfo getCurrentUser ( ) { return com.google.gerrit.client.Gerrit.getUserAccount ( ) ; }
Source:
static boolean onTime ( java.lang.String dateTime ) { return ( com.googlesource.gerrit.plugins.lfs.LfsAuthToken.FORMAT.now ( ) . compareTo ( dateTime ) ) <= 0 ; }

Target:
public boolean onTime ( java.time.Instant when ) { return when.isBefore ( token.issued.plusSeconds ( token.expiresIn ) ) ; }
Source:
protected void preDisplay ( com.google.gerrit.client.projects.ConfigInfoCache.Entry result ) { loaded = true ; commentLinkProcessor = result.getCommentLinkProcessor ( ) ; setTheme ( result.getTheme ( ) ) ; renderChangeInfo ( info ) ; }

Target:
protected void preDisplay ( com.google.gerrit.client.projects.ConfigInfoCache.Entry result ) { loaded = true ; commentLinkProcessor = result.getCommentLinkProcessor ( ) ; setTheme ( result.getTheme ( ) ) ; renderChangeInfo ( info ) ; loadRevisionInfo ( ) ; }
Source:
public void setShowUsernameInReviewCategory ( final boolean showUsernameInReviewCategory ) { this . showUsernameInReviewCategory = showUsernameInReviewCategory ; }

Target:
public void setShowUsernameInReviewCategory ( final boolean showUsernameInReviewCategory ) { this . showUserInReview = showUsernameInReviewCategory ; }
Source:
void restore ( com.googlecode.prolog_cafe.lang.Prolog engine ) { engine.cont = this . cont ; engine.areg1 = this . areg1 ; engine.areg2 = this . areg2 ; engine.areg3 = this . areg3 ; }

Target:
void restore ( com.googlecode.prolog_cafe.lang.Prolog engine ) { engine.cont = this . cont ; engine.r1 = this . r1 ; engine.r2 = this . r2 ; engine.r3 = this . r3 ; }
Source:
private java.lang.String group ( java.lang.String name ) throws java.io.IOException { name = name ( name ) ; com.google.gerrit.server.group.CreateGroup.Input in = new com.google.gerrit.server.group.CreateGroup.Input ( ) ; adminSession.put ( ( "/groups/" + name ) , in ) . consume ( ) ; return name ; }

Target:
private java.lang.String group ( java.lang.String name ) throws java.io.IOException { name = name ( name ) ; com.google.gerrit.extensions.api.groups.GroupInput in = new com.google.gerrit.extensions.api.groups.GroupInput ( ) ; adminSession.put ( ( "/groups/" + name ) , in ) . consume ( ) ; return name ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { info.getWatch ( ) . setNotify ( type , oldVal ) ; cbox.setValue ( oldVal ) ; super . onFailure ( caught ) ; }

Target:
public void onFailure ( final java.lang.Throwable caught ) { cbox.setEnabled ( true ) ; info.getWatch ( ) . setNotify ( type , oldVal ) ; cbox.setValue ( oldVal ) ; super . onFailure ( caught ) ; }
Source:
public void checkAllChanges ( ) throws java.lang.Exception { checkChanges ( com.google.common.collect.Iterables.transform ( unwrapDb ( ) . changes ( ) . all ( ) , com.google.gerrit.reviewdb.server.ReviewDbUtil.changeIdFunction ( ) ) ) ; }

Target:
public void rebuildAndCheckAllChanges ( ) throws java.lang.Exception { rebuildAndCheckChanges ( com.google.common.collect.Iterables.transform ( unwrapDb ( ) . changes ( ) . all ( ) , com.google.gerrit.reviewdb.server.ReviewDbUtil.changeIdFunction ( ) ) ) ; }
Source:
protected final void addErrorListener ( com.google.common.util.concurrent.ListenableFuture < ? > future , java.lang.String desc , org.eclipse.jgit.lib.ProgressMonitor progress , java.util.concurrent.atomic.AtomicBoolean ok ) { future.addListener ( new com.google.gerrit.server.index.SiteIndexer.ErrorListener ( future , desc , progress , ok ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; }

Target:
protected final void addErrorListener ( com.google.common.util.concurrent.ListenableFuture < ? > future , java.lang.String desc , org.eclipse.jgit.lib.ProgressMonitor progress , java.util.concurrent.atomic.AtomicBoolean ok ) { future.addListener ( new com.google.gerrit.index.SiteIndexer.ErrorListener ( future , desc , progress , ok ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; }
Source:
public boolean containsHeader ( java.lang.String name ) { return headers.containsKey ( name ) ; }

Target:
public boolean containsHeader ( java.lang.String name ) { return headers.containsKey ( name.toLowerCase ( ) ) ; }
Source:
public java.lang.String getReplacementString ( ) { return java.lang.String.valueOf ( change.legacy_id ( ) . get ( ) ) ; }

Target:
public java.lang.String getReplacementString ( ) { return java.lang.String.valueOf ( change.legacyId ( ) . get ( ) ) ; }
Source:
protected void removeCookie ( final java.lang.String name ) { final javax.servlet.http.Cookie c = new javax.servlet.http.Cookie ( name , "" ) ; c.setMaxAge ( 0 ) ; com.google.gwtjsonrpc.server.JsonServlet.getCurrentResponse ( ) . addCookie ( c ) ; }

Target:
protected void removeCookie ( final java.lang.String name ) { final javax.servlet.http.Cookie c = new javax.servlet.http.Cookie ( name , "" ) ; c.setMaxAge ( 0 ) ; com.google.gwtjsonrpc.server.JsonServlet.getCurrentCall ( ) . httpResponse.addCookie ( c ) ; }
Source:
public com.google.gerrit.common.data.LabelType byLabel ( com.google.gerrit.reviewdb.client.PatchSetApproval.LabelId labelId ) { return byLabel ( ) . get ( labelId.get ( ) . toLowerCase ( ) ) ; }

Target:
public com.google.gerrit.common.data.LabelType byLabel ( com.google.gerrit.reviewdb.client.LabelId labelId ) { return byLabel ( ) . get ( labelId.get ( ) . toLowerCase ( ) ) ; }
Source:
java.lang.String getToken ( ) { return isSignedIn ( ) ? key.getToken ( ) : null ; }

Target:
public java.lang.String getToken ( ) { return isSignedIn ( ) ? val.getXsrfToken ( ) : null ; }
Source:
public void testLinkify_TrailingDotDot ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_LinkifyTest.html ( "A http://go.here/.. B" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.linkify ( ) ; org.junit.Assert.assertNotSame ( o , n ) ; org.junit.Assert.assertEquals ( "A <a href=\"http://go.here/.\" target=\"_blank\">http://go.here/.</a>. B" , n.asString ( ) ) ; }

Target:
public void testLinkify_TrailingComma ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_LinkifyTest.html ( "A http://go.here/, B" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.linkify ( ) ; com.google.common.truth.Truth.assertThat ( o ) . isNotSameAs ( n ) ; com.google.common.truth.Truth.assertThat ( n.asString ( ) ) . isEqualTo ( "A <a href=\"http://go.here/\" target=\"_blank\">http://go.here/</a>, B" ) ; }
Source:
public int compare ( com.google.gerrit.client.diff.UnifiedDiffChunkInfo o1 , com.google.gerrit.client.diff.UnifiedDiffChunkInfo o2 ) { return ( o1.getCmLine ( ) ) - ( o2.getCmLine ( ) ) ; }

Target:
public int compare ( com.google.gerrit.client.diff.UnifiedDiffChunkInfo o1 , com.google.gerrit.client.diff.UnifiedDiffChunkInfo o2 ) { return ( o1.cmLine ) - ( o2.cmLine ) ; }
Source:
public com.google.template.soy.tofu.SoyTofu get ( ) throws com.google.inject.ProvisionException { com.google.template.soy.SoyFileSet.Builder builder = new com.google.template.soy.SoyFileSet.Builder ( ) ; for ( java.lang.String name : com.google.gerrit.server.mail.MailSoyTofuProvider.TEMPLATES ) { addTemplate ( builder , name ) ; } return builder.build ( ) . compileToTofu ( ) ; }

Target:
public com.google.template.soy.tofu.SoyTofu get ( ) throws com.google.inject.ProvisionException { com.google.template.soy.SoyFileSet.Builder builder = com.google.template.soy.SoyFileSet.builder ( ) ; for ( java.lang.String name : com.google.gerrit.server.mail.MailSoyTofuProvider.TEMPLATES ) { addTemplate ( builder , name ) ; } return builder.build ( ) . compileToTofu ( ) ; }
Source:
public void listBranches ( final com.google.gerrit.reviewdb.client.Project.NameKey projectName , final com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.common.data.ListBranchesResult > callback ) { listBranchesFactory.create ( projectName ) . to ( callback ) ; }

Target:
public void addBranch ( final com.google.gerrit.reviewdb.client.Project.NameKey projectName , final java.lang.String branchName , final java.lang.String startingRevision , final com.google.gwtjsonrpc.common.AsyncCallback < com.google.gerrit.common.data.ListBranchesResult > callback ) { addBranchFactory.create ( projectName , branchName , startingRevision ) . to ( callback ) ; }
Source:
private long getSecureConfigLastEditTs ( ) { org.eclipse.jgit.storage.file.FileBasedConfig cfg = new org.eclipse.jgit.storage.file.FileBasedConfig ( site.secure_config , org.eclipse.jgit.util.FS.DETECTED ) ; if ( cfg.getFile ( ) . exists ( ) ) { return cfg.getFile ( ) . lastModified ( ) ; } else { return 0L ; } }

Target:
private long getSecureConfigLastEditTs ( ) throws java.io.IOException { if ( ! ( java.nio.file.Files.exists ( site.secure_config ) ) ) { return 0L ; } return java.nio.file.Files.getLastModifiedTime ( site.secure_config ) . toMillis ( ) ; }
Source:
public void run ( ) { renderSkips ( context ) ; }

Target:
public void run ( ) { skipManager.removeAll ( ) ; skipManager.render ( context , diff ) ; }
Source:
public com.google.gerrit.server.change.RevisionResource doNotCache ( ) { cacheable = false ; return this ; }

Target:
public static com.google.gerrit.server.change.RevisionResource createNonCachable ( com.google.gerrit.server.change.ChangeResource change , com.google.gerrit.reviewdb.client.PatchSet ps ) { return new com.google.gerrit.server.change.RevisionResource ( change , ps , java.util.Optional.empty ( ) , false ) ; }
Source:
public void checkChanges ( com.google.gerrit.reviewdb.client.Change ... changeIds ) throws java.lang.Exception { checkChanges ( java.util.Arrays.asList ( changeIds ) ) ; }

Target:
public void checkChanges ( com.google.gerrit.reviewdb.client.Change ... changeIds ) throws java.lang.Exception { checkActual ( readExpected ( java.util.Arrays.stream ( changeIds ) ) , new java.util.ArrayList < > ( ) ) ; }
Source:
protected void submit ( java.lang.String changeId ) throws java.lang.Exception { submit ( changeId , HttpStatus.SC_OK , null ) ; }

Target:
public void cleanup ( ) { source.removeEventListener ( eventListener ) ; db.close ( ) ; }
Source:
public static synchronized void useSystemTime ( ) { com.google.gerrit.testutil.TestTimeUtil.clockMs = null ; org.joda.time.DateTimeUtils.setCurrentMillisSystem ( ) ; }

Target:
public static synchronized void useSystemTime ( ) { com.google.gerrit.testutil.TestTimeUtil.clockMs = null ; com.google.gerrit.common.TimeUtil.resetCurrentMillisSupplier ( ) ; }
Source:
public void visibleProjectDetails ( final com.google.gwt.user.client.rpc.AsyncCallback < java.util.List < com.google.gerrit.common.data.ProjectDetail > > callback ) { visibleProjectDetailsFactory.create ( ) . to ( callback ) ; }

Target:
public void projectAccess ( final com.google.gerrit.reviewdb.client.Project.NameKey projectName , final com.google.gwtjsonrpc.common.AsyncCallback < com.google.gerrit.common.data.ProjectAccess > callback ) { projectAccessFactory.create ( projectName ) . to ( callback ) ; }
Source:
public boolean allRefsAreVisible ( ) { return ( ( user ) instanceof com.google.gerrit.server.InternalUser ) || ( canPerformOnAllRefs ( Permission.READ ) ) ; }

Target:
public boolean allRefsAreVisibleExcept ( java.util.Set < java.lang.String > except ) { return ( ( user ) instanceof com.google.gerrit.server.InternalUser ) || ( canPerformOnAllRefs ( Permission.READ , except ) ) ; }
Source:
public < T > T get ( com.google.gerrit.server.CurrentUser.PropertyKey < T > key ) { return null ; }

Target:
public < T > java.util.Optional < T > get ( com.google.gerrit.server.CurrentUser.PropertyKey < T > key ) { return java.util.Optional.empty ( ) ; }
Source:
public void copyInReviewDb ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.project.ChangeControl ctl , com.google.gerrit.reviewdb.client.PatchSet ps , @ com.google.gerrit.common.Nullable org.eclipse.jgit.revwalk.RevWalk rw , @ com.google.gerrit.common.Nullable org.eclipse.jgit.lib.Config repoConfig ) throws com.google.gwtorm.server.OrmException { copyInReviewDb ( db , ctl , ps , rw , repoConfig , java.util.Collections.emptyList ( ) ) ; }

Target:
public void copyInReviewDb ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.notedb.ChangeNotes notes , com.google.gerrit.server.CurrentUser user , com.google.gerrit.reviewdb.client.PatchSet ps , @ com.google.gerrit.common.Nullable org.eclipse.jgit.revwalk.RevWalk rw , @ com.google.gerrit.common.Nullable org.eclipse.jgit.lib.Config repoConfig ) throws com.google.gwtorm.server.OrmException { copyInReviewDb ( db , notes , user , ps , rw , repoConfig , java.util.Collections.emptyList ( ) ) ; }