auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void allRefsVisibleNoRefsMetaConfig ( ) throws java.lang.Exception { com.google.gerrit.server.git.ProjectConfig cfg = projectCache.checkedGet ( project ) . getConfig ( ) ; com.google.gerrit.server.project.Util.allow ( cfg , Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/*" ) ; com.google.gerrit.server.project.Util.allow ( cfg , Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.PROJECT_OWNERS , "refs/meta/config" ) ; com.google.gerrit.server.project.Util.doNotInherit ( cfg , Permission.READ , "refs/meta/config" ) ; saveProjectConfig ( project , cfg ) ; assertRefs ( "HEAD" , "refs/changes/01/1/1" , "refs/changes/02/2/1" , "refs/heads/branch" , "refs/heads/master" ) ; }

Target:
public void subsetOfBranchesVisibleNotIncludingHead ( ) throws java.lang.Exception { deny ( Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/heads/master" ) ; allow ( Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/heads/branch" ) ; assertRefs ( "refs/changes/02/2/1" , "refs/changes/02/2/meta" , "refs/heads/branch" ) ; }
Source:
public com.google.gerrit.extensions.registration.RegistrationHandle add ( final T item ) { final java.util.concurrent.atomic.AtomicReference < T > ref = new java.util.concurrent.atomic.AtomicReference < T > ( item ) ; items.add ( ref ) ; return new com.google.gerrit.extensions.registration.RegistrationHandle ( ) { @ java.lang.Override public void remove ( ) { if ( ref.compareAndSet ( item , null ) ) { items.remove ( ref ) ; } } } ; }

Target:
public com.google.gerrit.extensions.registration.RegistrationHandle add ( final com.google.inject.Provider < T > item ) { final java.util.concurrent.atomic.AtomicReference < com.google.inject.Provider < T > > ref = new java.util.concurrent.atomic.AtomicReference < com.google.inject.Provider < T > > ( item ) ; items.add ( ref ) ; return new com.google.gerrit.extensions.registration.RegistrationHandle ( ) { @ java.lang.Override public void remove ( ) { if ( ref.compareAndSet ( item , null ) ) { items.remove ( ref ) ; } } } ; }
Source:
void onSaveSuccess ( final com.google.gerrit.reviewdb.client.Account result ) { final com.google.gerrit.reviewdb.client.Account me = com.google.gerrit.client.Gerrit.getUserAccount ( ) ; me.setFullName ( result.getFullName ( ) ) ; me.setPreferredEmail ( result.getPreferredEmail ( ) ) ; com.google.gerrit.client.Gerrit.refreshMenuBar ( ) ; display ( me ) ; }

Target:
void onSaveSuccess ( com.google.gerrit.client.info.AccountInfo result ) { com.google.gerrit.client.info.AccountInfo me = com.google.gerrit.client.Gerrit.getUserAccount ( ) ; me.name ( result.name ( ) ) ; me.email ( result.email ( ) ) ; com.google.gerrit.client.Gerrit.refreshMenuBar ( ) ; display ( me ) ; }
Source:
private void setDefaultVisbilityCache ( ) { if ( ( visibilityCache ) == null ) { if ( config.getSubsections ( "cache" ) . contains ( "visibility" ) ) { visibilityCache = new com.google.gitiles.VisibilityCache ( false , com.google.gitiles.ConfigUtil.getCacheBuilder ( config , "visibility" ) ) ; } else { visibilityCache = new com.google.gitiles.VisibilityCache ( false ) ; } } }

Target:
private void setDefaultVisbilityCache ( ) { if ( ( visibilityCache ) == null ) { if ( config.getSubsections ( "cache" ) . contains ( "visibility" ) ) { visibilityCache = new com.google.gitiles.VisibilityCache ( false , com.google.gitiles.ConfigUtil.getCacheBuilder ( com.google.gitiles.VisibilityCache.newBuilder ( ) , config , "visibility" ) ) ; } else { visibilityCache = new com.google.gitiles.VisibilityCache ( false ) ; } } }
Source:
public void testMIXED_NoFullNameUser ( ) { setFrom ( "MIXED" ) ; final java.lang.String email = "a.u.thor@test.example.com" ; final com.google.gerrit.reviewdb.client.Account.Id user = user ( null , email ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( user ) ; org.junit.Assert.assertNotNull ( r ) ; org.junit.Assert.assertEquals ( "Anonymous Coward (Code Review)" , r.name ) ; org.junit.Assert.assertEquals ( ident.getEmailAddress ( ) , r.email ) ; org.easymock.EasyMock.verify ( accountCache ) ; }

Target:
public void testMIXED_NoPreferredEmailUser ( ) { setFrom ( "MIXED" ) ; final java.lang.String name = "A U. Thor" ; final com.google.gerrit.reviewdb.client.Account.Id user = user ( name , null ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( user ) ; com.google.common.truth.Truth.assertThat ( r ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( r.name ) . isEqualTo ( ( name + " (Code Review)" ) ) ; com.google.common.truth.Truth.assertThat ( r.email ) . isEqualTo ( ident.getEmailAddress ( ) ) ; org.easymock.EasyMock.verify ( accountCache ) ; }
Source:
private void initForwarding ( ) { setTcpipForwardingFilter ( new org.apache.sshd.common.ForwardingFilter ( ) { @ java.lang.Override public boolean canForwardAgent ( org.apache.sshd.common.Session session ) { return false ; } @ java.lang.Override public boolean canForwardX11 ( org.apache.sshd.common.Session session ) { return false ; } @ java.lang.Override public boolean canListen ( org.apache.sshd.common.SshdSocketAddress address , org.apache.sshd.common.Session session ) { return false ; } @ java.lang.Override public boolean canConnect ( org.apache.sshd.common.SshdSocketAddress address , org.apache.sshd.common.Session session ) { return false ; } } ) ; setTcpipForwarderFactory ( new org.apache.sshd.common.forward.DefaultTcpipForwarderFactory ( ) ) ; }

Target:
private void initChannels ( ) { setChannelFactories ( ServerBuilder.DEFAULT_CHANNEL_FACTORIES ) ; }
Source:
private com.google.common.collect.Multimap < java.lang.String , org.eclipse.jgit.diff.Edit > getEditsDueToRebasePerFilePath ( org.eclipse.jgit.revwalk.RevWalk revWalk , org.eclipse.jgit.revwalk.RevCommit commitB , org.eclipse.jgit.revwalk.RevCommit commitA ) throws com.google.gerrit.server.patch.PatchListNotAvailableException , java.io.IOException { if ( ! ( arePatchSetCommitsWithRebaseInBetween ( revWalk , commitA , commitB ) ) ) { return com.google.common.collect.ImmutableMultimap.of ( ) ; } return getEditsDueToRebasePerFilePath ( commitA , commitB ) ; }

Target:
private static boolean isRootOrMergeCommit ( org.eclipse.jgit.revwalk.RevCommit commit ) { return ( commit.getParentCount ( ) ) != 1 ; }
Source:
public void testUpsertOneException ( ) throws com.google.gwtorm.client.OrmException , java.sql.SQLException { stubExecuteBatchException ( com.google.gwtorm.jdbc.TestJdbcAccess.UPDATE , new java.sql.BatchUpdateException ( ) ) ; try { createClassUnderTest ( ) . upsert ( com.google.gwtorm.jdbc.TestJdbcAccess.ONE_ROW ) ; org.junit.Assert.fail ( "missingException" ) ; } catch ( com.google.gwtorm.client.OrmException e ) { } }

Target:
public void testUpsertTwoNotExistingZeroLengthArray ( ) throws com.google.gwtorm.server.OrmException , java.sql.SQLException { java.sql.PreparedStatement update = stubStatementWithUpdateCounts ( com.google.gwtorm.jdbc.TestJdbcAccess.UPDATE ) ; java.sql.PreparedStatement insert = stubStatementWithUpdateCounts ( com.google.gwtorm.jdbc.TestJdbcAccess.INSERT , 1 , 1 ) ; createClassUnderTest ( ) . upsert ( twoRows ) ; com.google.gwtorm.jdbc.TestJdbcAccess.assertUsedBatchingOnly ( update ) ; com.google.gwtorm.jdbc.TestJdbcAccess.assertUsedBatchingOnly ( insert ) ; com.google.gwtorm.jdbc.TestJdbcAccess.assertExpectedIdsUsed ( insert , 1 , 2 ) ; }
Source:
static com.google.gwtorm.server.ResultSet < com.google.gerrit.server.query.change.ChangeData > patchSet ( final com.google.gwtorm.server.ResultSet < com.google.gerrit.reviewdb.client.PatchSet > rs ) { return new com.google.gerrit.server.query.change.ChangeDataResultSet < com.google.gerrit.reviewdb.client.PatchSet > ( rs , false ) { @ java.lang.Override com.google.gerrit.server.query.change.ChangeData convert ( com.google.gerrit.reviewdb.client.PatchSet t ) { return new com.google.gerrit.server.query.change.ChangeData ( t.getId ( ) . getParentKey ( ) ) ; } } ; }

Target:
static com.google.gwtorm.server.ResultSet < com.google.gerrit.server.query.change.ChangeData > patchSet ( final com.google.gerrit.server.query.change.ChangeData.Factory factory , final com.google.inject.Provider < com.google.gerrit.reviewdb.server.ReviewDb > db , final com.google.gwtorm.server.ResultSet < com.google.gerrit.reviewdb.client.PatchSet > rs ) { return new com.google.gerrit.server.query.change.ChangeDataResultSet < com.google.gerrit.reviewdb.client.PatchSet > ( rs , false ) { @ java.lang.Override com.google.gerrit.server.query.change.ChangeData convert ( com.google.gerrit.reviewdb.client.PatchSet t ) { return factory.create ( db.get ( ) , t.getId ( ) . getParentKey ( ) ) ; } } ; }
Source:
private final org.eclipse.jgit.lib.ObjectId getObjectIdForBranch ( com.google.gerrit.reviewdb.Project.NameKey projectName , java.lang.String branch ) { try { final org.eclipse.jgit.lib.Repository r = repoManager.openRepository ( projectName.get ( ) ) ; try { org.eclipse.jgit.lib.Ref ref = r.getRef ( branch ) ; return ref == null ? null : ref.getObjectId ( ) ; } finally { r.close ( ) ; } } catch ( java.io.IOException ioe ) { return null ; } }

Target:
private org.eclipse.jgit.lib.Ref getBranchRef ( com.google.gerrit.reviewdb.Project.NameKey projectName ) { try { final org.eclipse.jgit.lib.Repository r = repoManager.openRepository ( projectName.get ( ) ) ; try { return r.getRef ( showBranch ) ; } finally { r.close ( ) ; } } catch ( java.io.IOException ioe ) { return null ; } }
Source:
public com.google.gerrit.server.notedb.ChangeNotes notes ( ) throws com.google.gwtorm.server.OrmException { if ( ( notes ) == null ) { notes = notesFactory.create ( db , project , legacyId ) ; } return notes ; }

Target:
public com.google.gerrit.reviewdb.client.Change reloadChange ( ) throws com.google.gwtorm.server.OrmException { if ( ( project ) == null ) { notes = notesFactory.createFromIdOnlyWhenNotedbDisabled ( db , legacyId ) ; } else { notes = notesFactory.create ( db , project , legacyId ) ; } change = notes.getChange ( ) ; if ( ( change ) == null ) { throw new com.google.gwtorm.server.OrmException ( ( "Unable to load change " + ( legacyId ) ) ) ; } return change ; }
Source:
public void testGetComment ( ) throws java.lang.Exception { assertGetComment ( revRes1 , plc1 , plc1.getKey ( ) . get ( ) ) ; assertGetComment ( revRes1 , null , "BadComment" ) ; }

Target:
public void testGetCommentExisting ( ) throws java.lang.Exception { java.lang.String uuid = plc1.getKey ( ) . get ( ) ; com.google.gerrit.server.change.CommentResource commentRes = comments.parse ( revRes1 , com.google.gerrit.extensions.restapi.IdString.fromUrl ( uuid ) ) ; com.google.gerrit.extensions.common.CommentInfo actual = getComment.apply ( commentRes ) ; com.google.gerrit.server.change.CommentsTest.assertComment ( plc1 , actual , true ) ; }
Source:
private com.google.gerrit.acceptance.rest.change.ChangeInfo getChange ( java.lang.String changeId ) throws java.io.IOException { com.google.gerrit.acceptance.RestResponse r = session.get ( ( "/changes/?q=" + changeId ) ) ; java.util.List < com.google.gerrit.acceptance.rest.change.ChangeInfo > c = new com.google.gson.Gson ( ) . fromJson ( r.getReader ( ) , new com.google.gson.reflect.TypeToken < java.util.List < com.google.gerrit.acceptance.rest.change.ChangeInfo > > ( ) { } . getType ( ) ) ; return c.get ( 0 ) ; }

Target:
private com.google.gerrit.server.change.ChangeJson.ChangeInfo getChange ( java.lang.String changeId ) throws java.io.IOException { com.google.gerrit.acceptance.RestResponse r = session.get ( ( ( "/changes/" + changeId ) + "/detail" ) ) ; return newGson ( ) . fromJson ( r.getReader ( ) , com.google.gerrit.server.change.ChangeJson.ChangeInfo.class ) ; }
Source:
void onRebase ( @ java.lang.SuppressWarnings ( value = "unused" ) com.google.gwt.event.dom.client.ClickEvent e ) { boolean enabled = true ; com.google.gerrit.client.changes.ChangeInfo.RevisionInfo revInfo = changeInfo.revision ( revision ) ; if ( revInfo.has_actions ( ) ) { com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.actions.ActionInfo > actions = revInfo.actions ( ) ; if ( actions.containsKey ( "rebase" ) ) { enabled = actions.get ( "rebase" ) . enabled ( ) ; } } com.google.gerrit.client.change.RebaseAction.call ( rebase , project , changeInfo.branch ( ) , changeId , revision , enabled ) ; }

Target:
void onRebase ( @ java.lang.SuppressWarnings ( value = "unused" ) com.google.gwt.event.dom.client.ClickEvent e ) { com.google.gerrit.client.change.RebaseAction.call ( rebase , project , changeInfo.branch ( ) , changeId , revision , rebaseParentNotCurrent ) ; }
Source:
private void compileProlog ( org.eclipse.jgit.lib.ObjectId prolog , java.io.File tempDir ) throws com.googlecode.prolog_cafe.compiler.CompileException , java.io.IOException { java.io.File tempRules = copyToTempFile ( prolog , tempDir ) ; try { java.lang.Compiler comp = new java.lang.Compiler ( ) ; comp.prologToJavaSource ( tempRules.getPath ( ) , tempDir.getPath ( ) ) ; } finally { tempRules.delete ( ) ; } }

Target:
private void compileProlog ( org.eclipse.jgit.lib.ObjectId prolog , java.io.File tempDir ) throws com.googlecode.prolog_cafe.exceptions.CompileException , java.io.IOException { java.io.File tempRules = copyToTempFile ( prolog , tempDir ) ; try { java.lang.Compiler comp = new java.lang.Compiler ( ) ; comp.prologToJavaSource ( tempRules.getPath ( ) , tempDir.getPath ( ) ) ; } finally { tempRules.delete ( ) ; } }
Source:
public void basicGroupProperties ( ) throws java.lang.Exception { com.google.gerrit.extensions.common.GroupInfo createdGroup = gApi.groups ( ) . create ( name ( "group" ) ) . get ( ) ; try ( com.google.gerrit.acceptance.api.group.GroupRebuilderIT.BlockReviewDbUpdatesForGroups ctx = new com.google.gerrit.acceptance.api.group.GroupRebuilderIT.BlockReviewDbUpdatesForGroups ( ) ) { com.google.gerrit.server.group.db.GroupBundle reviewDbBundle = bundleFactory.fromReviewDb ( db , new com.google.gerrit.reviewdb.client.AccountGroup.Id ( createdGroup.groupId ) ) ; deleteGroupRefs ( reviewDbBundle ) ; com.google.common.truth.Truth.assertThat ( rebuild ( reviewDbBundle ) ) . isEqualTo ( reviewDbBundle.truncateToSecond ( ) ) ; } }

Target:
public void basicGroupProperties ( ) throws java.lang.Exception { com.google.gerrit.extensions.common.GroupInfo createdGroup = gApi.groups ( ) . create ( name ( "group" ) ) . get ( ) ; try ( com.google.gerrit.acceptance.api.group.GroupRebuilderIT.BlockReviewDbUpdatesForGroups ctx = new com.google.gerrit.acceptance.api.group.GroupRebuilderIT.BlockReviewDbUpdatesForGroups ( ) ) { com.google.gerrit.server.group.db.GroupBundle reviewDbBundle = bundleFactory.fromReviewDb ( db , new com.google.gerrit.reviewdb.client.AccountGroup.Id ( createdGroup.groupId ) ) ; deleteGroupRefs ( reviewDbBundle ) ; assertMigratedCleanly ( rebuild ( reviewDbBundle ) , reviewDbBundle ) ; } }
Source:
public com.google.gerrit.server.events.PatchSetCommentAttribute asPatchSetLineAttribute ( com.google.gerrit.reviewdb.PatchLineComment c ) { com.google.gerrit.server.events.PatchSetCommentAttribute a = new com.google.gerrit.server.events.PatchSetCommentAttribute ( ) ; a.reviewer = asAccountAttribute ( c.getAuthor ( ) ) ; a.file = c.getKey ( ) . getParentKey ( ) . get ( ) ; a.line = c.getLine ( ) ; a.message = c.getMessage ( ) ; return a ; }

Target:
public com.google.gerrit.server.events.MessageAttribute asMessageAttribute ( com.google.gerrit.reviewdb.client.ChangeMessage message ) { com.google.gerrit.server.events.MessageAttribute a = new com.google.gerrit.server.events.MessageAttribute ( ) ; a.timestamp = ( message.getWrittenOn ( ) . getTime ( ) ) / 1000L ; a.reviewer = asAccountAttribute ( message.getAuthor ( ) ) ; a.message = message.getMessage ( ) ; return a ; }
Source:
private void deleteRef ( com.google.gerrit.reviewdb.client.Change change , org.eclipse.jgit.lib.Repository repo , com.google.gerrit.server.git.ChainedReceiveCommands cmds ) throws java.io.IOException { java.lang.String refName = com.google.gerrit.reviewdb.client.RefNames.changeMetaRef ( change.getId ( ) ) ; org.eclipse.jgit.lib.ObjectId old = cmds.getObjectId ( repo , refName ) ; if ( old != null ) { cmds.add ( new org.eclipse.jgit.transport.ReceiveCommand ( old , org.eclipse.jgit.lib.ObjectId.zeroId ( ) , refName ) ) ; } }

Target:
private void deleteRef ( com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.server.git.ChainedReceiveCommands cmds ) throws java.io.IOException { java.lang.String refName = com.google.gerrit.reviewdb.client.RefNames.changeMetaRef ( change.getId ( ) ) ; com.google.common.base.Optional < org.eclipse.jgit.lib.ObjectId > old = cmds.get ( refName ) ; if ( old.isPresent ( ) ) { cmds.add ( new org.eclipse.jgit.transport.ReceiveCommand ( old.get ( ) , org.eclipse.jgit.lib.ObjectId.zeroId ( ) , refName ) ) ; } }
Source:
public void onSuccess ( com.google.gerrit.client.VoidResult result ) { for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; ) { com.google.gerrit.client.projects.BranchInfo k = getRowItem ( row ) ; if ( ( k != null ) && ( branches.contains ( k.ref ( ) ) ) ) { table.removeRow ( row ) ; } else { row ++ ; } } updateDeleteButton ( ) ; delBranch.setVisible ( branchTable.hasBranchCanDelete ( ) ) ; }

Target:
public void onFailure ( java.lang.Throwable caught ) { query = new com.google.gerrit.client.admin.ProjectBranchesScreen.Query ( match ) . start ( start ) . run ( ) ; super . onFailure ( caught ) ; }
Source:
public boolean updateChange ( com.google.gerrit.server.update.ChangeContext ctx ) { com.google.gerrit.reviewdb.client.Change change = ctx.getChange ( ) ; com.google.gerrit.server.notedb.ChangeUpdate update = ctx.getUpdate ( change.currentPatchSetId ( ) ) ; change.setPrivate ( isPrivate ) ; change.setLastUpdatedOn ( ctx.getWhen ( ) ) ; update.setPrivate ( isPrivate ) ; return true ; }

Target:
public boolean updateChange ( com.google.gerrit.server.update.ChangeContext ctx ) throws com.google.gerrit.extensions.restapi.ResourceConflictException { com.google.gerrit.reviewdb.client.Change change = ctx.getChange ( ) ; if ( ( change.getStatus ( ) ) == ( Change.Status.MERGED ) ) { throw new com.google.gerrit.extensions.restapi.ResourceConflictException ( "change is merged" ) ; } com.google.gerrit.server.notedb.ChangeUpdate update = ctx.getUpdate ( change.currentPatchSetId ( ) ) ; change.setPrivate ( isPrivate ) ; change.setLastUpdatedOn ( ctx.getWhen ( ) ) ; update.setPrivate ( isPrivate ) ; return true ; }
Source:
private static byte [ ] readWholeEntry ( com.google.gerrit.server.plugins.PluginContentScanner scanner , com.google.gerrit.server.plugins.PluginEntry entry ) throws java.io.IOException { byte [ ] data = new byte [ entry.getSize ( ) . get ( ) . intValue ( ) ] ; try ( java.io.InputStream in = scanner.getInputStream ( entry ) ) { org.eclipse.jgit.util.IO.readFully ( in , data , 0 , data.length ) ; } return data ; }

Target:
private static byte [ ] readWholeEntry ( com.google.gerrit.server.plugins.PluginContentScanner scanner , com.google.gerrit.server.plugins.PluginEntry entry ) throws java.io.IOException { try ( java.io.InputStream in = scanner.getInputStream ( entry ) ) { return org.eclipse.jgit.util.IO.readWholeStream ( in , entry.getSize ( ) . get ( ) . intValue ( ) ) . array ( ) ; } }
Source:
public int run ( ) throws java.lang.Exception { final com.google.gerrit.server.GerritServer gs = com.google.gerrit.server.GerritServer.getInstance ( ) ; gs.getSchemaFactory ( ) . open ( ) . close ( ) ; java.lang.System.out.println ( "Gerrit2 schema initialized" ) ; return 0 ; }

Target:
public int run ( ) throws java.lang.Exception { final com.google.inject.Injector injector = com.google.inject.Guice.createInjector ( new com.google.gerrit.server.GerritServerModule ( ) ) ; final com.google.gerrit.server.GerritServer gs = injector.getInstance ( com.google.gerrit.server.GerritServer.class ) ; gs.getSchemaFactory ( ) . open ( ) . close ( ) ; java.lang.System.out.println ( "Gerrit2 schema initialized" ) ; return 0 ; }
Source:
protected void insertRow ( final int row ) { super . insertRow ( row ) ; final com.google.gwt.user.client.ui.HTMLTable.CellFormatter fmt = table.getCellFormatter ( ) ; fmt.addStyleName ( row , ( ( com.google.gerrit.client.patches.UnifiedDiffTable.PC ) - 2 ) , Gerrit.RESOURCES.css ( ) . lineNumber ( ) ) ; fmt.addStyleName ( row , ( ( com.google.gerrit.client.patches.UnifiedDiffTable.PC ) - 1 ) , Gerrit.RESOURCES.css ( ) . lineNumber ( ) ) ; fmt.addStyleName ( row , com.google.gerrit.client.patches.UnifiedDiffTable.PC , Gerrit.RESOURCES.css ( ) . diffText ( ) ) ; }

Target:
protected void insertRow ( final int row ) { super . insertRow ( row ) ; final com.google.gwt.user.client.ui.HTMLTable.CellFormatter fmt = table.getCellFormatter ( ) ; defaultStyle ( row , fmt ) ; }
Source:
private boolean isTrusted ( final com.google.gerrit.reviewdb.AccountExternalId id ) { if ( id.isScheme ( AccountExternalId.LEGACY_GAE ) ) { return isAllowGoogleAccountUpgrade ( ) ; } if ( id.isScheme ( AccountExternalId.SCHEME_MAILTO ) ) { return true ; } if ( id.isScheme ( AccountExternalId.SCHEME_UUID ) ) { return true ; } if ( id.isScheme ( AccountExternalId.SCHEME_USERNAME ) ) { return true ; } for ( final java.lang.String p : trusted ) { if ( matches ( p , id ) ) { return true ; } } return false ; }

Target:
private boolean isTrusted ( final com.google.gerrit.reviewdb.AccountExternalId id ) { if ( id.isScheme ( AccountExternalId.LEGACY_GAE ) ) { return isAllowGoogleAccountUpgrade ( ) ; } if ( id.isScheme ( AccountExternalId.SCHEME_MAILTO ) ) { return true ; } if ( id.isScheme ( AccountExternalId.SCHEME_UUID ) ) { return true ; } if ( id.isScheme ( AccountExternalId.SCHEME_USERNAME ) ) { return true ; } for ( final com.google.gerrit.common.auth.openid.OpenIdProviderPattern p : trusted ) { if ( p.matches ( id ) ) { return true ; } } return false ; }
Source:
void onSyntaxHighlighting ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > e ) { prefs.syntaxHighlighting ( e.getValue ( ) ) ; view.setSyntaxHighlighting ( prefs.syntaxHighlighting ( ) ) ; }

Target:
void onSyntaxHighlighting ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > e ) { prefs.syntaxHighlighting ( e.getValue ( ) ) ; mode.setEnabled ( prefs.syntaxHighlighting ( ) ) ; if ( prefs.syntaxHighlighting ( ) ) { setMode ( view.getContentType ( ) ) ; } view.setSyntaxHighlighting ( prefs.syntaxHighlighting ( ) ) ; }
Source:
private static java.lang.Iterable < com.google.gerrit.reviewdb.client.Change > changesToUpdate ( com.google.gerrit.server.update.BatchUpdate.ChangeContext ctx ) { com.google.gerrit.reviewdb.client.Change c = ctx.getChange ( ) ; if ( ( ctx.bumpLastUpdatedOn ) && ( c.getLastUpdatedOn ( ) . before ( ctx.getWhen ( ) ) ) ) { c.setLastUpdatedOn ( ctx.getWhen ( ) ) ; } return java.util.Collections.singleton ( c ) ; }

Target:
private static java.lang.Iterable < com.google.gerrit.reviewdb.client.Change > changesToUpdate ( com.google.gerrit.server.update.BatchUpdate.ChangeContextImpl ctx ) { com.google.gerrit.reviewdb.client.Change c = ctx.getChange ( ) ; if ( ( ctx.bumpLastUpdatedOn ) && ( c.getLastUpdatedOn ( ) . before ( ctx.getWhen ( ) ) ) ) { c.setLastUpdatedOn ( ctx.getWhen ( ) ) ; } return java.util.Collections.singleton ( c ) ; }
Source:
boolean match ( com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid , boolean isChangeOwner ) { if ( AccountGroup.PROJECT_OWNERS.equals ( uuid ) ) { return isDeclaredOwner ( ) ; } else if ( AccountGroup.CHANGE_OWNER.equals ( uuid ) ) { return isChangeOwner ; } else { return user.getEffectiveGroups ( ) . contains ( uuid ) ; } }

Target:
boolean match ( com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid , boolean isChangeOwner ) { if ( SystemGroupBackend.PROJECT_OWNERS.equals ( uuid ) ) { return isDeclaredOwner ( ) ; } else if ( SystemGroupBackend.CHANGE_OWNER.equals ( uuid ) ) { return isChangeOwner ; } else { return user.getEffectiveGroups ( ) . contains ( uuid ) ; } }
Source:
public static void publishEdit ( int id , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwt.core.client.JavaScriptObject > cb ) { com.google.gwt.core.client.JavaScriptObject in = com.google.gwt.core.client.JavaScriptObject.createObject ( ) ; com.google.gerrit.client.changes.ChangeApi.change ( id ) . view ( "edit:publish" ) . post ( in , cb ) ; }

Target:
public static void publish ( @ com.google.gerrit.common.Nullable java.lang.String project , int id , java.lang.String commit , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwt.core.client.JavaScriptObject > cb ) { com.google.gwt.core.client.JavaScriptObject in = com.google.gwt.core.client.JavaScriptObject.createObject ( ) ; com.google.gerrit.client.changes.ChangeApi.call ( project , id , commit , "publish" ) . post ( in , cb ) ; }
Source:
public java.lang.String toProject ( final com.google.gerrit.reviewdb.Project.NameKey project ) { com.google.gerrit.common.data.ParameterizedString pattern = new com.google.gerrit.common.data.ParameterizedString ( type.getProject ( ) ) ; final java.util.Map < java.lang.String , java.lang.String > p = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; p.put ( "project" , com.google.gwt.http.client.URL.encodeQueryString ( project.get ( ) ) ) ; return ( baseUrl ) + ( pattern.replace ( p ) ) ; }

Target:
public java.lang.String toProject ( final com.google.gerrit.reviewdb.Project.NameKey project ) { com.google.gerrit.common.data.ParameterizedString pattern = new com.google.gerrit.common.data.ParameterizedString ( type.getProject ( ) ) ; final java.util.Map < java.lang.String , java.lang.String > p = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; p.put ( "project" , encode ( project.get ( ) ) ) ; return ( baseUrl ) + ( pattern.replace ( p ) ) ; }
Source:
public void init ( javax.servlet.FilterConfig config ) throws javax.servlet.ServletException { for ( com.google.gerrit.httpd.AllRequestFilter f : filters ) { f.init ( config ) ; } }

Target:
private synchronized void cleanUpInitializedFilters ( ) { java.lang.Iterable < com.google.gerrit.httpd.AllRequestFilter > filtersToCleanUp = initializedFilters ; initializedFilters = new com.google.gerrit.extensions.registration.DynamicSet ( ) ; for ( com.google.gerrit.httpd.AllRequestFilter filter : filtersToCleanUp ) { if ( filters.contains ( filter ) ) { initializedFilters.add ( filter ) ; } else { filter.destroy ( ) ; } } }
Source:
public void abandonReviewableChangeByOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; abandon ( sc.changeId , sc.owner ) ; assertThat ( sender ) . sent ( "abandon" , sc ) . notTo ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; }

Target:
public void abandonReviewableChangeByOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; abandon ( sc.changeId , sc.owner ) ; assertThat ( sender ) . sent ( "abandon" , sc ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) . noOneElse ( ) ; }
Source:
static com.google.gerrit.server.project.SectionMatcher wrap ( com.google.gerrit.reviewdb.client.Project.NameKey project , com.google.gerrit.common.data.AccessSection section ) { java.lang.String ref = section.getName ( ) ; if ( com.google.gerrit.common.data.AccessSection.isValid ( ref ) ) { return com.google.gerrit.server.project.SectionMatcher.wrap ( project , ref , section ) ; } else { return null ; } }

Target:
static com.google.gerrit.server.project.SectionMatcher wrap ( com.google.gerrit.reviewdb.client.Project.NameKey project , com.google.gerrit.common.data.AccessSection section ) { java.lang.String ref = section.getName ( ) ; if ( com.google.gerrit.common.data.AccessSection.isValid ( ref ) ) { return new com.google.gerrit.server.project.SectionMatcher ( project , section , getMatcher ( ref ) ) ; } else { return null ; } }
Source:
private void populate ( final int row , final com.google.gerrit.client.data.PatchLine line ) { final com.google.gwt.user.client.ui.HTMLTable.CellFormatter fmt = table.getCellFormatter ( ) ; table.setWidget ( row , com.google.gerrit.client.patches.C_ARROW , null ) ; table.setText ( row , 1 , line.getText ( ) ) ; fmt.setStyleName ( row , 1 , ( "DiffText-" + ( line.getType ( ) . name ( ) ) ) ) ; fmt.addStyleName ( row , 1 , "DiffText" ) ; setRowItem ( row , line ) ; }

Target:
private void populate ( final int row , final com.google.gerrit.client.data.PatchLine line ) { final com.google.gwt.user.client.ui.HTMLTable.CellFormatter fmt = table.getCellFormatter ( ) ; table.setWidget ( row , com.google.gerrit.client.patches.C_ARROW , null ) ; table.setHTML ( row , 1 , com.google.gerrit.client.patches.PatchUtil.lineToHTML ( line.getText ( ) ) ) ; fmt.setStyleName ( row , 1 , ( "DiffText-" + ( line.getType ( ) . name ( ) ) ) ) ; fmt.addStyleName ( row , 1 , "DiffText" ) ; setRowItem ( row , line ) ; }
Source:
public com.google.gerrit.extensions.restapi.Response < java.lang.String > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Mute.Input input ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.StarredChangesUtil.IllegalLabelException , com.google.gwtorm.server.OrmException { if ( ( rsrc.isUserOwner ( ) ) || ( isMuted ( rsrc.getChange ( ) ) ) ) { return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; } stars.mute ( rsrc ) ; return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; }

Target:
public com.google.gerrit.server.change.Description getDescription ( com.google.gerrit.server.change.ChangeResource rsrc ) { return new com.google.gerrit.extensions.webui.UiAction.Description ( ) . setLabel ( "Mute" ) . setTitle ( "Mute the change to unhighlight it in the dashboard" ) . setVisible ( ( ( ! ( rsrc.isUserOwner ( ) ) ) && ( isMuteable ( rsrc ) ) ) ) ; }
Source:
public void testItsAssociationPolicyOptional ( ) { com.googlesource.gerrit.plugins.hooks.its.ItsConfig itsConfig = createItsConfig ( ) ; org.easymock.EasyMock.expect ( serverConfig.getEnum ( "commentlink" , "ItsTestName" , "association" , ItsAssociationPolicy.OPTIONAL ) ) . andReturn ( ItsAssociationPolicy.OPTIONAL ) . atLeastOnce ( ) ; replayMocks ( ) ; assertEquals ( "Expected and generated associated policy do not match" , ItsAssociationPolicy.OPTIONAL , itsConfig.getItsAssociationPolicy ( ) ) ; }

Target:
public void testItsAssociationPolicyOptional ( ) { com.googlesource.gerrit.plugins.hooks.its.ItsConfig itsConfig = createItsConfig ( ) ; org.easymock.EasyMock.expect ( serverConfig.getString ( "ItsTestName" , null , "commentlink" ) ) . andReturn ( null ) . atLeastOnce ( ) ; org.easymock.EasyMock.expect ( serverConfig.getEnum ( "commentlink" , "ItsTestName" , "association" , ItsAssociationPolicy.OPTIONAL ) ) . andReturn ( ItsAssociationPolicy.OPTIONAL ) . atLeastOnce ( ) ; replayMocks ( ) ; assertEquals ( "Expected and generated associated policy do not match" , ItsAssociationPolicy.OPTIONAL , itsConfig.getItsAssociationPolicy ( ) ) ; }
Source:
public void onShowView ( ) { super . onShowView ( ) ; int rest = ( com.google.gerrit.client.Gerrit.getHeaderFooterHeight ( ) ) + 30 ; cm.setHeight ( ( ( com.google.gwt.user.client.Window.getClientHeight ( ) ) - rest ) ) ; cm.refresh ( ) ; cm.focus ( ) ; }

Target:
public void onShowView ( ) { super . onShowView ( ) ; if ( prefs.hideTopMenu ( ) ) { com.google.gerrit.client.Gerrit.setHeaderVisible ( false ) ; } int rest = ( com.google.gerrit.client.Gerrit.getHeaderFooterHeight ( ) ) + 30 ; cm.setHeight ( ( ( com.google.gwt.user.client.Window.getClientHeight ( ) ) - rest ) ) ; cm.refresh ( ) ; cm.focus ( ) ; }
Source:
public void blockRule_ParentBlocksChildEvenIfAlreadyBlockedInChild ( ) { com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/tags/*" ) ; com.google.gerrit.server.project.Util.block ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/tags/*" ) ; com.google.gerrit.server.project.Util.block ( parent , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/tags/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.Util.DEVS ) ; assertCannotUpdate ( "refs/tags/V10" , u ) ; }

Target:
public void unblockNoForce ( ) { 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/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.testing.Util.DEVS ) ; assertCanUpdate ( "refs/heads/master" , u ) ; }
Source:
public void run ( ) { if ( cm.hasActiveLine ( ) ) { com.google.gerrit.client.diff.CommentGroup w = map ( cm.side ( ) ) . get ( ( ( cm.getLineNumber ( cm.activeLine ( ) ) ) + 1 ) ) ; if ( w != null ) { w.openCloseLast ( ) ; } } }

Target:
public void run ( ) { if ( cm.extras ( ) . hasActiveLine ( ) ) { com.google.gerrit.client.diff.CommentGroup w = map ( cm.side ( ) ) . get ( ( ( cm.getLineNumber ( cm.extras ( ) . activeLine ( ) ) ) + 1 ) ) ; if ( w != null ) { w.openCloseLast ( ) ; } } }
Source:
public void simpleReadmeDoc ( ) throws java.lang.Exception { java.lang.String title = "DocServletTest simpleDoc" ; java.lang.String url = "http://daringfireball.net/projects/markdown/syntax" ; java.lang.String markdown = ( ( ( ( ( ( "# " + title ) + "\n" ) + "\n" ) + "Tests the rendering of " ) + "[Markdown](" ) + url ) + ")." ; repo.branch ( "master" ) . commit ( ) . add ( "README.md" , markdown ) . create ( ) ; java.lang.String html = buildHtml ( "/repo/+doc/master/README.md" ) ; org.junit.Assert.assertTrue ( html.contains ( ( ( "<title>" + title ) + "</title>" ) ) ) ; org.junit.Assert.assertTrue ( html.contains ( ( title + "</h1>" ) ) ) ; org.junit.Assert.assertTrue ( html.contains ( ( ( "<a href=\"" + url ) + "\">Markdown</a>" ) ) ) ; }

Target:
public void simpleReadmeDoc ( ) throws java.lang.Exception { java.lang.String title = "DocServletTest simpleDoc" ; java.lang.String url = "http://daringfireball.net/projects/markdown/syntax" ; java.lang.String markdown = ( ( ( ( ( ( "# " + title ) + "\n" ) + "\n" ) + "Tests the rendering of " ) + "[Markdown](" ) + url ) + ")." ; repo.branch ( "master" ) . commit ( ) . add ( "README.md" , markdown ) . create ( ) ; java.lang.String html = buildHtml ( "/repo/+doc/master/README.md" ) ; com.google.common.truth.Truth.assertThat ( html ) . contains ( ( ( "<title>" + title ) + "</title>" ) ) ; com.google.common.truth.Truth.assertThat ( html ) . contains ( ( title + "</h1>" ) ) ; com.google.common.truth.Truth.assertThat ( html ) . contains ( ( ( "<a href=\"" + url ) + "\">Markdown</a>" ) ) ; }
Source:
public void onSuccess ( final com.google.gwtjsonrpc.client.VoidResult result ) { for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; ) { final com.google.gerrit.common.data.AccountProjectWatchInfo k = getRowItem ( row ) ; if ( ( k != null ) && ( ids.contains ( k.getWatch ( ) . getKey ( ) ) ) ) { table.removeRow ( row ) ; } else { row ++ ; } } }

Target:
void remove ( java.util.Set < com.google.gerrit.reviewdb.AccountProjectWatch.Key > ids ) { for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; ) { final com.google.gerrit.common.data.AccountProjectWatchInfo k = getRowItem ( row ) ; if ( ( k != null ) && ( ids.contains ( k.getWatch ( ) . getKey ( ) ) ) ) { table.removeRow ( row ) ; } else { row ++ ; } } }
Source:
public void setAssigneeOnReviewableWipChange ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableWipChange ( ) ; assign ( sc , sc.owner , sc.assignee ) ; assertThat ( sender ) . sent ( "setassignee" , sc ) . notTo ( sc.owner , sc.reviewer , sc.ccer , sc.starrer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . to ( sc.assignee ) ; }

Target:
public void createAssignee ( ) throws java.lang.Exception { assignee = accountCreator.create ( "assignee" , "assignee@example.com" , "assignee" ) ; }
Source:
public void onWindowResized ( final int width , final int height ) { com.google.gerrit.client.Gerrit.body.setHeight ( ( height + "px" ) ) ; }

Target:
public void onModuleLoad ( ) { com.google.gerrit.client.Gerrit.initHistoryHooks ( ) ; com.google.gerrit.client.Gerrit.populateBottomMenu ( ) ; final com.google.gwt.user.client.ui.RootPanel topMenu = com.google.gwt.user.client.ui.RootPanel.get ( "gerrit_topmenu" ) ; com.google.gerrit.client.Gerrit.menuBar = new com.google.gerrit.client.ui.LinkMenuBar ( ) ; topMenu.add ( com.google.gerrit.client.Gerrit.menuBar ) ; com.google.gerrit.client.Gerrit.body = com.google.gwt.user.client.ui.RootPanel.get ( "gerrit_body" ) ; com.google.gwtjsonrpc.client.JsonUtil.addRpcStatusListener ( new com.google.gerrit.client.RpcStatus ( topMenu ) ) ; com.google.gerrit.client.Gerrit.SYSTEM_SVC.loadGerritConfig ( new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.data.GerritConfig > ( ) { public void onSuccess ( final com.google.gerrit.client.data.GerritConfig result ) { com.google.gerrit.client.rpc.Common.setGerritConfig ( result ) ; onModuleLoad2 ( ) ; } } ) ; }
Source:
private java.lang.String changeKindMessage ( com.google.gerrit.extensions.client.ChangeKind changeKind ) { switch ( changeKind ) { case MERGE_FIRST_PARENT_UPDATE : case TRIVIAL_REBASE : case NO_CHANGE : return ( ": Patch Set " + ( priorPatchSetId.get ( ) ) ) + " was rebased" ; case NO_CODE_CHANGE : return ": Commit message was updated" ; case REWORK : default : return null ; } }

Target:
private java.lang.String changeKindMessage ( com.google.gerrit.extensions.client.ChangeKind changeKind ) { switch ( changeKind ) { case MERGE_FIRST_PARENT_UPDATE : case TRIVIAL_REBASE : case NO_CHANGE : return ( ": Patch Set " + ( priorPatchSetId.get ( ) ) ) + " was rebased." ; case NO_CODE_CHANGE : return ": Commit message was updated." ; case REWORK : default : return null ; } }
Source:
public com.google.gerrit.server.group.GroupJson addOption ( com.google.gerrit.common.groups.ListGroupsOption o ) { options.add ( o ) ; return this ; }

Target:
public com.google.gerrit.extensions.common.GroupInfo format ( com.google.gerrit.common.data.GroupDescription.Basic group ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.extensions.common.GroupInfo info = init ( group ) ; if ( ( options.contains ( com.google.gerrit.extensions.client.ListGroupsOption.MEMBERS ) ) || ( options.contains ( com.google.gerrit.extensions.client.ListGroupsOption.INCLUDES ) ) ) { com.google.gerrit.server.group.GroupResource rsrc = new com.google.gerrit.server.group.GroupResource ( groupControlFactory.controlFor ( group ) ) ; initMembersAndIncludes ( rsrc , info ) ; } return info ; }
Source:
private com.google.re2j.Pattern getConfigPattern ( java.lang.String key ) { java.util.Set < java.lang.String > mergeStrings = new java.util.HashSet < > ( ( ( java.util.List < java.lang.String > ) ( global.get ( key ) ) ) ) ; return com.google.re2j.Pattern.compile ( com.google.common.base.Joiner.on ( "|" ) . join ( mergeStrings ) , Pattern.DOTALL ) ; }

Target:
private com.google.re2j.Pattern getConfigPattern ( java.lang.String key ) { java.lang.Object patterns = global.get ( key ) ; if ( patterns != null ) { java.util.Set < java.lang.String > mergeStrings = new java.util.HashSet < > ( ( ( java.util.List < java.lang.String > ) ( patterns ) ) ) ; return com.google.re2j.Pattern.compile ( com.google.common.base.Joiner.on ( "|" ) . join ( mergeStrings ) , Pattern.DOTALL ) ; } return null ; }
Source:
public java.util.Set < com.google.gerrit.reviewdb.client.AccountGroup.UUID > intersection ( java.lang.Iterable < com.google.gerrit.reviewdb.client.AccountGroup.UUID > groupIds ) { java.util.Set < com.google.gerrit.reviewdb.client.AccountGroup.UUID > r = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.google.gerrit.reviewdb.client.AccountGroup.UUID id : groupIds ) { if ( contains ( id ) ) { r.add ( id ) ; } } return r ; }

Target:
public java.util.Set < com.google.gerrit.reviewdb.client.AccountGroup.UUID > intersection ( java.lang.Iterable < com.google.gerrit.reviewdb.client.AccountGroup.UUID > groupIds ) { java.util.Set < com.google.gerrit.reviewdb.client.AccountGroup.UUID > r = new java.util.HashSet < > ( ) ; for ( com.google.gerrit.reviewdb.client.AccountGroup.UUID id : groupIds ) { if ( contains ( id ) ) { r.add ( id ) ; } } return r ; }
Source:
private void appendNoLF ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m ) { openLine ( m ) ; padLineNumber ( m ) ; padLineNumber ( m ) ; m.openTd ( ) ; m.addStyleName ( "DiffText" ) ; m.addStyleName ( "DiffText-NO_LF" ) ; m.append ( "\\ No newline at end of file" ) ; m.closeTd ( ) ; closeLine ( m ) ; }

Target:
private void appendNoLF ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m ) { openLine ( m ) ; padLineNumber ( m ) ; padLineNumber ( m ) ; m.openTd ( ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . diffText ( ) ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . diffTextNoLF ( ) ) ; m.append ( "\\ No newline at end of file" ) ; m.closeTd ( ) ; closeLine ( m ) ; }
Source:
com.google.common.collect.ImmutableList < com.google.gerrit.reviewdb.client.PatchLineComment > exportComments ( final com.google.gerrit.reviewdb.client.PatchLineComment.Status status ) { return com.google.common.collect.ImmutableList.copyOf ( com.google.common.collect.Lists.transform ( comments , new com.google.common.base.Function < com.google.gerrit.server.notedb.RevisionNoteData.Comment , com.google.gerrit.reviewdb.client.PatchLineComment > ( ) { @ java.lang.Override public com.google.gerrit.reviewdb.client.PatchLineComment apply ( com.google.gerrit.server.notedb.RevisionNoteData.Comment c ) { com.google.gerrit.reviewdb.client.PatchLineComment plc = c.export ( ) ; plc.setStatus ( status ) ; return plc ; } } ) ) ; }

Target:
com.google.common.collect.ImmutableList < com.google.gerrit.reviewdb.client.PatchLineComment > exportComments ( com.google.gerrit.reviewdb.client.Change.Id changeId , com.google.gerrit.reviewdb.client.PatchLineComment.Status status ) { return com.google.common.collect.ImmutableList.copyOf ( comments.stream ( ) . map ( ( c ) -> c.export ( changeId , status ) ) . collect ( java.util.stream.Collectors.toList ( ) ) ) ; }
Source:
void scheduleFullSync ( final com.google.gerrit.reviewdb.client.Project.NameKey project , final java.lang.String urlMatch ) { if ( ! ( running ) ) { com.googlesource.gerrit.plugins.replication.ReplicationQueue.log.warn ( "Replication plugin did not finish startup before event" ) ; return ; } for ( com.googlesource.gerrit.plugins.replication.Destination cfg : configs ) { for ( org.eclipse.jgit.transport.URIish uri : cfg.getURIs ( project , urlMatch ) ) { cfg.schedule ( project , PushOne.ALL_REFS , uri ) ; } } }

Target:
void scheduleFullSync ( final com.google.gerrit.reviewdb.client.Project.NameKey project , final java.lang.String urlMatch , com.googlesource.gerrit.plugins.replication.ReplicationState state ) { if ( ! ( running ) ) { com.googlesource.gerrit.plugins.replication.ReplicationQueue.wrappedLog.warn ( "Replication plugin did not finish startup before event" , state ) ; return ; } for ( com.googlesource.gerrit.plugins.replication.Destination cfg : configs ) { if ( cfg.wouldPushProject ( project ) ) { for ( org.eclipse.jgit.transport.URIish uri : cfg.getURIs ( project , urlMatch ) ) { cfg.schedule ( project , PushOne.ALL_REFS , uri , state ) ; } } } }
Source:
public static java.util.Set < java.lang.String > getEmails ( java.util.Collection < com.google.gerrit.server.account.ExternalId > ids ) { java.util.Set < java.lang.String > emails = new java.util.HashSet < > ( ) ; for ( com.google.gerrit.server.account.ExternalId extId : ids ) { if ( extId.isScheme ( com.google.gerrit.server.account.ExternalId.SCHEME_MAILTO ) ) { emails.add ( extId.key ( ) . id ( ) ) ; } } return emails ; }

Target:
public static java.util.Set < java.lang.String > getEmails ( java.util.Collection < com.google.gerrit.server.account.externalids.ExternalId > ids ) { java.util.Set < java.lang.String > emails = new java.util.HashSet < > ( ) ; for ( com.google.gerrit.server.account.externalids.ExternalId extId : ids ) { if ( extId.isScheme ( com.google.gerrit.server.account.externalids.ExternalId.SCHEME_MAILTO ) ) { emails.add ( extId.key ( ) . id ( ) ) ; } } return emails ; }
Source:
private com.google.gerrit.server.project.ProjectControl user ( com.google.gerrit.reviewdb.AccountGroup ... memberOf ) { com.google.gerrit.server.project.RefControl.Factory refControlFactory = new com.google.gerrit.server.project.RefControl.Factory ( ) { @ java.lang.Override public com.google.gerrit.server.project.RefControl create ( final com.google.gerrit.server.project.ProjectControl projectControl , final java.lang.String ref ) { return new com.google.gerrit.server.project.RefControl ( projectControl , ref ) ; } } ; HEAD ( 1118.0 ) ; com.google.gerrit.server.project.a Correct ; com.google.gerrit.server.project.usage of ; @ com.google.gerrit.server.project.Nullable com.google.gerrit.server.project.in EventFactory ; }

Target:
private com.google.gerrit.server.project.ProjectControl user ( com.google.gerrit.reviewdb.AccountGroup ... memberOf ) { com.google.gerrit.server.project.RefControl.Factory refControlFactory = new com.google.gerrit.server.project.RefControl.Factory ( ) { @ java.lang.Override public com.google.gerrit.server.project.RefControl create ( final com.google.gerrit.server.project.ProjectControl projectControl , final java.lang.String ref ) { return new com.google.gerrit.server.project.RefControl ( projectControl , ref ) ; } } ; return new com.google.gerrit.server.project.ProjectControl ( java.util.Collections.< com.google.gerrit.reviewdb.AccountGroup.UUID > emptySet ( ) , java.util.Collections.< com.google.gerrit.reviewdb.AccountGroup.UUID > emptySet ( ) , refControlFactory , new com.google.gerrit.server.project.RefControlTest.MockUser ( memberOf ) , newProjectState ( ) ) ; }
Source:
public static synchronized void setClockStep ( long clockStep , java.util.concurrent.TimeUnit clockStepUnit ) { com.google.common.base.Preconditions.checkState ( ( ( com.google.gerrit.testutil.TestTimeUtil.clockMs ) != null ) , "call resetWithClockStep first" ) ; com.google.gerrit.testutil.TestTimeUtil.clockStepMs = java.util.concurrent.TimeUnit.MILLISECONDS.convert ( clockStep , clockStepUnit ) ; org.joda.time.DateTimeUtils.setCurrentMillisProvider ( new org.joda.time.DateTimeUtils.MillisProvider ( ) { @ java.lang.Override public long getMillis ( ) { return com.google.gerrit.testutil.TestTimeUtil.clockMs.getAndAdd ( com.google.gerrit.testutil.TestTimeUtil.clockStepMs ) ; } } ) ; }

Target:
public java.lang.String getenv ( java.lang.String variable ) { return defaultReader.getenv ( variable ) ; }
Source:
protected void configure ( ) { bind ( com.google.gerrit.client.data.GerritConfig.class ) . toProvider ( com.google.gerrit.server.config.GerritConfigProvider.class ) . in ( com.google.inject.Scopes.SINGLETON ) ; }

Target:
public int run ( ) throws java.lang.Exception { final com.google.inject.Injector injector = com.google.inject.Guice.createInjector ( com.google.inject.Stage.PRODUCTION , new com.google.gerrit.server.config.DatabaseModule ( ) , new com.google.gerrit.server.config.GerritGlobalModule ( ) , new com.google.gerrit.server.ssh.SshModule ( ) ) ; injector.getInstance ( com.google.gerrit.server.ssh.SshDaemon.class ) . start ( ) ; return never ( ) ; }