auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public int compareTo ( com.googlecode.prolog_cafe.lang.Term anotherTerm ) { if ( ( val ) != ( this ) ) return val.compareTo ( anotherTerm ) ; if ( ! ( anotherTerm.isVariable ( ) ) ) return BEFORE ; if ( ( this ) == anotherTerm ) return EQUAL ; int x = ( this . hashCode ( ) ) - ( ( ( com.googlecode.prolog_cafe.lang.VariableTerm ) ( anotherTerm ) ) . hashCode ( ) ) ; if ( x != 0 ) return x ; throw new com.googlecode.prolog_cafe.exceptions.InternalException ( "VariableTerm is not unique" ) ; }

Target:
public int compareTo ( com.googlecode.prolog_cafe.lang.Term anotherTerm ) { if ( ( val ) != ( this ) ) return val.compareTo ( anotherTerm ) ; if ( ! ( anotherTerm instanceof com.googlecode.prolog_cafe.lang.VariableTerm ) ) return BEFORE ; if ( ( this ) == anotherTerm ) return EQUAL ; int x = ( this . hashCode ( ) ) - ( ( ( com.googlecode.prolog_cafe.lang.VariableTerm ) ( anotherTerm ) ) . hashCode ( ) ) ; if ( x != 0 ) return x ; throw new com.googlecode.prolog_cafe.exceptions.InternalException ( "VariableTerm is not unique" ) ; }
Source:
public void commentOnReviewableChangeByOwnerCcingSelf ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; review ( sc.owner , sc.changeId , com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "comment" , sc ) . to ( sc.owner ) . to ( sc.reviewerByEmail ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; }

Target:
public void commentOnReviewableChangeByOwnerCcingSelf ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; review ( sc.owner , sc.changeId , com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "comment" , sc ) . to ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; }
Source:
private static void whoAmI ( ) { final com.google.gwt.user.client.ui.MenuItem me ; me = com.google.gerrit.client.Gerrit.menuBar.addItem ( com.google.gerrit.client.FormatUtil.nameEmail ( com.google.gerrit.client.Gerrit.getUserAccount ( ) ) , ( ( com.google.gwt.user.client.Command ) ( null ) ) ) ; me.removeStyleName ( "gwt-MenuItem" ) ; me.addStyleName ( "gerrit-MenuBarUserName" ) ; }

Target:
private static void whoAmI ( ) { final java.lang.String name = com.google.gerrit.client.FormatUtil.nameEmail ( com.google.gerrit.client.Gerrit.getUserAccount ( ) ) ; final com.google.gwt.user.client.ui.MenuItem me = com.google.gerrit.client.Gerrit.menuBar.addItem ( name , ( ( com.google.gwt.user.client.Command ) ( null ) ) ) ; me.removeStyleName ( "gwt-MenuItem" ) ; me.addStyleName ( "gerrit-MenuBarUserName" ) ; }
Source:
public void fire ( com.google.gerrit.extensions.common.ChangeInfo change , com.google.gerrit.extensions.common.RevisionInfo revision , com.google.gerrit.extensions.common.AccountInfo restorer , java.lang.String reason ) { com.google.gerrit.server.extensions.events.ChangeRestored.Event e = new com.google.gerrit.server.extensions.events.ChangeRestored.Event ( change , revision , restorer , reason ) ; if ( ! ( listeners.iterator ( ) . hasNext ( ) ) ) { return ; } for ( com.google.gerrit.extensions.events.ChangeRestoredListener l : listeners ) { l.onChangeRestored ( e ) ; } }

Target:
public void fire ( com.google.gerrit.extensions.common.ChangeInfo change , com.google.gerrit.extensions.common.RevisionInfo revision , com.google.gerrit.extensions.common.AccountInfo restorer , java.lang.String reason ) { if ( ! ( listeners.iterator ( ) . hasNext ( ) ) ) { return ; } com.google.gerrit.server.extensions.events.ChangeRestored.Event e = new com.google.gerrit.server.extensions.events.ChangeRestored.Event ( change , revision , restorer , reason ) ; for ( com.google.gerrit.extensions.events.ChangeRestoredListener l : listeners ) { l.onChangeRestored ( e ) ; } }
Source:
public com.google.gerrit.server.notedb.ChangeNotes createFromIdOnlyWhenNoteDbDisabled ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change.Id changeId ) throws com.google.gwtorm.server.OrmException { com.google.common.base.Preconditions.checkState ( ( ! ( args.migration.readChanges ( ) ) ) , ( "do not call" + " createFromIdOnlyWhenNoteDbDisabled when NoteDb is enabled" ) ) ; com.google.gerrit.reviewdb.client.Change change = com.google.gerrit.server.notedb.ChangeNotes.Factory.unwrap ( db ) . changes ( ) . get ( changeId ) ; com.google.common.base.Preconditions.checkNotNull ( change , "change %s not found in ReviewDb" , changeId ) ; return new com.google.gerrit.server.notedb.ChangeNotes ( args , change.getProject ( ) , change ) . load ( ) ; }

Target:
public com.google.gerrit.server.notedb.ChangeNotes createFromIdOnlyWhenNoteDbDisabled ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change.Id changeId ) throws com.google.gwtorm.server.OrmException { com.google.common.base.Preconditions.checkState ( ( ! ( args.migration.readChanges ( ) ) ) , ( "do not call" + " createFromIdOnlyWhenNoteDbDisabled when NoteDb is enabled" ) ) ; com.google.gerrit.reviewdb.client.Change change = com.google.gerrit.server.notedb.ChangeNotes.unwrap ( db ) . changes ( ) . get ( changeId ) ; com.google.common.base.Preconditions.checkNotNull ( change , "change %s not found in ReviewDb" , changeId ) ; return new com.google.gerrit.server.notedb.ChangeNotes ( args , change.getProject ( ) , change ) . load ( ) ; }
Source:
void send ( java.lang.String message ) { com.google.gerrit.client.changes.ChangeApi.restore ( id.get ( ) , message , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.info.ChangeInfo > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.info.ChangeInfo result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( id ) ) ; hide ( ) ; } } ) ; }

