auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRelativeAlternateLocation ( ) { configMock = org.easymock.EasyMock.createNiceMock ( com.google.gerrit.server.config.RepositoryConfig.class ) ; org.easymock.EasyMock.expect ( configMock.getAllBasePaths ( ) ) . andReturn ( java.util.Arrays.asList ( java.nio.file.Paths.get ( "repos" ) ) ) . anyTimes ( ) ; org.easymock.EasyMock.replay ( configMock ) ; repoManager = new com.google.gerrit.server.git.MultiBaseLocalDiskRepositoryManager ( site , cfg , org.easymock.EasyMock.createNiceMock ( com.google.gerrit.server.notedb.NotesMigration.class ) , configMock ) ; }

Target:
public void testRelativeAlternateLocation ( ) { configMock = org.easymock.EasyMock.createNiceMock ( com.google.gerrit.server.config.RepositoryConfig.class ) ; org.easymock.EasyMock.expect ( configMock.getAllBasePaths ( ) ) . andReturn ( java.util.Arrays.asList ( java.nio.file.Paths.get ( "repos" ) ) ) . anyTimes ( ) ; org.easymock.EasyMock.replay ( configMock ) ; repoManager = new com.google.gerrit.server.git.MultiBaseLocalDiskRepositoryManager ( site , cfg , configMock ) ; }
Source:
public com.google.gerrit.server.CurrentUser getCurrentUser ( ) { final com.google.gerrit.server.CurrentUser user = session.getCurrentUser ( ) ; if ( user instanceof com.google.gerrit.server.IdentifiedUser ) { return userFactory.create ( user.getAccessPath ( ) , ( ( com.google.gerrit.server.IdentifiedUser ) ( user ) ) . getAccountId ( ) ) ; } return user ; }

Target:
public com.google.gerrit.server.CurrentUser getCurrentUser ( ) { final com.google.gerrit.server.CurrentUser user = session.getCurrentUser ( ) ; if ( user instanceof com.google.gerrit.server.IdentifiedUser ) { return userFactory.create ( ( ( com.google.gerrit.server.IdentifiedUser ) ( user ) ) . getAccountId ( ) ) ; } return user ; }
Source:
public com.googlesource.gerrit.plugins.github.oauth.OAuthProtocol.Scope [ ] getDefaultScopes ( ) { if ( ( ( scopes ) == null ) || ( ( scopes.get ( "scopes" ) ) == null ) ) { return new com.googlesource.gerrit.plugins.github.oauth.OAuthProtocol.Scope [ 0 ] ; } else { return scopes.get ( "scopes" ) . toArray ( new com.googlesource.gerrit.plugins.github.oauth.OAuthProtocol.Scope [ 0 ] ) ; } }

Target:
public com.googlesource.gerrit.plugins.github.oauth.OAuthProtocol.Scope [ ] getDefaultScopes ( ) { if ( ( ( scopes ) == null ) || ( ( scopes.get ( "scopes" ) ) == null ) ) { return new com.googlesource.gerrit.plugins.github.oauth.OAuthProtocol.Scope [ 0 ] ; } return scopes.get ( "scopes" ) . toArray ( new com.googlesource.gerrit.plugins.github.oauth.OAuthProtocol.Scope [ 0 ] ) ; }
Source:
public com.google.gerrit.reviewdb.client.Change reloadChange ( ) throws com.google.gwtorm.server.OrmException { if ( ( project ) == null ) { notes = notesFactory.createFromIdOnlyWhenNoteDbDisabled ( db , legacyId ) ; } else { notes = notesFactory.create ( db , project , legacyId ) ; } change = notes.getChange ( ) ; if ( ( change ) == null ) { throw new com.google.gwtorm.server.OrmException ( ( "Unable to load change " + ( legacyId ) ) ) ; } setPatchSets ( null ) ; return change ; }

Target:
public com.google.gerrit.reviewdb.client.Change reloadChange ( ) throws com.google.gwtorm.server.OrmException { notes = notesFactory.create ( db , project , legacyId ) ; change = notes.getChange ( ) ; if ( ( change ) == null ) { throw new com.google.gwtorm.server.OrmException ( ( "Unable to load change " + ( legacyId ) ) ) ; } setPatchSets ( null ) ; return change ; }
Source:
public void testReadString ( ) throws java.io.IOException { assertNull ( com.google.gerrit.server.ioutil.BasicSerialization.readString ( com.google.gerrit.server.ioutil.BasicSerializationTest.r ( com.google.gerrit.server.ioutil.BasicSerializationTest.b ( 0 ) ) ) ) ; assertEquals ( "a" , com.google.gerrit.server.ioutil.BasicSerialization.readString ( com.google.gerrit.server.ioutil.BasicSerializationTest.r ( com.google.gerrit.server.ioutil.BasicSerializationTest.b ( 1 , 'a' ) ) ) ) ; assertEquals ( "coffee4" , com.google.gerrit.server.ioutil.BasicSerialization.readString ( com.google.gerrit.server.ioutil.BasicSerializationTest.r ( com.google.gerrit.server.ioutil.BasicSerializationTest.b ( 7 , 'c' , 'o' , 'f' , 'f' , 'e' , 'e' , '4' ) ) ) ) ; }

Target:
public void testReadString ( ) throws java.io.IOException { org.junit.Assert.assertNull ( com.google.gerrit.server.ioutil.BasicSerialization.readString ( com.google.gerrit.server.ioutil.BasicSerializationTest.r ( com.google.gerrit.server.ioutil.BasicSerializationTest.b ( 0 ) ) ) ) ; org.junit.Assert.assertEquals ( "a" , com.google.gerrit.server.ioutil.BasicSerialization.readString ( com.google.gerrit.server.ioutil.BasicSerializationTest.r ( com.google.gerrit.server.ioutil.BasicSerializationTest.b ( 1 , 'a' ) ) ) ) ; org.junit.Assert.assertEquals ( "coffee4" , com.google.gerrit.server.ioutil.BasicSerialization.readString ( com.google.gerrit.server.ioutil.BasicSerializationTest.r ( com.google.gerrit.server.ioutil.BasicSerializationTest.b ( 7 , 'c' , 'o' , 'f' , 'f' , 'e' , 'e' , '4' ) ) ) ) ; }
Source:
private void updateSuperProjects ( java.util.Collection < com.google.gerrit.reviewdb.client.Branch.NameKey > branches ) { logDebug ( "Updating superprojects" ) ; com.google.gerrit.server.git.SubmoduleOp subOp = subOpFactory.create ( orm ) ; try { subOp.updateSuperProjects ( branches ) ; logDebug ( "Updating superprojects done" ) ; } catch ( com.google.gerrit.server.git.SubmoduleException e ) { logError ( ( "The gitlinks were not updated according to the " + "subscriptions" ) , e ) ; } }

