auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testOpenRepositoryCreatedDirectlyOnDisk ( ) throws java.lang.Exception { createRepository ( repoManager.getBasePath ( ) , "projectA" ) ; com.google.gerrit.reviewdb.client.Project.NameKey projectA = new com.google.gerrit.reviewdb.client.Project.NameKey ( "projectA" ) ; com.google.common.truth.Truth.assertThat ( repoManager.openRepository ( projectA ) ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( ( ( java.lang.Iterable < ? > ) ( repoManager.list ( ) ) ) ) . containsExactly ( projectA ) ; }

Target:
public void testOpenRepositoryCreatedDirectlyOnDisk ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey projectA = new com.google.gerrit.reviewdb.client.Project.NameKey ( "projectA" ) ; createRepository ( repoManager.getBasePath ( projectA ) , projectA.get ( ) ) ; try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( projectA ) ) { com.google.common.truth.Truth.assertThat ( repo ) . isNotNull ( ) ; } com.google.common.truth.Truth.assertThat ( repoManager.list ( ) ) . containsExactly ( projectA ) ; }
Source:
protected void onInitUI ( ) { table = new com.google.gerrit.client.changes.DashboardTable ( params ) { @ java.lang.Override protected void onLoad ( ) { super . onLoad ( ) ; } @ java.lang.Override public void finishDisplay ( ) { super . finishDisplay ( ) ; display ( ) ; } } ; super . onInitUI ( ) ; java.lang.String title = table.getTitle ( ) ; if ( title != null ) { setWindowTitle ( title ) ; setPageTitle ( title ) ; } add ( table ) ; }

Target:
protected void onInitUI ( ) { table = new com.google.gerrit.client.changes.DashboardTable ( this , params ) { @ java.lang.Override public void finishDisplay ( ) { super . finishDisplay ( ) ; display ( ) ; } } ; super . onInitUI ( ) ; java.lang.String title = table.getTitle ( ) ; if ( title != null ) { setWindowTitle ( title ) ; setPageTitle ( title ) ; } add ( table ) ; }
Source:
private boolean isVisible ( 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 ( ( getChange ( ) . isPrivate ( ) ) && ( ! ( isPrivateVisible ( db , cd ) ) ) ) { return false ; } return ( refControl.isVisible ( ) ) && ( getProjectControl ( ) . getProject ( ) . getState ( ) . permitsRead ( ) ) ; }

Target:
private boolean isVisible ( 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 ( ( getChange ( ) . isPrivate ( ) ) && ( ! ( isPrivateVisible ( db , cd ) ) ) ) { return false ; } return refControl.isVisible ( ) ; }
Source:
public static com.google.gerrit.server.query.change.ChangeData createForTest ( com.google.gerrit.reviewdb.client.Change.Id id , int currentPatchSetId ) { com.google.gerrit.server.query.change.ChangeData cd = new com.google.gerrit.server.query.change.ChangeData ( null , null , null , null , null , null , null , null , null , null , null , null , null , id ) ; cd.currentPatchSet = new com.google.gerrit.reviewdb.client.PatchSet ( new com.google.gerrit.reviewdb.client.PatchSet.Id ( id , currentPatchSetId ) ) ; return cd ; }

Target:
public static com.google.gerrit.server.query.change.ChangeData createForTest ( com.google.gerrit.reviewdb.client.Change.Id id , int currentPatchSetId ) { com.google.gerrit.server.query.change.ChangeData cd = new com.google.gerrit.server.query.change.ChangeData ( null , null , null , null , null , null , null , null , null , null , null , null , null , null , id ) ; cd.currentPatchSet = new com.google.gerrit.reviewdb.client.PatchSet ( new com.google.gerrit.reviewdb.client.PatchSet.Id ( id , currentPatchSetId ) ) ; return cd ; }
Source:
public static void patch ( java.lang.String token , com.google.gerrit.reviewdb.client.PatchSet.Id base , com.google.gerrit.reviewdb.client.Patch.Key id , int patchIndex , com.google.gerrit.common.data.PatchSetDetail patchSetDetail , com.google.gerrit.client.changes.PatchTable patchTable , com.google.gerrit.client.patches.PatchScreen.TopView topView ) { com.google.gerrit.client.Dispatcher.patch ( token , base , id , patchIndex , patchSetDetail , patchTable , topView , null ) ; }

Target:
public static void patch ( java.lang.String token , com.google.gerrit.reviewdb.client.PatchSet.Id base , com.google.gerrit.reviewdb.client.Patch.Key id , int patchIndex , com.google.gerrit.common.data.PatchSetDetail patchSetDetail , com.google.gerrit.client.changes.PatchTable patchTable , com.google.gerrit.client.patches.PatchScreen.TopView topView ) { com.google.gerrit.client.Dispatcher.patch ( token , base , id , null , 0 , patchIndex , patchSetDetail , patchTable , topView , null ) ; }
Source:
public static synchronized void cleanup ( ) throws java.io.IOException { java.lang.System.out.println ( "deleting dirs" ) ; for ( java.io.File dir : com.google.gerrit.acceptance.TempFileUtil.allDirsCreated ) { java.lang.System.err.println ( ( "cleaning up " + ( dir.getCanonicalPath ( ) ) ) ) ; com.google.gerrit.acceptance.TempFileUtil.recursivelyDelete ( dir ) ; } com.google.gerrit.acceptance.TempFileUtil.allDirsCreated.clear ( ) ; }

Target:
public static synchronized void cleanup ( ) throws java.io.IOException { for ( java.io.File dir : com.google.gerrit.acceptance.TempFileUtil.allDirsCreated ) { com.google.gerrit.acceptance.TempFileUtil.recursivelyDelete ( dir ) ; } com.google.gerrit.acceptance.TempFileUtil.allDirsCreated.clear ( ) ; }
Source:
static com.google.gerrit.server.config.ConfigUtilTest.SectionInfo defaults ( ) { com.google.gerrit.server.config.ConfigUtilTest.SectionInfo i = new com.google.gerrit.server.config.ConfigUtilTest.SectionInfo ( ) ; i.i = 1 ; i.ii = 2 ; i.id = 3 ; i.l = 4L ; i.ll = 5L ; i.ld = 6L ; i.b = true ; i.bb = false ; i.bd = true ; i.s = "foo" ; i.sd = "bar" ; i.nd = null ; i.t = com.google.gerrit.extensions.client.Theme.DEFAULT ; i.td = com.google.gerrit.extensions.client.Theme.DEFAULT ; return i ; }