Target:
void send ( java.lang.String message ) { com.google.gerrit.client.changes.ChangeApi.restore ( project.get ( ) , id.get ( ) , message , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.info.ChangeInfo > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.info.ChangeInfo result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( project , id ) ) ; hide ( ) ; } } ) ; }
Source:
public void onLoad ( ) { super . onLoad ( ) ; Util.GROUP_SVC.ownedGroups ( new com.google.gerrit.client.rpc.ScreenLoadCallback < java.util.List < com.google.gerrit.client.reviewdb.AccountGroup > > ( this ) { @ java.lang.Override protected void preDisplay ( final java.util.List < com.google.gerrit.client.reviewdb.AccountGroup > result ) { groups.display ( result ) ; groups.finishDisplay ( ) ; } } ) ; }

Target:
protected void onLoad ( ) { super . onLoad ( ) ; Util.GROUP_SVC.ownedGroups ( new com.google.gerrit.client.rpc.ScreenLoadCallback < java.util.List < com.google.gerrit.client.reviewdb.AccountGroup > > ( this ) { @ java.lang.Override protected void preDisplay ( final java.util.List < com.google.gerrit.client.reviewdb.AccountGroup > result ) { groups.display ( result ) ; groups.finishDisplay ( ) ; } } ) ; }
Source:
public static void applyUserPreferences ( ) { final com.google.gerrit.reviewdb.AccountGeneralPreferences p = com.google.gerrit.client.Gerrit.myAccount.getGeneralPreferences ( ) ; com.google.gwtexpui.clippy.client.CopyableLabel.setFlashEnabled ( p.isUseFlashClipboard ( ) ) ; if ( ( com.google.gerrit.client.Gerrit.siteHeader ) != null ) { com.google.gerrit.client.Gerrit.siteHeader.setVisible ( p.isShowSiteHeader ( ) ) ; } if ( ( com.google.gerrit.client.Gerrit.siteFooter ) != null ) { com.google.gerrit.client.Gerrit.siteFooter.setVisible ( p.isShowSiteHeader ( ) ) ; } }

Target:
public static void applyUserPreferences ( ) { if ( ( com.google.gerrit.client.Gerrit.myAccount ) != null ) { final com.google.gerrit.reviewdb.AccountGeneralPreferences p = com.google.gerrit.client.Gerrit.myAccount.getGeneralPreferences ( ) ; com.google.gwtexpui.clippy.client.CopyableLabel.setFlashEnabled ( p.isUseFlashClipboard ( ) ) ; com.google.gerrit.client.Gerrit.siteHeader.setVisible ( p.isShowSiteHeader ( ) ) ; com.google.gerrit.client.Gerrit.siteFooter.setVisible ( p.isShowSiteHeader ( ) ) ; } }
Source:
private void enableForm ( final boolean canModifyAgreements , final boolean canModifyDescription , final boolean canModifyMergeType ) { submitType.setEnabled ( canModifyMergeType ) ; descTxt.setEnabled ( canModifyDescription ) ; useContributorAgreements.setEnabled ( canModifyAgreements ) ; useSignedOffBy.setEnabled ( canModifyAgreements ) ; requireChangeID.setEnabled ( canModifyMergeType ) ; saveProject.setEnabled ( ( ( canModifyAgreements || canModifyDescription ) || canModifyMergeType ) ) ; }

Target:
private void enableForm ( final boolean canModifyAgreements , final boolean canModifyDescription , final boolean canModifyMergeType ) { submitType.setEnabled ( canModifyMergeType ) ; descTxt.setEnabled ( canModifyDescription ) ; useContributorAgreements.setEnabled ( canModifyAgreements ) ; useSignedOffBy.setEnabled ( canModifyAgreements ) ; requireChangeID.setEnabled ( canModifyMergeType ) ; }
Source:
public void queryChangesOneTerm ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r1 = createChange ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result r2 = createChange ( ) ; java.util.List < com.google.gerrit.extensions.common.ChangeInfo > results = gApi.changes ( ) . query ( "status:open" ) . get ( ) ; org.junit.Assert.assertEquals ( 2 , results.size ( ) ) ; org.junit.Assert.assertEquals ( r2.getChangeId ( ) , results.get ( 0 ) . changeId ) ; org.junit.Assert.assertEquals ( r1.getChangeId ( ) , results.get ( 1 ) . changeId ) ; }

Target:
public void queryChangesOneTerm ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r1 = createChange ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result r2 = createChange ( ) ; java.util.List < com.google.gerrit.extensions.common.ChangeInfo > results = query ( "status:open" ) ; org.junit.Assert.assertEquals ( 2 , results.size ( ) ) ; org.junit.Assert.assertEquals ( r2.getChangeId ( ) , results.get ( 0 ) . changeId ) ; org.junit.Assert.assertEquals ( r1.getChangeId ( ) , results.get ( 1 ) . changeId ) ; }
Source:
public boolean areDraftsUpToDate ( org.eclipse.jgit.lib.Repository draftsRepo , com.google.gerrit.reviewdb.client.Account.Id accountId ) throws java.io.IOException { org.eclipse.jgit.lib.Ref ref = draftsRepo.exactRef ( com.google.gerrit.reviewdb.client.RefNames.refsDraftComments ( accountId , changeId ) ) ; if ( ref == null ) { return ! ( draftIds.containsKey ( accountId ) ) ; } return ref.getObjectId ( ) . equals ( draftIds.get ( accountId ) ) ; }

