auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void assertNoSubmitter ( java.lang.String changeId , int psId ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.server.notedb.ChangeNotes cn = notesFactory.create ( com.google.common.collect.Iterables.getOnlyElement ( queryProvider.get ( ) . byKeyPrefix ( changeId ) ) . change ( ) ) ; com.google.gerrit.reviewdb.client.PatchSetApproval submitter = approvalsUtil.getSubmitter ( db , cn , new com.google.gerrit.reviewdb.client.PatchSet.Id ( cn.getChangeId ( ) , psId ) ) ; com.google.common.truth.Truth.assertThat ( submitter ) . isNull ( ) ; }

Target:
protected void assertNoSubmitter ( java.lang.String changeId , int psId ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.server.notedb.ChangeNotes cn = notesFactory.create ( db , com.google.common.collect.Iterables.getOnlyElement ( queryProvider.get ( ) . byKeyPrefix ( changeId ) ) . change ( ) ) ; com.google.gerrit.reviewdb.client.PatchSetApproval submitter = approvalsUtil.getSubmitter ( db , cn , new com.google.gerrit.reviewdb.client.PatchSet.Id ( cn.getChangeId ( ) , psId ) ) ; com.google.common.truth.Truth.assertThat ( submitter ) . isNull ( ) ; }
Source:
private void addDiffChunk ( net.codemirror.lib.CodeMirror cmToPad , int line , int lineOnOther , int chunkSize , boolean edit ) { chunks.add ( new com.google.gerrit.client.diff.DiffChunkInfo ( host.otherCm ( cmToPad ) . side ( ) , ( ( lineOnOther - chunkSize ) + 1 ) , ( ( line - chunkSize ) + 1 ) , lineOnOther , edit ) ) ; }

