auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setCfgInjector ( com.google.inject.Injector cfgInjector ) { final com.google.inject.Module cm = com.google.gerrit.server.plugins.PluginGuiceEnvironment.copy ( cfgInjector ) ; final com.google.inject.Module sm = com.google.gerrit.server.plugins.PluginGuiceEnvironment.copy ( sysInjector ) ; sysModule = new com.google.inject.AbstractModule ( ) { @ java.lang.Override protected void configure ( ) { install ( copyConfigModule ) ; install ( cm ) ; install ( sm ) ; } } ; }

Target:
public void setCfgInjector ( com.google.inject.Injector cfgInjector ) { final com.google.inject.Module cm = copy ( cfgInjector ) ; final com.google.inject.Module sm = copy ( sysInjector ) ; sysModule = new com.google.inject.AbstractModule ( ) { @ java.lang.Override protected void configure ( ) { install ( copyConfigModule ) ; install ( cm ) ; install ( sm ) ; } } ; }
Source:
public void onPluginLoad ( ) { com.googlesource.gerrit.plugins.labelui.client.LabelUIPlugin.injectCssToHideDefaultLabels ( ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK , new com.googlesource.gerrit.plugins.labelui.client.LabelPanel.Factory ( ) ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.PREFERENCES_SCREEN_BOTTOM , new com.googlesource.gerrit.plugins.labelui.client.LabelUiPreferencesPanel.Factory ( ) ) ; }

Target:
public void onPluginLoad ( ) { com.googlesource.gerrit.plugins.labelui.client.LabelUIPlugin.injectCssToHideDefaultLabels ( ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK , new com.googlesource.gerrit.plugins.labelui.client.LabelPanel.Factory ( ) , null ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.PREFERENCES_SCREEN_BOTTOM , new com.googlesource.gerrit.plugins.labelui.client.LabelUiPreferencesPanel.Factory ( ) , null ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { for ( com.google.gerrit.reviewdb.Patch p : detail.getPatches ( ) ) { com.google.gerrit.client.ui.PatchLink.SideBySide link = new com.google.gerrit.client.ui.PatchLink.SideBySide ( p.getFileName ( ) , p.getKey ( ) , 0 , null ) ; com.google.gwt.user.client.Window.open ( link.getElement ( ) . toString ( ) , p.getFileName ( ) , null ) ; } }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { for ( com.google.gerrit.reviewdb.Patch p : detail.getPatches ( ) ) { com.google.gerrit.client.ui.PatchLink.SideBySide link = new com.google.gerrit.client.ui.PatchLink.SideBySide ( p.getFileName ( ) , p.getKey ( ) , 0 , null , null ) ; com.google.gwt.user.client.Window.open ( link.getElement ( ) . toString ( ) , p.getFileName ( ) , null ) ; } }
Source:
public boolean match ( com.google.gerrit.server.query.change.ChangeData object ) throws com.google.gwtorm.server.OrmException { java.util.List < java.lang.String > files = object.currentFilePaths ( ) ; if ( files != null ) { return com.google.gerrit.server.util.RegexListSearcher.ofStrings ( getValue ( ) ) . hasMatch ( files ) ; } return true ; }

Target:
public boolean match ( com.google.gerrit.server.query.change.ChangeData object ) throws com.google.gwtorm.server.OrmException { java.util.List < java.lang.String > files ; try { files = object.currentFilePaths ( ) ; } catch ( java.io.IOException e ) { throw new com.google.gwtorm.server.OrmException ( e ) ; } return com.google.gerrit.server.util.RegexListSearcher.ofStrings ( getValue ( ) ) . hasMatch ( files ) ; }
Source:
public void run ( ) { try { future.get ( ) ; done.update ( 1 ) ; } catch ( java.lang.InterruptedException e ) { fail ( change , e ) ; } catch ( java.util.concurrent.ExecutionException e ) { fail ( change , e ) ; } catch ( java.lang.RuntimeException e ) { failAndThrow ( change , e ) ; } catch ( java.lang.Error e ) { failAndThrow ( change , e ) ; } finally { sem.release ( ) ; } }

Target:
private void failAndThrow ( com.google.gerrit.reviewdb.client.Project.NameKey project , java.lang.Error e ) { fail ( project , e ) ; throw e ; }
Source:
public void operationComplete ( org.apache.mina.core.future.IoFuture future ) { final com.google.gerrit.sshd.SshScope.Context ctx = sshScope.newContext ( sd , null ) ; final com.google.gerrit.sshd.SshScope.Context old = sshScope.set ( ctx ) ; try { sshLog.onLogout ( ) ; } finally { sshScope.set ( old ) ; } }

Target:
public void operationComplete ( org.apache.mina.core.future.IoFuture future ) { final com.google.gerrit.sshd.SshScope.Context ctx = sshScope.newContext ( null , sd , null ) ; final com.google.gerrit.sshd.SshScope.Context old = sshScope.set ( ctx ) ; try { sshLog.onLogout ( ) ; } finally { sshScope.set ( old ) ; } }
Source:
public void noConflictingChanges ( ) throws com.jcraft.jsch.JSchException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { org.eclipse.jgit.api.Git git = createProject ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result change = createChange ( git , true ) ; createChange ( git , false ) ; java.util.Set < java.lang.String > changes = queryConflictingChanges ( change ) ; org.junit.Assert.assertEquals ( 0 , changes.size ( ) ) ; }

Target:
public void noConflictingChanges ( ) throws com.jcraft.jsch.JSchException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { com.google.gerrit.acceptance.PushOneCommit.Result change = createChange ( git , true ) ; createChange ( git , false ) ; java.util.Set < java.lang.String > changes = queryConflictingChanges ( change ) ; org.junit.Assert.assertEquals ( 0 , changes.size ( ) ) ; }
Source:
public void invalidate ( final java.lang.Object key ) { if ( ( keyType.getRawType ( ) . isInstance ( key ) ) && ( store.mightContain ( ( ( K ) ( key ) ) ) ) ) { executor.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { store.invalidate ( ( ( K ) ( key ) ) ) ; } } ) ; } mem.invalidate ( key ) ; }