Target:
public boolean areDraftsUpToDate ( org.eclipse.jgit.lib.Repository draftsRepo , com.google.gerrit.reviewdb.client.Account.Id accountId ) throws java.io.IOException { org.eclipse.jgit.lib.Ref ref = draftsRepo.exactRef ( com.google.gerrit.reviewdb.client.RefNames.refsDraftComments ( changeId , accountId ) ) ; if ( ref == null ) { return ! ( draftIds.containsKey ( accountId ) ) ; } return ref.getObjectId ( ) . equals ( draftIds.get ( accountId ) ) ; }
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.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 ) ) ) { return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; } stars.mute ( rsrc ) ; return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; }
Source:
private java.util.Map < com.google.gerrit.client.reviewdb.Change.Key , com.google.gerrit.client.reviewdb.Change.Id > openChangesByKey ( ) throws com.google.gwtorm.client.OrmException { final java.util.Map < com.google.gerrit.client.reviewdb.Change.Key , com.google.gerrit.client.reviewdb.Change.Id > r = new java.util.HashMap < com.google.gerrit.client.reviewdb.Change.Key , com.google.gerrit.client.reviewdb.Change.Id > ( ) ; for ( com.google.gerrit.client.reviewdb.Change c : db.changes ( ) . byProjectOpenAll ( proj.getNameKey ( ) ) ) { r.put ( c.getKey ( ) , c.getId ( ) ) ; } return r ; }

Target:
private java.util.Map < com.google.gerrit.client.reviewdb.Change.Key , com.google.gerrit.client.reviewdb.Change.Id > openChangesByKey ( ) throws com.google.gwtorm.client.OrmException { final java.util.Map < com.google.gerrit.client.reviewdb.Change.Key , com.google.gerrit.client.reviewdb.Change.Id > r = new java.util.HashMap < com.google.gerrit.client.reviewdb.Change.Key , com.google.gerrit.client.reviewdb.Change.Id > ( ) ; for ( com.google.gerrit.client.reviewdb.Change c : db.changes ( ) . byProjectOpenAll ( project.getNameKey ( ) ) ) { r.put ( c.getKey ( ) , c.getId ( ) ) ; } return r ; }
Source:
public void login ( final com.google.gerrit.server.account.AuthResult res , final boolean rememberMe ) { final com.google.gerrit.reviewdb.client.Account.Id id = res.getAccountId ( ) ; final com.google.gerrit.reviewdb.client.AccountExternalId.Key identity = res.getExternalId ( ) ; if ( ( val ) != null ) { manager.destroy ( key ) ; } key = manager.createKey ( id ) ; val = manager.createVal ( key , id , rememberMe , identity ) ; saveCookie ( ) ; }

Target:
public void login ( final com.google.gerrit.server.account.AuthResult res , final boolean rememberMe ) { final com.google.gerrit.reviewdb.client.Account.Id id = res.getAccountId ( ) ; final com.google.gerrit.reviewdb.client.AccountExternalId.Key identity = res.getExternalId ( ) ; if ( ( val ) != null ) { manager.destroy ( key ) ; } key = manager.createKey ( id ) ; val = manager.createVal ( key , id , rememberMe , identity , null ) ; saveCookie ( ) ; }
Source:
public void onSignOut ( ) { final com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter fmt = table.getFlexCellFormatter ( ) ; final int max = table.getRowCount ( ) ; for ( int row = 0 ; row < max ; row ++ ) { if ( ( getRowItem ( row ) ) != null ) { table.clearCell ( row , com.google.gerrit.client.changes.ChangeTable.C_STAR ) ; } } }

Target:
public void onSignOut ( ) { final int max = table.getRowCount ( ) ; for ( int row = 0 ; row < max ; row ++ ) { if ( ( getRowItem ( row ) ) != null ) { table.clearCell ( row , com.google.gerrit.client.changes.ChangeTable.C_STAR ) ; } } }
Source:
public com.google.gerrit.reviewdb.client.PatchSet currentPatchSet ( com.google.inject.Provider < com.google.gerrit.reviewdb.server.ReviewDb > db ) throws com.google.gwtorm.server.OrmException { if ( ( currentPatchSet ) == null ) { com.google.gerrit.reviewdb.client.Change c = change ( db ) ; if ( c == null ) { return null ; } for ( com.google.gerrit.reviewdb.client.PatchSet p : patches ( db ) ) { if ( p.getId ( ) . equals ( c.currentPatchSetId ( ) ) ) { currentPatchSet = p ; return p ; } } } return currentPatchSet ; }

Target:
public com.google.gerrit.reviewdb.client.PatchSet currentPatchSet ( ) throws com.google.gwtorm.server.OrmException { if ( ( currentPatchSet ) == null ) { com.google.gerrit.reviewdb.client.Change c = change ( ) ; if ( c == null ) { return null ; } for ( com.google.gerrit.reviewdb.client.PatchSet p : patches ( ) ) { if ( p.getId ( ) . equals ( c.currentPatchSetId ( ) ) ) { currentPatchSet = p ; return p ; } } } return currentPatchSet ; }
Source:
static com.googlecode.prolog_cafe.lang.Term export ( com.google.gerrit.common.data.LabelType type ) { return new com.googlecode.prolog_cafe.lang.StructureTerm ( gerrit.PRED_get_legacy_label_types_1.symLabelType , com.googlecode.prolog_cafe.lang.SymbolTerm.intern ( type.getName ( ) ) , com.googlecode.prolog_cafe.lang.SymbolTerm.intern ( type.getId ( ) ) , com.googlecode.prolog_cafe.lang.SymbolTerm.intern ( type.getFunctionName ( ) ) , new com.googlecode.prolog_cafe.lang.IntegerTerm ( type.getMin ( ) . getValue ( ) ) , new com.googlecode.prolog_cafe.lang.IntegerTerm ( type.getMax ( ) . getValue ( ) ) ) ; }