Target:
private void addDiffChunk ( net.codemirror.lib.CodeMirror cmToPad , int lineOnOther , int chunkSize , boolean edit ) { chunks.add ( new com.google.gerrit.client.diff.DiffChunkInfo ( host.otherCm ( cmToPad ) . side ( ) , ( ( lineOnOther - chunkSize ) + 1 ) , lineOnOther , edit ) ) ; }
Source:
private void format ( java.io.OutputStream out ) throws java.io.IOException { out.write ( com.google.gerrit.server.change.GetPatch.formatEmailHeader ( commit ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; org.eclipse.jgit.diff.DiffFormatter fmt = new org.eclipse.jgit.diff.DiffFormatter ( out ) ; fmt.setRepository ( repo ) ; fmt.format ( base.getTree ( ) , commit.getTree ( ) ) ; fmt.flush ( ) ; }

Target:
private void format ( java.io.OutputStream out ) throws java.io.IOException { out.write ( com.google.gerrit.server.change.GetPatch.formatEmailHeader ( commit ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; try ( org.eclipse.jgit.diff.DiffFormatter fmt = new org.eclipse.jgit.diff.DiffFormatter ( out ) ) { fmt.setRepository ( repo ) ; fmt.format ( base.getTree ( ) , commit.getTree ( ) ) ; fmt.flush ( ) ; } }
Source:
public void noChangeMessage ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Change c = newChange ( ) ; com.google.gerrit.server.notedb.ChangeUpdate update = newUpdate ( c , changeOwner ) ; update.putReviewer ( changeOwner.getAccount ( ) . getId ( ) , com.google.gerrit.server.notedb.ReviewerState.REVIEWER ) ; update.commit ( ) ; com.google.gerrit.server.notedb.ChangeNotes notes = newNotes ( c ) ; com.google.common.collect.ListMultimap < com.google.gerrit.reviewdb.client.PatchSet.Id , com.google.gerrit.reviewdb.client.ChangeMessage > changeMessages = notes.getChangeMessages ( ) ; org.junit.Assert.assertEquals ( 0 , changeMessages.keySet ( ) . size ( ) ) ; }

Target:
public void noChangeMessage ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Change c = newChange ( ) ; com.google.gerrit.server.notedb.ChangeUpdate update = newUpdate ( c , changeOwner ) ; update.putReviewer ( changeOwner.getAccount ( ) . getId ( ) , com.google.gerrit.server.notedb.ReviewerState.REVIEWER ) ; update.commit ( ) ; com.google.gerrit.server.notedb.ChangeNotes notes = newNotes ( c ) ; com.google.common.truth.Truth.assertThat ( notes.getChangeMessages ( ) ) . isEmpty ( ) ; }
Source:
public java.util.Set < com.google.gerrit.reviewdb.client.Account.Id > getAll ( ) { final java.util.Set < com.google.gerrit.reviewdb.client.Account.Id > all = new java.util.HashSet < com.google.gerrit.reviewdb.client.Account.Id > ( ( ( reviewers.size ( ) ) + ( cc.size ( ) ) ) ) ; all.addAll ( reviewers ) ; all.addAll ( cc ) ; return java.util.Collections.unmodifiableSet ( all ) ; }

Target:
public java.util.Set < com.google.gerrit.reviewdb.client.Account.Id > getAll ( ) { final java.util.Set < com.google.gerrit.reviewdb.client.Account.Id > all = new java.util.HashSet ( ( ( reviewers.size ( ) ) + ( cc.size ( ) ) ) ) ; all.addAll ( reviewers ) ; all.addAll ( cc ) ; return java.util.Collections.unmodifiableSet ( all ) ; }
Source:
public void fire ( com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet patchSet , com.google.gerrit.reviewdb.client.Account.Id accountId , java.sql.Timestamp when ) { try { fire ( util.changeInfo ( change ) , util.revisionInfo ( change.getProject ( ) , patchSet ) , util.accountInfo ( accountId ) , when ) ; } catch ( com.google.gerrit.server.patch.PatchListNotAvailableException | com.google.gerrit.server.GpgException | java.io.IOException | com.google.gwtorm.server.OrmException e ) { com.google.gerrit.server.extensions.events.DraftPublished.log.error ( "Couldn't fire event" , e ) ; } }

Target:
public void fire ( com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet patchSet , com.google.gerrit.reviewdb.client.Account accountId , java.sql.Timestamp when ) { try { fire ( util.changeInfo ( change ) , util.revisionInfo ( change.getProject ( ) , patchSet ) , util.accountInfo ( accountId ) , when ) ; } catch ( com.google.gerrit.server.patch.PatchListNotAvailableException | com.google.gerrit.server.GpgException | java.io.IOException | com.google.gwtorm.server.OrmException e ) { com.google.gerrit.server.extensions.events.DraftPublished.log.error ( "Couldn't fire event" , e ) ; } }
Source:
public final java.lang.String getDisplayName ( ) { if ( ( created_by ( ) . username ( ) ) != null ) { return created_by ( ) . username ( ) ; } else { if ( ( created_by ( ) . _account_id ( ) ) != ( - 1 ) ) { return java.lang.Integer.toString ( created_by ( ) . _account_id ( ) ) ; } else { return "N/A" ; } } }

Target:
public final java.lang.String getDisplayName ( ) { if ( ( created_by ( ) . username ( ) ) != null ) { return created_by ( ) . username ( ) ; } if ( ( created_by ( ) . _account_id ( ) ) != ( - 1 ) ) { return java.lang.Integer.toString ( created_by ( ) . _account_id ( ) ) ; } return "N/A" ; }
Source:
private static java.util.List < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > sort ( java.util.Collection < ? extends com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > that ) { java.util.ArrayList < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > r = new java.util.ArrayList < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > ( that ) ; java.util.Collections.sort ( r , com.google.gerrit.server.query.change.AndSource.CMP ) ; return r ; }

Target:
private static java.util.List < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > sort ( java.util.Collection < ? extends com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > that ) { java.util.List < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > r = new java.util.ArrayList < > ( that ) ; java.util.Collections.sort ( r , com.google.gerrit.server.query.change.AndSource.CMP ) ; return r ; }
Source:
void testRelative ( java.lang.String a , java.lang.String b , java.lang.String want ) { java.lang.String got = com.googlesource.gerrit.plugins.supermanifest.JiriUpdater.relativize ( java.net.URI.create ( a ) , java.net.URI.create ( b ) ) . toString ( ) ; if ( ! ( got.equals ( want ) ) ) { org.junit.Assert.fail ( java.lang.String.format ( "relative('%s', '%s') = '%s', want '%s'" , a , b , got , want ) ) ; } }

Target:
void testRelative ( java.lang.String a , java.lang.String b , java.lang.String want ) throws java.lang.Exception { java.lang.String got = com.googlesource.gerrit.plugins.supermanifest.JiriUpdater.relativize ( java.net.URI.create ( a ) , java.net.URI.create ( b ) ) . toString ( ) ; if ( ! ( got.equals ( want ) ) ) { fail ( java.lang.String.format ( "relative('%s', '%s') = '%s', want '%s'" , a , b , got , want ) ) ; } }
Source:
public java.util.List < com.google.gerrit.reviewdb.client.Patch > toPatchList ( final com.google.gerrit.reviewdb.client.PatchSet.Id setId ) { final java.util.ArrayList < com.google.gerrit.reviewdb.client.Patch > r = new java.util.ArrayList < com.google.gerrit.reviewdb.client.Patch > ( patches.length ) ; for ( final com.google.gerrit.server.patch.PatchListEntry e : patches ) { r.add ( e.toPatch ( setId ) ) ; } return r ; }

Target:
public java.util.List < com.google.gerrit.reviewdb.client.Patch > toPatchList ( final com.google.gerrit.reviewdb.client.PatchSet.Id setId ) { final java.util.ArrayList < com.google.gerrit.reviewdb.client.Patch > r = new java.util.ArrayList ( patches.length ) ; for ( final com.google.gerrit.server.patch.PatchListEntry e : patches ) { r.add ( e.toPatch ( setId ) ) ; } return r ; }
Source:
public void submitWithFastForward ( ) throws java.lang.Exception { org.eclipse.jgit.api.Git git = createProject ( ) ; org.eclipse.jgit.revwalk.RevCommit oldHead = getRemoteHead ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result change = createChange ( git ) ; submit ( change.getChangeId ( ) ) ; org.eclipse.jgit.revwalk.RevCommit head = getRemoteHead ( ) ; com.google.common.truth.Truth.assertThat ( head.getId ( ) ) . isEqualTo ( change.getCommitId ( ) ) ; com.google.common.truth.Truth.assertThat ( head.getParent ( 0 ) ) . isEqualTo ( oldHead ) ; assertSubmitter ( change.getChangeId ( ) , 1 ) ; }

Target:
public void submitWithFastForward ( ) throws java.lang.Exception { org.eclipse.jgit.revwalk.RevCommit oldHead = getRemoteHead ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result change = createChange ( git ) ; submit ( change.getChangeId ( ) ) ; org.eclipse.jgit.revwalk.RevCommit head = getRemoteHead ( ) ; com.google.common.truth.Truth.assertThat ( head.getId ( ) ) . isEqualTo ( change.getCommitId ( ) ) ; com.google.common.truth.Truth.assertThat ( head.getParent ( 0 ) ) . isEqualTo ( oldHead ) ; assertSubmitter ( change.getChangeId ( ) , 1 ) ; }
Source:
private static Account.Id toAccountId ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.account.AccountResolver accountResolver , java.lang.String nameOrEmail ) throws com.google.gerrit.common.errors.NoSuchAccountException , com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.reviewdb.client.Account a = accountResolver.findByNameOrEmail ( db , nameOrEmail ) ; if ( a == null ) { throw new com.google.gerrit.common.errors.NoSuchAccountException ( ( ( "\"" + nameOrEmail ) + "\" is not registered" ) ) ; } return a.getId ( ) ; }

Target:
private static Account.Id toAccountId ( com.google.gerrit.server.account.AccountResolver accountResolver , java.lang.String nameOrEmail ) throws com.google.gerrit.common.errors.NoSuchAccountException , com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.reviewdb.client.Account a = accountResolver.findByNameOrEmail ( nameOrEmail ) ; if ( a == null ) { throw new com.google.gerrit.common.errors.NoSuchAccountException ( ( ( "\"" + nameOrEmail ) + "\" is not registered" ) ) ; } return a.getId ( ) ; }
Source:
protected void add ( final com.google.gerrit.server.mail.RecipientType rt , final com.google.gerrit.reviewdb.UserIdentity who ) { if ( ( who != null ) && ( ( who.getAccount ( ) ) != null ) ) { add ( rt , who.getAccount ( ) ) ; HEAD ( f4c716 ) ; com.google.gerrit.server.mail.unique IDs ; com.google.gerrit.server.mail.each relation ; com.google.gerrit.server.mail.in ReviewDB ; } }

