auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final void theme ( com.google.gerrit.extensions.common.Theme i ) { setThemeRaw ( ( i != null ? i.toString ( ) : Theme.DEFAULT.toString ( ) ) ) ; }

Target:
public final void theme ( com.google.gerrit.extensions.client.Theme i ) { setThemeRaw ( ( i != null ? i.toString ( ) : Theme.DEFAULT.toString ( ) ) ) ; }
Source:
void onCloseForm ( ) { com.google.gwt.user.client.ui.UIObject.setVisible ( form , false ) ; com.google.gwt.user.client.ui.UIObject.setVisible ( error , false ) ; editAssigneeIcon.setVisible ( true ) ; suggestBox.setFocus ( false ) ; }

Target:
void onCloseForm ( ) { com.google.gwt.user.client.ui.UIObject.setVisible ( form , false ) ; com.google.gwt.user.client.ui.UIObject.setVisible ( show , true ) ; com.google.gwt.user.client.ui.UIObject.setVisible ( error , false ) ; editAssigneeIcon.setVisible ( true ) ; suggestBox.setFocus ( false ) ; }
Source:
public void onSignOut ( ) { addReviewer.setVisible ( false ) ; }

Target:
public void onSignOut ( final com.google.gerrit.client.SignOutEvent event ) { addReviewer.setVisible ( false ) ; regSignOut.removeHandler ( ) ; regSignOut = null ; }
Source:
public void servletPathMatchesRequestPath ( ) { com.google.common.truth.Truth.assertThat ( com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( mockRequest ( "/c/s" , "/c" , "/s" ) ) ) . isNull ( ) ; }

Target:
public void emptyPathInfo ( ) { com.google.common.truth.Truth.assertThat ( com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( fakeRequest ( "/c" , "/s" , "" ) ) ) . isNull ( ) ; }
Source:
public com.google.gitiles.Revision getOldRevision ( ) { return revision ; }

Target:
public com.google.gitiles.Revision getOldRevision ( ) { return oldRevision ; }
Source:
com.google.gerrit.gpg.GerritPushCertificateChecker create ( com.google.gerrit.server.IdentifiedUser expectedUser ) ;

Target:
com.google.gerrit.gpg.GerritPushCertificateChecker create ( com.google.gerrit.server.IdentifiedUser expectedUser , boolean checkNonce ) ;
Source:
public com.google.gitiles.GitilesView.Builder setExtension ( java.lang.String extension ) { switch ( type ) { default : com.google.common.base.Preconditions.checkState ( ( extension == null ) , "cannot set extension on %s view" , type ) ; case ARCHIVE : this . extension = extension ; break ; } return this ; }

Target:
public com.google.gitiles.GitilesView.Builder setExtension ( java.lang.String extension ) { if ( ( type ) != ( com.google.gitiles.GitilesView.Type.ARCHIVE ) ) { com.google.common.base.Preconditions.checkState ( ( extension == null ) , "cannot set extension on %s view" , type ) ; } this . extension = extension ; return this ; }
Source:
public com.googlesource.gerrit.plugins.manager.gson.SmartJson get ( java.lang.String fieldName ) ;

Target:
public com.googlesource.gerrit.plugins.manager.gson.SmartJson get ( java.lang.String fieldName ) { return getOptional ( fieldName ) . get ( ) ; }
Source:
public boolean apply ( com.google.gerrit.reviewdb.client.AccountExternalId externalId ) { return ( externalId.isScheme ( AccountExternalId.SCHEME_EXTERNAL ) ) && ( externalId.getSchemeRest ( ) . startsWith ( OAuthWebFilter.GITHUB_EXT_ID ) ) ; }

Target:
public boolean apply ( com.google.gerrit.server.account.ExternalId externalId ) { return externalId.key ( ) . get ( ) . startsWith ( IdentifiedUserGitHubLoginProvider.EXTERNAL_ID_PREFIX ) ; }
Source:
public abstract java.lang.String getType ( ) ;

Target:
public java.lang.String getRefName ( ) { return ( org.eclipse.jgit.lib.Constants.R_HEADS ) + ( change.branch ) ; }
Source:
private com.google.gerrit.server.git.SubmitStrategy createStrategy ( final com.google.gerrit.reviewdb.client.Project.SubmitType submitType ) throws com.google.gerrit.server.git.MergeException , com.google.gerrit.server.project.NoSuchProjectException { return submitStrategyFactory.create ( submitType , db , repo , rw , inserter , canMergeFlag , getAlreadyAccepted ( branchTip ) , destBranch ) ; }

Target:
private com.google.gerrit.server.git.strategy.SubmitStrategy createStrategy ( final com.google.gerrit.reviewdb.client.Project.SubmitType submitType ) throws com.google.gerrit.server.git.MergeException , com.google.gerrit.server.project.NoSuchProjectException { return submitStrategyFactory.create ( submitType , db , repo , rw , inserter , canMergeFlag , getAlreadyAccepted ( branchTip ) , destBranch ) ; }
Source:
protected void configure ( ) { bind ( java.io.File.class ) . annotatedWith ( com.google.gerrit.server.config.SitePath.class ) . toInstance ( sitePath ) ; bind ( com.google.gerrit.server.securestore.SecureStore.class ) . toProvider ( com.google.gerrit.pgm.util.SecureStoreProvider.class ) ; }

Target:
protected void configure ( ) { bind ( java.io.File.class ) . annotatedWith ( com.google.gerrit.server.config.SitePath.class ) . toInstance ( sitePath ) ; bind ( com.google.gerrit.server.securestore.SecureStore.class ) . toProvider ( com.google.gerrit.server.securestore.SecureStoreProvider.class ) ; }
Source:
public boolean canRemoveMember ( final com.google.gerrit.reviewdb.Account.Id id ) { return isOwner ( ) ; }

Target:
public boolean canAddMember ( com.google.gerrit.reviewdb.Account.Id id ) { return isOwner ( ) ; }
Source:
private void uncacheSshKeys ( final com.google.gerrit.reviewdb.Account.Id me ) { uncacheSshKeys ( accountCache.get ( me ) . getAccount ( ) . getSshUserName ( ) ) ; }

Target:
private void uncacheSshKeys ( ) { sshKeyCache.evict ( user.get ( ) . getUserName ( ) ) ; }
Source:
public void onKeyPress ( final com.google.gwt.event.dom.client.KeyPressEvent event ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChangeQuery ( "is:draft" ) ) ; }

Target:
public void onKeyPress ( final com.google.gwt.event.dom.client.KeyPressEvent event ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChangeQuery ( "owner:self is:draft" ) ) ; }
Source:
public void onFailure ( java.lang.Throwable e ) { enableEdit ( true ) ; super . onFailure ( e ) ; }