Target:
private void updateSuperProjects ( java.util.Collection < com.google.gerrit.reviewdb.client.Branch.NameKey > branches ) { logDebug ( "Updating superprojects" ) ; com.google.gerrit.server.git.SubmoduleOp subOp = subOpFactory.create ( branches , orm ) ; try { subOp.updateSuperProjects ( ) ; logDebug ( "Updating superprojects done" ) ; } catch ( com.google.gerrit.server.git.SubmoduleException e ) { logError ( ( "The gitlinks were not updated according to the " + "subscriptions" ) , e ) ; } }
Source:
private < V , K > com.google.gerrit.server.cache.h2.H2CacheImpl.SqlStore < K , V > newSqlStore ( java.lang.String name , com.google.inject.TypeLiteral < K > keyType , long maxSize ) { java.io.File db = new java.io.File ( cacheDir , name ) . getAbsoluteFile ( ) ; java.lang.String url = "jdbc:h2:" + ( db.toURI ( ) . toString ( ) ) ; return new com.google.gerrit.server.cache.h2.H2CacheImpl.SqlStore < K , V > ( url , keyType , maxSize ) ; }

Target:
private < V , K > com.google.gerrit.server.cache.h2.H2CacheImpl.SqlStore < K , V > newSqlStore ( java.lang.String name , com.google.inject.TypeLiteral < K > keyType , long maxSize ) { java.io.File db = new java.io.File ( cacheDir , name ) . getAbsoluteFile ( ) ; java.lang.String url = "jdbc:h2:" + ( db.toURI ( ) . toString ( ) ) ; return new com.google.gerrit.server.cache.h2.H2CacheImpl.SqlStore ( url , keyType , maxSize ) ; }
Source:
private static java.lang.String getUserPreference ( ) { if ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) { com.google.gerrit.reviewdb.client.AccountGeneralPreferences.DownloadScheme pref = com.google.gerrit.client.Gerrit.getUserAccount ( ) . getGeneralPreferences ( ) . getDownloadUrl ( ) ; if ( pref != null ) { switch ( pref ) { case ANON_GIT : return "git" ; case HTTP : case ANON_HTTP : return "http" ; case SSH : case ANON_SSH : return "ssh" ; default : return null ; } } } return null ; }

Target:
private static java.lang.String getUserPreference ( ) { if ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) { com.google.gerrit.reviewdb.client.AccountGeneralPreferences.DownloadScheme pref = com.google.gerrit.client.Gerrit.getUserAccount ( ) . getGeneralPreferences ( ) . getDownloadUrl ( ) ; if ( pref != null ) { switch ( pref ) { case ANON_GIT : return "git" ; case HTTP : case ANON_HTTP : return "http" ; case SSH : return "ssh" ; default : return null ; } } } return null ; }
Source:
private com.google.inject.Injector createDbInjector ( ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( new com.google.gerrit.lifecycle.LifecycleModule ( ) { @ java.lang.Override protected void configure ( ) { bind ( com.google.inject.Key.get ( javax.sql.DataSource.class , com.google.inject.name.Names.named ( "ReviewDb" ) ) ) . toProvider ( com.google.gerrit.httpd.ReviewDbDataSourceProvider.class ) . in ( com.google.inject.Scopes.SINGLETON ) ; listener ( ) . to ( com.google.gerrit.httpd.ReviewDbDataSourceProvider.class ) ; } } ) ; modules.add ( new com.google.gerrit.server.config.DatabaseModule ( ) ) ; return com.google.inject.Guice.createInjector ( com.google.inject.Stage.PRODUCTION , modules ) ; }

Target:
protected void configure ( ) { bind ( com.google.inject.Key.get ( javax.sql.DataSource.class , com.google.inject.name.Names.named ( "ReviewDb" ) ) ) . toProvider ( com.google.gerrit.httpd.ReviewDbDataSourceProvider.class ) . in ( com.google.inject.Scopes.SINGLETON ) ; listener ( ) . to ( com.google.gerrit.httpd.ReviewDbDataSourceProvider.class ) ; }
Source:
public org.apache.sshd.common.file.FileSystemView createFileSystemView ( org.apache.sshd.common.Session session ) throws java.io.IOException { return new org.apache.sshd.common.file.FileSystemView ( ) { @ java.lang.Override public org.apache.sshd.common.file.SshFile getFile ( org.apache.sshd.common.file.SshFile baseDir , java.lang.String file ) { return null ; } @ java.lang.Override public org.apache.sshd.common.file.SshFile getFile ( java.lang.String file ) { return null ; } @ java.lang.Override public org.apache.sshd.common.file.FileSystemView getNormalizedView ( ) { return this ; } } ; }

Target:
public void close ( ) throws java.io.IOException { }
Source:
public void doImport ( org.eclipse.jgit.lib.ProgressMonitor progress ) throws java.lang.Exception { progress.beginTask ( "Setting up Gerrit replication" , 2 ) ; java.lang.String repositoryName = ( ( getOrganisation ( ) ) + "/" ) + ( getRepositoryName ( ) ) ; progress.update ( 1 ) ; replicationConfig.addSecureCredentials ( getOrganisation ( ) , authUsername , authToken ) ; progress.update ( 1 ) ; replicationConfig.addReplicationRemote ( getOrganisation ( ) , ( ( gitHubUrl ) + "/${name}.git" ) , repositoryName ) ; progress.endTask ( ) ; }

Target:
public void doImport ( org.eclipse.jgit.lib.ProgressMonitor progress ) throws java.lang.Exception { progress.beginTask ( "Setting up Gerrit replication" , 2 ) ; java.lang.String repositoryName = ( ( getOrganisation ( ) ) + "/" ) + ( getRepositoryName ( ) ) ; progress.update ( 1 ) ; replicationConfig.addSecureCredentials ( authUsername , authToken ) ; progress.update ( 1 ) ; replicationConfig.addReplicationRemote ( authUsername , ( ( gitHubUrl ) + "/${name}.git" ) , repositoryName ) ; progress.endTask ( ) ; }
Source:
public void close ( ) { newTree = null ; if ( ( inserter ) != null ) { inserter.release ( ) ; inserter = null ; } if ( ( reader ) != null ) { reader.release ( ) ; reader = null ; } }