Target:
static com.googlecode.prolog_cafe.lang.Term export ( com.google.gerrit.common.data.LabelType type ) { return new com.googlecode.prolog_cafe.lang.StructureTerm ( gerrit.PRED_get_legacy_label_types_1.symLabelType , com.googlecode.prolog_cafe.lang.SymbolTerm.intern ( type.getName ( ) ) , com.googlecode.prolog_cafe.lang.SymbolTerm.intern ( type.getFunctionName ( ) ) , new com.googlecode.prolog_cafe.lang.IntegerTerm ( type.getMin ( ) . getValue ( ) ) , new com.googlecode.prolog_cafe.lang.IntegerTerm ( type.getMax ( ) . getValue ( ) ) ) ; }
Source:
public void defaultMessage ( ) throws java.lang.Exception { java.lang.String changeId = createChange ( ) . getChangeId ( ) ; com.google.gerrit.extensions.common.ChangeInfo c = get ( changeId ) ; com.google.common.truth.Truth.assertThat ( ( ( java.lang.Iterable < ? > ) ( c.messages ) ) ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( ( ( java.lang.Iterable < ? > ) ( c.messages ) ) ) . hasSize ( 1 ) ; com.google.common.truth.Truth.assertThat ( c.messages.iterator ( ) . next ( ) . message ) . isEqualTo ( "Uploaded patch set 1." ) ; }

Target:
public void defaultMessage ( ) throws java.lang.Exception { java.lang.String changeId = createChange ( ) . getChangeId ( ) ; com.google.gerrit.extensions.common.ChangeInfo c = get ( changeId ) ; com.google.common.truth.Truth.assertThat ( c.messages ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( c.messages ) . hasSize ( 1 ) ; com.google.common.truth.Truth.assertThat ( c.messages.iterator ( ) . next ( ) . message ) . isEqualTo ( "Uploaded patch set 1." ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { repo = new org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.DfsRepository > ( new org.eclipse.jgit.internal.storage.dfs.InMemoryRepository ( new org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription ( "test" ) ) ) ; walk = new org.eclipse.jgit.revwalk.RevWalk ( repo.getRepository ( ) ) ; cache = new com.google.gitiles.TimeCache ( ) ; start = ( repo.getClock ( ) . getTime ( ) ) / 1000 ; }

Target:
public void setUp ( ) throws java.lang.Exception { repo = new org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.DfsRepository > ( new org.eclipse.jgit.internal.storage.dfs.InMemoryRepository ( new org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription ( "test" ) ) ) ; walk = new org.eclipse.jgit.revwalk.RevWalk ( repo.getRepository ( ) ) ; cache = new com.google.gitiles.TimeCache ( ) ; start = ( repo.getClock ( ) . getTime ( ) ) / 1000 ; }
Source:
public static void abandon ( int changeId , java.lang.String message , com.google.gwtjsonrpc.common.AsyncCallback < com.google.gerrit.client.changes.ChangeInfo > callback ) { com.google.gerrit.client.rpc.RestApi call = new com.google.gerrit.client.rpc.RestApi ( ( ( ( com.google.gerrit.client.changes.ChangeApi.URI ) + changeId ) + "/abandon" ) ) ; com.google.gerrit.client.changes.ChangeApi.Message msg = new com.google.gerrit.client.changes.ChangeApi.Message ( ) ; msg.setMessage ( message ) ; call.post ( msg , callback ) ; }

Target:
public static void abandon ( int changeId , java.lang.String message , com.google.gwtjsonrpc.common.AsyncCallback < com.google.gerrit.client.changes.ChangeInfo > callback ) { com.google.gerrit.client.changes.ChangeApi.Message msg = new com.google.gerrit.client.changes.ChangeApi.Message ( ) ; msg.setMessage ( message ) ; new com.google.gerrit.client.rpc.RestApi ( ( ( ( com.google.gerrit.client.changes.ChangeApi.URI ) + changeId ) + "/abandon" ) ) . data ( msg ) . post ( callback ) ; }
Source:
private void initChangeAction ( com.google.gerrit.client.info.ChangeInfo info ) { if ( ( info.status ( ) ) == ( com.google.gerrit.reviewdb.client.Change.Status.DRAFT ) ) { com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.info.ActionInfo > actions = ( info.hasActions ( ) ) ? info.actions ( ) : com.google.gerrit.client.rpc.NativeMap.< com.google.gerrit.client.info.ActionInfo > create ( ) ; actions.copyKeysIntoChildren ( "id" ) ; if ( actions.containsKey ( "/" ) ) { deleteChange.setVisible ( true ) ; deleteChange.setTitle ( actions.get ( "/" ) . title ( ) ) ; } } }

Target:
private void initChangeAction ( com.google.gerrit.client.info.ChangeInfo info ) { com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.info.ActionInfo > actions = ( info.hasActions ( ) ) ? info.actions ( ) : com.google.gerrit.client.rpc.NativeMap.create ( ) ; actions.copyKeysIntoChildren ( "id" ) ; if ( actions.containsKey ( "/" ) ) { deleteChange.setVisible ( true ) ; deleteChange.setTitle ( actions.get ( "/" ) . title ( ) ) ; } }
Source:
private void initAgreements ( ) { grid.addHeader ( new com.google.gerrit.client.ui.SmallHeading ( Util.C.headingAgreements ( ) ) ) ; contributorAgreements = com.google.gerrit.client.admin.ProjectInfoScreen.newInheritedBooleanBox ( ) ; if ( com.google.gerrit.client.Gerrit.info ( ) . auth ( ) . use_contributor_agreements ( ) ) { saveEnabler.listenTo ( contributorAgreements ) ; grid.add ( Util.C.useContributorAgreements ( ) , contributorAgreements ) ; } signedOffBy = com.google.gerrit.client.admin.ProjectInfoScreen.newInheritedBooleanBox ( ) ; saveEnabler.listenTo ( signedOffBy ) ; grid.addHtml ( Util.C.useSignedOffBy ( ) , signedOffBy ) ; }

Target:
private void initAgreements ( ) { grid.addHeader ( new com.google.gerrit.client.ui.SmallHeading ( Util.C.headingAgreements ( ) ) ) ; contributorAgreements = com.google.gerrit.client.admin.ProjectInfoScreen.newInheritedBooleanBox ( ) ; if ( com.google.gerrit.client.Gerrit.info ( ) . auth ( ) . useContributorAgreements ( ) ) { saveEnabler.listenTo ( contributorAgreements ) ; grid.add ( Util.C.useContributorAgreements ( ) , contributorAgreements ) ; } signedOffBy = com.google.gerrit.client.admin.ProjectInfoScreen.newInheritedBooleanBox ( ) ; saveEnabler.listenTo ( signedOffBy ) ; grid.addHtml ( Util.C.useSignedOffBy ( ) , signedOffBy ) ; }
Source:
public void onSuccess ( com.google.gwt.core.client.JavaScriptObject result ) { if ( screen.isCurrentView ( ) ) { com.google.gerrit.reviewdb.client.PatchSet.Id psId = screen.getPatchSetId ( ) ; com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( psId.getParentKey ( ) , java.lang.String.valueOf ( psId.get ( ) ) ) ) ; } }

Target:
public void onSuccess ( com.google.gwt.core.client.JavaScriptObject result ) { if ( screen.isCurrentView ( ) ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( psId ) ) ; } }
Source:
protected void configure ( ) { bind ( com.google.gerrit.extensions.api.GerritApi.class ) . to ( com.google.gerrit.server.api.GerritApiImpl.class ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; bind ( com.google.gerrit.extensions.api.plugins.Plugins.class ) . to ( com.google.gerrit.server.api.plugins.PluginsImpl.class ) ; factory ( PluginApiImpl.Factory.class ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.extensions.api.GerritApi.class ) . to ( com.google.gerrit.server.api.GerritApiImpl.class ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; }
Source:
public void listBranchesSomeHidden ( ) throws java.lang.Exception { blockRead ( project , "refs/heads/dev" ) ; java.lang.String master = pushTo ( "refs/heads/master" ) . getCommit ( ) . name ( ) ; pushTo ( "refs/heads/dev" ) ; setApiUser ( user ) ; com.google.gerrit.acceptance.rest.project.BranchAssert.assertBranches ( com.google.common.collect.ImmutableList.of ( com.google.gerrit.acceptance.rest.project.ListBranchesIT.branch ( "HEAD" , "master" , false ) , com.google.gerrit.acceptance.rest.project.ListBranchesIT.branch ( "refs/heads/master" , master , false ) ) , list ( ) . get ( ) ) ; }

Target:
public void listBranchesSomeHidden ( ) throws java.lang.Exception { blockRead ( "refs/heads/dev" ) ; java.lang.String master = pushTo ( "refs/heads/master" ) . getCommit ( ) . name ( ) ; pushTo ( "refs/heads/dev" ) ; setApiUser ( user ) ; com.google.gerrit.acceptance.rest.project.BranchAssert.assertBranches ( com.google.common.collect.ImmutableList.of ( com.google.gerrit.acceptance.rest.project.ListBranchesIT.branch ( "HEAD" , "master" , false ) , com.google.gerrit.acceptance.rest.project.ListBranchesIT.branch ( "refs/heads/master" , master , false ) ) , list ( ) . get ( ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { repo = new org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.DfsRepository > ( new org.eclipse.jgit.internal.storage.dfs.InMemoryRepository ( new org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription ( "test" ) ) ) ; servlet = new com.google.gitiles.RepositoryIndexServlet ( new com.google.gitiles.DefaultRenderer ( ) , new com.google.gitiles.TestGitilesAccess ( repo.getRepository ( ) ) , new com.google.gitiles.TimeCache ( ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { repo = new org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.DfsRepository > ( new org.eclipse.jgit.internal.storage.dfs.InMemoryRepository ( new org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription ( "test" ) ) ) ; servlet = new com.google.gitiles.RepositoryIndexServlet ( new com.google.gitiles.TestGitilesAccess ( repo.getRepository ( ) ) , new com.google.gitiles.DefaultRenderer ( ) , new com.google.gitiles.TimeCache ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { index = new com.google.gerrit.server.index.FakeIndex ( FakeIndex.V2 ) ; indexes = new com.google.gerrit.server.index.IndexCollection ( ) ; indexes.setSearchIndex ( index ) ; queryBuilder = new com.google.gerrit.server.index.FakeQueryBuilder ( indexes ) ; rewrite = new com.google.gerrit.server.index.IndexRewriteImpl ( indexes , new com.google.gerrit.server.query.change.BasicChangeRewrites ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { index = new com.google.gerrit.server.index.FakeIndex ( FakeIndex.V2 ) ; indexes = new com.google.gerrit.server.index.IndexCollection ( ) ; indexes.setSearchIndex ( index ) ; queryBuilder = new com.google.gerrit.server.index.FakeQueryBuilder ( indexes ) ; rewrite = new com.google.gerrit.server.index.IndexRewriteImpl ( indexes ) ; }
Source:
private void setDefaultVisibilityCache ( ) { 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 ) ; } } }

Target:
private void setDefaultVisibilityCache ( ) { 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 ) ; } } }
Source:
private org.eclipse.jgit.treewalk.TreeWalk find ( final org.eclipse.jgit.lib.ObjectId within ) throws java.io.IOException , org.eclipse.jgit.errors.CorruptObjectException , org.eclipse.jgit.errors.IncorrectObjectTypeException , org.eclipse.jgit.errors.MissingObjectException { if ( ( ( path ) == null ) || ( within == null ) ) { return null ; } final org.eclipse.jgit.revwalk.RevWalk rw = new org.eclipse.jgit.revwalk.RevWalk ( reader ) ; final org.eclipse.jgit.revwalk.RevTree tree = rw.parseTree ( within ) ; return org.eclipse.jgit.treewalk.TreeWalk.forPath ( reader , path , tree ) ; }

Target:
private org.eclipse.jgit.treewalk.TreeWalk find ( final org.eclipse.jgit.lib.ObjectId within ) throws java.io.IOException , org.eclipse.jgit.errors.CorruptObjectException , org.eclipse.jgit.errors.IncorrectObjectTypeException , org.eclipse.jgit.errors.MissingObjectException { if ( ( ( path ) == null ) || ( within == null ) ) { return null ; } try ( org.eclipse.jgit.revwalk.RevWalk rw = new org.eclipse.jgit.revwalk.RevWalk ( reader ) ) { final org.eclipse.jgit.revwalk.RevTree tree = rw.parseTree ( within ) ; return org.eclipse.jgit.treewalk.TreeWalk.forPath ( reader , path , tree ) ; } }
Source:
public void testMultipleSlashes ( ) throws java.lang.Exception { org.eclipse.jgit.revwalk.RevCommit master = repo.branch ( "refs/heads/master" ) . commit ( ) . create ( ) ; com.google.gitiles.GitilesView view ; assertEquals ( Type.HOST_INDEX , getView ( "//" ) . getType ( ) ) ; assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo" ) . getType ( ) ) ; assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo//" ) . getType ( ) ) ; assertNull ( getView ( "/repo/+//master" ) ) ; assertNull ( getView ( "/repo/+/refs//heads//master" ) ) ; assertNull ( getView ( "/repo/+//master//" ) ) ; assertNull ( getView ( "/repo/+//master/foo//bar" ) ) ; }

Target:
public void testMultipleSlashes ( ) throws java.lang.Exception { assertEquals ( Type.HOST_INDEX , getView ( "//" ) . getType ( ) ) ; assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo" ) . getType ( ) ) ; assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo//" ) . getType ( ) ) ; assertNull ( getView ( "/repo/+//master" ) ) ; assertNull ( getView ( "/repo/+/refs//heads//master" ) ) ; assertNull ( getView ( "/repo/+//master//" ) ) ; assertNull ( getView ( "/repo/+//master/foo//bar" ) ) ; }
Source:
public void testAppend_SafeHtml ( ) { final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder b = new com.google.gwtexpui.safehtml.client.SafeHtmlBuilder ( ) ; assertSame ( b , b.append ( ( ( com.google.gwtexpui.safehtml.client.SafeHtml ) ( null ) ) ) ) ; assertEquals ( "" , b.asString ( ) ) ; assertSame ( b , b.append ( new com.google.gwtexpui.safehtml.client.SafeHtmlString ( "foo" ) ) ) ; assertSame ( b , b.append ( new com.google.gwtexpui.safehtml.client.SafeHtmlBuilder ( ) . append ( "bar" ) ) ) ; assertEquals ( "foobar" , b.asString ( ) ) ; }

Target:
public void testAppend_SafeHtml ( ) { final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder b = new com.google.gwtexpui.safehtml.client.SafeHtmlBuilder ( ) ; org.junit.Assert.assertSame ( b , b.append ( ( ( com.google.gwtexpui.safehtml.client.SafeHtml ) ( null ) ) ) ) ; org.junit.Assert.assertEquals ( "" , b.asString ( ) ) ; org.junit.Assert.assertSame ( b , b.append ( new com.google.gwtexpui.safehtml.client.SafeHtmlString ( "foo" ) ) ) ; org.junit.Assert.assertSame ( b , b.append ( new com.google.gwtexpui.safehtml.client.SafeHtmlBuilder ( ) . append ( "bar" ) ) ) ; org.junit.Assert.assertEquals ( "foobar" , b.asString ( ) ) ; }
Source:
private java.io.File copyToTempFile ( org.eclipse.jgit.lib.ObjectId blobId , java.io.File tempDir ) throws java.io.FileNotFoundException , java.io.IOException , org.eclipse.jgit.errors.MissingObjectException { java.io.File tmp = java.io.File.createTempFile ( "rules" , ".pl" , tempDir ) ; java.io.FileOutputStream out = new java.io.FileOutputStream ( tmp ) ; try { git.open ( blobId ) . copyTo ( out ) ; } finally { out.close ( ) ; } return tmp ; }

Target:
private java.io.File copyToTempFile ( org.eclipse.jgit.lib.ObjectId blobId , java.io.File tempDir ) throws java.io.FileNotFoundException , java.io.IOException , org.eclipse.jgit.errors.MissingObjectException { java.io.File tmp = java.io.File.createTempFile ( "rules" , ".pl" , tempDir ) ; try ( java.io.FileOutputStream out = new java.io.FileOutputStream ( tmp ) ) { git.open ( blobId ) . copyTo ( out ) ; } return tmp ; }
Source:
org.pegdown.ast.ReferenceNode get ( org.pegdown.ast.SuperNode keyNode , java.lang.String text ) { java.lang.String id = ( keyNode != null ) ? com.google.gitiles.doc.MarkdownUtil.getInnerText ( keyNode ) : text ; return references.get ( com.google.gitiles.doc.ReferenceMap.key ( id ) ) ; }

Target:
org.pegdown.ast.ReferenceNode get ( org.pegdown.ast.SuperNode keyNode , java.lang.String text ) { java.lang.String id = ( keyNode != null ) ? com.google.gitiles.doc.MarkdownUtil.getInnerText ( keyNode ) : text ; if ( ( id == null ) || ( id.isEmpty ( ) ) ) { return null ; } return references.get ( com.google.gitiles.doc.ReferenceMap.key ( id ) ) ; }
Source:
public java.util.List toJava ( ) { java.util.List < java.lang.Object > vec = new java.util.ArrayList < java.lang.Object > ( ) ; com.googlecode.prolog_cafe.lang.Term t = this ; while ( t.isList ( ) ) { vec.add ( ( ( com.googlecode.prolog_cafe.lang.ListTerm ) ( t ) ) . car ( ) . dereference ( ) . toJava ( ) ) ; t = ( ( com.googlecode.prolog_cafe.lang.ListTerm ) ( t ) ) . cdr ( ) . dereference ( ) ; } return vec ; }

Target:
public java.util.List toJava ( ) { java.util.List < java.lang.Object > vec = new java.util.ArrayList < java.lang.Object > ( ) ; com.googlecode.prolog_cafe.lang.Term t = this ; while ( t instanceof com.googlecode.prolog_cafe.lang.ListTerm ) { vec.add ( ( ( com.googlecode.prolog_cafe.lang.ListTerm ) ( t ) ) . car ( ) . dereference ( ) . toJava ( ) ) ; t = ( ( com.googlecode.prolog_cafe.lang.ListTerm ) ( t ) ) . cdr ( ) . dereference ( ) ; } return vec ; }
Source:
private boolean shouldSendMessage ( ) { if ( ( body.length ( ) ) == 0 ) { return false ; } if ( rcptTo.isEmpty ( ) ) { return false ; } if ( ( ( rcptTo.size ( ) ) == 1 ) && ( rcptTo.contains ( fromId ) ) ) { return false ; } return true ; }

Target:
protected boolean shouldSendMessage ( ) { if ( ( body.length ( ) ) == 0 ) { return false ; } if ( rcptTo.isEmpty ( ) ) { return false ; } if ( ( ( rcptTo.size ( ) ) == 1 ) && ( rcptTo.contains ( fromId ) ) ) { return false ; } return true ; }
Source:
private void setReviewedByCurrentUser ( boolean reviewed ) { if ( ( fileList ) != null ) { fileList.updateReviewedStatus ( patchKey , reviewed ) ; } PatchUtil.DETAIL_SVC.setReviewedByCurrentUser ( patchKey , reviewed , new com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwtjsonrpc.client.VoidResult > ( ) { @ java.lang.Override public void onFailure ( java.lang.Throwable arg0 ) { } @ java.lang.Override public void onSuccess ( com.google.gwtjsonrpc.client.VoidResult result ) { } } ) ; }

Target:
void setReviewedByCurrentUser ( boolean reviewed ) { if ( ( fileList ) != null ) { fileList.updateReviewedStatus ( patchKey , reviewed ) ; } PatchUtil.DETAIL_SVC.setReviewedByCurrentUser ( patchKey , reviewed , new com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwtjsonrpc.client.VoidResult > ( ) { @ java.lang.Override public void onFailure ( java.lang.Throwable arg0 ) { } @ java.lang.Override public void onSuccess ( com.google.gwtjsonrpc.client.VoidResult result ) { } } ) ; }
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 ) 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 ( null , res , msg ) ; }

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 ) 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 ) ; }
Source:
private boolean updateMergeable ( com.google.gerrit.reviewdb.client.Project.NameKey project ) { if ( ( mergeabilityChecker ) != null ) { try { mergeabilityChecker.newCheck ( ) . addProject ( project ) . run ( ) ; } catch ( java.io.IOException e ) { com.google.gerrit.server.index.ChangeBatchIndexer.log.error ( "Error in mergeability checker" , e ) ; return false ; } } return true ; }