Target:
public void invalidate ( final java.lang.Object key ) { if ( ( keyType.getRawType ( ) . isInstance ( key ) ) && ( store.mightContain ( ( ( K ) ( key ) ) ) ) ) { executor.execute ( ( ) -> store.invalidate ( ( ( K ) ( key ) ) ) ) ; } mem.invalidate ( key ) ; }
Source:
private java.lang.String getTabToken ( final java.lang.String token , final java.lang.String tab ) { if ( token.startsWith ( "/admin/groups/uuid-" ) ) { return com.google.gerrit.client.Dispatcher.toGroup ( group.getGroupUUID ( ) , tab ) ; } else { return com.google.gerrit.client.Dispatcher.toGroup ( group.getGroupId ( ) , tab ) ; } }

Target:
private java.lang.String getTabToken ( final java.lang.String token , final java.lang.String tab ) { if ( token.startsWith ( "/admin/groups/uuid-" ) ) { return com.google.gerrit.client.Dispatcher.toGroup ( group.getGroupUUID ( ) , tab ) ; } return com.google.gerrit.client.Dispatcher.toGroup ( group.getGroupId ( ) , tab ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( other instanceof com.google.gerrit.server.query.ObjectIdPredicate ) { final com.google.gerrit.server.query.ObjectIdPredicate p = ( ( com.google.gerrit.server.query.ObjectIdPredicate ) ( other ) ) ; return ( getOperator ( ) . equals ( p.getOperator ( ) ) ) && ( id.equals ( p.id ) ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object other ) { if ( other instanceof com.google.gerrit.server.query.ObjectIdPredicate ) { final com.google.gerrit.server.query.ObjectIdPredicate < ? > p = ( ( com.google.gerrit.server.query.ObjectIdPredicate < ? > ) ( other ) ) ; return ( com.google.gerrit.server.query.ObjectIdPredicate.getOperator ( ) . equals ( p.getOperator ( ) ) ) && ( id.equals ( p.id ) ) ; } return false ; }
Source:
public void select ( com.google.gerrit.reviewdb.client.AccountGeneralPreferences.DownloadCommand cmdType ) { com.google.gerrit.client.download.DownloadCommandLink first = null ; for ( com.google.gwt.user.client.ui.Widget w : this ) { if ( w instanceof com.google.gerrit.client.download.DownloadCommandLink ) { final com.google.gerrit.client.download.DownloadCommandLink d = ( ( com.google.gerrit.client.download.DownloadCommandLink ) ( w ) ) ; if ( first == null ) { first = d ; } if ( ( d.cmdType ) == cmdType ) { d.select ( ) ; return ; } } } if ( first != null ) { first.select ( ) ; } }

Target:
public void select ( ) { com.google.gerrit.client.download.DownloadCommandLink first = null ; for ( com.google.gwt.user.client.ui.Widget w : this ) { if ( w instanceof com.google.gerrit.client.download.DownloadCommandLink ) { final com.google.gerrit.client.download.DownloadCommandLink d = ( ( com.google.gerrit.client.download.DownloadCommandLink ) ( w ) ) ; if ( first == null ) { first = d ; } } } if ( first != null ) { first.select ( ) ; } }
Source:
public java.util.Map < java.lang.String , com.google.gerrit.extensions.common.GpgKeyInfo > putGpgKeys ( java.util.List < java.lang.String > add ) throws com.google.gerrit.extensions.restapi.RestApiException { com.google.gerrit.server.account.PostGpgKeys.Input in = new com.google.gerrit.server.account.PostGpgKeys.Input ( ) ; in.add = add ; try { return postGpgKeys.apply ( account , in ) ; } catch ( org.bouncycastle.openpgp.PGPException | com.google.gwtorm.server.OrmException | java.io.IOException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot add GPG key" , e ) ; } }

Target:
public java.util.Map < java.lang.String , com.google.gerrit.extensions.common.GpgKeyInfo > putGpgKeys ( java.util.List < java.lang.String > add , java.util.List < java.lang.String > delete ) throws com.google.gerrit.extensions.restapi.RestApiException { com.google.gerrit.server.account.PostGpgKeys.Input in = new com.google.gerrit.server.account.PostGpgKeys.Input ( ) ; in.add = add ; in.delete = delete ; try { return postGpgKeys.apply ( account , in ) ; } catch ( org.bouncycastle.openpgp.PGPException | com.google.gwtorm.server.OrmException | java.io.IOException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot add GPG key" , e ) ; } }
Source:
public java.util.List < com.google.gerrit.reviewdb.client.ChangeMessage > messages ( com.google.inject.Provider < com.google.gerrit.reviewdb.server.ReviewDb > db ) throws com.google.gwtorm.server.OrmException { if ( ( messages ) == null ) { messages = db.get ( ) . changeMessages ( ) . byChange ( legacyId ) . toList ( ) ; } return messages ; }

Target:
public java.util.List < com.google.gerrit.reviewdb.client.ChangeMessage > messages ( ) throws com.google.gwtorm.server.OrmException { if ( ( messages ) == null ) { messages = db.changeMessages ( ) . byChange ( legacyId ) . toList ( ) ; } return messages ; }
Source:
public void queryChangesNoOptions ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; com.google.gerrit.extensions.common.ChangeInfo result = com.google.common.collect.Iterables.getOnlyElement ( gApi.changes ( ) . query ( r.getChangeId ( ) ) . get ( ) ) ; org.junit.Assert.assertNull ( result.labels ) ; org.junit.Assert.assertNull ( result.messages ) ; org.junit.Assert.assertNull ( result.revisions ) ; org.junit.Assert.assertNull ( result.actions ) ; }

Target:
public void queryChangesNoOptions ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; com.google.gerrit.extensions.common.ChangeInfo result = com.google.common.collect.Iterables.getOnlyElement ( query ( r.getChangeId ( ) ) ) ; org.junit.Assert.assertNull ( result.labels ) ; org.junit.Assert.assertNull ( result.messages ) ; org.junit.Assert.assertNull ( result.revisions ) ; org.junit.Assert.assertNull ( result.actions ) ; }
Source:
public static java.io.File defaultFile ( javax.servlet.FilterConfig filterConfig ) { java.lang.String configPath = null ; if ( filterConfig != null ) { configPath = filterConfig.getInitParameter ( com.google.gitiles.GitilesConfig.FILTER_CONFIG_PARAM ) ; } if ( configPath == null ) { configPath = java.lang.System.getProperty ( com.google.gitiles.GitilesConfig.PROPERTY_NAME , com.google.gitiles.GitilesConfig.DEFAULT_PATH ) ; } return new java.io.File ( configPath ) ; }

Target:
public static java.io.File defaultFile ( javax.servlet.FilterConfig filterConfig ) { java.lang.String configPath = java.lang.System.getProperty ( com.google.gitiles.GitilesConfig.PROPERTY_NAME , com.google.gitiles.GitilesConfig.DEFAULT_PATH ) ; if ( ( configPath == null ) && ( filterConfig != null ) ) { configPath = filterConfig.getInitParameter ( com.google.gitiles.GitilesConfig.FILTER_CONFIG_PARAM ) ; } return new java.io.File ( configPath ) ; }
Source:
public void reindexEmptySite ( ) throws java.lang.Exception { initSite ( ) ; org.eclipse.jgit.storage.file.FileBasedConfig cfg = gerritConfig ( ) ; cfg.load ( ) ; cfg.setBoolean ( "gerrit-test" , null , "bypassAutoRecheckMergeable" , true ) ; cfg.save ( ) ; com.google.gerrit.acceptance.pgm.ReindexIT.runGerrit ( "reindex" , "-d" , sitePath.toString ( ) , "--show-stack-trace" ) ; }

Target:
public void reindexEmptySite ( ) throws java.lang.Exception { initSite ( ) ; com.google.gerrit.acceptance.pgm.ReindexIT.runGerrit ( "reindex" , "-d" , sitePath.toString ( ) , "--show-stack-trace" ) ; }
Source:
public < T > java.util.List < T > getTaskInfos ( com.google.gerrit.server.git.TaskInfoFactory < T > factory ) { java.util.List < T > taskInfos = com.google.common.collect.Lists.newArrayList ( ) ; for ( com.google.gerrit.server.git.WorkQueue.Executor exe : queues ) { for ( com.google.gerrit.server.git.WorkQueue.Task < ? > task : exe.getTasks ( ) ) { taskInfos.add ( factory.getTaskInfo ( task ) ) ; } } return taskInfos ; }

Target:
public < T > java.util.List < T > getTaskInfos ( com.google.gerrit.server.git.TaskInfoFactory < T > factory ) { java.util.List < T > taskInfos = new java.util.ArrayList < > ( ) ; for ( com.google.gerrit.server.git.WorkQueue.Executor exe : queues ) { for ( com.google.gerrit.server.git.WorkQueue.Task < ? > task : exe.getTasks ( ) ) { taskInfos.add ( factory.getTaskInfo ( task ) ) ; } } return taskInfos ; }
Source:
public boolean match ( com.google.gerrit.server.query.change.ChangeData object ) throws com.google.gwtorm.server.OrmException { java.util.List < java.lang.String > files = object.currentFilePaths ( ) ; if ( files != null ) { return com.google.gerrit.server.util.RegexListSearcher.ofStrings ( getValue ( ) ) . hasMatch ( files ) ; } else { return true ; } }

Target:
public boolean match ( com.google.gerrit.server.query.change.ChangeData object ) throws com.google.gwtorm.server.OrmException { java.util.List < java.lang.String > files = object.currentFilePaths ( ) ; if ( files != null ) { return com.google.gerrit.server.util.RegexListSearcher.ofStrings ( getValue ( ) ) . hasMatch ( files ) ; } return true ; }
Source:
private com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo openRepo ( com.google.gerrit.reviewdb.client.Project.NameKey p , boolean meta ) throws java.io.IOException { org.eclipse.jgit.lib.Repository repo = ( meta ) ? repoManager.openMetadataRepository ( p ) : repoManager.openRepository ( p ) ; org.eclipse.jgit.lib.ObjectInserter ins = repo.newObjectInserter ( ) ; return new com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo ( repo , new org.eclipse.jgit.revwalk.RevWalk ( ins.newReader ( ) ) , ins , new com.google.gerrit.server.git.ChainedReceiveCommands ( ) , true ) ; }

Target:
private com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo openRepo ( com.google.gerrit.reviewdb.client.Project.NameKey p ) throws java.io.IOException { org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( p ) ; org.eclipse.jgit.lib.ObjectInserter ins = repo.newObjectInserter ( ) ; return new com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo ( repo , new org.eclipse.jgit.revwalk.RevWalk ( ins.newReader ( ) ) , ins , new com.google.gerrit.server.git.ChainedReceiveCommands ( ) , true ) ; }
Source:
public com.google.gerrit.server.notedb.NoteDbUpdateManager.Result execute ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change.Id changeId , com.google.gerrit.server.notedb.NoteDbUpdateManager manager ) throws com.google.gerrit.server.project.NoSuchChangeException , com.google.gwtorm.server.OrmException , java.io.IOException { if ( failNextUpdate.getAndSet ( false ) ) { throw new java.io.IOException ( "Update failed" ) ; } com.google.gerrit.server.notedb.NoteDbUpdateManager.Result result = delegate.execute ( db , changeId , manager ) ; if ( stealNextUpdate.getAndSet ( false ) ) { throw new java.io.IOException ( "Update stolen" ) ; } return result ; }

Target:
public com.google.gerrit.server.notedb.NoteDbUpdateManager.Result execute ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change.Id changeId , com.google.gerrit.server.notedb.NoteDbUpdateManager manager ) throws com.google.gwtorm.server.OrmException , java.io.IOException { if ( failNextUpdate.getAndSet ( false ) ) { throw new java.io.IOException ( "Update failed" ) ; } com.google.gerrit.server.notedb.NoteDbUpdateManager.Result result = delegate.execute ( db , changeId , manager ) ; if ( stealNextUpdate.getAndSet ( false ) ) { throw new java.io.IOException ( "Update stolen" ) ; } return result ; }
Source:
private java.util.Map < java.lang.String , org.eclipse.jgit.lib.Ref > getDraftRefs ( com.google.gerrit.reviewdb.client.Change.Id changeId ) throws com.google.gwtorm.server.OrmException { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openMetadataRepository ( allUsers ) ) { return getDraftRefs ( repo , changeId ) ; } catch ( java.io.IOException e ) { throw new com.google.gwtorm.server.OrmException ( e ) ; } }

Target:
public java.util.Map < java.lang.String , org.eclipse.jgit.lib.Ref > getDraftRefs ( com.google.gerrit.reviewdb.client.Change.Id changeId ) throws com.google.gwtorm.server.OrmException { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openMetadataRepository ( allUsers ) ) { return getDraftRefs ( repo , changeId ) ; } catch ( java.io.IOException e ) { throw new com.google.gwtorm.server.OrmException ( e ) ; } }
Source:
private void assertStatus ( org.eclipse.jgit.transport.RemoteRefUpdate.Status expectedStatus , java.lang.String expectedMessage ) { org.eclipse.jgit.transport.RemoteRefUpdate refUpdate = result.getRemoteUpdate ( ref ) ; com.google.common.truth.Truth.assertThat ( expectedStatus ) . named ( message ( refUpdate ) ) . isEqualTo ( refUpdate.getStatus ( ) ) ; com.google.common.truth.Truth.assertThat ( expectedMessage ) . isEqualTo ( refUpdate.getMessage ( ) ) ; }

Target:
private void assertStatus ( org.eclipse.jgit.transport.RemoteRefUpdate.Status expectedStatus , java.lang.String expectedMessage ) { org.eclipse.jgit.transport.RemoteRefUpdate refUpdate = result.getRemoteUpdate ( ref ) ; com.google.common.truth.Truth.assertThat ( refUpdate.getStatus ( ) ) . named ( message ( refUpdate ) ) . isEqualTo ( expectedStatus ) ; com.google.common.truth.Truth.assertThat ( refUpdate.getMessage ( ) ) . isEqualTo ( expectedMessage ) ; }
Source:
private void setTable ( com.google.gerrit.client.change.RelatedChangesTab.MyTable t ) { progress.setVisible ( false ) ; scroll.clear ( ) ; scroll.add ( t ) ; scroll.setVisible ( true ) ; table = t ; if ( register ) { table.setRegisterKeys ( true ) ; } }

Target:
private void setTable ( com.google.gerrit.client.change.RelatedChangesTab.MyTable t ) { progress.setVisible ( false ) ; scroll.clear ( ) ; scroll.add ( t ) ; scroll.setVisible ( true ) ; table = t ; table.setRegisterKeys ( register ) ; }
Source:
public void run ( ) { try { final com.google.gerrit.server.mail.MergedSender cm = mergedSenderFactory.create ( id ) ; cm.setFrom ( user.getAccountId ( ) ) ; cm.setPatchSet ( result.newPatchSet , result.info ) ; cm.send ( ) ; } catch ( java.lang.Exception e ) { final com.google.gerrit.reviewdb.client.PatchSet.Id psi = result.newPatchSet.getId ( ) ; com.google.gerrit.server.git.ReceiveCommits.log.error ( ( "Cannot send email for submitted patch set " + psi ) , e ) ; } }

Target:
public void run ( ) { try { com.google.gerrit.server.mail.MergedSender cm = mergedSenderFactory.create ( ps.getId ( ) . getParentKey ( ) ) ; cm.setFrom ( user.getAccountId ( ) ) ; cm.setPatchSet ( ps , info ) ; cm.send ( ) ; } catch ( java.lang.Exception e ) { com.google.gerrit.server.git.ReceiveCommits.log.error ( ( "Cannot send email for submitted patch set " + ( ps.getId ( ) ) ) , e ) ; } }
Source:
private com.google.gerrit.common.data.LabelTypes getLabelTypes ( com.google.gerrit.reviewdb.client.Branch.NameKey branch ) throws com.google.gerrit.server.project.NoSuchProjectException { final com.google.gerrit.server.project.ProjectState p = projectCache.get ( branch.getParentKey ( ) ) ; if ( p == null ) { throw new com.google.gerrit.server.project.NoSuchProjectException ( branch.getParentKey ( ) ) ; } return p.getLabelTypes ( ) ; }

Target:
private com.google.gerrit.server.project.ProjectState getProject ( com.google.gerrit.reviewdb.client.Branch.NameKey branch ) throws com.google.gerrit.server.project.NoSuchProjectException { final com.google.gerrit.server.project.ProjectState p = projectCache.get ( branch.getParentKey ( ) ) ; if ( p == null ) { throw new com.google.gerrit.server.project.NoSuchProjectException ( branch.getParentKey ( ) ) ; } return p ; }
Source:
public void load ( org.eclipse.jgit.lib.Repository db , org.eclipse.jgit.lib.ObjectId id ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { if ( id != null ) { reader = db.newObjectReader ( ) ; try { revision = new org.eclipse.jgit.revwalk.RevWalk ( reader ) . parseCommit ( id ) ; onLoad ( ) ; } finally { reader.release ( ) ; reader = null ; } } else { revision = null ; onLoad ( ) ; } }

Target:
public void load ( org.eclipse.jgit.lib.Repository db , org.eclipse.jgit.lib.ObjectId id ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { reader = db.newObjectReader ( ) ; try { revision = ( id != null ) ? new org.eclipse.jgit.revwalk.RevWalk ( reader ) . parseCommit ( id ) : null ; onLoad ( ) ; } finally { reader.release ( ) ; reader = null ; } }
Source:
public void start ( ) { queue.start ( ) ; if ( ( ( srvInfo.getState ( ) ) == ( ServerInformation.State.STARTUP ) ) && ( queue.replicateAllOnPluginStart ) ) { com.googlesource.gerrit.plugins.replication.ReplicationState state = new com.googlesource.gerrit.plugins.replication.ReplicationState ( ReplicationType.STARTUP ) ; pushAllFuture.set ( pushAll.create ( null , state ) . schedule ( 30 , java.util.concurrent.TimeUnit.SECONDS ) ) ; } }

Target:
public void start ( ) { queue.start ( ) ; if ( ( ( srvInfo.getState ( ) ) == ( ServerInformation.State.STARTUP ) ) && ( queue.replicateAllOnPluginStart ) ) { com.googlesource.gerrit.plugins.replication.ReplicationState state = new com.googlesource.gerrit.plugins.replication.ReplicationState ( ) ; pushAllFuture.set ( pushAll.create ( null , state ) . schedule ( 30 , java.util.concurrent.TimeUnit.SECONDS ) ) ; } }
Source:
public void setParent_Forbidden ( ) throws java.lang.Exception { java.lang.String parent = "parent" ; com.google.gerrit.acceptance.GitUtil.createProject ( sshSession , parent , null , true ) ; com.google.gerrit.acceptance.RestResponse r = userSession.put ( ( ( "/projects/" + ( project.get ( ) ) ) + "/parent" ) , newParentInput ( parent ) ) ; com.google.common.truth.Truth.assertThat ( r.getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_FORBIDDEN ) ; r.consume ( ) ; }

Target:
public void setParent_Forbidden ( ) throws java.lang.Exception { java.lang.String parent = "parent" ; createProject ( parent , null , true ) ; com.google.gerrit.acceptance.RestResponse r = userSession.put ( ( ( "/projects/" + ( project.get ( ) ) ) + "/parent" ) , newParentInput ( parent ) ) ; com.google.common.truth.Truth.assertThat ( r.getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_FORBIDDEN ) ; r.consume ( ) ; }
Source:
public com.google.gerrit.extensions.restapi.Response < java.util.Set < java.lang.String > > apply ( com.google.gerrit.server.change.ChangeResource req ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.BadRequestException , com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.server.project.ChangeControl control = req.getControl ( ) ; com.google.gerrit.server.notedb.ChangeNotes notes = control.getNotes ( ) . load ( ) ; java.util.Set < java.lang.String > hashtags = notes.getHashtags ( ) ; if ( hashtags == null ) { hashtags = java.util.Collections.emptySet ( ) ; } return com.google.gerrit.extensions.restapi.Response.ok ( hashtags ) ; }

Target:
public com.google.gerrit.extensions.restapi.Response < java.util.Set < java.lang.String > > apply ( com.google.gerrit.server.change.ChangeResource req ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.BadRequestException , com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.server.notedb.ChangeNotes notes = req.getNotes ( ) . load ( ) ; java.util.Set < java.lang.String > hashtags = notes.getHashtags ( ) ; if ( hashtags == null ) { hashtags = java.util.Collections.emptySet ( ) ; } return com.google.gerrit.extensions.restapi.Response.ok ( hashtags ) ; }
Source:
protected void setApiHeaders ( javax.servlet.http.HttpServletResponse res , com.google.gitiles.FormatType type ) { res.setContentType ( type.getMimeType ( ) ) ; res.setCharacterEncoding ( com.google.common.base.Charsets.UTF_8.name ( ) ) ; res.setHeader ( com.google.common.net.HttpHeaders.CONTENT_DISPOSITION , "attachment" ) ; res.setHeader ( com.google.common.net.HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN , "*" ) ; setCacheHeaders ( res ) ; }

Target:
protected void setApiHeaders ( javax.servlet.http.HttpServletResponse res , com.google.gitiles.FormatType type ) { setApiHeaders ( res , type.getMimeType ( ) ) ; }
Source:
public static boolean canBeOnAllProjects ( java.lang.String ref , java.lang.String permissionName ) { if ( AccessSection.ALL.equals ( ref ) ) { return ! ( com.google.gerrit.common.data.Permission.OWNER.equals ( permissionName ) ) ; } if ( AccessSection.REF_CONFIG.equals ( ref ) ) { return ! ( com.google.gerrit.common.data.Permission.PUSH.equals ( permissionName ) ) ; } return true ; }

Target:
public static boolean canBeOnAllProjects ( java.lang.String ref , java.lang.String permissionName ) { if ( AccessSection.ALL.equals ( ref ) ) { return ! ( com.google.gerrit.common.data.Permission.OWNER.equals ( permissionName ) ) ; } return true ; }
Source:
public com.google.gerrit.server.change.ReviewerJson.ReviewerInfo format ( com.google.gerrit.server.change.ReviewerJson.ReviewerInfo out , com.google.gerrit.server.project.ChangeControl ctl , com.google.gerrit.server.notedb.ChangeNotes changeNotes ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.PatchSet.Id psId = ctl.getChange ( ) . currentPatchSetId ( ) ; return format ( out , ctl , approvalsUtil.byPatchSetUser ( db.get ( ) , ctl , psId , out._id ) ) ; }

Target:
public com.google.gerrit.server.change.ReviewerJson.ReviewerInfo format ( com.google.gerrit.server.change.ReviewerJson.ReviewerInfo out , com.google.gerrit.server.project.ChangeControl ctl ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.PatchSet.Id psId = ctl.getChange ( ) . currentPatchSetId ( ) ; return format ( out , ctl , approvalsUtil.byPatchSetUser ( db.get ( ) , ctl , psId , out._id ) ) ; }
Source:
public void abandonReviewableChangeByOwnerCcingSelf ( ) 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 , com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "abandon" , 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.ABANDONED_CHANGES ) ; }

Target:
public void abandonReviewableChangeByOwnerCcingSelf ( ) 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 , com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "abandon" , sc ) . to ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . to ( sc.reviewerByEmail ) . cc ( sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; }
Source:
private static boolean acceptsGzip ( javax.servlet.http.HttpServletRequest req ) { if ( req != null ) { java.lang.String accepts = req.getHeader ( com.google.common.net.HttpHeaders.ACCEPT_ENCODING ) ; return ( accepts != null ) && ( ( accepts.indexOf ( "gzip" ) ) != ( - 1 ) ) ; } return false ; }