Target:
public void close ( ) { newTree = null ; rw.close ( ) ; if ( ( inserter ) != null ) { inserter.close ( ) ; inserter = null ; } if ( ( reader ) != null ) { reader.close ( ) ; reader = null ; } }
Source:
public void defaultMessage ( ) throws com.google.gerrit.extensions.restapi.RestApiException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { java.lang.String changeId = createChange ( ) ; com.google.gerrit.extensions.common.ChangeInfo c = getChangeAll ( ( "p~master~" + changeId ) ) ; org.junit.Assert.assertNotNull ( c.messages ) ; org.junit.Assert.assertEquals ( 1 , c.messages.size ( ) ) ; org.junit.Assert.assertEquals ( "Uploaded patch set 1." , c.messages.iterator ( ) . next ( ) . message ) ; }

Target:
public void defaultMessage ( ) throws com.google.gerrit.extensions.restapi.RestApiException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { java.lang.String changeId = createChange ( ) . getChangeId ( ) ; com.google.gerrit.extensions.common.ChangeInfo c = get ( changeId ) ; org.junit.Assert.assertNotNull ( c.messages ) ; org.junit.Assert.assertEquals ( 1 , c.messages.size ( ) ) ; org.junit.Assert.assertEquals ( "Uploaded patch set 1." , c.messages.iterator ( ) . next ( ) . message ) ; }
Source:
public void set ( com.google.gerrit.client.projects.ThemeInfo theme ) { set ( ( ( theme.css ( ) ) != null ? theme.css ( ) : cssText ) , ( ( theme.header ( ) ) != null ? theme.header ( ) : headerHtml ) , ( ( theme.footer ( ) ) != null ? theme.footer ( ) : footerHtml ) ) ; }

Target:
public void set ( com.google.gerrit.client.projects.ThemeInfo theme ) { if ( theme != null ) { set ( ( ( theme.css ( ) ) != null ? theme.css ( ) : cssText ) , ( ( theme.header ( ) ) != null ? theme.header ( ) : headerHtml ) , ( ( theme.footer ( ) ) != null ? theme.footer ( ) : footerHtml ) ) ; } else { set ( cssText , headerHtml , footerHtml ) ; } }
Source:
public void onShowView ( ) { super . onShowView ( ) ; if ( ( cmA ) != null ) { cmA.refresh ( ) ; } if ( ( cmB ) != null ) { cmB.refresh ( ) ; } com.google.gwt.user.client.Window.enableScrolling ( false ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { for ( com.google.gerrit.client.diff.CommentBox box : initialBoxes ) { box.resizePaddingWidget ( ) ; } } } ) ; }

Target:
public void onShowView ( ) { super . onShowView ( ) ; if ( ( cmA ) != null ) { cmA.refresh ( ) ; } if ( ( cmB ) != null ) { cmB.refresh ( ) ; } com.google.gwt.user.client.Window.enableScrolling ( false ) ; for ( com.google.gerrit.client.diff.CommentBox box : initialBoxes ) { box.resizePaddingWidget ( ) ; } }
Source:
private java.util.List < com.google.gerrit.extensions.common.WebLinkInfo > getFileWebLinks ( com.google.gerrit.reviewdb.client.Project project , java.lang.String rev , java.lang.String file ) { com.google.common.collect.FluentIterable < com.google.gerrit.extensions.common.WebLinkInfo > links = webLinks.getFileLinks ( project.getName ( ) , rev , file ) ; return links.isEmpty ( ) ? null : links.toList ( ) ; }