Target:
protected void add ( final com.google.gerrit.server.mail.RecipientType rt , final com.google.gerrit.reviewdb.UserIdentity who ) { if ( ( who != null ) && ( ( who.getAccount ( ) ) != null ) ) { add ( rt , who.getAccount ( ) ) ; } }
Source:
private org.eclipse.jgit.revwalk.RevCommit makeCommitWithoutSymlink ( ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { java.util.Map < java.io.File , byte [ ] > files = new java.util.HashMap < > ( ) ; files.put ( new java.io.File ( repo.getDirectory ( ) . getParent ( ) , "foo.txt" ) , null ) ; return com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.makeCommit ( repo , "Commit with empty test files." , files ) ; }

Target:
private org.eclipse.jgit.revwalk.RevCommit makeCommitWithoutSymlink ( org.eclipse.jgit.revwalk.RevWalk rw ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { java.util.Map < java.io.File , byte [ ] > files = new java.util.HashMap < > ( ) ; files.put ( new java.io.File ( repo.getDirectory ( ) . getParent ( ) , "foo.txt" ) , null ) ; return com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.makeCommit ( rw , repo , "Commit with empty test files." , files ) ; }
Source:
protected void configure ( ) { bind ( com.google.gerrit.server.plugins.ServerInformationImpl.class ) ; bind ( com.google.gerrit.extensions.systemstatus.ServerInformation.class ) . to ( com.google.gerrit.server.plugins.ServerInformationImpl.class ) ; bind ( com.google.gerrit.server.plugins.PluginCleanerTask.class ) ; bind ( com.google.gerrit.server.plugins.PluginGuiceEnvironment.class ) ; bind ( com.google.gerrit.server.plugins.PluginLoader.class ) ; bind ( com.google.gerrit.server.plugins.CopyConfigModule.class ) ; listener ( ) . to ( com.google.gerrit.server.plugins.PluginLoader.class ) ; }

Target:
protected void configure ( ) { listener ( ) . to ( com.google.gerrit.server.plugins.PluginLoader.class ) ; }
Source:
private < T extends com.google.gwt.core.client.JavaScriptObject > void sendRaw ( com.google.gwt.http.client.RequestBuilder.Method method , java.lang.String body , com.google.gwt.user.client.rpc.AsyncCallback < T > cb ) { com.google.gerrit.client.rpc.RestApi.HttpCallback < T > httpCallback = new com.google.gerrit.client.rpc.RestApi.HttpCallback < T > ( background , cb ) ; try { if ( ! ( background ) ) { RpcStatus.INSTANCE.onRpcStart ( ) ; } com.google.gwt.http.client.RequestBuilder req = request ( method ) ; req.setHeader ( "Content-Type" , com.google.gerrit.client.rpc.RestApi.TEXT_TYPE ) ; req.sendRequest ( body , httpCallback ) ; } catch ( com.google.gwt.http.client.RequestException e ) { httpCallback.onError ( null , e ) ; } }

Target:
private < T extends com.google.gwt.core.client.JavaScriptObject > void sendRaw ( com.google.gwt.http.client.RequestBuilder.Method method , java.lang.String body , com.google.gwt.user.client.rpc.AsyncCallback < T > cb ) { com.google.gerrit.client.rpc.RestApi.HttpCallback < T > httpCallback = new com.google.gerrit.client.rpc.RestApi.HttpCallback ( background , cb ) ; try { if ( ! ( background ) ) { RpcStatus.INSTANCE.onRpcStart ( ) ; } com.google.gwt.http.client.RequestBuilder req = request ( method ) ; req.setHeader ( "Content-Type" , com.google.gerrit.client.rpc.RestApi.TEXT_TYPE ) ; req.sendRequest ( body , httpCallback ) ; } catch ( com.google.gwt.http.client.RequestException e ) { httpCallback.onError ( null , e ) ; } }
Source:
public void atomicDelete ( com.google.gerrit.reviewdb.client.Project project ) throws com.google.gwtorm.server.OrmException { com.google.gwtorm.server.ResultSet < com.google.gerrit.reviewdb.client.Change > changes = null ; try { changes = db.changes ( ) . byProject ( project.getNameKey ( ) ) ; } catch ( com.google.gwtorm.server.OrmException ex ) { } deleteChanges ( changes ) ; db.accountProjectWatches ( ) . delete ( db.accountProjectWatches ( ) . byProject ( project.getNameKey ( ) ) ) ; }

Target:
public void atomicDelete ( com.google.gerrit.reviewdb.client.Project project ) throws com.google.gwtorm.server.OrmException { com.google.gwtorm.server.ResultSet < com.google.gerrit.reviewdb.client.Change > changes = null ; changes = db.changes ( ) . byProject ( project.getNameKey ( ) ) ; deleteChanges ( changes ) ; db.accountProjectWatches ( ) . delete ( db.accountProjectWatches ( ) . byProject ( project.getNameKey ( ) ) ) ; }
Source:
public com.google.gerrit.server.data.AccountAttribute asAccountAttribute ( final com.google.gerrit.reviewdb.client.Account account ) { com.google.gerrit.server.data.AccountAttribute who = new com.google.gerrit.server.data.AccountAttribute ( ) ; who.name = account.getFullName ( ) ; who.email = account.getPreferredEmail ( ) ; who.username = account.getUserName ( ) ; return who ; }

Target:
public com.google.gerrit.server.data.AccountAttribute asAccountAttribute ( final com.google.gerrit.reviewdb.client.Account account ) { if ( account == null ) { return null ; } com.google.gerrit.server.data.AccountAttribute who = new com.google.gerrit.server.data.AccountAttribute ( ) ; who.name = account.getFullName ( ) ; who.email = account.getPreferredEmail ( ) ; who.username = account.getUserName ( ) ; return who ; }
Source:
private com.google.inject.Injector createWebInjector ( ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( sshInjector.getInstance ( com.google.inject.Module.class ) ) ; modules.add ( sshInjector.getInstance ( com.google.gerrit.httpd.WebModule.class ) ) ; return sysInjector.createChildInjector ( modules ) ; }

Target:
private com.google.inject.Injector createWebInjector ( ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( sshInjector.getInstance ( com.google.gerrit.httpd.WebModule.class ) ) ; modules.add ( sshInjector.getInstance ( com.google.inject.Module.class ) ) ; return sysInjector.createChildInjector ( modules ) ; }
Source:
public static void replyError ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , int statusCode , java.lang.String msg , com.google.gerrit.extensions.restapi.CacheControl c , @ com.google.gerrit.common.Nullable java.lang.Throwable err ) throws java.io.IOException { res.setStatus ( statusCode ) ; com.google.gerrit.httpd.restapi.RestApiServlet.configureCaching ( req , res , null , c ) ; com.google.gerrit.httpd.restapi.RestApiServlet.replyText ( req , res , msg ) ; if ( err != null ) { com.google.gerrit.util.http.RequestUtil.setErrorTraceAttribute ( req , err ) ; } }

Target:
public static void replyError ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , int statusCode , java.lang.String msg , com.google.gerrit.extensions.restapi.CacheControl c , @ com.google.gerrit.common.Nullable java.lang.Throwable err ) throws java.io.IOException { if ( err != null ) { com.google.gerrit.util.http.RequestUtil.setErrorTraceAttribute ( req , err ) ; } com.google.gerrit.httpd.restapi.RestApiServlet.configureCaching ( req , res , null , c ) ; res.setStatus ( statusCode ) ; com.google.gerrit.httpd.restapi.RestApiServlet.replyText ( req , res , msg ) ; }
Source:
private java.lang.String createServiceUserNote ( java.lang.String branch , com.googlesource.gerrit.plugins.serviceuser.GetServiceUser.ServiceUserInfo serviceUser ) throws com.google.gwtorm.server.OrmException { com.googlesource.gerrit.plugins.serviceuser.HeaderFormatter fmt = new com.googlesource.gerrit.plugins.serviceuser.HeaderFormatter ( gerritServerIdent.getTimeZone ( ) , anonymousCowardName ) ; fmt.appendDate ( ) ; fmt.append ( "Project" , project.get ( ) ) ; fmt.append ( "Branch" , branch ) ; fmt.append ( com.googlesource.gerrit.plugins.serviceuser.CreateServiceUser.KEY_CREATED_BY , serviceUser.createdBy ) ; for ( com.google.gerrit.server.account.AccountInfo owner : listOwners ( serviceUser ) ) { fmt.appendUser ( com.googlesource.gerrit.plugins.serviceuser.CreateServiceUser.KEY_OWNER , owner ) ; } return fmt.toString ( ) ; }