Target:
private static boolean acceptsGzip ( javax.servlet.http.HttpServletRequest req ) { if ( req != null ) { java.lang.String accepts = req.getHeader ( com.google.common.net.HttpHeaders.ACCEPT_ENCODING ) ; return ( accepts != null ) && ( accepts.contains ( "gzip" ) ) ; } return false ; }
Source:
void setShowLineNumbers ( boolean b ) { cmA.setOption ( "lineNumbers" , b ) ; cmB.setOption ( "lineNumbers" , b ) ; if ( b ) { diffTable.addStyleName ( Resources.I.diffTableStyle ( ) . showLineNumbers ( ) ) ; } else { diffTable.removeStyleName ( Resources.I.diffTableStyle ( ) . showLineNumbers ( ) ) ; } }

Target:
void setShowLineNumbers ( boolean b ) { super . setShowLineNumbers ( b ) ; cmA.setOption ( "lineNumbers" , b ) ; cmB.setOption ( "lineNumbers" , b ) ; }
Source:
public void insertChange ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet ps , org.eclipse.jgit.revwalk.RevCommit commit , com.google.gerrit.common.data.LabelTypes labelTypes , java.util.List < org.eclipse.jgit.revwalk.FooterLine > footerLines , com.google.gerrit.reviewdb.client.PatchSetInfo info , java.util.Set < com.google.gerrit.reviewdb.client.Account.Id > reviewers ) throws com.google.gwtorm.server.OrmException { insertChange ( db , change , null , ps , commit , labelTypes , footerLines , info , reviewers ) ; }