Target:
private boolean updateMergeable ( com.google.gerrit.reviewdb.client.Project.NameKey project ) { if ( ( mergeabilityChecker ) != null ) { try { mergeabilityChecker.newCheck ( ) . addProject ( project ) . run ( ) ; } catch ( java.lang.Exception e ) { com.google.gerrit.server.index.ChangeBatchIndexer.log.error ( "Error in mergeability checker" , e ) ; return false ; } } return true ; }
Source:
public com.google.gerrit.extensions.common.WebLinkInfo getFileHistoryWebLink ( java.lang.String projectName , java.lang.String revision , java.lang.String fileName ) { if ( ( fileHistory ) != null ) { return link ( revision.replace ( "project" , encode ( projectName ) ) . replace ( "branch" , encode ( revision ) ) . replace ( "file" , encode ( fileName ) ) . toString ( ) ) ; } return null ; }

Target:
public com.google.gerrit.extensions.common.WebLinkInfo getFileHistoryWebLink ( java.lang.String projectName , java.lang.String revision , java.lang.String fileName ) { if ( ( fileHistory ) != null ) { return link ( fileHistory.replace ( "project" , encode ( projectName ) ) . replace ( "branch" , encode ( revision ) ) . replace ( "file" , encode ( fileName ) ) . toString ( ) ) ; } return null ; }
Source:
public com.google.gerrit.server.git.MetaDataUpdate create ( com.google.gerrit.reviewdb.client.Project.NameKey name , org.eclipse.jgit.lib.Repository repository , com.google.gerrit.server.IdentifiedUser user , org.eclipse.jgit.lib.BatchRefUpdate batch ) { com.google.gerrit.server.git.MetaDataUpdate md = factory.create ( name , repository , batch ) ; md.getCommitBuilder ( ) . setAuthor ( createPersonIdent ( user ) ) ; md.getCommitBuilder ( ) . setCommitter ( serverIdent ) ; return md ; }