Target:
static com.google.gerrit.server.config.ConfigUtilTest.SectionInfo defaults ( ) { com.google.gerrit.server.config.ConfigUtilTest.SectionInfo i = new com.google.gerrit.server.config.ConfigUtilTest.SectionInfo ( ) ; i.i = 1 ; i.ii = 2 ; i.id = 3 ; i.l = 4L ; i.ll = 5L ; i.ld = 6L ; i.b = true ; i.bb = false ; i.bd = true ; i.s = "foo" ; i.sd = "bar" ; i.t = com.google.gerrit.extensions.client.Theme.DEFAULT ; i.td = com.google.gerrit.extensions.client.Theme.DEFAULT ; return i ; }
Source:
public void testAppend_StringBuffer ( ) { final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder b = new com.google.gwtexpui.safehtml.client.SafeHtmlBuilder ( ) ; assertSame ( b , b.append ( ( ( java.lang.StringBuffer ) ( null ) ) ) ) ; assertEquals ( "" , b.asString ( ) ) ; assertSame ( b , b.append ( new java.lang.StringBuffer ( "foo" ) ) ) ; assertSame ( b , b.append ( new java.lang.StringBuffer ( "bar" ) ) ) ; assertEquals ( "foobar" , b.asString ( ) ) ; }

Target:
public void testAppend_StringBuffer ( ) { final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder b = new com.google.gwtexpui.safehtml.client.SafeHtmlBuilder ( ) ; org.junit.Assert.assertSame ( b , b.append ( ( ( java.lang.StringBuffer ) ( null ) ) ) ) ; org.junit.Assert.assertEquals ( "" , b.asString ( ) ) ; org.junit.Assert.assertSame ( b , b.append ( new java.lang.StringBuffer ( "foo" ) ) ) ; org.junit.Assert.assertSame ( b , b.append ( new java.lang.StringBuffer ( "bar" ) ) ) ; org.junit.Assert.assertEquals ( "foobar" , b.asString ( ) ) ; }
Source:
public void testListComments ( ) throws java.lang.Exception { com.google.gerrit.server.change.CommentsTest.assertListComments ( injector , revRes1 , com.google.common.collect.ImmutableMap.of ( "FileOne.txt" , com.google.common.collect.Lists.newArrayList ( plc3 , plc1 , plc2 ) ) ) ; com.google.gerrit.server.change.CommentsTest.assertListComments ( injector , revRes2 , java.util.Collections.< java.lang.String , java.util.ArrayList < com.google.gerrit.reviewdb.client.PatchLineComment > > emptyMap ( ) ) ; }

Target:
public void testListComments ( ) throws java.lang.Exception { assertListComments ( revRes1 , com.google.common.collect.ImmutableMap.of ( "FileOne.txt" , com.google.common.collect.Lists.newArrayList ( plc3 , plc1 , plc2 ) ) ) ; assertListComments ( revRes2 , java.util.Collections.< java.lang.String , java.util.ArrayList < com.google.gerrit.reviewdb.client.PatchLineComment > > emptyMap ( ) ) ; }
Source:
public com.google.gerrit.extensions.restapi.Response < ? > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Index.Input input ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.server.permissions.PermissionBackendException , com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.server.project.ChangeControl ctl = rsrc.getControl ( ) ; if ( ! ( ctl.isOwner ( ) ) ) { permissionBackend.user ( user ) . check ( GlobalPermission.MAINTAIN_SERVER ) ; } indexer.index ( db.get ( ) , rsrc.getChange ( ) ) ; return com.google.gerrit.extensions.restapi.Response.none ( ) ; }

Target:
public com.google.gerrit.extensions.restapi.Response < ? > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Index.Input input ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.server.permissions.PermissionBackendException , com.google.gwtorm.server.OrmException , java.io.IOException { permissionBackend.user ( user ) . check ( GlobalPermission.MAINTAIN_SERVER ) ; indexer.index ( db.get ( ) , rsrc.getChange ( ) ) ; return com.google.gerrit.extensions.restapi.Response.none ( ) ; }
Source:
public static void registerClass ( com.google.gerrit.server.events.Event event ) { java.lang.String type = event.getType ( ) ; if ( com.google.gerrit.server.events.EventTypes.typesByString.containsKey ( type ) ) { throw new java.lang.IllegalArgumentException ( ( "Event type already registered: " + type ) ) ; } com.google.gerrit.server.events.EventTypes.typesByString.put ( type , event.getClass ( ) ) ; }

Target:
public static void registerClass ( com.google.gerrit.server.events.Event event ) { java.lang.String type = event.getType ( ) ; com.google.gerrit.server.events.EventTypes.typesByString.put ( type , event.getClass ( ) ) ; }
Source:
private static final boolean computeWin32 ( ) { final java.lang.String osDotName = java.security.AccessController.doPrivileged ( new java.security.PrivilegedAction < java.lang.String > ( ) { public java.lang.String run ( ) { return java.lang.System.getProperty ( "os.name" ) ; } } ) ; return ( osDotName != null ) && ( ( osDotName.toLowerCase ( ) . indexOf ( "windows" ) ) != ( - 1 ) ) ; }

Target:
private static final boolean computeWin32 ( ) { final java.lang.String osDotName = java.security.AccessController.doPrivileged ( new java.security.PrivilegedAction < java.lang.String > ( ) { public java.lang.String run ( ) { return java.lang.System.getProperty ( "os.name" ) ; } } ) ; return ( osDotName != null ) && ( osDotName.toLowerCase ( ) . contains ( "windows" ) ) ; }
Source:
public boolean unify ( com.googlecode.prolog_cafe.lang.Term t , com.googlecode.prolog_cafe.lang.Trail trail ) { if ( t.isVariable ( ) ) return ( ( com.googlecode.prolog_cafe.lang.VariableTerm ) ( t ) ) . unify ( this , trail ) ; if ( ! ( t.isClosure ( ) ) ) return false ; return code.equals ( ( ( com.googlecode.prolog_cafe.lang.ClosureTerm ) ( t ) ) . code ) ; }