Target:
private java.util.List < com.google.gerrit.extensions.common.WebLinkInfo > getFileWebLinks ( com.google.gerrit.reviewdb.client.Project project , java.lang.String rev , java.lang.String file ) { java.util.List < com.google.gerrit.extensions.common.WebLinkInfo > links = webLinks.getFileLinks ( project.getName ( ) , rev , file ) ; return links.isEmpty ( ) ? null : links ; }
Source:
public void byAfter ( ) throws java.lang.Exception { com.google.gerrit.testutil.TestTimeUtil.resetWithClockStep ( 30 , java.util.concurrent.TimeUnit.HOURS ) ; org.eclipse.jgit.junit.TestRepository < com.google.gerrit.testutil.InMemoryRepositoryManager.Repo > repo = createProject ( "repo" ) ; com.google.gerrit.reviewdb.client.Change change1 = insert ( newChange ( repo ) ) ; com.google.gerrit.reviewdb.client.Change change2 = insert ( newChange ( repo ) ) ; com.google.gerrit.testutil.TestTimeUtil.setClockStep ( 0 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; assertQuery ( "after:2009-10-03" ) ; assertQuery ( "after:\"2009-10-01 20:59:59 -0400\"" , change2 ) ; assertQuery ( "after:\"2009-10-01 20:59:59 -0000\"" , change2 ) ; assertQuery ( "after:2009-10-01" , change2 ) ; assertQuery ( "after:2009-09-30" , change2 , change1 ) ; }

Target:
public void byAfter ( ) throws java.lang.Exception { com.google.gerrit.testutil.TestTimeUtil.resetWithClockStep ( 30 , java.util.concurrent.TimeUnit.HOURS ) ; org.eclipse.jgit.junit.TestRepository < com.google.gerrit.testutil.InMemoryRepositoryManager.Repo > repo = createProject ( "repo" ) ; com.google.gerrit.reviewdb.client.Change change1 = insert ( repo , newChange ( repo ) ) ; com.google.gerrit.reviewdb.client.Change change2 = insert ( repo , newChange ( repo ) ) ; com.google.gerrit.testutil.TestTimeUtil.setClockStep ( 0 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; assertQuery ( "after:2009-10-03" ) ; assertQuery ( "after:\"2009-10-01 20:59:59 -0400\"" , change2 ) ; assertQuery ( "after:\"2009-10-01 20:59:59 -0000\"" , change2 ) ; assertQuery ( "after:2009-10-01" , change2 ) ; assertQuery ( "after:2009-09-30" , change2 , change1 ) ; }
Source:
public com.google.gerrit.server.patch.IntraLineDiff getIntraLineDiff ( com.google.gerrit.server.patch.IntraLineDiffKey key , com.google.gerrit.server.patch.IntraLineDiffArgs args ) { if ( computeIntraline ) { try { return intraCache.get ( key , intraLoaderFactory.create ( key , args ) ) ; } catch ( java.util.concurrent.ExecutionException | org.eclipse.jgit.errors.LargeObjectException e ) { IntraLineLoader.log.warn ( ( "Error computing " + key ) , e ) ; return new com.google.gerrit.server.patch.IntraLineDiff ( IntraLineDiff.Status.ERROR ) ; } } else { return new com.google.gerrit.server.patch.IntraLineDiff ( IntraLineDiff.Status.DISABLED ) ; } }

Target:
public com.google.gerrit.server.patch.IntraLineDiff getIntraLineDiff ( com.google.gerrit.server.patch.IntraLineDiffKey key , com.google.gerrit.server.patch.IntraLineDiffArgs args ) { if ( computeIntraline ) { try { return intraCache.get ( key , intraLoaderFactory.create ( key , args ) ) ; } catch ( java.util.concurrent.ExecutionException | org.eclipse.jgit.errors.LargeObjectException e ) { IntraLineLoader.log.warn ( ( "Error computing " + key ) , e ) ; return new com.google.gerrit.server.patch.IntraLineDiff ( IntraLineDiff.Status.ERROR ) ; } } return new com.google.gerrit.server.patch.IntraLineDiff ( IntraLineDiff.Status.DISABLED ) ; }
Source:
public void deleteBranch_Forbidden ( ) throws java.lang.Exception { com.google.gerrit.acceptance.RestResponse r = userSession.delete ( ( ( ( "/projects/" + ( project.get ( ) ) ) + "/branches/" ) + ( branch.getShortName ( ) ) ) ) ; org.junit.Assert.assertEquals ( HttpStatus.SC_FORBIDDEN , r.getStatusCode ( ) ) ; r.consume ( ) ; }

Target:
public void deleteBranch_Forbidden ( ) throws java.lang.Exception { com.google.gerrit.acceptance.RestResponse r = userSession.delete ( ( ( ( "/projects/" + ( project.get ( ) ) ) + "/branches/" ) + ( branch.getShortName ( ) ) ) ) ; com.google.common.truth.Truth.assertThat ( r.getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_FORBIDDEN ) ; r.consume ( ) ; }
Source:
private void assertReviewers ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.acceptance.TestAccount ... expectedReviewers ) throws com.google.gwtorm.server.OrmException { java.lang.Iterable < com.google.gerrit.reviewdb.client.Account.Id > actualIds = approvalsUtil.getReviewers ( db , notesFactory.create ( db , c ) ) . values ( ) ; com.google.common.truth.Truth.assertThat ( actualIds ) . containsExactlyElementsIn ( com.google.common.collect.Sets.newHashSet ( com.google.gerrit.acceptance.TestAccount.ids ( expectedReviewers ) ) ) ; }

Target:
private void assertReviewers ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.acceptance.TestAccount ... expectedReviewers ) throws com.google.gwtorm.server.OrmException { java.lang.Iterable < com.google.gerrit.reviewdb.client.Account.Id > actualIds = approvalsUtil.getReviewers ( db , notesFactory.create ( db , c.getProject ( ) , c.getId ( ) ) ) . values ( ) ; com.google.common.truth.Truth.assertThat ( actualIds ) . containsExactlyElementsIn ( com.google.common.collect.Sets.newHashSet ( com.google.gerrit.acceptance.TestAccount.ids ( expectedReviewers ) ) ) ; }
Source:
private java.util.List < com.google.gerrit.server.data.ChangeAttribute > executeSuccessfulQuery ( java.lang.String params ) throws java.lang.Exception { HEAD ( 414 ) ; aa2 ( "Add schema and index definitions for accounts index" ) ; java.lang.String rawResponse = adminSshSession.exec ( ( "gerrit query --format=JSON " + params ) ) ; com.google.common.truth.Truth.assert_ ( ) . withFailureMessage ( adminSshSession.getError ( ) ) . that ( adminSshSession.hasError ( ) ) . isFalse ( ) ; return com.google.gerrit.acceptance.ssh.QueryIT.getChanges ( rawResponse ) ; return executeSuccessfulQuery ( params , sshSession ) ; BRANCH ( d57655 ) ; }

Target:
private java.util.List < com.google.gerrit.server.data.ChangeAttribute > executeSuccessfulQuery ( java.lang.String params ) throws java.lang.Exception { return executeSuccessfulQuery ( params , adminSshSession ) ; }
Source:
public void testPreformat2 ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.html ( "A\n\n This is pre\n formatted\n\nbut this is not" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.wikify ( ) ; assertNotSame ( o , n ) ; assertEquals ( ( ( ( ( ( "<p>A</p>" + "<p>" ) + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " This is pre" ) ) ) + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " formatted" ) ) ) + "</p>" ) + "<p>but this is not</p>" ) , n.asString ( ) ) ; }

Target:
public void testPreformat2 ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.html ( "A\n\n This is pre\n formatted\n\nbut this is not" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.wikify ( ) ; org.junit.Assert.assertNotSame ( o , n ) ; org.junit.Assert.assertEquals ( ( ( ( ( ( "<p>A</p>" + "<p>" ) + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " This is pre" ) ) ) + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " formatted" ) ) ) + "</p>" ) + "<p>but this is not</p>" ) , n.asString ( ) ) ; }
Source:
public void emptyExceptSubject ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Change c = newChange ( ) ; com.google.gerrit.server.notedb.ChangeUpdate update = newUpdate ( c , changeOwner ) ; update.commit ( ) ; org.junit.Assert.assertNull ( update.getRevision ( ) ) ; update = newUpdate ( c , changeOwner ) ; update.setSubject ( "Create change" ) ; update.commit ( ) ; org.junit.Assert.assertNotNull ( update.getRevision ( ) ) ; }

Target:
public void emptyExceptSubject ( ) throws java.lang.Exception { com.google.gerrit.server.notedb.ChangeUpdate update = newUpdate ( newChange ( ) , changeOwner ) ; update.setSubject ( "Create change" ) ; update.commit ( ) ; org.junit.Assert.assertNotNull ( update.getRevision ( ) ) ; }
Source:
public static com.google.gerrit.common.data.GroupReference findExactSuggestion ( com.google.gerrit.server.account.GroupBackend groupBackend , java.lang.String name ) { java.util.Collection < com.google.gerrit.common.data.GroupReference > refs = groupBackend.suggest ( name ) ; for ( com.google.gerrit.common.data.GroupReference ref : refs ) { if ( com.google.gerrit.server.account.GroupBackends.isExactSuggestion ( ref , name ) ) { return ref ; } } return null ; }

Target:
public static com.google.gerrit.common.data.GroupReference findExactSuggestion ( com.google.gerrit.server.account.GroupBackend groupBackend , java.lang.String name ) { return com.google.gerrit.server.account.GroupBackends.findExactSuggestion ( groupBackend , name , null ) ; }
Source:
public boolean canAddPatchSet ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { if ( ( ( ! ( getRefControl ( ) . canUpload ( ) ) ) || ( isPatchSetLocked ( db ) ) ) || ( ! ( isPatchVisible ( patchSetUtil.current ( db , notes ) , db ) ) ) ) { return false ; } if ( isOwner ( ) ) { return true ; } return getRefControl ( ) . canAddPatchSet ( ) ; }