Target:
public void insertChange ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet ps , org.eclipse.jgit.revwalk.RevCommit commit , com.google.gerrit.common.data.LabelTypes labelTypes , com.google.gerrit.reviewdb.client.PatchSetInfo info , java.util.Set < com.google.gerrit.reviewdb.client.Account.Id > reviewers ) throws com.google.gwtorm.server.OrmException { insertChange ( db , change , null , ps , commit , labelTypes , info , reviewers ) ; }
Source:
public void commentOnReviewableChangeByOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; setApiUser ( sc.owner ) ; review ( sc.changeId , com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy.ENABLED ) ; assertThat ( sender ) . sent ( "comment" , sc ) . notTo ( 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 commentOnReviewableChangeByOwner ( ) 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.ENABLED ) ; assertThat ( sender ) . sent ( "comment" , sc ) . notTo ( 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 ) ; }
Source:
public boolean isReviewer ( com.google.gerrit.reviewdb.server.ReviewDb db , @ com.google.gerrit.common.Nullable com.google.gerrit.server.query.change.ChangeData cd ) throws com.google.gwtorm.server.OrmException { if ( getCurrentUser ( ) . isIdentifiedUser ( ) ) { java.util.Collection < com.google.gerrit.reviewdb.client.Account.Id > results = ( cd != null ) ? cd.reviewers ( com.google.inject.util.Providers.of ( db ) ) . values ( ) : approvalsUtil.getReviewers ( db , change.getId ( ) ) . values ( ) ; com.google.gerrit.server.IdentifiedUser user = ( ( com.google.gerrit.server.IdentifiedUser ) ( getCurrentUser ( ) ) ) ; return results.contains ( user.getAccountId ( ) ) ; } return false ; }