Target:
private java.lang.String createServiceUserNote ( java.lang.String branch , com.googlesource.gerrit.plugins.serviceuser.GetServiceUser.ServiceUserInfo serviceUser ) throws com.google.gwtorm.server.OrmException { com.googlesource.gerrit.plugins.serviceuser.HeaderFormatter fmt = new com.googlesource.gerrit.plugins.serviceuser.HeaderFormatter ( gerritServerIdent.getTimeZone ( ) , anonymousCowardName ) ; fmt.appendDate ( ) ; fmt.append ( "Project" , project.get ( ) ) ; fmt.append ( "Branch" , branch ) ; fmt.appendUser ( com.googlesource.gerrit.plugins.serviceuser.CreateServiceUser.KEY_CREATED_BY , serviceUser.createdBy ) ; for ( com.google.gerrit.server.account.AccountInfo owner : listOwners ( serviceUser ) ) { fmt.appendUser ( com.googlesource.gerrit.plugins.serviceuser.CreateServiceUser.KEY_OWNER , owner ) ; } return fmt.toString ( ) ; }
Source:
private com.google.gerrit.server.project.ProjectControl user ( com.google.gerrit.server.git.ProjectConfig local , java.lang.String name , com.google.gerrit.reviewdb.client.AccountGroup ... memberOf ) { return new com.google.gerrit.server.project.ProjectControl ( java.util.Collections.< com.google.gerrit.reviewdb.client.AccountGroup.UUID > emptySet ( ) , java.util.Collections.< com.google.gerrit.reviewdb.client.AccountGroup.UUID > emptySet ( ) , projectCache , sectionSorter , null , changeControlFactory , permissionBackend , new com.google.gerrit.server.project.RefControlTest.MockUser ( name , memberOf ) , newProjectState ( local ) ) ; }

Target:
private com.google.gerrit.server.project.ProjectControl user ( com.google.gerrit.server.git.ProjectConfig local , java.lang.String name , com.google.gerrit.reviewdb.client.AccountGroup ... memberOf ) { return new com.google.gerrit.server.project.ProjectControl ( java.util.Collections.< com.google.gerrit.reviewdb.client.AccountGroup.UUID > emptySet ( ) , java.util.Collections.< com.google.gerrit.reviewdb.client.AccountGroup.UUID > emptySet ( ) , sectionSorter , null , changeControlFactory , permissionBackend , new com.google.gerrit.server.project.RefControlTest.MockUser ( name , memberOf ) , newProjectState ( local ) ) ; }
Source:
private void selectProtocol ( com.google.gerrit.acceptance.git.PushForReviewIT.Protocol p ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { java.lang.String url ; switch ( p ) { case SSH : url = sshUrl ; break ; case HTTP : url = admin.getHttpUrl ( ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "unexpected protocol: " + p ) ) ; } git = com.google.gerrit.acceptance.git.GitUtil.cloneProject ( ( ( url + "/" ) + ( project.get ( ) ) ) ) ; }