Target:
private boolean canAddPatchSet ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { if ( ( ( ! ( getRefControl ( ) . canUpload ( ) ) ) || ( isPatchSetLocked ( db ) ) ) || ( ! ( isPatchVisible ( patchSetUtil.current ( db , notes ) , db ) ) ) ) { return false ; } if ( isOwner ( ) ) { return true ; } return getRefControl ( ) . canAddPatchSet ( ) ; }
Source:
private org.eclipse.jgit.revwalk.RevObject resolve ( java.lang.String name , org.eclipse.jgit.revwalk.RevWalk walk ) throws java.io.IOException { try { org.eclipse.jgit.lib.ObjectId id = repo.resolve ( name ) ; return id != null ? walk.parseAny ( id ) : null ; } catch ( org.eclipse.jgit.errors.AmbiguousObjectException e ) { return null ; } catch ( org.eclipse.jgit.errors.RevisionSyntaxException e ) { return null ; } catch ( org.eclipse.jgit.errors.MissingObjectException e ) { return null ; } }

Target:
private org.eclipse.jgit.revwalk.RevObject resolve ( java.lang.String name , org.eclipse.jgit.revwalk.RevWalk walk ) throws java.io.IOException { try { org.eclipse.jgit.lib.ObjectId id = repo.resolve ( name ) ; return id != null ? walk.parseAny ( id ) : null ; } catch ( org.eclipse.jgit.errors.AmbiguousObjectException e ) { return null ; } catch ( org.eclipse.jgit.errors.RevisionSyntaxException | org.eclipse.jgit.errors.MissingObjectException e ) { return null ; } }
Source:
public void checkTrustChainWithExpiredKey ( ) throws java.lang.Exception { com.google.gerrit.gpg.testutil.TestKey keyA = add ( com.google.gerrit.gpg.testutil.TestTrustKeys.keyA ( ) , user ) ; com.google.gerrit.gpg.testutil.TestKey keyB = add ( com.google.gerrit.gpg.testutil.TestTrustKeys.keyB ( ) , addUser ( "userB" ) ) ; com.google.gerrit.gpg.PublicKeyChecker checker = checkerFactory.create ( ) . setExpectedUser ( user ) . setStore ( store ) ; assertProblems ( checker.check ( keyA.getPublicKey ( ) ) , Status.OK , "No path to a trusted key" , ( ( "Certification by " + ( com.google.gerrit.gpg.PublicKeyStore.keyToString ( keyB.getPublicKey ( ) ) ) ) + " is valid, but key is not trusted" ) , "Key D24FE467 used for certification is not in store" ) ; }

Target:
public void checkTrustChainWithExpiredKey ( ) throws java.lang.Exception { com.google.gerrit.gpg.testutil.TestKey keyA = add ( com.google.gerrit.gpg.testutil.TestTrustKeys.keyA ( ) , user ) ; com.google.gerrit.gpg.testutil.TestKey keyB = add ( com.google.gerrit.gpg.testutil.TestTrustKeys.keyB ( ) , addUser ( "userB" ) ) ; com.google.gerrit.gpg.PublicKeyChecker checker = checkerFactory.create ( user , store ) ; assertProblems ( checker.check ( keyA.getPublicKey ( ) ) , Status.OK , "No path to a trusted key" , ( ( "Certification by " + ( com.google.gerrit.gpg.PublicKeyStore.keyToString ( keyB.getPublicKey ( ) ) ) ) + " is valid, but key is not trusted" ) , "Key D24FE467 used for certification is not in store" ) ; }
Source:
private java.lang.String getHtml ( java.lang.String formatterName , com.googlesource.gerrit.plugins.xdocs.formatter.StreamFormatter f , org.eclipse.jgit.lib.Repository repo , org.eclipse.jgit.lib.ObjectLoader loader , com.google.gerrit.reviewdb.client.Project.NameKey project , org.eclipse.jgit.lib.ObjectId revId ) throws java.io.IOException { try ( java.io.InputStream raw = loader.openStream ( ) ) { return ( ( com.googlesource.gerrit.plugins.xdocs.formatter.StreamFormatter ) ( f ) ) . format ( project.get ( ) , com.googlesource.gerrit.plugins.xdocs.XDocLoader.getAbbrRevId ( repo , revId ) , getFormatterConfig ( formatterName ) , raw ) ; } }

Target:
private java.lang.String getHtml ( java.lang.String formatterName , com.googlesource.gerrit.plugins.xdocs.formatter.StreamFormatter f , org.eclipse.jgit.lib.Repository repo , org.eclipse.jgit.lib.ObjectLoader loader , com.google.gerrit.reviewdb.client.Project.NameKey project , java.lang.String path , org.eclipse.jgit.lib.ObjectId revId ) throws java.io.IOException { try ( java.io.InputStream raw = loader.openStream ( ) ) { return ( ( com.googlesource.gerrit.plugins.xdocs.formatter.StreamFormatter ) ( f ) ) . format ( project.get ( ) , path , revId.getName ( ) , com.googlesource.gerrit.plugins.xdocs.XDocLoader.getAbbrRevId ( repo , revId ) , getFormatterConfig ( formatterName ) , raw ) ; } }
Source:
private void update ( ) { if ( ( ( currentCommand ) != null ) && ( ( currentUrl ) != null ) ) { currentCommand.setCurrentUrl ( currentUrl ) ; } else if ( ( ( currentCommand ) != null ) && ( currentCommand.getCmdType ( ) . equals ( DownloadCommand.REPO_DOWNLOAD ) ) ) { currentCommand.setCurrentUrl ( null ) ; } }

Target:
private void update ( ) { if ( ( ( currentCommand ) != null ) && ( ( currentUrl ) != null ) ) { currentCommand.setCurrentUrl ( currentUrl ) ; } }
Source:
public void remove ( final com.google.gerrit.reviewdb.client.Project p ) { listLock.lock ( ) ; try { java.util.SortedSet < com.google.gerrit.reviewdb.client.Project.NameKey > n = com.google.common.collect.Sets.newTreeSet ( list.get ( com.google.gerrit.server.project.ProjectCacheImpl.ListKey.ALL ) ) ; n.remove ( p.getNameKey ( ) ) ; list.put ( com.google.gerrit.server.project.ProjectCacheImpl.ListKey.ALL , java.util.Collections.unmodifiableSortedSet ( n ) ) ; } catch ( java.util.concurrent.ExecutionException e ) { com.google.gerrit.server.project.ProjectCacheImpl.log.warn ( "Cannot list avaliable projects" , e ) ; } finally { listLock.unlock ( ) ; } evict ( p ) ; }