Target:
public boolean isReviewer ( com.google.gerrit.reviewdb.server.ReviewDb db , @ com.google.gerrit.common.Nullable com.google.gerrit.server.query.change.ChangeData cd ) throws com.google.gwtorm.server.OrmException { if ( getCurrentUser ( ) . isIdentifiedUser ( ) ) { java.util.Collection < com.google.gerrit.reviewdb.client.Account.Id > results = ( cd != null ) ? cd.reviewers ( ) . values ( ) : approvalsUtil.getReviewers ( db , change.getId ( ) ) . values ( ) ; com.google.gerrit.server.IdentifiedUser user = ( ( com.google.gerrit.server.IdentifiedUser ) ( getCurrentUser ( ) ) ) ; return results.contains ( user.getAccountId ( ) ) ; } return false ; }
Source:
public boolean exists ( final java.lang.String externalId ) throws com.google.gerrit.server.account.AccountException { try { final com.google.gerrit.client.reviewdb.ReviewDb db = schema.open ( ) ; try { final java.util.List < com.google.gerrit.client.reviewdb.AccountExternalId > matches = db.accountExternalIds ( ) . byExternal ( externalId ) . toList ( ) ; return ! ( matches.isEmpty ( ) ) ; } finally { db.close ( ) ; } } catch ( com.google.gwtorm.client.OrmException e ) { throw new com.google.gerrit.server.account.AccountException ( ( "Cannot lookup account " + externalId ) , e ) ; } }