Target:
public void onSuccess ( com.google.gwt.core.client.JavaScriptObject result ) { removeUI ( ) ; }
Source:
void onLogin ( ) { async.append ( log ( ( "LOGIN FROM " + ( session.get ( ) . getRemoteAddressAsString ( ) ) ) ) ) ; audit ( context.get ( ) , "0" , "LOGIN" ) ; }

Target:
public void stop ( ) { if ( ( async ) != null ) { async.close ( ) ; } }
Source:
protected void configure ( ) { bind ( com.google.gerrit.common.EventDispatcher.class ) . to ( com.google.gerrit.common.EventBroker.class ) ; }

Target:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicItem.itemOf ( binder ( ) , com.google.gerrit.common.EventDispatcher.class ) ; com.google.gerrit.extensions.registration.DynamicItem.bind ( binder ( ) , com.google.gerrit.common.EventDispatcher.class ) . to ( com.google.gerrit.common.EventBroker.class ) ; }
Source:
public void onSuccess ( com.google.gerrit.client.changes.CommentInfo result ) { enableEdit ( true ) ; set ( result ) ; setEdit ( false ) ; if ( autoClosed ) { setOpen ( false ) ; } }

Target:
public void onSuccess ( com.google.gerrit.client.changes.CommentInfo result ) { enableEdit ( true ) ; set ( result ) ; setEdit ( false ) ; if ( autoClosed ) { setOpen ( false ) ; } parent.updateUnsaved ( this , false ) ; }
Source:
public void tearDown ( ) { lifecycle.stop ( ) ; requestContext.setContext ( null ) ; db.close ( ) ; com.google.gerrit.testutil.InMemoryDatabase.drop ( schemaFactory ) ; }

Target:
public void tearDownInjector ( ) { lifecycle.stop ( ) ; requestContext.setContext ( null ) ; db.close ( ) ; com.google.gerrit.testutil.InMemoryDatabase.drop ( schemaFactory ) ; }
Source:
public void isDisabledForInvalidRef ( ) throws java.lang.Exception { com.googlesource.gerrit.plugins.uploadvalidator.ValidatorConfig config = getConfig ( ( "[plugin \"uploadvalidator\"]\n" + ( " ref = anInvalidRef\n" + " blockedFileExtension = jar" ) ) ) ; com.google.common.truth.Truth.assertThat ( config.isEnabledForRef ( projectName , "refs/heads/anyref" , "blockedFileExtension" ) ) . isFalse ( ) ; }

Target:
public void isDisabledForInvalidRef ( ) throws java.lang.Exception { com.googlesource.gerrit.plugins.uploadvalidator.ValidatorConfig config = getConfig ( ( "[plugin \"uploadvalidator\"]\n" + ( " ref = anInvalidRef\n" + " blockedFileExtension = jar" ) ) ) ; com.google.common.truth.Truth.assertThat ( config.isEnabledForRef ( anyUser , projectName , "refs/heads/anyref" , "blockedFileExtension" ) ) . isFalse ( ) ; }
Source:
public com.google.gerrit.server.group.CreateGroup create ( com.google.gerrit.extensions.restapi.TopLevelResource root , java.lang.String name ) { return createGroup.create ( com.google.gerrit.extensions.restapi.Url.decode ( name ) ) ; }

Target:
public com.google.gerrit.server.group.CreateGroup create ( com.google.gerrit.extensions.restapi.TopLevelResource root , com.google.gerrit.extensions.restapi.IdString name ) { return createGroup.create ( name.get ( ) ) ; }
Source:
protected void onMovePointerTo ( java.lang.String projectName ) { if ( ( ! ( projectsPopup.isPoppingUp ( ) ) ) || ( "" . equals ( nameBox.getText ( ) ) ) ) { nameBox.setText ( projectName ) ; } }

Target:
protected void openRow ( java.lang.String projectName ) { nameBox.setText ( projectName ) ; doAddNew ( ) ; }
Source:
protected void configure ( ) { bind ( com.google.gerrit.server.notedb.ChangeNotesCache.class ) ; cache ( com.google.gerrit.server.notedb.ChangeNotesCache.CACHE_NAME , com.google.gerrit.server.notedb.ChangeNotesCache.Key.class , com.google.gerrit.server.notedb.ChangeNotesState.class ) . maximumWeight ( 1000 ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.server.notedb.ChangeNotesCache.class ) ; cache ( com.google.gerrit.server.notedb.ChangeNotesCache.CACHE_NAME , com.google.gerrit.server.notedb.ChangeNotesCache.Key.class , com.google.gerrit.server.notedb.ChangeNotesState.class ) . weigher ( com.google.gerrit.server.notedb.ChangeNotesCache.Weigher.class ) . maximumWeight ( ( 10 << 20 ) ) ; }
Source:
private void onDiscoveryFailure ( ) { showError ( OpenIdUtil.C.notSupported ( ) ) ; enable ( true ) ; providerId.selectAll ( ) ; providerId.setFocus ( true ) ; }

Target:
private void enableRetryDiscovery ( ) { enable ( true ) ; providerId.selectAll ( ) ; providerId.setFocus ( true ) ; }
Source:
public java.util.Map < java.lang.String , java.util.List < com.google.gerrit.extensions.common.CommentInfo > > apply ( com.google.gerrit.server.change.RevisionResource rsrc ) throws com.google.gwtorm.server.OrmException { return commentJson.format ( listComments ( rsrc ) , includeAuthorInfo ( ) ) ; }

Target:
public java.util.Map < java.lang.String , java.util.List < com.google.gerrit.extensions.common.CommentInfo > > apply ( com.google.gerrit.server.change.RevisionResource rsrc ) throws com.google.gwtorm.server.OrmException { return commentJson.get ( ) . setFillAccounts ( includeAuthorInfo ( ) ) . format ( listComments ( rsrc ) ) ; }
Source:
protected void configureServlets ( ) { filter ( "/*" ) . through ( com.google.gerrit.httpd.RequireSslFilter.class ) ; }

Target:
protected void configureServlets ( ) { if ( wantSsl ) { filter ( "/*" ) . through ( com.google.gerrit.httpd.RequireSslFilter.class ) ; } }
Source:
public void update ( java.lang.Iterable < T > instances ) throws com.google.gwtorm.client.OrmException { for ( T obj : instances ) { upsertOne ( obj , true ) ; } maybeFlush ( ) ; }

Target:
public void update ( java.lang.Iterable < T > instances ) throws com.google.gwtorm.client.OrmException { for ( T obj : instances ) { upsertOne ( obj , true ) ; } db.flush ( ) ; }
Source:
public void onSuccess ( final com.google.gerrit.client.data.SingleListChangeInfo result ) { display ( result ) ; }