Target:
public com.google.gerrit.server.git.MetaDataUpdate create ( com.google.gerrit.reviewdb.client.Project.NameKey name , org.eclipse.jgit.lib.Repository repository , com.google.gerrit.server.IdentifiedUser user , org.eclipse.jgit.lib.BatchRefUpdate batch ) { com.google.gerrit.server.git.MetaDataUpdate md = factory.create ( name , repository , batch ) ; md.getCommitBuilder ( ) . setCommitter ( serverIdent ) ; md.setAuthor ( user ) ; return md ; }
Source:
public java.util.List < com.google.gerrit.reviewdb.client.PatchSetApproval > addReviewers ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.notedb.ChangeUpdate update , com.google.gerrit.common.data.LabelTypes labelTypes , com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet ps , com.google.gerrit.reviewdb.client.PatchSetInfo info , java.lang.Iterable < com.google.gerrit.reviewdb.client.Account.Id > wantReviewers , java.util.Collection < com.google.gerrit.reviewdb.client.Account.Id > existingReviewers ) throws com.google.gwtorm.server.OrmException { return addReviewers ( db , update , labelTypes , change , ps.getId ( ) , ps.isDraft ( ) , info.getAuthor ( ) . getAccount ( ) , info.getCommitter ( ) . getAccount ( ) , wantReviewers , existingReviewers ) ; }