Target:
public boolean exists ( final java.lang.String externalId ) throws com.google.gerrit.server.account.AccountException { try { final com.google.gerrit.client.reviewdb.ReviewDb db = schema.open ( ) ; try { return ( db.accountExternalIds ( ) . get ( new com.google.gerrit.client.reviewdb.AccountExternalId.Key ( externalId ) ) ) != null ; } finally { db.close ( ) ; } } catch ( com.google.gwtorm.client.OrmException e ) { throw new com.google.gerrit.server.account.AccountException ( ( "Cannot lookup account " + externalId ) , e ) ; } }
Source:
public com.google.gerrit.server.project.ChildProjectResource parse ( com.google.gerrit.server.project.ProjectResource parent , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gerrit.server.permissions.PermissionBackendException , java.io.IOException { com.google.gerrit.server.project.ProjectResource p = projectsCollection.parse ( TopLevelResource.INSTANCE , id ) ; for ( com.google.gerrit.server.project.ProjectState pp : p.getControl ( ) . getProjectState ( ) . parents ( ) ) { if ( parent.getNameKey ( ) . equals ( pp.getProject ( ) . getNameKey ( ) ) ) { return new com.google.gerrit.server.project.ChildProjectResource ( parent , p.getProjectState ( ) ) ; } } throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; }

Target:
public com.google.gerrit.server.project.ChildProjectResource parse ( com.google.gerrit.server.project.ProjectResource parent , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gerrit.server.permissions.PermissionBackendException , java.io.IOException { com.google.gerrit.server.project.ProjectResource p = projectsCollection.parse ( TopLevelResource.INSTANCE , id ) ; for ( com.google.gerrit.server.project.ProjectState pp : p.getProjectState ( ) . parents ( ) ) { if ( parent.getNameKey ( ) . equals ( pp.getProject ( ) . getNameKey ( ) ) ) { return new com.google.gerrit.server.project.ChildProjectResource ( parent , p.getProjectState ( ) ) ; } } throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; }
Source:
public java.lang.Object apply ( com.google.gerrit.server.group.IncludedGroupResource resource , com.google.gerrit.server.group.DeleteIncludedGroups.DeleteIncludedGroup.Input input ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.BadRequestException , com.google.gerrit.extensions.restapi.MethodNotAllowedException , com.google.gwtorm.server.OrmException { com.google.gerrit.server.group.AddIncludedGroups.Input in = new com.google.gerrit.server.group.AddIncludedGroups.Input ( ) ; in.groups = com.google.common.collect.ImmutableList.of ( resource.getMember ( ) . toString ( ) ) ; return delete.get ( ) . apply ( resource , in ) ; }

Target:
public java.lang.Object apply ( com.google.gerrit.server.group.IncludedGroupResource resource , com.google.gerrit.server.group.DeleteIncludedGroups.DeleteIncludedGroup.Input input ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.BadRequestException , com.google.gerrit.extensions.restapi.MethodNotAllowedException , com.google.gwtorm.server.OrmException { com.google.gerrit.server.group.AddIncludedGroups.Input in = new com.google.gerrit.server.group.AddIncludedGroups.Input ( ) ; in.groups = com.google.common.collect.ImmutableList.of ( resource.getMember ( ) . get ( ) ) ; return delete.get ( ) . apply ( resource , in ) ; }
Source:
public Account.Id lookup ( final java.lang.String externalId ) throws com.google.gerrit.server.account.AccountException { try { final com.google.gerrit.reviewdb.server.ReviewDb db = schema.open ( ) ; try { final com.google.gerrit.reviewdb.client.AccountExternalId ext = db.accountExternalIds ( ) . get ( new com.google.gerrit.reviewdb.client.AccountExternalId.Key ( externalId ) ) ; return ext != null ? ext.getAccountId ( ) : null ; } finally { db.close ( ) ; } } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.server.account.AccountException ( ( "Cannot lookup account " + externalId ) , e ) ; } }

Target:
public Account.Id lookup ( java.lang.String externalId ) throws com.google.gerrit.server.account.AccountException { try { try ( com.google.gerrit.reviewdb.server.ReviewDb db = schema.open ( ) ) { com.google.gerrit.reviewdb.client.AccountExternalId ext = db.accountExternalIds ( ) . get ( new com.google.gerrit.reviewdb.client.AccountExternalId.Key ( externalId ) ) ; return ext != null ? ext.getAccountId ( ) : null ; } } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.server.account.AccountException ( ( "Cannot lookup account " + externalId ) , e ) ; } }
Source:
public void doFilter ( javax.servlet.ServletRequest request , javax.servlet.ServletResponse response , javax.servlet.FilterChain chain ) throws java.io.IOException , javax.servlet.ServletException { if ( gerritAuthFilter.doFilter ( webSession , request , response , chain ) ) { super . doFilter ( new com.googlesource.gerrit.plugins.gitblit.WrappedSyndicationFilter.SyndicationHttpServletRequest ( ( ( javax.servlet.http.HttpServletRequest ) ( request ) ) ) , response , chain ) ; } }

Target:
public void doFilter ( javax.servlet.ServletRequest request , javax.servlet.ServletResponse response , javax.servlet.FilterChain chain ) throws java.io.IOException , javax.servlet.ServletException { if ( gerritAuthFilter.doFilter ( webSession , request , response , chain ) ) { super . doFilter ( request , response , chain ) ; } }
Source:
public java.lang.String getGerritPluginName ( java.nio.file.Path srcPath ) { java.lang.String fileName = srcPath.getFileName ( ) . toString ( ) ; if ( com.google.gerrit.server.plugins.PluginLoader.isUiPlugin ( fileName ) ) { return fileName.substring ( 0 , fileName.lastIndexOf ( '.' ) ) ; } if ( serverPluginFactory.handles ( srcPath ) ) { return serverPluginFactory.getPluginName ( srcPath ) ; } return null ; }

Target:
public java.lang.String getGerritPluginName ( java.nio.file.Path srcPath ) { java.lang.String fileName = srcPath.getFileName ( ) . toString ( ) ; if ( isUiPlugin ( fileName ) ) { return fileName.substring ( 0 , fileName.lastIndexOf ( '.' ) ) ; } if ( serverPluginFactory.handles ( srcPath ) ) { return serverPluginFactory.getPluginName ( srcPath ) ; } return null ; }
Source:
protected void assertQuery ( com.google.gerrit.extensions.api.changes.Changes.QueryRequest query , com.google.gerrit.reviewdb.client.Change ... changes ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( ( ( java.lang.Iterable < java.lang.Integer > ) ( com.google.gerrit.server.query.change.AbstractQueryChangesTest.query ( query ) ) ) ) . named ( query.toString ( ) ) . containsExactlyElementsIn ( com.google.gerrit.server.query.change.AbstractQueryChangesTest.ids ( changes ) ) . inOrder ( ) ; }

Target:
protected void assertQuery ( com.google.gerrit.extensions.api.changes.Changes.QueryRequest query , com.google.gerrit.reviewdb.client.Change ... changes ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( com.google.gerrit.server.query.change.AbstractQueryChangesTest.query ( query ) ) . named ( query.toString ( ) ) . containsExactlyElementsIn ( com.google.gerrit.server.query.change.AbstractQueryChangesTest.ids ( changes ) ) . inOrder ( ) ; }
Source:
private java.util.List < com.google.gerrit.common.data.SubmitRecord > ruleError ( java.lang.String err , java.lang.Exception e ) { if ( logErrors ) { if ( err == 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 ( ) ; } else { return com.google.gerrit.server.project.SubmitRuleEvaluator.createRuleError ( err ) ; } }
Source:
public com.google.gerrit.extensions.auth.oauth.OAuthToken getAccessToken ( com.google.gerrit.extensions.auth.oauth.OAuthVerifier rv ) { if ( ( rv == null ) || ( ( rv.getValue ( ) ) == null ) ) { throw new com.googlesource.gerrit.plugins.cfoauth.UAAClientException ( "Must provide an authorization code" ) ; } return com.googlesource.gerrit.plugins.cfoauth.CFOAuthService.getAsOAuthToken ( uaaClient.getAccessToken ( rv.getValue ( ) ) ) ; }

Target:
public com.google.gerrit.extensions.auth.oauth.OAuthToken getAccessToken ( com.google.gerrit.extensions.auth.oauth.OAuthVerifier rv ) { if ( ( rv == null ) || ( ( rv.getValue ( ) ) == null ) ) { throw new com.googlesource.gerrit.plugins.cfoauth.UAAClientException ( "Must provide an authorization code" ) ; } return getAsOAuthToken ( uaaClient.getAccessToken ( rv.getValue ( ) ) ) ; }
Source:
private com.google.gerrit.server.project.ProjectState newProjectState ( com.google.gerrit.server.git.ProjectConfig local ) { com.google.gerrit.rules.PrologEnvironment.Factory envFactory = null ; com.google.gerrit.server.git.GitRepositoryManager gitMgr = null ; com.google.gerrit.server.project.ProjectControl.AssistedFactory projectControlFactory = null ; com.google.gerrit.rules.RulesCache rulesCache = null ; com.google.gerrit.server.config.SitePaths sitePaths = null ; java.util.List < com.google.gerrit.server.project.CommentLinkInfo > commentLinks = null ; all.put ( local.getProject ( ) . getNameKey ( ) , new com.google.gerrit.server.project.ProjectState ( sitePaths , projectCache , allProjectsName , projectControlFactory , envFactory , gitMgr , rulesCache , commentLinks , local ) ) ; return all.get ( local.getProject ( ) . getNameKey ( ) ) ; }

Target:
private com.google.gerrit.server.project.ProjectState newProjectState ( com.google.gerrit.server.git.ProjectConfig local ) { add ( local ) ; return all.get ( local.getProject ( ) . getNameKey ( ) ) ; }
Source:
public void delete ( com.google.gerrit.reviewdb.client.Project project , boolean preserveGitRepository ) throws com.google.gerrit.sshd.BaseCommand.UnloggedFailure , java.io.IOException , org.eclipse.jgit.errors.RepositoryNotFoundException { final org.eclipse.jgit.lib.Repository repository = repoManager.openRepository ( project.getNameKey ( ) ) ; if ( repository == null ) { throw new com.google.gerrit.sshd.BaseCommand.UnloggedFailure ( "There was an error finding the project." ) ; } cleanCache ( repository ) ; if ( ! preserveGitRepository ) { deleteGitRepository ( repository ) ; } }

Target:
public void delete ( com.google.gerrit.reviewdb.client.Project project , boolean preserveGitRepository ) throws java.io.IOException , org.eclipse.jgit.errors.RepositoryNotFoundException { final org.eclipse.jgit.lib.Repository repository = repoManager.openRepository ( project.getNameKey ( ) ) ; if ( repository == null ) { throw new org.eclipse.jgit.errors.RepositoryNotFoundException ( "There was an error finding the project." ) ; } cleanCache ( repository ) ; if ( ! preserveGitRepository ) { deleteGitRepository ( repository ) ; } }
Source:
public java.lang.String healthCheck ( final com.googlesource.gerrit.plugins.its.jira.Check check ) throws java.io.IOException { return execute ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) throws java.lang.Exception { if ( check.equals ( Check.ACCESS ) ) return healthCheckAccess ( ) ; return healthCheckSysinfo ( ) ; } } ) ; }