Target:
public void onLoad ( ) { super . onLoad ( ) ; Util.LIST_SVC.myDraftChanges ( loadCallback ( ) ) ; }
Source:
protected void configure ( ) { bind ( com.google.gerrit.server.index.IndexRewriter.class ) ; bind ( com.google.gerrit.server.index.IndexCollection.class ) ; listener ( ) . to ( com.google.gerrit.server.index.IndexCollection.class ) ; factory ( ChangeIndexer.Factory.class ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.server.index.change.IndexRewriter.class ) ; bind ( com.google.gerrit.server.index.IndexCollection.class ) ; listener ( ) . to ( com.google.gerrit.server.index.IndexCollection.class ) ; factory ( ChangeIndexer.Factory.class ) ; }
Source:
protected com.google.gwtorm.client.ResultSet scanPrimaryKey ( byte [ ] fromKey , byte [ ] toKey , int limit ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
protected com.google.gwtorm.client.ResultSet scanPrimaryKey ( byte [ ] fromKey , byte [ ] toKey , int limit , boolean order ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
public void onGitReferenceUpdated ( com.google.gerrit.extensions.events.GitReferenceUpdatedListener.Event event ) { for ( com.googlesource.gerrit.plugins.branchnetwork.data.Update update : event.getUpdates ( ) ) { if ( update.getRefName ( ) . startsWith ( "refs/heads" ) ) { networkGraphDataCache.refresh ( event.getProjectName ( ) ) ; return ; } } }

Target:
public void onGitReferenceUpdated ( com.google.gerrit.extensions.events.GitReferenceUpdatedListener.Event event ) { if ( event.getRefName ( ) . startsWith ( "refs/heads/" ) ) { networkGraphDataCache.refresh ( event.getProjectName ( ) ) ; } }
Source:
public void setRevision ( final java.lang.String pattern ) { revision = pattern ; }

Target:
public void setRevision ( java.lang.String str ) { revision = str ; }
Source:
public void testEvictAccountsOK ( ) throws java.lang.Exception { setupMocks ( Constants.ACCOUNTS , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.ID_RESPONSE , true , false ) ; com.google.common.truth.Truth.assertThat ( restClient.evict ( com.ericsson.gerrit.plugins.evictcache.RestSessionTest.SOURCE_NAME , Constants.ACCOUNTS , createMock ( Account.Id.class ) ) ) . isTrue ( ) ; }

Target:
public void testEvictGroupsOK ( ) throws java.lang.Exception { setupMocks ( Constants.GROUPS , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.ID_RESPONSE , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.OK_RESPONSE , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.DO_NOT_THROW_EXCEPTION ) ; com.google.common.truth.Truth.assertThat ( restClient.evict ( com.ericsson.gerrit.plugins.evictcache.RestSessionTest.SOURCE_NAME , Constants.GROUPS , org.mockito.Mockito.mock ( AccountGroup.Id.class ) ) ) . isTrue ( ) ; }
Source:
public com.google.gerrit.extensions.api.projects.ConfigInfo config ( com.google.gerrit.extensions.api.projects.ConfigInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { return putConfig.apply ( checkExists ( ) , in ) ; }

Target:
public com.google.gerrit.extensions.api.projects.ConfigInfo config ( com.google.gerrit.extensions.api.projects.ConfigInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return putConfig.apply ( checkExists ( ) , in ) ; } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.api.ApiUtil.asRestApiException ( "Cannot list tags" , e ) ; } }
Source:
private com.google.gerrit.server.notedb.ChangeNotesParser newParser ( org.eclipse.jgit.lib.ObjectId tip ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Change c = newChange ( ) ; return new com.google.gerrit.server.notedb.ChangeNotesParser ( c.getProject ( ) , c.getId ( ) , tip , walk , repoManager ) ; }

Target:
private com.google.gerrit.server.notedb.ChangeNotesParser newParser ( org.eclipse.jgit.lib.ObjectId tip ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Change c = newChange ( ) ; return new com.google.gerrit.server.notedb.ChangeNotesParser ( c.getProject ( ) , c.getId ( ) , tip , walk , repoManager , changeNoteUtil , commentsUtil ) ; }
Source:
public void onClick ( com.google.gwt.user.client.ui.Widget sender ) { form.submit ( ) ; }

Target:
public void onClick ( final com.google.gwt.event.dom.client.ClickEvent event ) { form.submit ( ) ; }
Source:
public com.google.gerrit.server.project.SubmitRuleEvaluator setRule ( @ com.google.gerrit.common.Nullable java.lang.String rule ) { this . rule = rule ; return this ; }

Target:
public com.google.gerrit.server.project.SubmitRuleEvaluator setRule ( @ com.google.gerrit.common.Nullable java.lang.String rule ) { checkNotStarted ( ) ; optsBuilder.rule ( rule ) ; return this ; }
Source:
void deleteSshKey ( com.google.gerrit.client.reviewdb.AccountSshKey.Id id , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwtjsonrpc.client.VoidResult > callback ) ;

Target:
void deleteSshKeys ( java.util.Set < com.google.gerrit.client.reviewdb.AccountSshKey.Id > ids , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwtjsonrpc.client.VoidResult > callback ) ;
Source:
public void updateRepo ( com.google.gerrit.server.git.BatchUpdate.RepoContext ctx ) throws java.io.IOException { ctx.addRefUpdate ( new org.eclipse.jgit.transport.ReceiveCommand ( org.eclipse.jgit.lib.ObjectId.zeroId ( ) , commit , getPatchSetId ( ) . toRefName ( ) , ReceiveCommand.Type.CREATE ) ) ; }

Target:
public void updateRepo ( com.google.gerrit.server.git.BatchUpdate.RepoContext ctx ) throws com.google.gerrit.server.project.InvalidChangeOperationException , java.io.IOException { init ( ) ; validate ( ) ; ctx.addRefUpdate ( new org.eclipse.jgit.transport.ReceiveCommand ( org.eclipse.jgit.lib.ObjectId.zeroId ( ) , commit , getPatchSetId ( ) . toRefName ( ) , ReceiveCommand.Type.CREATE ) ) ; }
Source:
public int getSessionAge ( ) { return sConfig.maxSessionAge ; }

Target:
public int getSessionAge ( ) { return sessionAge ; }
Source:
public void run ( ) { if ( cm.hasVimSearchHighlight ( ) ) { net.codemirror.lib.CodeMirror.handleVimKey ( cm , "n" ) ; } else { diffChunkNav ( cm , com.google.gerrit.client.diff.SideBySide2.Direction.NEXT ) . run ( ) ; } }

Target:
public void run ( ) { if ( cm.hasVimSearchHighlight ( ) ) { net.codemirror.lib.CodeMirror.handleVimKey ( cm , "n" ) ; } else { chunkManager.diffChunkNav ( cm , Direction.NEXT ) . run ( ) ; } }
Source:
public void testEndsOnNewline ( ) { com.google.gerrit.client.diff.CodeMirrorDemo.EditIterator iter = new com.google.gerrit.client.diff.CodeMirrorDemo.EditIterator ( lines , 0 ) ; assertLineChsEqual ( net.codemirror.lib.LineCharacter.create ( 1 ) , iter.advance ( 4 ) ) ; }

Target:
public void testEndsOnNewline ( ) { com.google.gerrit.client.diff.SideBySide2.EditIterator iter = new com.google.gerrit.client.diff.SideBySide2.EditIterator ( lines , 0 ) ; assertLineChsEqual ( net.codemirror.lib.LineCharacter.create ( 1 ) , iter.advance ( 4 ) ) ; }
Source:
void onEditMode ( com.google.gwt.event.dom.client.ClickEvent e ) { fileTableMode = FileTable.Mode.EDIT ; refreshFileTable ( ) ; editMode.setVisible ( false ) ; reviewMode.setVisible ( true ) ; }

Target:
void onEditMode ( com.google.gwt.event.dom.client.ClickEvent e ) { fileTableMode = FileTable.Mode.EDIT ; refreshFileTable ( ) ; editMode.setVisible ( false ) ; addFile.setVisible ( true ) ; reviewMode.setVisible ( true ) ; }
Source:
public final void init ( ) { if ( ( labels0 ( ) ) != null ) { labels0 ( ) . copyKeysIntoChildren ( "_name" ) ; } }

Target:
public final void init ( ) { if ( ( all_labels ( ) ) != null ) { all_labels ( ) . copyKeysIntoChildren ( "_name" ) ; } }
Source:
public com.google.gerrit.reviewdb.client.ChangeMessage getChangeMessage ( ) { if ( ( message ) == null ) { return null ; } }

Target:
public com.google.gerrit.reviewdb.client.ChangeMessage getChangeMessage ( ) { if ( ( message ) == null ) { return null ; } com.google.common.base.Preconditions.checkState ( ( ( changeMessage ) != null ) , "getChangeMessage() only valid after inserting change" ) ; return changeMessage ; }
Source:
public void groupCannotBeRenamedWithoutSpecifiedUuid ( ) throws java.lang.Exception { createGroup ( groupUuid , groupName ) ; com.google.gerrit.reviewdb.client.AccountGroup.NameKey anotherName = new com.google.gerrit.reviewdb.client.AccountGroup.NameKey ( "admins" ) ; expectedException.expect ( java.lang.NullPointerException.class ) ; com.google.gerrit.server.group.db.GroupNameNotes.loadForRename ( repo , null , groupName , anotherName ) ; }

Target:
public void groupCannotBeRenamedWithoutSpecifiedUuid ( ) throws java.lang.Exception { createGroup ( groupUuid , groupName ) ; com.google.gerrit.reviewdb.client.AccountGroup.NameKey anotherName = new com.google.gerrit.reviewdb.client.AccountGroup.NameKey ( "admins" ) ; expectedException.expect ( java.lang.NullPointerException.class ) ; com.google.gerrit.server.group.db.GroupNameNotes.forRename ( repo , null , groupName , anotherName ) ; }
Source:
private boolean couldDeleteWhenIn ( com.google.gerrit.reviewdb.client.Change.Status status ) { switch ( status ) { case NEW : case ABANDONED : return true ; case MERGED : return false ; } return false ; }

Target:
private static boolean isChangeDeletable ( com.google.gerrit.reviewdb.client.Change.Status status ) { if ( status == ( Change.Status.MERGED ) ) { return false ; } return true ; }
Source:
public static com.google.gerrit.index.query.Predicate < com.google.gerrit.server.account.AccountState > externalId ( java.lang.String externalId ) { return new com.google.gerrit.server.query.account.AccountPredicates.AccountPredicate ( com.google.gerrit.server.index.account.AccountField.EXTERNAL_ID , externalId ) ; }

Target:
public static com.google.gerrit.index.query.Predicate < com.google.gerrit.server.account.AccountState > externalIdIncludingSecondaryEmails ( java.lang.String externalId ) { return new com.google.gerrit.server.query.account.AccountPredicates.AccountPredicate ( com.google.gerrit.server.index.account.AccountField.EXTERNAL_ID , externalId ) ; }
Source:
public com.google.gerrit.extensions.api.projects.BranchInfo apply ( com.google.gerrit.server.project.BranchResource rsrc , com.google.gerrit.extensions.api.projects.BranchInput input ) throws com.google.gerrit.extensions.restapi.ResourceConflictException { throw new com.google.gerrit.extensions.restapi.ResourceConflictException ( ( ( "Branch \"" + ( rsrc.getBranchInfo ( ) . ref ) ) + "\" already exists" ) ) ; }

Target:
public com.google.gerrit.extensions.api.projects.BranchInfo apply ( com.google.gerrit.server.project.BranchResource rsrc , com.google.gerrit.extensions.api.projects.BranchInput input ) throws com.google.gerrit.extensions.restapi.ResourceConflictException { throw new com.google.gerrit.extensions.restapi.ResourceConflictException ( ( ( "Branch \"" + ( rsrc.getRef ( ) ) ) + "\" already exists" ) ) ; }
Source:
public com.google.gerrit.server.group.CreateGroup create ( com.google.gerrit.extensions.restapi.TopLevelResource root , java.lang.String name ) { return createGroup.create ( name ) ; }

Target:
public com.google.gerrit.server.group.CreateGroup create ( com.google.gerrit.extensions.restapi.TopLevelResource root , java.lang.String name ) { return createGroup.create ( com.google.gerrit.server.util.Url.decode ( name ) ) ; }
Source:
protected void configure ( ) { bind ( com.google.gerrit.server.config.SitePaths.class ) . toInstance ( site ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.server.config.SitePaths.class ) . toInstance ( site ) ; factory ( ChangeData.Factory.class ) ; }
Source:
public java.lang.String getSchemeRest ( final java.lang.String scheme ) { return isScheme ( scheme ) ? getExternalId ( ) . substring ( scheme.length ( ) ) : null ; }

Target:
public java.lang.String getSchemeRest ( ) { java.lang.String id = getExternalId ( ) ; int c = id.indexOf ( ':' ) ; return 0 < c ? id.substring ( ( c + 1 ) ) : null ; }
Source:
void onReplyDone ( com.google.gwt.event.dom.client.ClickEvent e ) { if ( ( replyBox ) == null ) { com.google.gerrit.client.diff.DraftBox box = getDiffView ( ) . addReply ( getOriginal ( ) , "Done" , true ) ; registerReplyBox ( box ) ; } else { openReplyBox ( ) ; } }

Target:
com.google.gerrit.client.diff.DraftBox addReplyBox ( ) { com.google.gerrit.client.diff.DraftBox box = parent.addDraftBox ( parent.createReply ( comment ) ) ; registerReplyBox ( box ) ; return box ; }
Source:
com.google.gerrit.server.change.ChangeInserter create ( com.google.gerrit.server.project.RefControl ctl , com.google.gerrit.reviewdb.client.Change c , org.eclipse.jgit.revwalk.RevCommit rc ) ;

Target:
com.google.gerrit.server.change.ChangeInserter create ( com.google.gerrit.server.project.RefControl ctl , com.google.gerrit.reviewdb.client.Change.Id cid , org.eclipse.jgit.revwalk.RevCommit rc ) ;
Source:
public void init ( javax.servlet.FilterConfig config ) throws javax.servlet.ServletException { for ( com.google.gerrit.httpd.AllRequestFilter f : filters ) { f.init ( config ) ; } }

Target:
public synchronized void destroy ( ) { java.lang.Iterable < com.google.gerrit.httpd.AllRequestFilter > filtersToDestroy = initializedFilters ; initializedFilters = new com.google.gerrit.extensions.registration.DynamicSet ( ) ; for ( com.google.gerrit.httpd.AllRequestFilter filter : filtersToDestroy ) { filter.destroy ( ) ; } }
Source:
public com.googlesrouce.gerrit.plugins.github.git.GHCompare getCompare ( com.googlesrouce.gerrit.plugins.github.git.GHCommit id1 , com.googlesrouce.gerrit.plugins.github.git.GHCommit id2 ) throws java.io.IOException { return ghRepository.getCompare ( id1 , id2 ) ; }

Target:
public com.googlesource.gerrit.plugins.github.git.GHCompare getCompare ( com.googlesource.gerrit.plugins.github.git.GHCommit id1 , com.googlesource.gerrit.plugins.github.git.GHCommit id2 ) throws java.io.IOException { return ghRepository.getCompare ( id1 , id2 ) ; }
Source:
protected boolean removeEldestEntry ( java.util.Map.Entry < java.lang.String , com.google.gerrit.client.reviewdb.Change.Id > eldest ) { return ( size ( ) ) >= 5 ; }

Target:
public void onCellClicked ( com.google.gwt.user.client.ui.SourcesTableEvents sender , int row , int cell ) { if ( cell == ( com.google.gerrit.client.changes.ChangeTable.C_STAR ) ) { onStarClick ( row ) ; } }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < com.google.gerrit.reviewdb.AccountDiffPreference > event ) { update ( event.getValue ( ) ) ; }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { setReviewedByCurrentUser ( event.getValue ( ) ) ; }
Source:
com.google.gerrit.server.account.PerformCreateGroup create ( ) ;