Target:
public void remove ( final com.google.gerrit.reviewdb.client.Project p ) { remove ( p.getNameKey ( ) ) ; }
Source:
public void execute ( ) { com.google.gwt.user.client.Window.scrollTo ( 0 , 0 ) ; for ( int i = 0 ; i < ( labelsTable.getColumnCount ( ) ) ; i ++ ) { com.google.gwt.user.client.ui.RadioButton b = ( ( com.google.gwt.user.client.ui.RadioButton ) ( labelsTable.getWidget ( 1 , i ) ) ) ; if ( ( b != null ) && ( b.getValue ( ) ) ) { b.setFocus ( true ) ; break ; } } }

Target:
public void execute ( ) { com.google.gwt.user.client.Window.scrollTo ( 0 , 0 ) ; message.setFocus ( true ) ; }
Source:
public void onSuccess ( com.google.gerrit.client.diff.DiffInfo diffInfo ) { diff = diffInfo ; new net.codemirror.lib.ModeInjector ( ) . add ( com.google.gerrit.client.diff.SideBySide2.getContentType ( diff.meta_a ( ) ) ) . add ( com.google.gerrit.client.diff.SideBySide2.getContentType ( diff.meta_b ( ) ) ) . inject ( modeInjectorCb ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.diff.DiffInfo diffInfo ) { diff = diffInfo ; new net.codemirror.lib.ModeInjector ( ) . add ( getContentType ( diff.meta_a ( ) ) ) . add ( getContentType ( diff.meta_b ( ) ) ) . inject ( modeInjectorCb ) ; }
Source:
public void emptyContextPath ( ) { org.junit.Assert.assertEquals ( "/foo/bar" , com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( mockRequest ( "/s/foo/bar" , "" , "/s" ) ) ) ; org.junit.Assert.assertEquals ( "/foo%2Fbar" , com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( mockRequest ( "/s/foo%2Fbar" , "" , "/s" ) ) ) ; }

Target:
public void emptyContextPath ( ) { com.google.common.truth.Truth.assertThat ( com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( mockRequest ( "/s/foo/bar" , "" , "/s" ) ) ) . isEqualTo ( "/foo/bar" ) ; com.google.common.truth.Truth.assertThat ( com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( mockRequest ( "/s/foo%2Fbar" , "" , "/s" ) ) ) . isEqualTo ( "/foo%2Fbar" ) ; }
Source:
public void onLoad ( ) { if ( ( diffTable ) == null ) { initUI ( ) ; } super . onLoad ( ) ; PatchUtil.DETAIL_SVC.unifiedPatchDetail ( patchId , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.data.UnifiedPatchDetail > ( this ) { @ java.lang.Override protected void preDisplay ( final com.google.gerrit.client.data.UnifiedPatchDetail r ) { display ( r ) ; } } ) ; }

Target:
public void onLoad ( ) { super . onLoad ( ) ; PatchUtil.DETAIL_SVC.unifiedPatchDetail ( patchId , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.data.UnifiedPatchDetail > ( this ) { @ java.lang.Override protected void preDisplay ( final com.google.gerrit.client.data.UnifiedPatchDetail r ) { display ( r ) ; } } ) ; }
Source:
private static com.google.gerrit.server.query.change.LabelPredicate.Test op ( java.lang.String op ) { if ( "=" . equals ( op ) ) { return com.google.gerrit.server.query.change.LabelPredicate.Test.EQ ; } else if ( ">=" . equals ( op ) ) { return com.google.gerrit.server.query.change.LabelPredicate.Test.GT_EQ ; } else if ( "<=" . equals ( op ) ) { return com.google.gerrit.server.query.change.LabelPredicate.Test.LT_EQ ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported operation " + op ) ) ; } }

Target:
static com.google.gerrit.server.query.change.LabelPredicate.Test op ( java.lang.String op ) { if ( "=" . equals ( op ) ) { return com.google.gerrit.server.query.change.LabelPredicate.Test.EQ ; } else if ( ">=" . equals ( op ) ) { return com.google.gerrit.server.query.change.LabelPredicate.Test.GT_EQ ; } else if ( "<=" . equals ( op ) ) { return com.google.gerrit.server.query.change.LabelPredicate.Test.LT_EQ ; } else { throw new java.lang.IllegalArgumentException ( ( "Unsupported operation " + op ) ) ; } }
Source:
public void testCarriageReturn ( ) throws java.lang.Exception { org.eclipse.jgit.revwalk.RevCommit c = makeCommit ( ) ; com.googlesource.gerrit.plugins.uploadvalidator.InvalidLineEndingValidator validator = new com.googlesource.gerrit.plugins.uploadvalidator.InvalidLineEndingValidator ( null , new com.googlesource.gerrit.plugins.uploadvalidator.ContentTypeUtil ( com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.PATTERN_CACHE ) , null , null , null ) ; java.util.List < com.google.gerrit.server.git.validators.CommitValidationMessage > m = validator.performValidation ( repo , c , com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.EMPTY_PLUGIN_CONFIG ) ; com.google.common.truth.Truth.assertThat ( com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.transformMessages ( m ) ) . containsExactly ( "ERROR: found carriage return (CR) character in file: foo.txt" ) ; }

Target:
public void testCarriageReturn ( ) throws java.lang.Exception { try ( org.eclipse.jgit.revwalk.RevWalk rw = new org.eclipse.jgit.revwalk.RevWalk ( repo ) ) { org.eclipse.jgit.revwalk.RevCommit c = makeCommit ( rw ) ; com.googlesource.gerrit.plugins.uploadvalidator.InvalidLineEndingValidator validator = new com.googlesource.gerrit.plugins.uploadvalidator.InvalidLineEndingValidator ( null , new com.googlesource.gerrit.plugins.uploadvalidator.ContentTypeUtil ( com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.PATTERN_CACHE ) , null , null , null ) ; java.util.List < com.google.gerrit.server.git.validators.CommitValidationMessage > m = validator.performValidation ( repo , c , rw , com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.EMPTY_PLUGIN_CONFIG ) ; com.google.common.truth.Truth.assertThat ( com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.transformMessages ( m ) ) . containsExactly ( "ERROR: found carriage return (CR) character in file: foo.txt" ) ; } }
Source:
public void onLoad ( ) { super . onLoad ( ) ; if ( ( regFocus ) == null ) { regFocus = com.google.gwtexpui.globalkey.client.GlobalKey.addApplication ( new com.google.gwtexpui.globalkey.client.KeyCommand ( 0 , '/' , Gerrit.C.keySearch ( ) ) { @ java.lang.Override public void onKeyPress ( final com.google.gwt.event.dom.client.KeyPressEvent event ) { event.preventDefault ( ) ; searchBox.setFocus ( true ) ; searchBox.selectAll ( ) ; } } ) ; } }

Target:
protected void onLoad ( ) { super . onLoad ( ) ; if ( ( regFocus ) == null ) { regFocus = com.google.gwtexpui.globalkey.client.GlobalKey.addApplication ( new com.google.gwtexpui.globalkey.client.KeyCommand ( 0 , '/' , Gerrit.C.keySearch ( ) ) { @ java.lang.Override public void onKeyPress ( final com.google.gwt.event.dom.client.KeyPressEvent event ) { event.preventDefault ( ) ; searchBox.setFocus ( true ) ; searchBox.selectAll ( ) ; } } ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { mergeResults = com.google.common.collect.Maps.newHashMap ( ) ; com.google.gerrit.server.CurrentUser listenerUser = factory.create ( user.id ) ; source.addEventListener ( new com.google.gerrit.common.EventListener ( ) { @ java.lang.Override public void onEvent ( com.google.gerrit.server.events.Event event ) { if ( event instanceof com.google.gerrit.server.events.ChangeMergedEvent ) { com.google.gerrit.server.events.ChangeMergedEvent changeMergedEvent = ( ( com.google.gerrit.server.events.ChangeMergedEvent ) ( event ) ) ; mergeResults.put ( changeMergedEvent.change.number , changeMergedEvent.newRev ) ; } } } , listenerUser ) ; project = new com.google.gerrit.reviewdb.client.Project.NameKey ( "p2" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mergeResults = com.google.common.collect.Maps.newHashMap ( ) ; com.google.gerrit.server.CurrentUser listenerUser = factory.create ( user.id ) ; source.addEventListener ( new com.google.gerrit.common.EventListener ( ) { @ java.lang.Override public void onEvent ( com.google.gerrit.server.events.Event event ) { if ( event instanceof com.google.gerrit.server.events.ChangeMergedEvent ) { com.google.gerrit.server.events.ChangeMergedEvent changeMergedEvent = ( ( com.google.gerrit.server.events.ChangeMergedEvent ) ( event ) ) ; mergeResults.put ( changeMergedEvent.change.number , changeMergedEvent.newRev ) ; } } } , listenerUser ) ; }
Source:
public java.lang.String toString ( ) { if ( isError ( ) ) { return ( ( ( ( ( "Error AccessToken [error=" + ( error ) ) + ", error_description=" ) + ( errorDescription ) ) + ", error_uri=" ) + ( errorUri ) ) + "]" ; } else { return ( ( ( "AccessToken [access_token=" + ( accessToken ) ) + ", token_type=" ) + ( tokenType ) ) + "]" ; } }

Target:
public java.lang.String toString ( ) { if ( isError ( ) ) { return ( ( ( ( ( "Error AccessToken [error=" + ( error ) ) + ", error_description=" ) + ( errorDescription ) ) + ", error_uri=" ) + ( errorUri ) ) + "]" ; } return ( ( ( "AccessToken [access_token=" + ( accessToken ) ) + ", token_type=" ) + ( tokenType ) ) + "]" ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( other instanceof com.google.gerrit.extensions.restapi.IdString ) { return urlEncoded.equals ( ( ( com.google.gerrit.extensions.restapi.IdString ) ( other ) ) . urlEncoded ) ; } else if ( other instanceof java.lang.String ) { return urlEncoded.equals ( other ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object other ) { if ( other instanceof com.google.gerrit.extensions.restapi.IdString ) { return urlEncoded.equals ( ( ( com.google.gerrit.extensions.restapi.IdString ) ( other ) ) . urlEncoded ) ; } return false ; }
Source:
protected com.google.gerrit.server.notedb.ChangeUpdate newUpdate ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.server.IdentifiedUser user ) throws java.lang.Exception { com.google.gerrit.server.notedb.ChangeUpdate update = com.google.gerrit.testutil.TestChanges.newUpdate ( injector , repoManager , com.google.gerrit.server.notedb.AbstractChangeNotesTest.MIGRATION , c , allUsers , user ) ; try ( org.eclipse.jgit.lib.Repository repo = repoManager.openMetadataRepository ( c.getProject ( ) ) ) { update.load ( repo ) ; } return update ; }

Target:
protected com.google.gerrit.server.notedb.ChangeUpdate newUpdate ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.server.IdentifiedUser user ) throws java.lang.Exception { com.google.gerrit.server.notedb.ChangeUpdate update = com.google.gerrit.testutil.TestChanges.newUpdate ( injector , repoManager , com.google.gerrit.server.notedb.AbstractChangeNotesTest.MIGRATION , c , allUsers , user ) ; return update ; }
Source:
private static boolean needsSuperSerializer ( com.google.gwt.core.ext.typeinfo.JClassType type ) { com.google.gwt.core.ext.typeinfo.JClassType t = type.getSuperclass ( ) ; while ( ! ( java.lang.Object.class . getName ( ) . equals ( t.getQualifiedSourceName ( ) ) ) ) { if ( ( com.google.gwtjsonrpc.rebind.SerializerCreator.sortFields ( t ) . length ) > 0 ) { return true ; } t = type.getSuperclass ( ) ; } return false ; }

Target:
private static boolean needsSuperSerializer ( com.google.gwt.core.ext.typeinfo.JClassType type ) { com.google.gwt.core.ext.typeinfo.JClassType t = type.getSuperclass ( ) ; while ( ! ( java.lang.Object.class . getName ( ) . equals ( t.getQualifiedSourceName ( ) ) ) ) { if ( ( com.google.gwtjsonrpc.rebind.SerializerCreator.sortFields ( t ) . length ) > 0 ) { return true ; } t = t.getSuperclass ( ) ; } return false ; }
Source:
private static void export ( org.spearce.jgit.lib.RepositoryConfig config , java.sql.ResultSet rs ) throws java.sql.SQLException { com.google.gerrit.pgm.ConvertSystemConfig.sshd ( config , rs ) ; com.google.gerrit.pgm.ConvertSystemConfig.contactstore ( config , rs ) ; com.google.gerrit.pgm.ConvertSystemConfig.user ( config , rs ) ; }

Target:
private static void export ( org.spearce.jgit.lib.RepositoryConfig config , java.sql.ResultSet rs ) throws java.sql.SQLException { com.google.gerrit.pgm.ConvertSystemConfig.sshd ( config , rs ) ; com.google.gerrit.pgm.ConvertSystemConfig.contactstore ( config , rs ) ; com.google.gerrit.pgm.ConvertSystemConfig.user ( config , rs ) ; com.google.gerrit.pgm.ConvertSystemConfig.auth ( config , rs ) ; }
Source:
private org.eclipse.jgit.lib.Repository openRepository ( final com.google.gerrit.reviewdb.Change change ) { com.google.gerrit.reviewdb.Project.NameKey name = change.getProject ( ) ; try { return repoManager.openRepository ( name.get ( ) ) ; } catch ( org.eclipse.jgit.errors.RepositoryNotFoundException err ) { com.google.gerrit.common.ChangeHookRunner.log.warn ( ( "Cannot open repository " + ( name.get ( ) ) ) , err ) ; return null ; } }

Target:
private org.eclipse.jgit.lib.Repository openRepository ( final com.google.gerrit.reviewdb.Change change ) { return openRepository ( change.getProject ( ) ) ; }
Source:
public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo info ) { info.revisions ( ) . copyKeysIntoChildren ( "name" ) ; com.google.gwt.core.client.JsArray < com.google.gerrit.client.changes.ChangeInfo.RevisionInfo > list = info.revisions ( ) . values ( ) ; com.google.gerrit.client.changes.ChangeInfo.RevisionInfo.sortRevisionInfoByNumber ( list ) ; diffTable.setUpPatchSetNav ( list , diff ) ; header.setChangeInfo ( info ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo info ) { info.revisions ( ) . copyKeysIntoChildren ( "name" ) ; com.google.gwt.core.client.JsArray < com.google.gerrit.client.changes.ChangeInfo.RevisionInfo > list = info.revisions ( ) . values ( ) ; com.google.gerrit.client.changes.ChangeInfo.RevisionInfo.sortRevisionInfoByNumber ( list ) ; diffTable.set ( list , diff ) ; header.setChangeInfo ( info ) ; }
Source:
public static com.google.gerrit.server.query.change.ChangeData createForTest ( com.google.gerrit.reviewdb.client.Project.NameKey project , 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 , project , 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.Project.NameKey project , 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 , null , project , id ) ; cd.currentPatchSet = new com.google.gerrit.reviewdb.client.PatchSet ( new com.google.gerrit.reviewdb.client.PatchSet.Id ( id , currentPatchSetId ) ) ; return cd ; }
Source:
public void setUp ( ) throws java.lang.Exception { skipIfWin32Platform ( ) ; super . setUp ( ) ; final java.util.Date when = author.getWhen ( ) ; final java.util.TimeZone tz = author.getTimeZone ( ) ; author = new org.eclipse.jgit.lib.PersonIdent ( "J. Author" , "ja@example.com" ) ; author = new org.eclipse.jgit.lib.PersonIdent ( author , when , tz ) ; committer = new org.eclipse.jgit.lib.PersonIdent ( "J. Committer" , "jc@example.com" ) ; committer = new org.eclipse.jgit.lib.PersonIdent ( committer , when , tz ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; final java.util.Date when = author.getWhen ( ) ; final java.util.TimeZone tz = author.getTimeZone ( ) ; author = new org.eclipse.jgit.lib.PersonIdent ( "J. Author" , "ja@example.com" ) ; author = new org.eclipse.jgit.lib.PersonIdent ( author , when , tz ) ; committer = new org.eclipse.jgit.lib.PersonIdent ( "J. Committer" , "jc@example.com" ) ; committer = new org.eclipse.jgit.lib.PersonIdent ( committer , when , tz ) ; }
Source:
private void preMerge ( ) throws com.google.gerrit.server.git.MergeException , com.google.gwtorm.client.OrmException { openBranch ( ) ; validateChangeList ( ) ; mergeTip = branchTip ; switch ( destProject.getSubmitType ( ) ) { case CHERRY_PICK : cherryPickChanges ( ) ; break ; case FAST_FORWARD_ONLY : case MERGE_ALWAYS : case MERGE_IF_NECESSARY : default : reduceToMinimalMerge ( ) ; mergeTopics ( ) ; markCleanMerges ( ) ; break ; } }

Target:
private void preMerge ( ) throws com.google.gerrit.server.git.MergeException , com.google.gwtorm.server.OrmException { openBranch ( ) ; validateChangeList ( ) ; mergeTip = branchTip ; switch ( destProject.getSubmitType ( ) ) { case CHERRY_PICK : cherryPickChanges ( ) ; break ; case FAST_FORWARD_ONLY : case MERGE_ALWAYS : case MERGE_IF_NECESSARY : default : reduceToMinimalMerge ( ) ; mergeTopics ( ) ; markCleanMerges ( ) ; break ; } }
Source:
private void setDestProject ( ) throws com.google.gerrit.server.git.MergeException { final com.google.gerrit.server.project.ProjectState pe = projectCache.get ( destBranch.getParentKey ( ) ) ; if ( pe == null ) { throw new com.google.gerrit.server.git.MergeException ( ( "No such project: " + ( destBranch.getParentKey ( ) ) ) ) ; } destProject = pe.getProject ( ) ; }

Target:
private void setDestProject ( ) throws com.google.gerrit.server.git.MergeException { destProject = projectCache.get ( destBranch.getParentKey ( ) ) ; if ( ( destProject ) == null ) { throw new com.google.gerrit.server.git.MergeException ( ( "No such project: " + ( destBranch.getParentKey ( ) ) ) ) ; } }
Source:
protected void configure ( ) { bind ( com.google.gerrit.extensions.api.GerritApi.class ) . to ( com.google.gerrit.server.api.GerritApiImpl.class ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.extensions.api.GerritApi.class ) . to ( com.google.gerrit.server.api.GerritApiImpl.class ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; install ( new com.google.gerrit.server.api.Module ( ) ) ; }
Source:
private void columnStatus ( com.google.gwtexpui.safehtml.client.SafeHtmlBuilder sb , com.google.gerrit.client.diff.FileInfo info ) { sb.openTd ( ) . setStyleName ( com.google.gerrit.client.change.FileTable.R.css ( ) . statusTypeCell ( ) ) ; if ( Patch.COMMIT_MSG.equals ( info.path ( ) ) ) { sb.nbsp ( ) ; } else { sb.append ( info.status ( ) ) ; } sb.closeTd ( ) ; }

Target:
private void columnStatus ( com.google.gwtexpui.safehtml.client.SafeHtmlBuilder sb , com.google.gerrit.client.diff.FileInfo info ) { sb.openTd ( ) . setStyleName ( com.google.gerrit.client.change.FileTable.R.css ( ) . statusTypeCell ( ) ) ; if ( ! ( Patch.COMMIT_MSG.equals ( info.path ( ) ) ) ) { sb.append ( info.status ( ) ) ; } sb.closeTd ( ) ; }