Target:
public java.util.List < com.google.gerrit.reviewdb.client.PatchSetApproval > addReviewers ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.notedb.ChangeUpdate update , com.google.gerrit.common.data.LabelTypes labelTypes , com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet ps , com.google.gerrit.reviewdb.client.PatchSetInfo info , java.lang.Iterable < com.google.gerrit.reviewdb.client.Account.Id > wantReviewers , java.util.Collection < com.google.gerrit.reviewdb.client.Account.Id > existingReviewers ) throws com.google.gwtorm.server.OrmException { return addReviewers ( db , update , labelTypes , change , ps.getId ( ) , info.getAuthor ( ) . getAccount ( ) , info.getCommitter ( ) . getAccount ( ) , wantReviewers , existingReviewers ) ; }
Source:
protected org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.InMemoryRepository > createProject ( java.lang.String name ) throws java.lang.Exception { com.google.gerrit.server.project.CreateProject create = projectFactory.create ( name ) ; create.apply ( com.google.gerrit.server.query.change.AbstractQueryChangesTest.TLR , new com.google.gerrit.extensions.api.projects.ProjectInput ( ) ) ; return new org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.InMemoryRepository > ( repoManager.openRepository ( new com.google.gerrit.reviewdb.client.Project.NameKey ( name ) ) ) ; }