Target:
com.google.gerrit.server.account.PerformCreateGroup create ( com.google.gerrit.server.account.CreateGroupArgs createGroupArgs ) ;
Source:
public com.googlesource.gerrit.plugins.webhooks.processors.GerritEventProcessor create ( com.google.gerrit.server.events.ProjectEvent event ) { return new com.googlesource.gerrit.plugins.webhooks.processors.GerritEventProcessor ( event ) ; }

Target:
public java.util.Optional < com.googlesource.gerrit.plugins.webhooks.EventProcessor.Request > doProcess ( com.google.gerrit.server.events.ProjectEvent event , com.googlesource.gerrit.plugins.webhooks.RemoteConfig remote ) { return java.util.Optional.of ( new com.googlesource.gerrit.plugins.webhooks.EventProcessor.Request ( com.googlesource.gerrit.plugins.webhooks.processors.GerritEventProcessor.GSON.toJson ( event ) ) ) ; }
Source:
void setVisibleA ( boolean show ) { visibleA = show ; if ( show ) { removeStyleName ( com.google.gerrit.client.diff.DiffTable.style.hideA ( ) ) ; } else { addStyleName ( com.google.gerrit.client.diff.DiffTable.style.hideA ( ) ) ; } }

Target:
void setVisibleA ( boolean show ) { visibleA = show ; if ( show ) { removeStyleName ( com.google.gerrit.client.diff.DiffTable.style.hideA ( ) ) ; parent.syncScroll ( DisplaySide.B ) ; } else { addStyleName ( com.google.gerrit.client.diff.DiffTable.style.hideA ( ) ) ; } }
Source:
private java.lang.String link ( final com.google.gerrit.reviewdb.Project item ) { return com.google.gerrit.client.Dispatcher.toProjectAdmin ( item.getNameKey ( ) , ProjectAdminScreen.INFO_TAB ) ; }