Target:
public java.lang.String healthCheck ( final com.googlesource.gerrit.plugins.its.jira.Check check ) throws java.io.IOException { return execute ( ( ) -> { if ( check.equals ( Check.ACCESS ) ) return healthCheckAccess ( ) ; return healthCheckSysinfo ( ) ; } ) ; }
Source:
private boolean isDirty ( ) { java.lang.String msg = editArea.getValue ( ) . trim ( ) ; if ( isNew ( ) ) { return ( msg.length ( ) ) > 0 ; } return msg.equals ( ( ( comment.message ( ) ) != null ? comment.message ( ) . trim ( ) : "" ) ) ; }

Target:
private boolean isDirty ( ) { java.lang.String msg = editArea.getValue ( ) . trim ( ) ; if ( isNew ( ) ) { return ( msg.length ( ) ) > 0 ; } return ! ( msg.equals ( ( ( comment.message ( ) ) != null ? comment.message ( ) . trim ( ) : "" ) ) ) ; }
Source:
public com.google.gerrit.server.change.VoteResource parse ( com.google.gerrit.server.change.ReviewerResource reviewer , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.MethodNotAllowedException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException { if ( ! ( reviewer.getRevisionResource ( ) . isCurrent ( ) ) ) { throw new com.google.gerrit.extensions.restapi.MethodNotAllowedException ( "Cannot access on non-current patch set" ) ; } return new com.google.gerrit.server.change.VoteResource ( reviewer , id.get ( ) ) ; }

Target:
public com.google.gerrit.server.change.VoteResource parse ( com.google.gerrit.server.change.ReviewerResource reviewer , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.MethodNotAllowedException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException { if ( ( ( reviewer.getRevisionResource ( ) ) != null ) && ( ! ( reviewer.getRevisionResource ( ) . isCurrent ( ) ) ) ) { throw new com.google.gerrit.extensions.restapi.MethodNotAllowedException ( "Cannot access on non-current patch set" ) ; } return new com.google.gerrit.server.change.VoteResource ( reviewer , id.get ( ) ) ; }