Target:
protected org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.InMemoryRepository > createProject ( java.lang.String name ) throws java.lang.Exception { com.google.gerrit.server.project.CreateProject create = projectFactory.create ( name ) ; create.apply ( com.google.gerrit.server.query.change.AbstractQueryChangesTest.TLR , new com.google.gerrit.extensions.api.projects.ProjectInput ( ) ) ; return new org.eclipse.jgit.junit.TestRepository ( repoManager.openRepository ( new com.google.gerrit.reviewdb.client.Project.NameKey ( name ) ) ) ; }
Source:
protected void run ( ) { java.util.List < com.googlesource.gerrit.plugins.replication.Destination > dest = config.getDestinations ( FilterType.ALL ) ; for ( com.googlesource.gerrit.plugins.replication.Destination d : dest ) { if ( matches ( d.getRemoteConfig ( ) . getName ( ) ) ) { printRemote ( d , detail ) ; } } }

Target:
protected void run ( ) { for ( com.googlesource.gerrit.plugins.replication.Destination d : config.getDestinations ( FilterType.ALL ) ) { if ( matches ( d.getRemoteConfig ( ) . getName ( ) ) ) { printRemote ( d , detail ) ; } } }
Source:
public static void computeSortKey ( final com.google.gerrit.reviewdb.Change c ) { long lastUpdated = c.getLastUpdatedOn ( ) . getTime ( ) ; int id = c.getId ( ) . get ( ) ; c.setSortKey ( com.google.gerrit.server.ChangeUtil.sortKey ( lastUpdated , id ) ) ; }

Target:
public static void computeSortKey ( final com.google.gerrit.reviewdb.client.Change c ) { long lastUpdated = c.getLastUpdatedOn ( ) . getTime ( ) ; int id = c.getId ( ) . get ( ) ; c.setSortKey ( com.google.gerrit.server.ChangeUtil.sortKey ( lastUpdated , id ) ) ; }
Source:
void display ( java.util.List < java.util.List < java.lang.String > > values ) { for ( int row = 2 ; row < ( table.getRowCount ( ) ) ; row ++ ) { table.removeRow ( ( row -- ) ) ; } int row = 2 ; for ( java.util.List < java.lang.String > v : values ) { populate ( row , v ) ; row ++ ; } }

Target:
void display ( java.util.List < java.util.List < java.lang.String > > values ) { for ( int row = 2 ; row < ( table.getRowCount ( ) ) ; row ++ ) { table.removeRow ( ( row -- ) ) ; } int row = 2 ; for ( java.util.List < java.lang.String > v : values ) { populate ( row , v , ( row == ( ( values.size ( ) ) + 1 ) ) ) ; row ++ ; } }
Source:
public void run ( ) { java.lang.String rev = java.lang.String.valueOf ( revision.get ( ) ) ; com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( changeId , rev ) , new com.google.gerrit.client.change.ChangeScreen2 ( changeId , rev , openReplyBox ) ) ; }

Target:
public void run ( ) { java.lang.String b = ( ( base ) != null ) ? java.lang.String.valueOf ( base.get ( ) ) : null ; java.lang.String rev = java.lang.String.valueOf ( revision.get ( ) ) ; com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( changeId , rev ) , new com.google.gerrit.client.change.ChangeScreen2 ( changeId , b , rev , openReplyBox ) ) ; }
Source:
public java.util.List < com.google.gerrit.extensions.common.ChangeInfo > submittedTogether ( ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return submittedTogether.apply ( change ) ; } catch ( java.lang.Exception e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot query submittedTogether" , e ) ; } }

Target:
public java.util.List < com.google.gerrit.extensions.common.ChangeInfo > submittedTogether ( ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return ( ( java.util.List < com.google.gerrit.extensions.common.ChangeInfo > ) ( submittedTogether.apply ( change ) ) ) ; } catch ( java.io.IOException | com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot query submittedTogether" , e ) ; } }
Source:
private int finish ( final java.util.Iterator < com.google.gerrit.client.reviewdb.PatchLineComment > i , int row , final int col ) { while ( i.hasNext ( ) ) { final com.google.gerrit.client.reviewdb.PatchLineComment c = i.next ( ) ; table.insertRow ( row ) ; table.getCellFormatter ( ) . setStyleName ( row , 0 , com.google.gerrit.client.patches.S_ICON_CELL ) ; bindComment ( row , col , c , ( ! ( i.hasNext ( ) ) ) ) ; row ++ ; } return row ; }

Target:
private int finish ( final java.util.Iterator < com.google.gerrit.client.reviewdb.PatchLineComment > i , int row , final int col ) { while ( i.hasNext ( ) ) { final com.google.gerrit.client.reviewdb.PatchLineComment c = i.next ( ) ; insertRow ( row ) ; bindComment ( row , col , c , ( ! ( i.hasNext ( ) ) ) ) ; row ++ ; } return row ; }
Source:
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 ) ; } } } ; }

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 ( 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:
private java.util.List < com.google.gerrit.common.data.SubmitRecord > ruleError ( java.lang.String err , java.lang.Exception e ) { if ( logErrors ) { if ( e == null ) { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err ) ; } else { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err , e ) ; } return com.google.gerrit.server.project.SubmitRuleEvaluator.defaultRuleError ( ) ; } else { return com.google.gerrit.server.project.SubmitRuleEvaluator.createRuleError ( err ) ; } }

Target:
private java.util.List < com.google.gerrit.common.data.SubmitRecord > ruleError ( java.lang.String err , java.lang.Exception e ) { if ( logErrors ) { if ( e == null ) { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err ) ; } else { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err , e ) ; } return com.google.gerrit.server.project.SubmitRuleEvaluator.defaultRuleError ( ) ; } return com.google.gerrit.server.project.SubmitRuleEvaluator.createRuleError ( err ) ; }