Target:
private java.lang.String link ( final com.google.gerrit.reviewdb.Project item ) { return com.google.gerrit.client.Dispatcher.toProjectAdmin ( item.getNameKey ( ) , ProjectScreen.INFO ) ; }
Source:
public com.google.gitiles.GitilesView.Builder setExtension ( java.lang.String extension ) { if ( ( type ) != ( com.google.gitiles.GitilesView.Type.ARCHIVE ) ) { com.google.common.base.Preconditions.checkState ( ( extension == null ) , "cannot set extension on %s view" , type ) ; } this . extension = extension ; return this ; }

Target:
public com.google.gitiles.GitilesView.Builder setExtension ( java.lang.String extension ) { switch ( type ) { default : com.google.common.base.Preconditions.checkState ( ( extension == null ) , "cannot set extension on %s view" , type ) ; case ARCHIVE : this . extension = extension ; break ; } return this ; }
Source:
public void onSuccess ( com.google.gerrit.client.account.ProjectCapabilities result ) { addPanel.setVisible ( result.canPerform ( ProjectCapabilities.CREATE_REF ) ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.access.ProjectAccessInfo result ) { addPanel.setVisible ( result.canAddRefs ( ) ) ; }
Source:
private org.eclipse.jgit.lib.PersonIdent newRefLogIdent ( ) { com.google.gerrit.server.CurrentUser u = user.get ( ) ; if ( u.isIdentifiedUser ( ) ) { return ( ( com.google.gerrit.server.IdentifiedUser ) ( u ) ) . newRefLogIdent ( ) ; } else { return serverIdent.get ( ) ; } }

Target:
private org.eclipse.jgit.lib.PersonIdent newRefLogIdent ( ) { com.google.gerrit.server.CurrentUser u = user.get ( ) ; if ( u.isIdentifiedUser ( ) ) { return u.asIdentifiedUser ( ) . newRefLogIdent ( ) ; } else { return serverIdent.get ( ) ; } }
Source:
public com.google.gerrit.extensions.client.DiffPreferencesInfo apply ( com.google.gerrit.server.config.ConfigResource configResource ) throws com.google.gerrit.extensions.restapi.BadRequestException , com.google.gerrit.extensions.restapi.ResourceConflictException , java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { try ( org.eclipse.jgit.lib.Repository git = gitManager.openRepository ( allUsersName ) ) { return com.google.gerrit.server.account.PreferencesConfig.readDefaultDiffPreferences ( git ) ; } }

Target:
public com.google.gerrit.extensions.client.DiffPreferencesInfo apply ( com.google.gerrit.server.config.ConfigResource configResource ) throws com.google.gerrit.extensions.restapi.BadRequestException , com.google.gerrit.extensions.restapi.ResourceConflictException , java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { try ( org.eclipse.jgit.lib.Repository git = gitManager.openRepository ( allUsersName ) ) { return com.google.gerrit.server.account.Preferences.readDefaultDiffPreferences ( git ) ; } }
Source:
public static boolean isSignedIn ( ) { return ( com.google.gerrit.client.Gerrit.myAccount ) != null ; }

Target:
public static com.google.gerrit.client.reviewdb.Account getUserAccount ( ) { return com.google.gerrit.client.Gerrit.myAccount ; }
Source:
public com.google.gwtorm.client.SchemaFactory < com.google.gerrit.client.reviewdb.ReviewDb > getSchemaFactory ( ) { return db ; }

Target:
private net.sf.ehcache.constructs.blocking.SelfPopulatingCache startCacheSshKeys ( ) { final net.sf.ehcache.Cache dc = com.google.gerrit.server.GerritServer.cacheMgr.getCache ( "sshkeys" ) ; final net.sf.ehcache.constructs.blocking.SelfPopulatingCache r ; r = new net.sf.ehcache.constructs.blocking.SelfPopulatingCache ( dc , new com.google.gerrit.server.ssh.SshKeyCacheEntryFactory ( db ) ) ; com.google.gerrit.server.GerritServer.cacheMgr.replaceCacheWithDecoratedCache ( dc , r ) ; return r ; }
Source:
private java.lang.String link ( final com.google.gerrit.client.reviewdb.Project item ) { return com.google.gerrit.client.Link.toProjectAdmin ( item.getId ( ) , ProjectAdminScreen.INFO_TAB ) ; }

Target:
private java.lang.String link ( final com.google.gerrit.client.reviewdb.Project item ) { return com.google.gerrit.client.Link.toProjectAdmin ( item.getNameKey ( ) , ProjectAdminScreen.INFO_TAB ) ; }
Source:
private com.googlesource.gerrit.plugins.its.rtc.network.RTCHttpParams.ParameterParser getParameterParser ( java.lang.String name ) { return com.google.common.base.Objects.firstNonNull ( com.googlesource.gerrit.plugins.its.rtc.network.RTCHttpParams.TYPES.get ( name ) , com.googlesource.gerrit.plugins.its.rtc.network.RTCHttpParams.TYPE_STRING ) ; }

Target:
private com.googlesource.gerrit.plugins.its.rtc.network.RTCHttpParams.ParameterParser getParameterParser ( java.lang.String name ) { return com.google.common.base.MoreObjects.firstNonNull ( com.googlesource.gerrit.plugins.its.rtc.network.RTCHttpParams.TYPES.get ( name ) , com.googlesource.gerrit.plugins.its.rtc.network.RTCHttpParams.TYPE_STRING ) ; }
Source:
public void subsetOfBranchesVisibleIncludingHead ( ) throws java.lang.Exception { allow ( Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/heads/master" ) ; deny ( Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/heads/branch" ) ; assertRefs ( "HEAD" , "refs/changes/01/1/1" , "refs/heads/master" ) ; }

Target:
public void allRefsVisibleWithRefsMetaConfig ( ) throws java.lang.Exception { allow ( Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/*" ) ; allow ( Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/meta/config" ) ; assertRefs ( "HEAD" , "refs/changes/01/1/1" , "refs/changes/01/1/meta" , "refs/changes/02/2/1" , "refs/changes/02/2/meta" , "refs/heads/branch" , "refs/heads/master" , "refs/meta/config" ) ; }
Source:
public com.google.common.util.concurrent.CheckedFuture < ? , java.io.IOException > indexAsync ( com.google.gerrit.reviewdb.client.Change.Id id ) { return ( executor ) != null ? submit ( new com.google.gerrit.server.index.ChangeIndexer.Task ( id , false ) ) : com.google.common.util.concurrent.Futures.< java.lang.Object , java.io.IOException > immediateCheckedFuture ( null ) ; }

Target:
public com.google.common.util.concurrent.CheckedFuture < ? , java.io.IOException > indexAsync ( com.google.gerrit.reviewdb.client.Change.Id id ) { return ( executor ) != null ? submit ( new com.google.gerrit.server.index.ChangeIndexer.IndexTask ( id ) ) : com.google.common.util.concurrent.Futures.< java.lang.Object , java.io.IOException > immediateCheckedFuture ( null ) ; }
Source:
private static java.lang.Iterable < com.google.gerrit.reviewdb.client.Change > bumpRowVersionNotLastUpdatedOn ( com.google.gerrit.server.git.BatchUpdate.ChangeContext ctx ) { return java.util.Collections.singleton ( ctx.getChange ( ) ) ; }

Target:
private void logDebug ( java.lang.String msg , java.lang.Throwable t ) { if ( com.google.gerrit.server.git.BatchUpdate.log.isDebugEnabled ( ) ) { this . logDebug ( ( ( ( "[" + ( taskId ) ) + "]" ) + msg ) , t ) ; } }
Source:
public void unblockMoreSpecificRefInLocal_Fails ( ) { com.google.gerrit.server.project.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.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/heads/master" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.Util.DEVS ) ; assertCannotUpdate ( "refs/heads/master" , u ) ; }

Target:
public void unblockMoreSpecificRef_Fails ( ) { com.google.gerrit.server.project.testing.Util.block ( local , 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 , com.google.gerrit.server.project.testing.Util.DEVS , "refs/heads/master" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.testing.Util.DEVS ) ; assertCannotUpdate ( "refs/heads/master" , u ) ; }
Source:
java.util.List < org.eclipse.jgit.dircache.DirCacheEditor.PathEdit > getPathEdits ( org.eclipse.jgit.lib.Repository repository ) throws java.io.IOException ;

Target:
java.util.List < org.eclipse.jgit.dircache.DirCacheEditor.PathEdit > getPathEdits ( org.eclipse.jgit.lib.Repository repository , org.eclipse.jgit.revwalk.RevCommit baseCommit ) throws java.io.IOException ;
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent arg0 ) { if ( cb.getValue ( ) ) { scriptSettings.setWhitespace ( com.google.gerrit.client.data.PatchScriptSettings.Whitespace.IGNORE_SPACE_CHANGE ) ; } else { scriptSettings.setWhitespace ( com.google.gerrit.client.data.PatchScriptSettings.Whitespace.IGNORE_NONE ) ; } refresh ( false ) ; }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { if ( event.getValue ( ) ) { scriptSettings.setWhitespace ( com.google.gerrit.client.data.PatchScriptSettings.Whitespace.IGNORE_SPACE_CHANGE ) ; } else { scriptSettings.setWhitespace ( com.google.gerrit.client.data.PatchScriptSettings.Whitespace.IGNORE_NONE ) ; } refresh ( false ) ; }
Source:
public void listNonExistingGroupIncludes_NotFound ( ) throws java.lang.Exception { java.lang.String name = name ( "non-existing" ) ; com.google.common.truth.Truth.assertThat ( adminSession.get ( ( ( "/groups/" + name ) + "/groups/" ) ) . getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_NOT_FOUND ) ; }

Target:
public void listEmptyGroupIncludes ( ) throws java.lang.Exception { java.lang.String gx = group ( "gx" ) ; com.google.common.truth.Truth.assertThat ( gApi.groups ( ) . id ( gx ) . includedGroups ( ) ) . isEmpty ( ) ; }
Source:
public void remove ( java.lang.String key ) throws java.io.IOException { java.nio.file.Path replicationStatusPath = getReplicationStatusPath ( key ) ; if ( java.nio.file.Files.exists ( replicationStatusPath ) ) { java.nio.file.Files.delete ( replicationStatusPath ) ; } }

Target:
private java.nio.file.Path getReplicationStatusPath ( java.lang.String key ) throws java.io.IOException { java.nio.file.Path projectPath = pluginData.resolve ( ( ( getSanitizedKey ( key ) ) + ".replication-error.json" ) ) ; java.nio.file.Files.createDirectories ( projectPath.getParent ( ) ) ; return projectPath ; }
Source:
private java.lang.String urlDelete ( com.google.gerrit.reviewdb.client.Change c ) { return ( ( ( ( "/changes/" + ( c.getChangeId ( ) ) ) + "/edits/" ) + 0 ) + "/files/" ) + ( com.google.gerrit.acceptance.edit.ChangeEditIT.FILE_NAME ) ; }

Target:
private java.lang.String urlPublish ( ) { return ( "/changes/" + ( change.getChangeId ( ) ) ) + "/publish_edit" ; }
Source:
void changeProjectAccess ( com.google.gerrit.reviewdb.Project.NameKey projectName , java.lang.String baseRevision , java.lang.String message , java.util.List < com.google.gerrit.common.data.AccessSection > sections , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.common.data.ProjectAccess > callback ) ;

Target:
void reviewProjectAccess ( com.google.gerrit.reviewdb.client.Project.NameKey projectName , java.lang.String baseRevision , java.lang.String message , java.util.List < com.google.gerrit.common.data.AccessSection > sections , com.google.gwtjsonrpc.common.AsyncCallback < com.google.gerrit.reviewdb.client.Change.Id > callback ) ;
Source:
public void onResize ( com.google.gwt.event.logical.shared.ResizeEvent event ) { resizeCodeMirror ( ) ; }

Target:
protected void preDisplay ( com.google.gerrit.client.projects.ConfigInfoCache.Entry result ) { commentManager = new com.google.gerrit.client.diff.CommentManager ( this , base , revision , path , result.getCommentLinkProcessor ( ) ) ; setTheme ( result.getTheme ( ) ) ; display ( comments ) ; }
Source:
private void autoReindexIfStale ( com.google.gerrit.reviewdb.client.Account.Id id ) { if ( autoReindexIfStale ) { @ java.lang.SuppressWarnings ( value = "unused" ) java.util.concurrent.Future < ? > possiblyIgnoredError = reindexIfStale ( id ) ; } }

Target:
private void autoReindexIfStale ( com.google.gerrit.reviewdb.client.Account.Id id ) { if ( autoReindexIfStale ) { @ java.lang.SuppressWarnings ( value = "unused" ) java.util.concurrent.Future < ? > possiblyIgnoredError = reindexIfStaleAsync ( id ) ; } }
Source:
public abstract java.util.Optional < com.google.gerrit.reviewdb.client.AccountGroup.UUID > getOwnerGroupUUID ( ) ;

Target:
public abstract java.util.Optional < com.google.gerrit.common.data.GroupReference > getOwnerGroupReference ( ) ;
Source:
public java.lang.String getHttpUrl ( ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; b.append ( "http://" ) ; b.append ( username ) ; b.append ( ":" ) ; b.append ( httpPassword ) ; b.append ( "@localhost:8080" ) ; return b.toString ( ) ; }

Target:
public java.lang.String getHttpUrl ( com.google.gerrit.acceptance.GerritServer server ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; b.append ( "http://" ) ; b.append ( username ) ; b.append ( ":" ) ; b.append ( httpPassword ) ; b.append ( ( "@localhost:" + ( server.getHttpPort ( ) ) ) ) ; return b.toString ( ) ; }
Source:
public com.googlesource.gerrit.plugins.webhooks.HttpSession get ( ) { return session.get ( ) ; }

Target:
public com.googlesource.gerrit.plugins.webhooks.HttpSession get ( ) { return session.create ( remote ) ; }
Source:
private boolean include ( org.pegdown.ast.HeaderNode h ) { if ( ( h.getLevel ( ) ) == 1 ) { return ( countH1 ) > 1 ; } return ( h.getLevel ( ) ) <= ( maxLevel ) ; }

Target:
private boolean include ( org.commonmark.node.Heading h ) { if ( ( h.getLevel ( ) ) == 1 ) { return ( countH1 ) > 1 ; } return ( h.getLevel ( ) ) <= ( maxLevel ) ; }
Source:
public void noNotificationForDraftChangesForWatchersInNotifyConfig ( ) throws java.lang.Exception { com.google.gerrit.server.mail.Address addr = new com.google.gerrit.server.mail.Address ( "Watcher" , "watcher@example.com" ) ; com.google.gerrit.server.git.NotifyConfig nc = new com.google.gerrit.server.git.NotifyConfig ( ) ; nc.addEmail ( addr ) ; nc.setName ( "team" ) ; nc.setHeader ( NotifyConfig.Header.TO ) ; nc.setTypes ( java.util.EnumSet.of ( NotifyType.NEW_CHANGES ) ) ; com.google.gerrit.server.git.ProjectConfig cfg = projectCache.checkedGet ( project ) . getConfig ( ) ; cfg.putNotifyConfig ( "team" , nc ) ; saveProjectConfig ( project , cfg ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = pushFactory.create ( db , admin.getIdent ( ) , testRepo , "draft change" , "a" , "a1" ) . to ( "refs/for/master%draft" ) ; r.assertOkStatus ( ) ; com.google.common.truth.Truth.assertThat ( sender.getMessages ( ) ) . isEmpty ( ) ; }

Target:
public void noNotificationForDraftChangesForWatchersInNotifyConfig ( ) throws java.lang.Exception { com.google.gerrit.server.mail.Address addr = new com.google.gerrit.server.mail.Address ( "Watcher" , "watcher@example.com" ) ; com.google.gerrit.server.git.NotifyConfig nc = new com.google.gerrit.server.git.NotifyConfig ( ) ; nc.addEmail ( addr ) ; nc.setName ( "team" ) ; nc.setHeader ( NotifyConfig.Header.TO ) ; nc.setTypes ( java.util.EnumSet.of ( NotifyType.NEW_CHANGES , NotifyType.ALL_COMMENTS ) ) ; com.google.gerrit.server.git.ProjectConfig cfg = projectCache.checkedGet ( project ) . getConfig ( ) ; cfg.putNotifyConfig ( "team" , nc ) ; saveProjectConfig ( project , cfg ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = pushFactory.create ( db , admin.getIdent ( ) , testRepo , "draft change" , "a" , "a1" ) . to ( "refs/for/master%draft" ) ; r.assertOkStatus ( ) ; com.google.common.truth.Truth.assertThat ( sender.getMessages ( ) ) . isEmpty ( ) ; setApiUser ( admin ) ; com.google.gerrit.extensions.api.changes.ReviewInput in = new com.google.gerrit.extensions.api.changes.ReviewInput ( ) ; in.message = "comment" ; gApi.changes ( ) . id ( r.getChangeId ( ) ) . current ( ) . review ( in ) ; com.google.common.truth.Truth.assertThat ( sender.getMessages ( ) ) . isEmpty ( ) ; }
Source:
public java.lang.String getExternalId ( ) { return externalId ; }

Target:
public ExternalId.Key getExternalIdKey ( ) { return externalId ; }
Source:
public void getCacheWithGerritPrefix ( ) throws java.lang.Exception { com.google.gerrit.acceptance.RestResponse r = adminSession.get ( "/config/server/caches/gerrit-accounts" ) ; org.junit.Assert.assertEquals ( HttpStatus.SC_OK , r.getStatusCode ( ) ) ; }

Target:
public void getCache_NotFound ( ) throws java.lang.Exception { com.google.gerrit.acceptance.RestResponse r = adminSession.get ( "/config/server/caches/nonExisting" ) ; com.google.common.truth.Truth.assertThat ( r.getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_NOT_FOUND ) ; }
Source:
private void enableForm ( final boolean on ) { ownerTxtBox.setEnabled ( on ) ; descTxt.setEnabled ( on ) ; }

Target:
private void enableForm ( final boolean on ) { ownerTxtBox.setEnabled ( on ) ; descTxt.setEnabled ( on ) ; delRight.setEnabled ( on ) ; }
Source:
private com.google.gerrit.client.diff.DraftBox addNewDraft ( net.codemirror.lib.CodeMirror cm , int line ) { com.google.gerrit.common.changes.Side side = getSideFromCm ( cm ) ; com.google.gerrit.client.changes.CommentInfo info = com.google.gerrit.client.changes.CommentInfo.create ( path , side , ( line + 1 ) , null , null ) ; return addDraftBox ( info , false ) ; }

Target:
private com.google.gerrit.client.diff.DraftBox addNewDraft ( net.codemirror.lib.CodeMirror cm , int line ) { return addDraftBox ( com.google.gerrit.client.changes.CommentInfo.createLine ( path , getSideFromCm ( cm ) , ( line + 1 ) , null , null ) ) ; }
Source:
public boolean equals ( java.lang.Object o ) { return ( o instanceof com.google.gerrit.server.git.gpg.Fingerprint ) && ( equalsBytes ( ( ( com.google.gerrit.server.git.gpg.Fingerprint ) ( o ) ) . fp ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { return ( o instanceof com.google.gerrit.gpg.Fingerprint ) && ( equalsBytes ( ( ( com.google.gerrit.gpg.Fingerprint ) ( o ) ) . fp ) ) ; }
Source:
static com.google.gerrit.client.account.AccountApi.HttpPasswordInput create ( ) { return ( ( com.google.gerrit.client.account.AccountApi.HttpPasswordInput ) ( createObject ( ) ) ) ; }

Target:
static com.google.gerrit.client.account.AccountApi.HttpPasswordInput create ( ) { return createObject ( ) . cast ( ) ; }
Source:
private void adjustCodeMirrorHeight ( ) { int rest = ( ( com.google.gerrit.client.Gerrit.getHeaderFooterHeight ( ) ) + ( header.getOffsetHeight ( ) ) ) + 5 ; cm.setHeight ( ( ( com.google.gwt.user.client.Window.getClientHeight ( ) ) - rest ) ) ; }

Target:
public void onResize ( com.google.gwt.event.logical.shared.ResizeEvent event ) { cm.adjustHeight ( header.getOffsetHeight ( ) ) ; }
Source:
public void onSuccess ( com.google.gerrit.client.changes.ReviewInput result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( changeId ) ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.changes.ReviewInput result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( changeId ) , new com.google.gerrit.client.change.ChangeScreen2 ( changeId , null , null , false , true ) ) ; }
Source:
public void destroy ( ) { com.google.gerrit.git.WorkQueue.terminate ( ) ; super . destroy ( ) ; }

Target:
public void destroy ( ) { com.google.gerrit.git.WorkQueue.terminate ( ) ; com.google.gerrit.server.GerritServer.closeDataSource ( ) ; super . destroy ( ) ; }
Source:
void replyTo ( com.google.gerrit.client.changes.ChangeInfo.MessageInfo info ) { replyAction.onReply ( info ) ; }

Target:
void replyTo ( com.google.gerrit.client.info.ChangeInfo.MessageInfo info ) { replyAction.onReply ( info ) ; }
Source:
public java.lang.String getContentType ( ) { java.lang.String enc = getCharacterEncoding ( ) ; if ( enc != null ) { return ( ( contentType ) + "; charset=" ) + enc ; } return contentType ; }

Target:
public java.lang.String getContentType ( ) { java.nio.charset.Charset enc = getCharacterEncoding ( ) ; if ( enc != null ) { return ( ( contentType ) + "; charset=" ) + ( enc.name ( ) ) ; } return contentType ; }
Source:
public java.lang.String getLoggableName ( ) { return getUserName ( ) . orElseGet ( ( ) -> "a/" + ( getAccountId ( ) . get ( ) ) ) ; }

Target:
public java.lang.String getLoggableName ( ) { return getUserName ( ) . orElseGet ( ( ) -> com.google.common.base.MoreObjects.firstNonNull ( getAccount ( ) . getPreferredEmail ( ) , ( "a/" + ( getAccountId ( ) . get ( ) ) ) ) ) ; }