Target:
private void selectProtocol ( com.google.gerrit.acceptance.git.PushForReviewIT.Protocol p ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { java.lang.String url ; switch ( p ) { case SSH : url = sshUrl ; break ; case HTTP : url = admin.getHttpUrl ( server ) ; break ; default : throw new java.lang.IllegalArgumentException ( ( "unexpected protocol: " + p ) ) ; } git = com.google.gerrit.acceptance.git.GitUtil.cloneProject ( ( ( url + "/" ) + ( project.get ( ) ) ) ) ; }
Source:
public void onClick ( final com.google.gwt.event.dom.client.ClickEvent event ) { final com.google.gwt.user.client.ui.Widget sender = ( ( com.google.gwt.user.client.ui.Widget ) ( event.getSource ( ) ) ) ; if ( ( send ) == sender ) { com.google.gerrit.client.changes.PublishCommentScreen.lastState = null ; onSend ( ) ; } else if ( ( cancel ) == sender ) { com.google.gerrit.client.changes.PublishCommentScreen.lastState = null ; saveStateOnUnload = false ; goChange ( ) ; } }

Target:
public void onClick ( final com.google.gwt.event.dom.client.ClickEvent event ) { final com.google.gwt.user.client.ui.Widget sender = ( ( com.google.gwt.user.client.ui.Widget ) ( event.getSource ( ) ) ) ; if ( ( send ) == sender ) { onSend ( ) ; } else if ( ( cancel ) == sender ) { saveStateOnUnload = false ; goChange ( ) ; } }
Source:
public void testParentString ( ) { final long pId = 21281821821821881L ; final com.google.gwtorm.client.LongKeyTestCase.Parent p1 = new com.google.gwtorm.client.LongKeyTestCase.Parent ( pId ) ; assertEquals ( ( "" + pId ) , p1.toString ( ) ) ; final com.google.gwtorm.client.LongKeyTestCase.Parent p2 = new com.google.gwtorm.client.LongKeyTestCase.Parent ( 0 ) ; p2.fromString ( p1.toString ( ) ) ; assertEquals ( p1 , p2 ) ; }

Target:
public void testParentString ( ) { final long pId = 21281821821821881L ; final com.google.gwtorm.client.LongKeyTestCase.Parent p1 = new com.google.gwtorm.client.LongKeyTestCase.Parent ( pId ) ; org.junit.Assert.assertEquals ( ( "" + pId ) , p1.toString ( ) ) ; final com.google.gwtorm.client.LongKeyTestCase.Parent p2 = new com.google.gwtorm.client.LongKeyTestCase.Parent ( 0 ) ; p2.fromString ( p1.toString ( ) ) ; org.junit.Assert.assertEquals ( p1 , p2 ) ; }
Source:
public com.google.gerrit.common.data.Capable canPushToAtLeastOneRef ( ) { if ( ( ( ! ( canPerformOnAnyRef ( Permission.PUSH ) ) ) && ( ! ( canPerformOnAnyRef ( Permission.CREATE_TAG ) ) ) ) && ( ! ( isOwner ( ) ) ) ) { java.lang.String pName = state.getProject ( ) . getName ( ) ; return new com.google.gerrit.common.data.Capable ( ( ( "Upload denied for project '" + pName ) + "'" ) ) ; } if ( state.isUseContributorAgreements ( ) ) { return verifyActiveContributorAgreement ( ) ; } return com.google.gerrit.common.data.Capable.OK ; }

Target:
public com.google.gerrit.common.data.Capable canPushToAtLeastOneRef ( ) { if ( ( ( ! ( canPerformOnAnyRef ( Permission.PUSH ) ) ) && ( ! ( canPerformOnAnyRef ( Permission.CREATE_TAG ) ) ) ) && ( ! ( isOwner ( ) ) ) ) { return new com.google.gerrit.common.data.Capable ( ( ( "Upload denied for project '" + ( state.getName ( ) ) ) + "'" ) ) ; } if ( state.isUseContributorAgreements ( ) ) { return verifyActiveContributorAgreement ( ) ; } return com.google.gerrit.common.data.Capable.OK ; }
Source:
public com.google.gerrit.server.notedb.NoteDbChangeState rebuild ( com.google.gerrit.server.notedb.NoteDbUpdateManager manager , com.google.gerrit.server.notedb.ChangeBundle bundle ) throws com.google.gerrit.server.project.NoSuchChangeException , com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { com.google.gerrit.reviewdb.client.Change change = new com.google.gerrit.reviewdb.client.Change ( bundle.getChange ( ) ) ; buildUpdates ( manager , bundle ) ; com.google.gerrit.server.notedb.NoteDbChangeState newState = com.google.gerrit.server.notedb.NoteDbChangeState.applyDelta ( change , manager.stage ( ) . get ( change.getId ( ) ) ) ; manager.execute ( ) ; return newState ; }

Target:
public com.google.gerrit.server.notedb.NoteDbChangeState rebuild ( com.google.gerrit.server.notedb.NoteDbUpdateManager manager , com.google.gerrit.server.notedb.ChangeBundle bundle ) throws com.google.gerrit.server.project.NoSuchChangeException , com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { com.google.gerrit.reviewdb.client.Change change = new com.google.gerrit.reviewdb.client.Change ( bundle.getChange ( ) ) ; buildUpdates ( manager , bundle ) ; return com.google.gerrit.server.notedb.NoteDbChangeState.applyDelta ( change , manager.stage ( ) . get ( change.getId ( ) ) ) ; }
Source:
private void bccWatchesNotifySubmittedChanges ( ) { if ( ( db ) != null ) { try { final com.google.gerrit.server.project.ProjectState ps = getProjectState ( ) ; if ( ps != null ) { for ( final com.google.gerrit.reviewdb.AccountProjectWatch w : getProjectWatches ( ) ) { if ( w.isNotifySubmittedChanges ( ) ) { add ( RecipientType.BCC , w.getAccountId ( ) ) ; } } } } catch ( com.google.gwtorm.client.OrmException err ) { } } }

Target:
private void bccWatchesNotifySubmittedChanges ( ) { if ( ( db ) != null ) { final com.google.gerrit.server.project.ProjectState ps = getProjectState ( ) ; if ( ps != null ) { for ( final com.google.gerrit.reviewdb.AccountProjectWatch w : getProjectWatches ( ) ) { if ( w.isNotifySubmittedChanges ( ) ) { add ( RecipientType.BCC , w.getAccountId ( ) ) ; } } } } }
Source:
protected org.eclipse.jgit.lib.CommitBuilder applyImpl ( org.eclipse.jgit.lib.ObjectInserter ins ) throws com.google.gwtorm.server.OrmException , java.io.IOException { org.eclipse.jgit.lib.CommitBuilder cb = new org.eclipse.jgit.lib.CommitBuilder ( ) ; cb.setMessage ( "Update draft comments" ) ; java.util.concurrent.atomic.AtomicBoolean removedAllComments = new java.util.concurrent.atomic.AtomicBoolean ( ) ; org.eclipse.jgit.lib.ObjectId treeId = storeCommentsInNotes ( ins , removedAllComments ) ; if ( removedAllComments.get ( ) ) { return null ; } cb.setTreeId ( com.google.common.base.Preconditions.checkNotNull ( treeId ) ) ; return cb ; }

Target:
public boolean isEmpty ( ) { return ( delete.isEmpty ( ) ) && ( put.isEmpty ( ) ) ; }
Source:
private static java.lang.String replace ( final java.lang.String pat , final java.lang.String key , final java.lang.String val ) { final int n = pat.indexOf ( ( ( "${" + key ) + "}" ) ) ; return ( ( pat.substring ( 0 , n ) ) + val ) + ( pat.substring ( ( ( n + 3 ) + ( key.length ( ) ) ) ) ) ; }

Target:
private static java.lang.String replace ( final java.lang.String pat , final java.lang.String key , final java.lang.String val ) { final int n = pat.indexOf ( ( ( "${" + key ) + "}" ) ) ; if ( n != ( - 1 ) ) { return ( ( pat.substring ( 0 , n ) ) + val ) + ( pat.substring ( ( ( n + 3 ) + ( key.length ( ) ) ) ) ) ; } else { return null ; } }
Source:
public com.google.gerrit.extensions.api.changes.ChangeApi revert ( com.google.gerrit.extensions.api.changes.RevertInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return changeApi.id ( revert.get ( ) . apply ( change , in ) . _number ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot revert change" , e ) ; } catch ( com.google.gerrit.common.errors.EmailException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot revert change" , e ) ; } catch ( java.io.IOException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot revert change" , e ) ; } }

Target:
public com.google.gerrit.extensions.api.changes.ChangeApi revert ( com.google.gerrit.extensions.api.changes.RevertInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return changeApi.id ( revert.get ( ) . apply ( change , in ) . _number ) ; } catch ( com.google.gwtorm.server.OrmException | com.google.gerrit.common.errors.EmailException | java.io.IOException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot revert change" , e ) ; } }
Source:
void onKeyMap ( @ java.lang.SuppressWarnings ( value = "unused" ) com.google.gwt.event.dom.client.ChangeEvent e ) { com.google.gerrit.extensions.client.KeyMapType keyMapType = com.google.gerrit.extensions.client.KeyMapType.valueOf ( keyMap.getValue ( keyMap.getSelectedIndex ( ) ) ) ; prefs.keyMapType ( keyMapType ) ; if ( ( view ) != null ) { view.getEditor ( ) . setOption ( "keyMap" , keyMapType.name ( ) . toLowerCase ( ) ) ; } }

Target:
void onKeyMap ( @ java.lang.SuppressWarnings ( value = "unused" ) com.google.gwt.event.dom.client.ChangeEvent e ) { com.google.gerrit.extensions.client.KeyMapType keyMapType = com.google.gerrit.extensions.client.KeyMapType.valueOf ( keyMap.getValue ( keyMap.getSelectedIndex ( ) ) ) ; prefs.keyMapType ( keyMapType ) ; if ( ( view ) != null ) { view.setOption ( "keyMap" , keyMapType.name ( ) . toLowerCase ( ) ) ; } }
Source:
private void appendComment ( java.lang.StringBuilder out , int contextLines , com.google.gerrit.server.patch.PatchFile currentFileData , com.google.gerrit.reviewdb.client.Comment comment ) { if ( comment instanceof com.google.gerrit.reviewdb.client.RobotComment ) { com.google.gerrit.reviewdb.client.RobotComment robotComment = ( ( com.google.gerrit.reviewdb.client.RobotComment ) ( comment ) ) ; out.append ( "Robot Comment from " ) . append ( robotComment.robotId ) . append ( " (run ID " ) . append ( robotComment.robotRunId ) . append ( "):\n" ) ; } if ( ( comment.range ) != null ) { appendRangedComment ( out , contextLines , currentFileData , comment ) ; } else { appendLineComment ( out , contextLines , currentFileData , comment ) ; } }

Target:
private void appendComment ( java.lang.StringBuilder out , int contextLines , com.google.gerrit.server.patch.PatchFile currentFileData , com.google.gerrit.reviewdb.client.Comment comment ) { if ( comment instanceof com.google.gerrit.reviewdb.client.RobotComment ) { com.google.gerrit.reviewdb.client.RobotComment robotComment = ( ( com.google.gerrit.reviewdb.client.RobotComment ) ( comment ) ) ; out.append ( "Robot Comment from " ) . append ( robotComment.robotId ) . append ( " (run ID " ) . append ( robotComment.robotRunId ) . append ( "):\n" ) ; } if ( ( comment.range ) != null ) { appendRangedComment ( out , currentFileData , comment ) ; } else { appendLineComment ( out , contextLines , currentFileData , comment ) ; } }
Source:
public final com.google.gerrit.gpg.CheckResult check ( org.bouncycastle.openpgp.PGPPublicKey key ) { if ( ( ( store ) == null ) && ( ( trusted ) != null ) ) { throw new java.lang.IllegalStateException ( "PublicKeyStore is required" ) ; } else if ( ( ( store ) != null ) && ( ( trusted ) == null ) ) { throw new java.lang.IllegalStateException ( "at least one trusted key is required" ) ; } return check ( key , 0 , true , ( ( store ) != null ? new java.util.HashSet < com.google.gerrit.gpg.Fingerprint > ( ) : null ) ) ; }

Target:
public final com.google.gerrit.gpg.CheckResult check ( org.bouncycastle.openpgp.PGPPublicKey key ) { if ( ( store ) == null ) { throw new java.lang.IllegalStateException ( "PublicKeyStore is required" ) ; } return check ( key , 0 , true , ( ( trusted ) != null ? new java.util.HashSet < com.google.gerrit.gpg.Fingerprint > ( ) : null ) ) ; }
Source:
public void messagesNotReturnedByDefault ( ) throws java.lang.Exception { java.lang.String changeId = createChange ( ) . getChangeId ( ) ; postMessage ( changeId , "Some nits need to be fixed." ) ; com.google.gerrit.extensions.common.ChangeInfo c = info ( changeId ) ; com.google.common.truth.Truth.assertThat ( ( ( java.lang.Iterable < ? > ) ( c.messages ) ) ) . isNull ( ) ; }

Target:
public void messagesNotReturnedByDefault ( ) throws java.lang.Exception { java.lang.String changeId = createChange ( ) . getChangeId ( ) ; postMessage ( changeId , "Some nits need to be fixed." ) ; com.google.gerrit.extensions.common.ChangeInfo c = info ( changeId ) ; com.google.common.truth.Truth.assertThat ( c.messages ) . isNull ( ) ; }
Source:
private void formatHtmlDiff ( java.io.OutputStream out , org.eclipse.jgit.lib.Repository repo , org.eclipse.jgit.revwalk.RevWalk walk , org.eclipse.jgit.treewalk.AbstractTreeIterator oldTree , org.eclipse.jgit.treewalk.AbstractTreeIterator newTree , java.lang.String path ) throws java.io.IOException { org.eclipse.jgit.diff.DiffFormatter diff = new com.google.gitiles.HtmlDiffFormatter ( renderer , out ) ; try { if ( ! ( path.equals ( "" ) ) ) { diff.setPathFilter ( org.eclipse.jgit.treewalk.filter.PathFilter.create ( path ) ) ; } diff.setRepository ( repo ) ; diff.setDetectRenames ( true ) ; diff.format ( oldTree , newTree ) ; } finally { diff.release ( ) ; } }

Target:
private void formatHtmlDiff ( java.io.OutputStream out , org.eclipse.jgit.lib.Repository repo , org.eclipse.jgit.treewalk.AbstractTreeIterator oldTree , org.eclipse.jgit.treewalk.AbstractTreeIterator newTree , java.lang.String path ) throws java.io.IOException { org.eclipse.jgit.diff.DiffFormatter diff = new com.google.gitiles.HtmlDiffFormatter ( renderer , out ) ; try { if ( ! ( path.equals ( "" ) ) ) { diff.setPathFilter ( org.eclipse.jgit.treewalk.filter.PathFilter.create ( path ) ) ; } diff.setRepository ( repo ) ; diff.setDetectRenames ( true ) ; diff.format ( oldTree , newTree ) ; } finally { diff.release ( ) ; } }
Source:
public void writeNoChanges ( ) throws java.lang.Exception { org.junit.Assert.assertEquals ( RefUpdate.Result.NEW , modifier.createEdit ( change , ps ) ) ; try { modifier.modifyFile ( editUtil.byChange ( change ) . get ( ) , com.google.gerrit.acceptance.edit.ChangeEditIT.FILE_NAME , com.google.gerrit.acceptance.edit.ChangeEditIT.CONTENT_OLD ) ; org.junit.Assert.fail ( ) ; } catch ( com.google.gerrit.server.project.InvalidChangeOperationException e ) { org.junit.Assert.assertEquals ( "no changes were made" , e.getMessage ( ) ) ; } }

Target:
public void writeNoChanges ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( modifier.createEdit ( change , ps ) ) . isEqualTo ( RefUpdate.Result.NEW ) ; try { modifier.modifyFile ( editUtil.byChange ( change ) . get ( ) , com.google.gerrit.acceptance.edit.ChangeEditIT.FILE_NAME , com.google.gerrit.acceptance.edit.ChangeEditIT.CONTENT_OLD ) ; org.junit.Assert.fail ( ) ; } catch ( com.google.gerrit.server.project.InvalidChangeOperationException e ) { com.google.common.truth.Truth.assertThat ( e.getMessage ( ) ) . isEqualTo ( "no changes were made" ) ; } }
Source:
public void deleteVoteFromReviewableChangeNotifyOwnerReviewers ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; deleteVote ( sc , voter , NotifyHandling.OWNER_REVIEWERS ) ; assertThat ( sender ) . sent ( "deleteVote" , sc ) . notTo ( voter ) . to ( sc.owner ) . to ( sc.reviewerByEmail ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.ccerByEmail ) . notTo ( sc.starrer ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; }

Target:
public void deleteVoteFromReviewableChangeNotifyOwnerReviewers ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; deleteVote ( sc , voter , NotifyHandling.OWNER_REVIEWERS ) ; assertThat ( sender ) . sent ( "deleteVote" , sc ) . notTo ( voter ) . to ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . notTo ( sc.starrer ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; }
Source:
protected void configureServlets ( ) { serve ( "/login" ) . with ( com.google.gerrit.server.rpc.OpenIdLoginServlet.class ) ; rpc ( com.google.gerrit.server.rpc.AccountServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.AccountSecurityImpl.class ) ; rpc ( com.google.gerrit.server.rpc.GroupAdminServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ChangeDetailServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ChangeListServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ChangeManageServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.OpenIdServiceImpl.class ) ; rpc ( com.google.gerrit.server.patch.PatchDetailServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ProjectAdminServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.SuggestServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.SystemInfoServiceImpl.class ) ; }

Target:
protected void configureServlets ( ) { rpc ( com.google.gerrit.server.rpc.AccountServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.AccountSecurityImpl.class ) ; rpc ( com.google.gerrit.server.rpc.GroupAdminServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ChangeDetailServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ChangeListServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ChangeManageServiceImpl.class ) ; rpc ( com.google.gerrit.server.patch.PatchDetailServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.ProjectAdminServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.SuggestServiceImpl.class ) ; rpc ( com.google.gerrit.server.rpc.SystemInfoServiceImpl.class ) ; }
Source:
private java.util.Collection < com.google.gerrit.server.project.ProjectState > tree ( com.google.gerrit.server.project.ProjectResource rsrc ) throws com.google.gerrit.server.permissions.PermissionBackendException { java.util.Map < com.google.gerrit.reviewdb.client.Project.NameKey , com.google.gerrit.server.project.ProjectState > tree = new java.util.LinkedHashMap < > ( ) ; for ( com.google.gerrit.server.project.ProjectState ps : rsrc.getProjectState ( ) . tree ( ) ) { tree.put ( ps.getProject ( ) . getNameKey ( ) , ps ) ; } tree.keySet ( ) . retainAll ( permissionBackend.user ( user ) . filter ( ProjectPermission.ACCESS , tree.keySet ( ) ) ) ; return tree.values ( ) ; }

Target:
private java.util.Collection < com.google.gerrit.server.project.ProjectState > tree ( com.google.gerrit.server.project.ProjectResource rsrc ) throws com.google.gerrit.server.permissions.PermissionBackendException { java.util.Map < com.google.gerrit.reviewdb.client.Project.NameKey , com.google.gerrit.server.project.ProjectState > tree = new java.util.LinkedHashMap < > ( ) ; for ( com.google.gerrit.server.project.ProjectState ps : rsrc.getProjectState ( ) . tree ( ) ) { tree.put ( ps.getNameKey ( ) , ps ) ; } tree.keySet ( ) . retainAll ( permissionBackend.user ( user ) . filter ( ProjectPermission.ACCESS , tree.keySet ( ) ) ) ; return tree.values ( ) ; }
Source:
private static void diffChanges ( java.util.List < java.lang.String > diffs , com.google.gerrit.server.notedb.ChangeBundle bundleA , com.google.gerrit.server.notedb.ChangeBundle bundleB ) { com.google.gerrit.reviewdb.client.Change a = bundleA.change ; com.google.gerrit.reviewdb.client.Change b = bundleB.change ; java.lang.String desc = ( a.getId ( ) . equals ( b.getId ( ) ) ) ? com.google.gerrit.server.notedb.ChangeBundle.describe ( a.getId ( ) ) : "Changes" ; com.google.gerrit.server.notedb.ChangeBundle.diffColumns ( diffs , com.google.gerrit.reviewdb.client.Change.class , desc , a , b ) ; }

Target:
private static void diffChanges ( java.util.List < java.lang.String > diffs , com.google.gerrit.server.notedb.ChangeBundle bundleA , com.google.gerrit.server.notedb.ChangeBundle bundleB ) { com.google.gerrit.reviewdb.client.Change a = bundleA.change ; com.google.gerrit.reviewdb.client.Change b = bundleB.change ; java.lang.String desc = ( a.getId ( ) . equals ( b.getId ( ) ) ) ? com.google.gerrit.server.notedb.ChangeBundle.describe ( a.getId ( ) ) : "Changes" ; com.google.gerrit.server.notedb.ChangeBundle.diffColumns ( diffs , com.google.gerrit.reviewdb.client.Change.class , desc , bundleA , a , bundleB , b ) ; }
Source:
public void getNonChildProject_NotFound ( ) throws java.lang.Exception { com.google.gerrit.acceptance.SshSession sshSession = new com.google.gerrit.acceptance.SshSession ( server , admin ) ; com.google.gerrit.reviewdb.client.Project.NameKey p1 = new com.google.gerrit.reviewdb.client.Project.NameKey ( "p1" ) ; createProject ( p1.get ( ) ) ; com.google.gerrit.reviewdb.client.Project.NameKey p2 = new com.google.gerrit.reviewdb.client.Project.NameKey ( "p2" ) ; createProject ( p2.get ( ) ) ; sshSession.close ( ) ; assertChildNotFound ( p1 , p2.get ( ) ) ; }

Target:
public void getNonChildProject_NotFound ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey p1 = createProject ( "p1" ) ; com.google.gerrit.reviewdb.client.Project.NameKey p2 = createProject ( "p2" ) ; assertChildNotFound ( p1 , p2.get ( ) ) ; }
Source:
com.google.gerrit.httpd.WebSessionManager.Val createVal ( final com.google.gerrit.httpd.WebSessionManager.Key key , final com.google.gerrit.httpd.WebSessionManager.Val val ) { final com.google.gerrit.reviewdb.client.Account.Id who = val.getAccountId ( ) ; final boolean remember = val.isPersistentCookie ( ) ; final com.google.gerrit.reviewdb.client.AccountExternalId.Key lastLogin = val.getExternalId ( ) ; final java.lang.String xsrfToken = val.getXsrfToken ( ) ; return createVal ( key , who , remember , lastLogin , xsrfToken ) ; }

Target:
com.google.gerrit.httpd.WebSessionManager.Val createVal ( final com.google.gerrit.httpd.WebSessionManager.Key key , final com.google.gerrit.httpd.WebSessionManager.Val val ) { final com.google.gerrit.reviewdb.client.Account.Id who = val.getAccountId ( ) ; final boolean remember = val.isPersistentCookie ( ) ; final com.google.gerrit.reviewdb.client.AccountExternalId.Key lastLogin = val.getExternalId ( ) ; return createVal ( key , who , remember , lastLogin ) ; }
Source:
public java.util.List < com.google.gerrit.server.git.validators.ValidationMessage > validateForRefOperation ( ) throws com.google.gerrit.server.git.validators.RefOperationValidationException { java.util.List < com.google.gerrit.server.git.validators.ValidationMessage > messages = com.google.common.collect.Lists.newArrayList ( ) ; boolean withException = false ; try { for ( com.google.gerrit.server.git.validators.RefOperationValidationListener listener : refOperationValidationListeners ) { messages.addAll ( listener.onRefOperation ( event ) ) ; } } catch ( com.google.gerrit.server.validators.ValidationException e ) { messages.add ( new com.google.gerrit.server.git.validators.ValidationMessage ( e.getMessage ( ) , true ) ) ; withException = true ; } if ( withException ) { throwException ( messages , event ) ; } return messages ; }

Target:
public java.util.List < com.google.gerrit.server.git.validators.ValidationMessage > validateForRefOperation ( ) throws com.google.gerrit.server.git.validators.RefOperationValidationException { java.util.List < com.google.gerrit.server.git.validators.ValidationMessage > messages = new java.util.ArrayList < > ( ) ; boolean withException = false ; try { for ( com.google.gerrit.server.git.validators.RefOperationValidationListener listener : refOperationValidationListeners ) { messages.addAll ( listener.onRefOperation ( event ) ) ; } } catch ( com.google.gerrit.server.validators.ValidationException e ) { messages.add ( new com.google.gerrit.server.git.validators.ValidationMessage ( e.getMessage ( ) , true ) ) ; withException = true ; } if ( withException ) { throwException ( messages , event ) ; } return messages ; }
Source:
private static boolean hasValidRef ( java.util.List < org.eclipse.jgit.lib.Ref > refs ) { for ( int i = 0 ; i < ( refs.size ( ) ) ; i ++ ) { if ( ( refs.get ( i ) ) != null ) { return true ; } } return false ; }

Target:
private static boolean hasValidRef ( java.util.List < org.eclipse.jgit.lib.Ref > refs ) { for ( org.eclipse.jgit.lib.Ref ref : refs ) { if ( ref != null ) { return true ; } } return false ; }
Source:
private static com.google.gitiles.doc.ImageLoader newImageLoader ( com.google.gitiles.doc.MarkdownToHtml.Builder b ) { if ( ( ( ( b.config ) != null ) && ( ( b.reader ) != null ) ) && ( ( b.root ) != null ) ) { return new com.google.gitiles.doc.ImageLoader ( b.view , b.config , b.reader , b.root ) ; } return null ; }

Target:
private static com.google.gitiles.doc.ImageLoader newImageLoader ( com.google.gitiles.doc.MarkdownToHtml.Builder b ) { if ( ( ( ( ( b.reader ) != null ) && ( ( b.view ) != null ) ) && ( ( b.config ) != null ) ) && ( ( b.root ) != null ) ) { return new com.google.gitiles.doc.ImageLoader ( b.reader , b.view , b.config , b.root ) ; } return null ; }
Source:
private java.lang.String getRedirectUrl ( java.lang.String pathAndQuery ) throws java.io.IOException , javax.servlet.ServletException { com.google.gitiles.FakeHttpServletResponse res = new com.google.gitiles.FakeHttpServletResponse ( ) ; service ( pathAndQuery , com.google.common.util.concurrent.Atomics.< com.google.gitiles.GitilesView > newReference ( ) , res ) ; assertEquals ( 302 , res.getStatus ( ) ) ; return res.getHeader ( com.google.common.net.HttpHeaders.LOCATION ) ; }

Target:
private java.lang.String getRedirectUrl ( java.lang.String pathAndQuery ) throws java.io.IOException , javax.servlet.ServletException { com.google.gitiles.FakeHttpServletResponse res = new com.google.gitiles.FakeHttpServletResponse ( ) ; service ( pathAndQuery , com.google.common.util.concurrent.Atomics.< com.google.gitiles.GitilesView > newReference ( ) , res ) ; org.junit.Assert.assertEquals ( 302 , res.getStatus ( ) ) ; return res.getHeader ( com.google.common.net.HttpHeaders.LOCATION ) ; }