Target:
public boolean unify ( com.googlecode.prolog_cafe.lang.Term t , com.googlecode.prolog_cafe.lang.Trail trail ) { if ( t instanceof com.googlecode.prolog_cafe.lang.VariableTerm ) return ( ( com.googlecode.prolog_cafe.lang.VariableTerm ) ( t ) ) . unify ( this , trail ) ; if ( ! ( t instanceof com.googlecode.prolog_cafe.lang.ClosureTerm ) ) return false ; return code.equals ( ( ( com.googlecode.prolog_cafe.lang.ClosureTerm ) ( t ) ) . code ) ; }
Source:
public java.lang.String healthCheck ( com.googlesource.gerrit.plugins.its.jira.Check check ) throws java.io.IOException { return execute ( ( ) -> { if ( check.equals ( Check.ACCESS ) ) return healthCheckAccess ( ) ; return healthCheckSysinfo ( ) ; } ) ; }

Target:
public java.lang.String healthCheck ( com.googlesource.gerrit.plugins.its.jira.Check check ) throws java.io.IOException { return execute ( ( ) -> { if ( check.equals ( Check.ACCESS ) ) { return client ( ) . healthCheckAccess ( ) ; } return client ( ) . healthCheckSysinfo ( ) ; } ) ; }
Source:
public com.google.gerrit.extensions.restapi.Response < ? > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Rebuild.Input input ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { if ( ! ( migration.commitChangeWrites ( ) ) ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( ) ; } try { rebuilder.rebuild ( db.get ( ) , rsrc.getId ( ) ) ; } catch ( com.google.gerrit.server.project.NoSuchChangeException e ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( com.google.gerrit.extensions.restapi.IdString.fromDecoded ( rsrc.getId ( ) . toString ( ) ) ) ; } return com.google.gerrit.extensions.restapi.Response.none ( ) ; }

Target:
private void rebuild ( com.google.gerrit.server.change.ChangeResource rsrc ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { try { rebuilder.rebuild ( db.get ( ) , rsrc.getId ( ) ) ; } catch ( com.google.gerrit.server.project.NoSuchChangeException e ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( com.google.gerrit.extensions.restapi.IdString.fromDecoded ( rsrc.getId ( ) . toString ( ) ) ) ; } }
Source:
javax.naming.directory.DirContext open ( ) throws javax.naming.NamingException , javax.security.auth.login.LoginException { final java.util.Properties env = createContextProperties ( ) ; env.put ( javax.naming.Context.SECURITY_AUTHENTICATION , authentication ) ; env.put ( javax.naming.Context.REFERRAL , referral ) ; if ( "GSSAPI" . equals ( authentication ) ) { return kerberosOpen ( env ) ; } else { if ( ( username ) != null ) { env.put ( javax.naming.Context.SECURITY_PRINCIPAL , username ) ; env.put ( javax.naming.Context.SECURITY_CREDENTIALS , password ) ; } return new javax.naming.directory.InitialDirContext ( env ) ; } }

Target:
javax.naming.directory.DirContext open ( ) throws javax.naming.NamingException , javax.security.auth.login.LoginException { final java.util.Properties env = createContextProperties ( ) ; env.put ( javax.naming.Context.SECURITY_AUTHENTICATION , authentication ) ; env.put ( javax.naming.Context.REFERRAL , referral ) ; if ( "GSSAPI" . equals ( authentication ) ) { return kerberosOpen ( env ) ; } if ( ( username ) != null ) { env.put ( javax.naming.Context.SECURITY_PRINCIPAL , username ) ; env.put ( javax.naming.Context.SECURITY_CREDENTIALS , password ) ; } return new javax.naming.directory.InitialDirContext ( env ) ; }
Source:
private org.eclipse.jgit.internal.storage.file.LockFile lockForImport ( ) throws com.google.gerrit.extensions.restapi.ResourceConflictException { java.io.File importStatus = projects.FS_LAYOUT.getImportStatusFile ( targetProject.get ( ) ) ; org.eclipse.jgit.internal.storage.file.LockFile lockFile = new org.eclipse.jgit.internal.storage.file.LockFile ( importStatus , org.eclipse.jgit.util.FS.DETECTED ) ; try { if ( lockFile.lock ( ) ) { return lockFile ; } else { throw new com.google.gerrit.extensions.restapi.ResourceConflictException ( "project is being imported from another session" ) ; } } catch ( java.io.IOException e1 ) { throw new com.google.gerrit.extensions.restapi.ResourceConflictException ( "failed to lock project for import" ) ; } }

Target:
private org.eclipse.jgit.internal.storage.file.LockFile lockForImport ( ) throws com.google.gerrit.extensions.restapi.ResourceConflictException { java.io.File importStatus = projects.FS_LAYOUT.getImportStatusFile ( targetProject.get ( ) ) ; org.eclipse.jgit.internal.storage.file.LockFile lockFile = new org.eclipse.jgit.internal.storage.file.LockFile ( importStatus ) ; try { if ( lockFile.lock ( ) ) { return lockFile ; } else { throw new com.google.gerrit.extensions.restapi.ResourceConflictException ( "project is being imported from another session" ) ; } } catch ( java.io.IOException e1 ) { throw new com.google.gerrit.extensions.restapi.ResourceConflictException ( "failed to lock project for import" ) ; } }
Source:
private static java.lang.String url ( com.google.gerrit.reviewdb.client.PatchSet.Id ps , com.google.gerrit.client.changes.CommentInfo info ) { return com.google.gerrit.client.Dispatcher.toPatch ( null , ps , info.path ( ) , ( ( info.side ( ) ) == ( com.google.gerrit.extensions.client.Side.PARENT ) ? com.google.gerrit.client.diff.DisplaySide.A : com.google.gerrit.client.diff.DisplaySide.B ) , info.line ( ) ) ; }

Target:
private static java.lang.String url ( com.google.gerrit.reviewdb.client.Project.NameKey project , com.google.gerrit.reviewdb.client.PatchSet.Id ps , com.google.gerrit.client.changes.CommentInfo info ) { return com.google.gerrit.client.Dispatcher.toPatch ( project , null , ps , info.path ( ) , ( ( info.side ( ) ) == ( com.google.gerrit.extensions.client.Side.PARENT ) ? com.google.gerrit.client.diff.DisplaySide.A : com.google.gerrit.client.diff.DisplaySide.B ) , info.line ( ) ) ; }
Source:
private void doEnterAgreement ( ) { com.google.gerrit.client.account.AccountApi.enterAgreement ( "self" , current.getName ( ) , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.rpc.NativeString > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.rpc.NativeString result ) { com.google.gerrit.client.Gerrit.display ( nextToken ) ; } @ java.lang.Override public void onFailure ( java.lang.Throwable caught ) { yesIAgreeBox.setText ( "" ) ; super . onFailure ( caught ) ; } } ) ; }

Target:
private void doEnterAgreement ( ) { com.google.gerrit.client.account.AccountApi.enterAgreement ( "self" , current.name ( ) , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.rpc.NativeString > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.rpc.NativeString result ) { com.google.gerrit.client.Gerrit.display ( nextToken ) ; } @ java.lang.Override public void onFailure ( java.lang.Throwable caught ) { yesIAgreeBox.setText ( "" ) ; super . onFailure ( caught ) ; } } ) ; }
Source:
public boolean isOwner ( ) { if ( canPerform ( com.google.gerrit.reviewdb.ApprovalCategory.OWN , ( ( short ) ( 1 ) ) ) ) { return true ; } if ( ( getRefName ( ) . equals ( RefRight.ALL.substring ( 0 , ( ( RefRight.ALL.length ( ) ) - 1 ) ) ) ) && ( getProjectControl ( ) . isOwner ( ) ) ) { return true ; } return false ; }

Target:
public boolean isOwner ( ) { if ( canPerform ( com.google.gerrit.reviewdb.ApprovalCategory.OWN , ( ( short ) ( 1 ) ) ) ) { return true ; } if ( ( ! ( getRefName ( ) . equals ( RefRight.ALL.substring ( 0 , ( ( RefRight.ALL.length ( ) ) - 1 ) ) ) ) ) && ( getProjectControl ( ) . isOwner ( ) ) ) { return true ; } return false ; }
Source:
protected void configure ( ) { bind ( com.codahale.metrics.MetricRegistry.class ) . in ( Scopes.SINGLETON ) ; bind ( com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker.class ) . in ( Scopes.SINGLETON ) ; bind ( com.google.gerrit.metrics.MetricMaker.class ) . to ( com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker.class ) ; install ( new com.google.gerrit.metrics.proc.ProcMetricModule ( ) ) ; install ( new com.google.gerrit.metrics.proc.JGitMetricModule ( ) ) ; com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.google.gerrit.metrics.dropwizard.MetricResource.METRIC_KIND ) ; child ( com.google.gerrit.server.config.ConfigResource.CONFIG_KIND , "metrics" ) . to ( com.google.gerrit.metrics.dropwizard.MetricsCollection.class ) ; get ( com.google.gerrit.metrics.dropwizard.MetricResource.METRIC_KIND ) . to ( com.google.gerrit.metrics.dropwizard.GetMetric.class ) ; }

Target:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.google.gerrit.metrics.dropwizard.MetricResource.METRIC_KIND ) ; child ( com.google.gerrit.server.config.ConfigResource.CONFIG_KIND , "metrics" ) . to ( com.google.gerrit.metrics.dropwizard.MetricsCollection.class ) ; get ( com.google.gerrit.metrics.dropwizard.MetricResource.METRIC_KIND ) . to ( com.google.gerrit.metrics.dropwizard.GetMetric.class ) ; }
Source:
public com.google.gerrit.extensions.common.ChangeInfo get ( java.util.EnumSet < com.google.gerrit.extensions.common.ListChangesOption > s ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return ChangeInfoMapper.INSTANCE.apply ( changeJson.get ( ) . addOptions ( s ) . format ( change ) ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot retrieve change" , e ) ; } }

Target:
public com.google.gerrit.extensions.common.ChangeInfo get ( java.util.EnumSet < com.google.gerrit.extensions.common.ListChangesOption > s ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return changeJson.get ( ) . addOptions ( s ) . format ( change ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot retrieve change" , e ) ; } }
Source:
public void writeCommit ( com.google.gerrit.server.notedb.BatchMetaDataUpdate batch ) throws com.google.gwtorm.server.OrmException , java.io.IOException { org.eclipse.jgit.lib.CommitBuilder builder = new org.eclipse.jgit.lib.CommitBuilder ( ) ; if ( migration.write ( ) ) { org.eclipse.jgit.lib.ObjectId treeId = storeCommentsInNotes ( ) ; if ( treeId != null ) { builder.setTreeId ( treeId ) ; } } batch.write ( builder ) ; }

Target:
public void writeCommit ( com.google.gerrit.server.notedb.BatchMetaDataUpdate batch ) throws com.google.gwtorm.server.OrmException , java.io.IOException { org.eclipse.jgit.lib.CommitBuilder builder = new org.eclipse.jgit.lib.CommitBuilder ( ) ; if ( migration.write ( ) ) { org.eclipse.jgit.lib.ObjectId treeId = storeCommentsInNotes ( ) ; if ( treeId != null ) { builder.setTreeId ( treeId ) ; } } batch.write ( this , builder ) ; }
Source:
private com.google.gerrit.reviewdb.client.AccountGroup newGroup ( com.google.gerrit.reviewdb.server.ReviewDb c , java.lang.String name , com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid ) throws com.google.gwtorm.server.OrmException { if ( uuid == null ) { uuid = com.google.gerrit.server.account.GroupUUID.make ( name , serverUser ) ; } return new com.google.gerrit.reviewdb.client.AccountGroup ( new com.google.gerrit.reviewdb.client.AccountGroup.NameKey ( name ) , new com.google.gerrit.reviewdb.client.AccountGroup.Id ( c.nextAccountGroupId ( ) ) , uuid , com.google.gerrit.common.TimeUtil.nowTs ( ) ) ; }

Target:
private com.google.gerrit.reviewdb.client.AccountGroup newGroup ( com.google.gerrit.reviewdb.server.ReviewDb c , java.lang.String name ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid = com.google.gerrit.server.account.GroupUUID.make ( name , serverUser ) ; return new com.google.gerrit.reviewdb.client.AccountGroup ( new com.google.gerrit.reviewdb.client.AccountGroup.NameKey ( name ) , new com.google.gerrit.reviewdb.client.AccountGroup.Id ( c.nextAccountGroupId ( ) ) , uuid , com.google.gerrit.common.TimeUtil.nowTs ( ) ) ; }
Source:
private void innerTest ( ) throws java.lang.Exception { try { outer ( ) ; org.junit.Assert.fail ( "should throw" ) ; } catch ( java.lang.IllegalStateException e ) { java.lang.StackTraceElement [ ] trimmed = com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.trimStack ( e.getStackTrace ( ) , java.lang.Thread.currentThread ( ) . getStackTrace ( ) [ 1 ] ) ; java.lang.String str = java.util.Arrays.toString ( trimmed ) ; com.google.common.truth.Truth.assertThat ( str ) . doesNotContain ( "trimStackTrace" ) ; com.google.common.truth.Truth.assertThat ( str ) . contains ( "innerTest" ) ; } }

Target:
private void innerTest ( ) throws java.lang.Exception { try { outer ( ) ; fail ( "should throw" ) ; } catch ( java.lang.IllegalStateException e ) { java.lang.StackTraceElement [ ] trimmed = com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.trimStack ( e.getStackTrace ( ) , java.lang.Thread.currentThread ( ) . getStackTrace ( ) [ 1 ] ) ; java.lang.String str = java.util.Arrays.toString ( trimmed ) ; com.google.common.truth.Truth.assertThat ( str ) . doesNotContain ( "trimStackTrace" ) ; com.google.common.truth.Truth.assertThat ( str ) . contains ( "innerTest" ) ; } }
Source:
private void testPushForMasterAsDraft ( com.google.gerrit.acceptance.git.PushForReviewIT.Protocol p ) throws com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { selectProtocol ( p ) ; com.google.gerrit.acceptance.git.PushOneCommit.Result r = pushTo ( "refs/drafts/master" ) ; r.assertOkStatus ( ) ; r.assertChange ( Change.Status.DRAFT , null ) ; r = pushTo ( "refs/for/master%draft" ) ; r.assertOkStatus ( ) ; r.assertChange ( Change.Status.DRAFT , null ) ; }

Target:
public void testPushForMasterAsDraft ( ) throws com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { com.google.gerrit.acceptance.git.PushOneCommit.Result r = pushTo ( "refs/drafts/master" ) ; r.assertOkStatus ( ) ; r.assertChange ( Change.Status.DRAFT , null ) ; r = pushTo ( "refs/for/master%draft" ) ; r.assertOkStatus ( ) ; r.assertChange ( Change.Status.DRAFT , null ) ; }
Source:
private void preMerge ( ) throws com.google.gerrit.server.git.MergeException { openBranch ( ) ; validateChangeList ( ) ; final com.google.gerrit.server.git.SubmitStrategy strategy = createStrategy ( ) ; mergeTip = strategy.run ( branchTip , toMerge ) ; refLogIdent = strategy.getRefLogIdent ( ) ; commits.putAll ( strategy.getNewCommits ( ) ) ; }

Target:
private void preMerge ( final com.google.gerrit.server.git.SubmitStrategy strategy ) throws com.google.gerrit.server.git.MergeException { mergeTip = strategy.run ( branchTip , toMerge ) ; refLogIdent = strategy.getRefLogIdent ( ) ; commits.putAll ( strategy.getNewCommits ( ) ) ; }
Source:
private static java.lang.String time ( long now , long time ) { if ( ( time - now ) < ( ( ( 24 * 60 ) * 60 ) * 1000L ) ) { return new java.text.SimpleDateFormat ( "HH:mm:ss" ) . format ( new java.util.Date ( time ) ) ; } return new java.text.SimpleDateFormat ( "MMM-dd" ) . format ( new java.util.Date ( time ) ) ; }

Target:
private static java.lang.String time ( long now , long time ) { if ( ( now - time ) < ( ( ( 24 * 60 ) * 60 ) * 1000L ) ) { return new java.text.SimpleDateFormat ( "HH:mm:ss" ) . format ( new java.util.Date ( time ) ) ; } return new java.text.SimpleDateFormat ( "MMM-dd" ) . format ( new java.util.Date ( time ) ) ; }
Source:
static com.google.gerrit.server.index.FieldDef < com.google.gerrit.server.query.change.ChangeData , ? > commitField ( com.google.gerrit.server.index.Schema < com.google.gerrit.server.query.change.ChangeData > schema , java.lang.String id ) { if ( ( ( ( id.length ( ) ) == ( org.eclipse.jgit.lib.Constants.OBJECT_ID_STRING_LENGTH ) ) && ( schema != null ) ) && ( schema.hasField ( com.google.gerrit.server.index.ChangeField.EXACT_COMMIT ) ) ) { return com.google.gerrit.server.index.ChangeField.EXACT_COMMIT ; } return com.google.gerrit.server.index.ChangeField.COMMIT ; }

Target:
static com.google.gerrit.server.index.FieldDef < com.google.gerrit.server.query.change.ChangeData , ? > commitField ( java.lang.String id ) { if ( ( id.length ( ) ) == ( org.eclipse.jgit.lib.Constants.OBJECT_ID_STRING_LENGTH ) ) { return com.google.gerrit.server.index.ChangeField.EXACT_COMMIT ; } return com.google.gerrit.server.index.ChangeField.COMMIT ; }
Source:
public com.google.gerrit.server.change.ChangeKind getChangeKind ( com.google.gerrit.server.project.ProjectState project , org.eclipse.jgit.lib.Repository repo , org.eclipse.jgit.lib.ObjectId prior , org.eclipse.jgit.lib.ObjectId next ) { try { return cache.get ( new com.google.gerrit.server.change.ChangeKindCacheImpl.Key ( project , repo , prior , next , useRecursiveMerge ) ) ; } catch ( java.util.concurrent.ExecutionException e ) { com.google.gerrit.server.change.ChangeKindCacheImpl.log.warn ( ( ( ( "Cannot check trivial rebase of new patch set " + ( next.name ( ) ) ) + " in " ) + ( project.getProject ( ) . getName ( ) ) ) , e ) ; return ChangeKind.REWORK ; } }

Target:
public com.google.gerrit.server.change.ChangeKind getChangeKind ( com.google.gerrit.server.project.ProjectState project , org.eclipse.jgit.lib.Repository repo , org.eclipse.jgit.lib.ObjectId prior , org.eclipse.jgit.lib.ObjectId next ) { try { return cache.get ( new com.google.gerrit.server.change.ChangeKindCacheImpl.Key ( repo , prior , next , useRecursiveMerge ) ) ; } catch ( java.util.concurrent.ExecutionException e ) { com.google.gerrit.server.change.ChangeKindCacheImpl.log.warn ( ( ( ( "Cannot check trivial rebase of new patch set " + ( next.name ( ) ) ) + " in " ) + ( project.getProject ( ) . getName ( ) ) ) , e ) ; return ChangeKind.REWORK ; } }
Source:
public void submitToEmptyRepo ( ) throws com.jcraft.jsch.JSchException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { org.eclipse.jgit.api.Git git = createProject ( false ) ; com.google.gerrit.acceptance.PushOneCommit.Result change = createChange ( git ) ; submit ( change.getChangeId ( ) ) ; com.google.common.truth.Truth.assertThat ( getRemoteHead ( ) . getId ( ) ) . isEqualTo ( change.getCommitId ( ) ) ; }

Target:
public void submitToEmptyRepo ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result change = createChange ( git ) ; submit ( change.getChangeId ( ) ) ; com.google.common.truth.Truth.assertThat ( getRemoteHead ( ) . getId ( ) ) . isEqualTo ( change.getCommitId ( ) ) ; }
Source:
private com.google.gerrit.server.account.AccountState makeUser ( final java.lang.String name , final java.lang.String email ) { final com.google.gerrit.reviewdb.Account.Id userId = new com.google.gerrit.reviewdb.Account.Id ( 42 ) ; final com.google.gerrit.reviewdb.Account account = new com.google.gerrit.reviewdb.Account ( userId ) ; account.setFullName ( name ) ; account.setPreferredEmail ( email ) ; final com.google.gerrit.server.account.AccountState s = new com.google.gerrit.server.account.AccountState ( account , java.util.Collections.< com.google.gerrit.reviewdb.AccountGroup.Id > emptySet ( ) , java.util.Collections.< com.google.gerrit.reviewdb.AccountExternalId > emptySet ( ) ) ; return s ; }

Target:
private com.google.gerrit.reviewdb.Account makeUser ( final java.lang.String name , final java.lang.String email ) { final com.google.gerrit.reviewdb.Account.Id userId = new com.google.gerrit.reviewdb.Account.Id ( 42 ) ; final com.google.gerrit.reviewdb.Account account = new com.google.gerrit.reviewdb.Account ( userId ) ; account.setFullName ( name ) ; account.setPreferredEmail ( email ) ; return account ; }
Source:
public static java.lang.String owner ( com.google.gerrit.client.changes.ChangeInfo.GitPerson person ) { if ( ( person.email ( ) ) != null ) { return person.email ( ) ; } else if ( ( person.name ( ) ) != null ) { return person.name ( ) ; } else { return "" ; } }

Target:
private static java.lang.String owner ( com.google.gerrit.client.changes.ChangeInfo.GitPerson person ) { if ( ( person.email ( ) ) != null ) { return person.email ( ) ; } else if ( ( person.name ( ) ) != null ) { return person.name ( ) ; } else { return "" ; } }
Source:
private javax.crypto.Cipher cipher ( byte [ ] initVector , int mode ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , java.security.spec.InvalidParameterSpecException , javax.crypto.NoSuchPaddingException { javax.crypto.spec.IvParameterSpec spec = new javax.crypto.spec.IvParameterSpec ( initVector ) ; javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance ( "AES/CBC/PKCS5PADDING" ) ; java.security.AlgorithmParameters params = java.security.AlgorithmParameters.getInstance ( com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.ALGORITHM ) ; params.init ( spec ) ; cipher.init ( mode , key.get ( ) , params ) ; return cipher ; }

Target:
private javax.crypto.Cipher cipher ( byte [ ] initVector , int mode ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , java.security.spec.InvalidParameterSpecException , javax.crypto.NoSuchPaddingException { javax.crypto.spec.IvParameterSpec spec = new javax.crypto.spec.IvParameterSpec ( initVector ) ; javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance ( "AES/CBC/PKCS5PADDING" ) ; java.security.AlgorithmParameters params = java.security.AlgorithmParameters.getInstance ( com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.ALGORITHM ) ; params.init ( spec ) ; cipher.init ( mode , key , params ) ; return cipher ; }
Source:
private static com.google.gerrit.server.query.change.ChangeData change ( java.lang.String ... files ) throws com.google.gwtorm.server.OrmException { java.util.Arrays.sort ( files ) ; com.google.gerrit.server.query.change.ChangeData cd = com.google.gerrit.server.query.change.ChangeData.createForTest ( new com.google.gerrit.reviewdb.client.Change.Id ( 1 ) ) ; cd.setCurrentFilePaths ( java.util.Arrays.asList ( files ) ) ; return cd ; }

Target:
private static com.google.gerrit.server.query.change.ChangeData change ( java.lang.String ... files ) throws com.google.gwtorm.server.OrmException { java.util.Arrays.sort ( files ) ; com.google.gerrit.server.query.change.ChangeData cd = com.google.gerrit.server.query.change.ChangeData.createForTest ( new com.google.gerrit.reviewdb.client.Change.Id ( 1 ) , 1 ) ; cd.setCurrentFilePaths ( java.util.Arrays.asList ( files ) ) ; return cd ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; b.append ( "Stream Events" ) ; if ( currentUser.state ( ) . getUserName ( ) . isPresent ( ) ) { b.append ( ( ( " (" + ( currentUser.state ( ) . getUserName ( ) . get ( ) ) ) + ")" ) ) ; } return b.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; b.append ( "Stream Events" ) ; if ( currentUser.getUserName ( ) . isPresent ( ) ) { b.append ( ( ( " (" + ( currentUser.getUserName ( ) . get ( ) ) ) + ")" ) ) ; } return b.toString ( ) ; }
Source:
public java.lang.String getString ( java.lang.String name , java.lang.String defaultValue ) { if ( defaultValue == null ) { return cfg.getString ( com.google.gerrit.server.config.PluginConfig.PLUGIN , pluginName , name ) ; } else { return com.google.common.base.MoreObjects.firstNonNull ( cfg.getString ( com.google.gerrit.server.config.PluginConfig.PLUGIN , pluginName , name ) , defaultValue ) ; } }

Target:
public java.lang.String getString ( java.lang.String name , java.lang.String defaultValue ) { if ( defaultValue == null ) { return cfg.getString ( com.google.gerrit.server.config.PluginConfig.PLUGIN , pluginName , name ) ; } return com.google.common.base.MoreObjects.firstNonNull ( cfg.getString ( com.google.gerrit.server.config.PluginConfig.PLUGIN , pluginName , name ) , defaultValue ) ; }
Source:
public static void checkRequiresCapability ( com.google.inject.Provider < com.google.gerrit.server.CurrentUser > userProvider , java.lang.String pluginName , java.lang.Class < ? > clazz ) throws com.google.gerrit.extensions.restapi.AuthException { com.google.gerrit.extensions.annotations.RequiresCapability rc = com.google.gerrit.server.account.CapabilityUtils.getClassAnnotation ( clazz , com.google.gerrit.extensions.annotations.RequiresCapability.class ) ; com.google.gerrit.extensions.annotations.RequiresAnyCapability rac = com.google.gerrit.server.account.CapabilityUtils.getClassAnnotation ( clazz , com.google.gerrit.extensions.annotations.RequiresAnyCapability.class ) ; if ( ( rc != null ) && ( rac != null ) ) { com.google.gerrit.server.account.CapabilityUtils.log.error ( java.lang.String.format ( "Class %s uses both @%s and @%s" , clazz.getName ( ) , com.google.gerrit.extensions.annotations.RequiresCapability.class . getSimpleName ( ) , com.google.gerrit.extensions.annotations.RequiresAnyCapability.class . getSimpleName ( ) ) ) ; throw new com.google.gerrit.extensions.restapi.AuthException ( "cannot check capability" ) ; } com.google.gerrit.server.CurrentUser user = userProvider.get ( ) ; com.google.gerrit.server.account.CapabilityControl ctl = user.getCapabilities ( ) ; if ( ctl.canAdministrateServer ( ) ) { return ; } com.google.gerrit.server.account.CapabilityUtils.checkRequiresCapability ( ctl , pluginName , clazz , rc ) ; com.google.gerrit.server.account.CapabilityUtils.checkRequiresAnyCapability ( ctl , pluginName , clazz , rac ) ; }

Target:
public static void checkRequiresCapability ( com.google.gerrit.server.CurrentUser user , java.lang.String pluginName , java.lang.Class < ? > clazz ) throws com.google.gerrit.extensions.restapi.AuthException { com.google.gerrit.extensions.annotations.RequiresCapability rc = com.google.gerrit.server.account.CapabilityUtils.getClassAnnotation ( clazz , com.google.gerrit.extensions.annotations.RequiresCapability.class ) ; com.google.gerrit.extensions.annotations.RequiresAnyCapability rac = com.google.gerrit.server.account.CapabilityUtils.getClassAnnotation ( clazz , com.google.gerrit.extensions.annotations.RequiresAnyCapability.class ) ; if ( ( rc != null ) && ( rac != null ) ) { com.google.gerrit.server.account.CapabilityUtils.log.error ( java.lang.String.format ( "Class %s uses both @%s and @%s" , clazz.getName ( ) , com.google.gerrit.extensions.annotations.RequiresCapability.class . getSimpleName ( ) , com.google.gerrit.extensions.annotations.RequiresAnyCapability.class . getSimpleName ( ) ) ) ; throw new com.google.gerrit.extensions.restapi.AuthException ( "cannot check capability" ) ; } com.google.gerrit.server.account.CapabilityControl ctl = user.getCapabilities ( ) ; if ( ctl.canAdministrateServer ( ) ) { return ; } com.google.gerrit.server.account.CapabilityUtils.checkRequiresCapability ( ctl , pluginName , clazz , rc ) ; com.google.gerrit.server.account.CapabilityUtils.checkRequiresAnyCapability ( ctl , pluginName , clazz , rac ) ; }
Source:
public void init ( final javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { super . init ( config ) ; try { server = com.google.gerrit.server.GerritServer.getInstance ( ) ; } catch ( com.google.gwtorm.client.OrmException e ) { throw new javax.servlet.ServletException ( "Cannot load GerritServer" , e ) ; } catch ( com.google.gwtjsonrpc.server.XsrfException e ) { throw new javax.servlet.ServletException ( "Cannot load GerritServer" , e ) ; } rng = new java.security.SecureRandom ( ) ; registry = com.google.gerrit.server.FileTypeRegistry.getInstance ( ) ; }

Target:
public void init ( final javax.servlet.ServletConfig config ) throws javax.servlet.ServletException { super . init ( config ) ; registry = com.google.gerrit.server.FileTypeRegistry.getInstance ( ) ; }
Source:
public static java.util.List < com.google.gitiles.blame.Region > loadBlame ( com.google.gitiles.blame.BlameCacheImpl.Key key ) throws java.io.IOException { try ( org.eclipse.jgit.blame.BlameGenerator gen = new org.eclipse.jgit.blame.BlameGenerator ( key.repo , key.path ) ) { gen.push ( null , key.commitId ) ; return com.google.gitiles.blame.BlameCacheImpl.loadRegions ( gen ) ; } finally { key.repo = null ; } }

Target:
public static java.util.List < com.google.gitiles.blame.Region > loadBlame ( com.google.gitiles.blame.BlameCacheImpl.Key key , org.eclipse.jgit.lib.Repository repo ) throws java.io.IOException { try ( org.eclipse.jgit.blame.BlameGenerator gen = new org.eclipse.jgit.blame.BlameGenerator ( repo , key.path ) ) { gen.push ( null , key.commitId ) ; return com.google.gitiles.blame.BlameCacheImpl.loadRegions ( gen ) ; } }
Source:
private void appendFileLine ( java.lang.StringBuilder cmts , com.google.gerrit.server.patch.PatchFile fileData , short side , int line ) { cmts.append ( ( "Line " + line ) ) ; try { final java.lang.String lineStr = fileData.getLine ( side , line ) ; cmts.append ( ": " ) ; cmts.append ( lineStr ) ; } catch ( java.lang.Throwable e ) { } cmts.append ( "\n" ) ; }

Target:
private void appendFileLine ( java.lang.StringBuilder cmts , com.google.gerrit.server.patch.PatchFile fileData , short side , int line ) { java.lang.String lineStr = getLine ( fileData , side , line ) ; cmts.append ( "Line " ) . append ( line ) . append ( ": " ) . append ( lineStr ) . append ( "\n" ) ; }
Source:
public void abandonReviewableChangeNotifyOwnersReviewers ( ) 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.api.changes.NotifyHandling.OWNER_REVIEWERS ) ; assertThat ( sender ) . sent ( "abandon" , sc ) . notTo ( sc.owner , sc.starrer ) . cc ( sc.reviewer , sc.ccer ) . to ( sc.reviewerByEmail ) . cc ( sc.ccerByEmail ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; }

Target:
public void abandonReviewableChangeNotifyOwnersReviewers ( ) 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.api.changes.NotifyHandling.OWNER_REVIEWERS ) ; assertThat ( sender ) . sent ( "abandon" , sc ) . notTo ( sc.owner , sc.starrer ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; }
Source:
protected void configure ( ) { factory ( EditCommitMessageHandler.Factory.class ) ; factory ( RebaseChangeHandler.Factory.class ) ; factory ( ChangeDetailFactory.Factory.class ) ; factory ( PatchSetDetailFactory.Factory.class ) ; factory ( PatchSetPublishDetailFactory.Factory.class ) ; factory ( PublishAction.Factory.class ) ; factory ( DeleteDraftChange.Factory.class ) ; }

Target:
protected void configure ( ) { factory ( PatchSetDetailFactory.Factory.class ) ; }
Source:
public boolean isValid ( ) { return ( ( ( ( ( ( startLine ) >= 0 ) && ( ( startCharacter ) >= 0 ) ) && ( ( endLine ) >= 0 ) ) && ( ( endCharacter ) >= 0 ) ) && ( ( startLine ) <= ( endLine ) ) ) && ( ( ( startLine ) != ( endLine ) ) || ( ( startCharacter ) <= ( endCharacter ) ) ) ; }

Target:
public boolean isValid ( ) { return ( ( ( ( ( ( startLine ) > 0 ) && ( ( startCharacter ) >= 0 ) ) && ( ( endLine ) > 0 ) ) && ( ( endCharacter ) >= 0 ) ) && ( ( startLine ) <= ( endLine ) ) ) && ( ( ( startLine ) != ( endLine ) ) || ( ( startCharacter ) <= ( endCharacter ) ) ) ; }
Source:
public void addGroupMember ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.AccountGroup.UUID groupUuid , com.google.gerrit.reviewdb.client.Account.Id accountId ) throws com.google.gwtorm.server.OrmException , java.io.IOException { java.util.Optional < com.google.gerrit.reviewdb.client.AccountGroup > foundGroup = groups.get ( db , groupUuid ) ; if ( ! ( foundGroup.isPresent ( ) ) ) { return ; } com.google.gerrit.reviewdb.client.AccountGroup group = foundGroup.get ( ) ; addGroupMembers ( db , group , com.google.common.collect.ImmutableSet.of ( accountId ) ) ; }

Target:
public void addGroupMember ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.AccountGroup.UUID groupUuid , com.google.gerrit.reviewdb.client.Account.Id accountId ) throws com.google.gwtorm.server.OrmException , java.io.IOException { addGroupMembers ( db , groupUuid , com.google.common.collect.ImmutableSet.of ( accountId ) ) ; }
Source:
public com.google.gerrit.extensions.client.GeneralPreferencesInfo loadChangeTableColumns ( com.google.gerrit.extensions.client.GeneralPreferencesInfo r , com.google.gerrit.server.account.VersionedAccountPreferences v , com.google.gerrit.server.account.VersionedAccountPreferences d ) { r.changeTable = com.google.gerrit.server.account.GeneralPreferencesLoader.changeTable ( v ) ; org.eclipse.jgit.lib.Config cfg = v.getConfig ( ) ; if ( ( r.changeTable.isEmpty ( ) ) && ( ! ( v.isDefaults ( ) ) ) ) { r.changeTable = com.google.gerrit.server.account.GeneralPreferencesLoader.changeTable ( d ) ; } return r ; }

Target:
public com.google.gerrit.extensions.client.GeneralPreferencesInfo loadChangeTableColumns ( com.google.gerrit.extensions.client.GeneralPreferencesInfo r , com.google.gerrit.server.account.VersionedAccountPreferences v , com.google.gerrit.server.account.VersionedAccountPreferences d ) { r.changeTable = com.google.gerrit.server.account.GeneralPreferencesLoader.changeTable ( v ) ; if ( ( r.changeTable.isEmpty ( ) ) && ( ! ( v.isDefaults ( ) ) ) ) { r.changeTable = com.google.gerrit.server.account.GeneralPreferencesLoader.changeTable ( d ) ; } return r ; }
Source:
private boolean isVisibleTo ( com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.server.CurrentUser user , com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.server.project.ProjectState pe = projectCache.get ( change.getProject ( ) ) ; if ( pe == null ) { return false ; } com.google.gerrit.server.project.ProjectControl pc = pe.controlFor ( user ) ; return pc.controlFor ( change ) . isVisible ( db ) ; }

Target:
private boolean isVisibleTo ( com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.server.CurrentUser user , com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.server.project.ProjectState pe = projectCache.get ( change.getProject ( ) ) ; if ( pe == null ) { return false ; } com.google.gerrit.server.project.ProjectControl pc = pe.controlFor ( user ) ; return pc.controlFor ( db , change ) . isVisible ( db ) ; }
Source:
private net.codemirror.lib.Configuration getConfig ( ) { return net.codemirror.lib.Configuration.create ( ) . set ( "readOnly" , false ) . set ( "cursorBlinkRate" , 0 ) . set ( "cursorHeight" , 0.85 ) . set ( "lineNumbers" , true ) . set ( "tabSize" , 4 ) . set ( "lineWrapping" , false ) . set ( "styleSelectedText" , true ) . set ( "showTrailingSpace" , true ) . set ( "keyMap" , "default" ) . set ( "mode" , net.codemirror.lib.ModeInjector.getContentType ( type ) ) ; }

Target:
private net.codemirror.lib.Configuration getConfig ( ) { return net.codemirror.lib.Configuration.create ( ) . set ( "readOnly" , false ) . set ( "cursorBlinkRate" , 0 ) . set ( "cursorHeight" , 0.85 ) . set ( "lineNumbers" , true ) . set ( "tabSize" , 4 ) . set ( "lineWrapping" , false ) . set ( "styleSelectedText" , true ) . set ( "showTrailingSpace" , true ) . set ( "keyMap" , "default" ) . set ( "mode" , type ) ; }
Source:
public boolean canRebase ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { return ( ( ( isOwner ( ) ) || ( getRefControl ( ) . canSubmit ( ) ) ) || ( getRefControl ( ) . canRebase ( ) ) ) && ( ! ( isPatchSetLocked ( db ) ) ) ; }

Target:
public boolean canRebase ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { return ( ( ( isOwner ( ) ) || ( getRefControl ( ) . canSubmit ( isOwner ( ) ) ) ) || ( getRefControl ( ) . canRebase ( ) ) ) && ( ! ( isPatchSetLocked ( db ) ) ) ; }