auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void create ( ) throws java.lang.Exception { for ( com.google.gerrit.acceptance.rest.project.PushTagIT.TagType tagType : com.google.gerrit.acceptance.rest.project.PushTagIT.TagType.values ( ) ) { pushTagForExistingCommit ( tagType , Status.REJECTED_OTHER_REASON ) ; allowTagCreation ( tagType ) ; pushTagForExistingCommit ( tagType , Status.OK ) ; pushTagForNewCommit ( tagType , Status.REJECTED_OTHER_REASON ) ; } allowPushOfTagsForNewCommits ( ) ; for ( com.google.gerrit.acceptance.rest.project.PushTagIT.TagType tagType : com.google.gerrit.acceptance.rest.project.PushTagIT.TagType.values ( ) ) { pushTagForNewCommit ( tagType , Status.OK ) ; } }

Target:
public void createTagForExistingCommit ( ) throws java.lang.Exception { for ( com.google.gerrit.acceptance.rest.project.PushTagIT.TagType tagType : com.google.gerrit.acceptance.rest.project.PushTagIT.TagType.values ( ) ) { pushTagForExistingCommit ( tagType , Status.REJECTED_OTHER_REASON ) ; allowTagCreation ( tagType ) ; pushTagForExistingCommit ( tagType , Status.OK ) ; allowPushOnRefsTags ( ) ; pushTagForExistingCommit ( tagType , Status.OK ) ; removePushFromRefsTags ( ) ; } }
Source:
private static void mergeTestConfig ( org.eclipse.jgit.lib.Config cfg ) { java.lang.String forceEphemeralPort = java.lang.String.format ( "%s:0" , com.google.gerrit.acceptance.GerritServer.getLocalHost ( ) . getHostName ( ) ) ; java.lang.String url = ( "http://" + forceEphemeralPort ) + "/" ; cfg.setString ( "gerrit" , null , "canonicalWebUrl" , url ) ; cfg.setString ( "httpd" , null , "listenUrl" , url ) ; cfg.setString ( "sshd" , null , "listenAddress" , forceEphemeralPort ) ; cfg.setBoolean ( "sshd" , null , "testUseInsecureRandom" , true ) ; cfg.setString ( "cache" , null , "directory" , null ) ; cfg.setString ( "gerrit" , null , "basePath" , "git" ) ; cfg.setBoolean ( "sendemail" , null , "enable" , false ) ; cfg.setInt ( "cache" , "projects" , "checkFrequency" , 0 ) ; cfg.setInt ( "plugins" , null , "checkFrequency" , 0 ) ; }

Target:
private static void mergeTestConfig ( org.eclipse.jgit.lib.Config cfg ) { java.lang.String forceEphemeralPort = java.lang.String.format ( "%s:0" , com.google.gerrit.acceptance.GerritServer.getLocalHost ( ) . getHostName ( ) ) ; java.lang.String url = ( "http://" + forceEphemeralPort ) + "/" ; cfg.setString ( "gerrit" , null , "canonicalWebUrl" , url ) ; cfg.setString ( "httpd" , null , "listenUrl" , url ) ; cfg.setString ( "sshd" , null , "listenAddress" , forceEphemeralPort ) ; cfg.setBoolean ( "sshd" , null , "testUseInsecureRandom" , true ) ; cfg.setString ( "cache" , null , "directory" , null ) ; cfg.setString ( "gerrit" , null , "basePath" , "git" ) ; cfg.setBoolean ( "sendemail" , null , "enable" , false ) ; cfg.setInt ( "cache" , "projects" , "checkFrequency" , 0 ) ; cfg.setInt ( "plugins" , null , "checkFrequency" , 0 ) ; cfg.setInt ( "sshd" , null , "threads" , 1 ) ; cfg.setInt ( "sshd" , null , "commandStartThreads" , 1 ) ; cfg.setInt ( "receive" , null , "threadPoolSize" , 1 ) ; cfg.setInt ( "index" , null , "threads" , 1 ) ; }
Source:
public void setUp ( ) { java.lang.String tz = "US/Eastern" ; systemTimeZoneProperty = java.lang.System.setProperty ( "user.timezone" , tz ) ; systemTimeZone = java.util.TimeZone.getDefault ( ) ; java.util.TimeZone.setDefault ( java.util.TimeZone.getTimeZone ( tz ) ) ; long maxMs = com.google.gerrit.server.notedb.rebuild.ChangeRebuilderImpl.MAX_WINDOW_MS ; com.google.common.truth.Truth.assertThat ( maxMs ) . isGreaterThan ( 1000L ) ; com.google.gerrit.testutil.TestTimeUtil.resetWithClockStep ( ( maxMs * 2 ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; project = new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) ; accountId = new com.google.gerrit.reviewdb.client.Account.Id ( 100 ) ; }

Target:
public void setUp ( ) { systemTimeZoneProperty = java.lang.System.setProperty ( "user.timezone" , com.google.gerrit.server.notedb.ChangeBundleTest.TIMEZONE_ID ) ; systemTimeZone = java.util.TimeZone.getDefault ( ) ; java.util.TimeZone.setDefault ( java.util.TimeZone.getTimeZone ( com.google.gerrit.server.notedb.ChangeBundleTest.TIMEZONE_ID ) ) ; long maxMs = com.google.gerrit.server.notedb.rebuild.ChangeRebuilderImpl.MAX_WINDOW_MS ; com.google.common.truth.Truth.assertThat ( maxMs ) . isGreaterThan ( 1000L ) ; com.google.gerrit.testing.TestTimeUtil.resetWithClockStep ( ( maxMs * 2 ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; project = new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) ; accountId = new com.google.gerrit.reviewdb.client.Account.Id ( 100 ) ; }
Source:
public void setUp ( ) throws java.io.IOException { org.mockito.Mockito.when ( cfgFactoryMock.getGlobalPluginConfig ( pluginName ) ) . thenReturn ( configMock ) ; org.mockito.Mockito.when ( configMock.getString ( com.ericsson.gerrit.plugins.highavailability.Configuration.MAIN_SECTION , null , com.ericsson.gerrit.plugins.highavailability.Configuration.SHARED_DIRECTORY_KEY ) ) . thenReturn ( com.ericsson.gerrit.plugins.highavailability.ConfigurationTest.SHARED_DIRECTORY ) ; site = new com.google.gerrit.server.config.SitePaths ( com.ericsson.gerrit.plugins.highavailability.ConfigurationTest.SITE_PATH ) ; }

Target:
public void setUp ( ) throws java.io.IOException { org.mockito.Mockito.when ( cfgFactoryMock.getGlobalPluginConfig ( pluginName ) ) . thenReturn ( configMock ) ; org.mockito.Mockito.when ( configMock.getString ( com.ericsson.gerrit.plugins.highavailability.Configuration.MAIN_SECTION , null , com.ericsson.gerrit.plugins.highavailability.Configuration.SHARED_DIRECTORY_KEY ) ) . thenReturn ( com.ericsson.gerrit.plugins.highavailability.ConfigurationTest.SHARED_DIRECTORY ) ; org.mockito.Mockito.when ( configMock.getStringList ( com.ericsson.gerrit.plugins.highavailability.Configuration.CACHE_SECTION , null , com.ericsson.gerrit.plugins.highavailability.Configuration.PATTERN_KEY ) ) . thenReturn ( com.ericsson.gerrit.plugins.highavailability.ConfigurationTest.CUSTOM_CACHE_PATTERNS ) ; site = new com.google.gerrit.server.config.SitePaths ( com.ericsson.gerrit.plugins.highavailability.ConfigurationTest.SITE_PATH ) ; }
Source:
public void contextInitialized ( final javax.servlet.ServletContextEvent event ) { super . contextInitialized ( event ) ; }

Target:
public void contextInitialized ( final javax.servlet.ServletContextEvent event ) { super . contextInitialized ( event ) ; try { injector.getInstance ( com.google.gerrit.server.ssh.GerritSshDaemon.class ) . start ( ) ; } catch ( com.google.inject.ConfigurationException e ) { event.getServletContext ( ) . log ( "Unable to start SSHD" , e ) ; } catch ( java.security.ProviderException e ) { event.getServletContext ( ) . log ( "Unable to start SSHD" , e ) ; } catch ( java.io.IOException e ) { event.getServletContext ( ) . log ( "Unable to start SSHD" , e ) ; } }
Source:
public static boolean siteReliesOnHttp ( ) { return ( ( ( com.google.gerrit.client.Gerrit.getConfig ( ) . getGitHttpUrl ( ) ) != null ) && ( ( com.google.gerrit.client.Gerrit.getConfig ( ) . getAuthType ( ) ) == ( com.google.gerrit.reviewdb.client.AuthType.CUSTOM_EXTENSION ) ) ) && ( ! ( com.google.gerrit.client.Gerrit.getConfig ( ) . siteHasUsernames ( ) ) ) ; }

Target:
public static boolean siteReliesOnHttp ( ) { return ( ( ( com.google.gerrit.client.Gerrit.getConfig ( ) . getGitHttpUrl ( ) ) != null ) && ( com.google.gerrit.client.Gerrit.info ( ) . auth ( ) . isCustomExtension ( ) ) ) && ( ! ( com.google.gerrit.client.Gerrit.getConfig ( ) . siteHasUsernames ( ) ) ) ; }
Source:
public void setAssigneeOnReviewableChangeByOwnerCcingSelf ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; assign ( sc , sc.owner , assignee , com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "setassignee" , sc ) . notTo ( sc.reviewer , sc.ccer , sc.starrer ) . cc ( sc.owner ) . to ( sc.reviewerByEmail ) . cc ( sc.ccerByEmail ) . to ( assignee ) ; }

Target:
public void setAssigneeOnReviewableChangeByOwnerCcingSelf ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; assign ( sc , sc.owner , sc.assignee , com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "setassignee" , sc ) . notTo ( sc.reviewer , sc.ccer , sc.starrer ) . cc ( sc.owner ) . to ( sc.reviewerByEmail ) . cc ( sc.ccerByEmail ) . to ( sc.assignee ) ; }
Source:
private void setListIdHeader ( ) { final java.lang.StringBuilder listid = new java.lang.StringBuilder ( ) ; listid.append ( "gerrit-" ) ; listid.append ( projectName.replace ( '/' , '-' ) ) ; listid.append ( "@" ) ; listid.append ( getGerritHost ( ) ) ; final java.lang.String listidStr = listid.toString ( ) ; setHeader ( "Mailing-List" , ( "list " + listidStr ) ) ; setHeader ( "List-Id" , ( ( "<" + ( listidStr.replace ( '@' , '.' ) ) ) + ">" ) ) ; if ( ( getSettingsUrl ( ) ) != null ) { setHeader ( "List-Unsubscribe" , ( ( "<" + ( getSettingsUrl ( ) ) ) + ">" ) ) ; } }

Target:
private void setListIdHeader ( ) throws com.google.gerrit.server.mail.EmailException { setVHeader ( "Mailing-List" , "list $email.listId" ) ; setVHeader ( "List-Id" , "<$email.listId.replace('@', '.')>" ) ; if ( ( getSettingsUrl ( ) ) != null ) { setVHeader ( "List-Unsubscribe" , "<$email.settingsUrl>" ) ; } }
Source:
PatchSet.Id getPatchSetIdFromSide ( com.google.gerrit.client.diff.DisplaySide side ) { return ( side == ( DisplaySide.A ) ) && ( ( base ) != null ) ? base : revision ; }

Target:
int getParentNumFromDisplaySide ( com.google.gerrit.client.diff.DisplaySide side ) { if ( ( ( side == ( DisplaySide.A ) ) && ( ( base ) != null ) ) && ( ( base.get ( ) ) < 0 ) ) { return - ( base.get ( ) ) ; } return 0 ; }
Source:
private java.util.HashMap < java.util.regex.Pattern , com.googlesource.gerrit.plugins.hooks.validation.ItsAssociationPolicy > getCommentRegexMap ( ) { java.util.HashMap < java.util.regex.Pattern , com.googlesource.gerrit.plugins.hooks.validation.ItsAssociationPolicy > regexMap = new java.util.HashMap < java.util.regex.Pattern , com.googlesource.gerrit.plugins.hooks.validation.ItsAssociationPolicy > ( ) ; java.lang.String match = gerritConfig.getString ( "commentLink" , itsName , "match" ) ; if ( match != null ) { regexMap.put ( java.util.regex.Pattern.compile ( match ) , gerritConfig.getEnum ( "commentLink" , itsName , "association" , ItsAssociationPolicy.OPTIONAL ) ) ; } return regexMap ; }

Target:
private java.util.HashMap < java.util.regex.Pattern , com.googlesource.gerrit.plugins.hooks.validation.ItsAssociationPolicy > getCommentRegexMap ( ) { java.util.HashMap < java.util.regex.Pattern , com.googlesource.gerrit.plugins.hooks.validation.ItsAssociationPolicy > regexMap = new java.util.HashMap < java.util.regex.Pattern , com.googlesource.gerrit.plugins.hooks.validation.ItsAssociationPolicy > ( ) ; java.util.regex.Pattern pattern = issueExtractor.getPattern ( ) ; if ( pattern != null ) { regexMap.put ( pattern , gerritConfig.getEnum ( "commentLink" , itsName , "association" , ItsAssociationPolicy.OPTIONAL ) ) ; } return regexMap ; }
Source:
public static void getFileContent ( int id , java.lang.String revision , java.lang.String path , com.google.gerrit.client.rpc.HttpCallback < com.google.gerrit.client.rpc.NativeString > cb ) { com.google.gerrit.client.rpc.RestApi api = com.google.gerrit.client.changes.ChangeApi.revision ( id , revision ) . view ( "files" ) . id ( path ) . view ( "content" ) ; api.get ( cb ) ; }

Target:
public static void get ( com.google.gerrit.reviewdb.client.PatchSet.Id id , java.lang.String path , com.google.gerrit.client.rpc.HttpCallback < com.google.gerrit.client.rpc.NativeString > cb ) { com.google.gerrit.client.changes.ChangeEditApi.get ( id , path , false , cb ) ; }
Source:
private void bccWatchesNotifySubmittedChanges ( ) { if ( ( db ) != null ) { try { final com.google.gerrit.client.reviewdb.Project project = getProject ( ) ; if ( project != null ) { for ( com.google.gerrit.client.reviewdb.AccountProjectWatch w : db.accountProjectWatches ( ) . notifySubmittedChanges ( project.getId ( ) ) ) { add ( RecipientType.BCC , w.getAccountId ( ) ) ; } } } catch ( com.google.gwtorm.client.OrmException err ) { } } }

Target:
private void bccWatchesNotifySubmittedChanges ( ) { if ( ( db ) != null ) { try { final com.google.gerrit.server.project.ProjectState ps = getProjectState ( ) ; if ( ps != null ) { for ( com.google.gerrit.client.reviewdb.AccountProjectWatch w : db.accountProjectWatches ( ) . notifySubmittedChanges ( ps.getProject ( ) . getNameKey ( ) ) ) { add ( RecipientType.BCC , w.getAccountId ( ) ) ; } } } catch ( com.google.gwtorm.client.OrmException err ) { } } }
Source:
public void replace ( com.google.gerrit.server.project.ProjectState projectState ) throws java.io.IOException { try { replace ( com.google.gerrit.lucene.LuceneProjectIndex.idTerm ( projectState ) , toDocument ( projectState , null ) ) . get ( ) ; } catch ( java.util.concurrent.ExecutionException | java.lang.InterruptedException e ) { throw new java.io.IOException ( e ) ; } }

Target:
public void replace ( com.google.gerrit.server.project.ProjectData projectState ) throws java.io.IOException { try { replace ( com.google.gerrit.lucene.LuceneProjectIndex.idTerm ( projectState ) , toDocument ( projectState ) ) . get ( ) ; } catch ( java.util.concurrent.ExecutionException | java.lang.InterruptedException e ) { throw new java.io.IOException ( e ) ; } }
Source:
public void onSignOut ( ) { final int max = table.getRowCount ( ) ; for ( int row = 0 ; row < max ; row ++ ) { if ( ( getChangeInfo ( row ) ) != null ) { table.clearCell ( row , com.google.gerrit.client.changes.ChangeTable.C_STAR ) ; } } }

Target:
public void onSignOut ( ) { final com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter fmt = table.getFlexCellFormatter ( ) ; final int max = table.getRowCount ( ) ; for ( int row = 0 ; row < max ; row ++ ) { if ( ( getChangeInfo ( row ) ) != null ) { table.clearCell ( row , com.google.gerrit.client.changes.ChangeTable.C_STAR ) ; } } }
Source:
public void addSubmitRecords ( com.google.gerrit.server.data.ChangeAttribute ca , java.util.List < com.google.gerrit.reviewdb.client.SubmitRecord > submitRecords ) { ca.submitRecords = new java.util.ArrayList < com.google.gerrit.server.data.SubmitRecordAttribute > ( ) ; for ( com.google.gerrit.reviewdb.client.SubmitRecord submitRecord : submitRecords ) { com.google.gerrit.server.data.SubmitRecordAttribute sa = new com.google.gerrit.server.data.SubmitRecordAttribute ( ) ; sa.status = submitRecord.status.name ( ) ; if ( ( submitRecord.status ) != ( SubmitRecord.Status.RULE_ERROR ) ) { addSubmitRecordLabels ( submitRecord , sa ) ; } ca.submitRecords.add ( sa ) ; } if ( ca.submitRecords.isEmpty ( ) ) { ca.submitRecords = null ; } }

Target:
public void addSubmitRecords ( com.google.gerrit.server.data.ChangeAttribute ca , java.util.List < com.google.gerrit.common.data.SubmitRecord > submitRecords ) { ca.submitRecords = new java.util.ArrayList < com.google.gerrit.server.data.SubmitRecordAttribute > ( ) ; for ( com.google.gerrit.common.data.SubmitRecord submitRecord : submitRecords ) { com.google.gerrit.server.data.SubmitRecordAttribute sa = new com.google.gerrit.server.data.SubmitRecordAttribute ( ) ; sa.status = submitRecord.status.name ( ) ; if ( ( submitRecord.status ) != ( SubmitRecord.Status.RULE_ERROR ) ) { addSubmitRecordLabels ( submitRecord , sa ) ; } ca.submitRecords.add ( sa ) ; } if ( ca.submitRecords.isEmpty ( ) ) { ca.submitRecords = null ; } }
Source:
public void start ( final org.apache.sshd.server.Environment env ) throws java.io.IOException { com.google.gerrit.sshd.SshScope.Context old = com.google.gerrit.sshd.SshScope.set ( context ) ; java.lang.String message ; try { message = messageFactory.get ( ) . getMessage ( ) ; } finally { com.google.gerrit.sshd.SshScope.set ( old ) ; } err.write ( org.eclipse.jgit.lib.Constants.encodeASCII ( message.toString ( ) ) ) ; err.flush ( ) ; in.close ( ) ; out.close ( ) ; err.close ( ) ; exit.onExit ( 127 ) ; }

Target:
public void start ( final org.apache.sshd.server.Environment env ) throws java.io.IOException { com.google.gerrit.sshd.SshScope.Context old = com.google.gerrit.sshd.SshScope.set ( context ) ; java.lang.String message ; try { message = messageFactory.get ( ) . getMessage ( ) ; } finally { com.google.gerrit.sshd.SshScope.set ( old ) ; } err.write ( org.eclipse.jgit.lib.Constants.encode ( message.toString ( ) ) ) ; err.flush ( ) ; in.close ( ) ; out.close ( ) ; err.close ( ) ; exit.onExit ( 127 ) ; }
Source:
public void newGroupMustNotReuseNameOfAnotherGroup ( ) throws java.lang.Exception { createGroup ( groupUuid , groupName ) ; com.google.gerrit.reviewdb.client.AccountGroup.UUID anotherGroupUuid = new com.google.gerrit.reviewdb.client.AccountGroup.UUID ( "AnotherGroup" ) ; expectedException.expect ( com.google.gwtorm.server.OrmDuplicateKeyException.class ) ; expectedException.expectMessage ( groupName.get ( ) ) ; com.google.gerrit.server.group.db.GroupNameNotes.loadForNewGroup ( repo , anotherGroupUuid , groupName ) ; }

Target:
public void newGroupMustNotReuseNameOfAnotherGroup ( ) throws java.lang.Exception { createGroup ( groupUuid , groupName ) ; com.google.gerrit.reviewdb.client.AccountGroup.UUID anotherGroupUuid = new com.google.gerrit.reviewdb.client.AccountGroup.UUID ( "AnotherGroup" ) ; expectedException.expect ( com.google.gwtorm.server.OrmDuplicateKeyException.class ) ; expectedException.expectMessage ( groupName.get ( ) ) ; com.google.gerrit.server.group.db.GroupNameNotes.forNewGroup ( repo , anotherGroupUuid , groupName ) ; }
Source:
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" ) ; }

Target:
public void emptyServletPath ( ) { com.google.common.truth.Truth.assertThat ( com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( fakeRequest ( "" , "/c" , "/foo/bar" ) ) ) . isEqualTo ( "/foo/bar" ) ; com.google.common.truth.Truth.assertThat ( com.google.gerrit.util.http.RequestUtil.getEncodedPathInfo ( fakeRequest ( "" , "/c" , "/foo%2Fbar" ) ) ) . isEqualTo ( "/foo%2Fbar" ) ; }
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:
public com.google.gerrit.server.data.PatchSetAttribute get ( ) { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( change.getProject ( ) ) ; org.eclipse.jgit.revwalk.RevWalk revWalk = new org.eclipse.jgit.revwalk.RevWalk ( repo ) ) { return eventFactory.asPatchSetAttribute ( revWalk , change , patchSet ) ; } catch ( java.io.IOException e ) { throw com.google.common.base.Throwables.propagate ( e ) ; } }
Source:
public void index ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change change ) throws com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.server.query.change.ChangeData cd ; if ( notesMigration.readChanges ( ) ) { cd = changeDataFactory.create ( db , change ) ; } else if ( notesMigration.writeChanges ( ) ) { com.google.gerrit.server.notedb.ChangeNotes notes = changeNotesFactory.createWithAutoRebuildingDisabled ( change , null ) ; cd = changeDataFactory.create ( db , notes ) ; } else { cd = changeDataFactory.create ( db , change ) ; } index ( cd ) ; }

Target:
public void index ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change change ) throws com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.server.query.change.ChangeData cd ; if ( notesMigration.commitChangeWrites ( ) ) { com.google.gerrit.server.notedb.ChangeNotes notes = changeNotesFactory.createWithAutoRebuildingDisabled ( change , null ) ; cd = changeDataFactory.create ( db , notes ) ; } else { cd = changeDataFactory.create ( db , change ) ; } index ( cd ) ; }
Source:
public void noRescheduleOnSuccess ( ) throws java.io.IOException { org.mockito.Mockito.when ( session.post ( com.googlesource.gerrit.plugins.webhooks.PostTaskTest.WEBHOOK_URL , com.googlesource.gerrit.plugins.webhooks.PostTaskTest.HEADERS , com.googlesource.gerrit.plugins.webhooks.PostTaskTest.BODY ) ) . thenReturn ( com.googlesource.gerrit.plugins.webhooks.PostTaskTest.OK_RESULT ) ; task.run ( ) ; org.mockito.Mockito.verifyZeroInteractions ( executor ) ; }

Target:
public void noRescheduleOnSuccess ( ) throws java.io.IOException { org.mockito.Mockito.when ( session.post ( org.mockito.ArgumentMatchers.eq ( remote ) , org.mockito.ArgumentMatchers.eq ( content ) ) ) . thenReturn ( com.googlesource.gerrit.plugins.webhooks.PostTaskTest.OK_RESULT ) ; task.run ( ) ; org.mockito.Mockito.verifyZeroInteractions ( executor ) ; }
Source:
private void insertChangeRow ( final int row ) { insertRow ( row ) ; setStyleName ( row , com.google.gerrit.client.changes.ChangeTable.C_ID , "gerrit-ChangeTable-ColumnID" ) ; }

Target:
private void insertChangeRow ( final int row ) { insertRow ( row ) ; setStyleName ( row , com.google.gerrit.client.changes.ChangeTable.C_ID , "gerrit-ChangeTable-ColumnID" ) ; final com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter fmt = table.getFlexCellFormatter ( ) ; for ( int i = com.google.gerrit.client.changes.ChangeTable.C_ID ; i < ( com.google.gerrit.client.changes.ChangeTable.COLUMNS ) ; i ++ ) { fmt.addStyleName ( row , i , "gerrit-ChangeTable-Cell" ) ; } }
Source:
public com.google.gerrit.server.update.BatchUpdate insertChange ( com.google.gerrit.server.update.BatchUpdate.InsertChangeOp op ) { com.google.gerrit.server.update.BatchUpdate.Context ctx = new com.google.gerrit.server.update.BatchUpdate.Context ( ) ; com.google.gerrit.reviewdb.client.Change c = op.createChange ( ctx ) ; com.google.common.base.Preconditions.checkArgument ( ( ! ( newChanges.containsKey ( c.getId ( ) ) ) ) , "only one op allowed to create change %s" , c.getId ( ) ) ; newChanges.put ( c.getId ( ) , c ) ; ops.get ( c.getId ( ) ) . add ( 0 , op ) ; return this ; }

Target:
public com.google.gerrit.server.update.BatchUpdate insertChange ( com.google.gerrit.server.update.BatchUpdate.InsertChangeOp op ) { com.google.gerrit.server.update.BatchUpdate.ContextImpl ctx = new com.google.gerrit.server.update.BatchUpdate.ContextImpl ( ) ; com.google.gerrit.reviewdb.client.Change c = op.createChange ( ctx ) ; com.google.common.base.Preconditions.checkArgument ( ( ! ( newChanges.containsKey ( c.getId ( ) ) ) ) , "only one op allowed to create change %s" , c.getId ( ) ) ; newChanges.put ( c.getId ( ) , c ) ; ops.get ( c.getId ( ) ) . add ( 0 , op ) ; return this ; }
Source:
public void preferDeleteAtLineBreak ( ) throws java.lang.Exception { java.lang.String a = " abc\n def\n" ; java.lang.String b = " abc\n def\n" ; java.util.List < org.eclipse.jgit.diff.Edit > expected = new org.eclipse.jgit.diff.EditList ( ) ; expected.add ( new org.eclipse.jgit.diff.Edit ( 0 , 2 , 0 , 0 ) ) ; expected.add ( new org.eclipse.jgit.diff.Edit ( 8 , 10 , 6 , 6 ) ) ; com.google.common.truth.Truth.assertThat ( com.google.gerrit.server.patch.IntraLineLoaderTest.intraline ( a , b ) ) . isEqualTo ( expected ) ; }

Target:
com.google.gerrit.server.patch.IntraLineLoaderTest.Reference common ( java.lang.String s ) { int len = s.length ( ) ; posA += len ; posB += len ; return this ; }
Source:
public int nextChangeId ( ) throws com.google.gwtorm.server.OrmException { if ( ! ( migration.readChangeSequence ( ) ) ) { return com.google.gerrit.server.Sequences.nextChangeId ( db.get ( ) ) ; } return changeSeq.next ( ) ; }

Target:
public int nextChangeId ( ) throws com.google.gwtorm.server.OrmException { if ( ! ( migration.readChangeSequence ( ) ) ) { return com.google.gerrit.server.Sequences.nextChangeId ( db.get ( ) ) ; } try ( com.google.gerrit.metrics.Timer2.Context timer = nextIdLatency.start ( com.google.gerrit.server.Sequences.SequenceType.CHANGES , false ) ) { return changeSeq.next ( ) ; } }
Source:
public java.lang.String passwordForKey ( java.lang.String key , java.lang.String password ) { java.lang.String ov = getSecure ( password ) ; if ( ov != null ) { if ( ( ui.isBatch ( ) ) || ( ! ( ui.yesno ( false , "Change %s" , key ) ) ) ) { return ov ; } } final java.lang.String nv = ui.password ( "%s" , key ) ; if ( ! ( com.google.gerrit.pgm.init.api.Section.eq ( ov , nv ) ) ) { setSecure ( password , nv ) ; } return nv ; }

Target:
public java.lang.String passwordForKey ( java.lang.String prompt , java.lang.String passwordKey ) { java.lang.String ov = getSecure ( passwordKey ) ; if ( ov != null ) { if ( ( ui.isBatch ( ) ) || ( ! ( ui.yesno ( false , "Change %s" , passwordKey ) ) ) ) { return ov ; } } final java.lang.String nv = ui.password ( "%s" , prompt ) ; if ( ! ( com.google.gerrit.pgm.init.api.Section.eq ( ov , nv ) ) ) { setSecure ( passwordKey , nv ) ; } return nv ; }
Source:
private int colorLinesAndAdvance ( net.codemirror.lib.CodeMirror cm , int line , int cnt ) { for ( int i = 0 ; i < cnt ; i ++ ) { cm.addLineClass ( ( line + i ) , LineClassWhere.WRAP , diffTable.style.diff ( ) ) ; } return line + cnt ; }

Target:
private void colorLines ( net.codemirror.lib.CodeMirror cm , int line , int cnt ) { for ( int i = 0 ; i < cnt ; i ++ ) { cm.addLineClass ( ( line + i ) , LineClassWhere.WRAP , diffTable.style.diff ( ) ) ; } }
Source:
public void testQuote2 ( ) { java.lang.String comment = "See this said:\n\n > a quoted\n > string block\n\nOK?" ; java.util.List < com.google.gerrit.server.mail.send.CommentFormatter.Block > result = com.google.gerrit.server.mail.send.CommentFormatter.parse ( comment ) ; com.google.common.truth.Truth.assertThat ( result ) . hasSize ( 3 ) ; assertBlock ( result , 0 , BlockType.PARAGRAPH , "See this said:" ) ; assertBlock ( result , 1 , BlockType.QUOTE , "a quoted\nstring block" ) ; assertBlock ( result , 2 , BlockType.PARAGRAPH , "OK?" ) ; }

Target:
public void testQuote2 ( ) { java.lang.String comment = "See this said:\n\n > a quoted\n > string block\n\nOK?" ; java.util.List < com.google.gerrit.server.mail.send.CommentFormatter.Block > result = com.google.gerrit.server.mail.send.CommentFormatter.parse ( comment ) ; com.google.common.truth.Truth.assertThat ( result ) . hasSize ( 3 ) ; assertBlock ( result , 0 , BlockType.PARAGRAPH , "See this said:" ) ; assertQuoteBlock ( result , 1 , 1 ) ; assertBlock ( result.get ( 1 ) . quotedBlocks , 0 , BlockType.PARAGRAPH , "a quoted\nstring block" ) ; assertBlock ( result , 2 , BlockType.PARAGRAPH , "OK?" ) ; }
Source:
protected void init ( ) throws com.google.gerrit.server.mail.EmailException { super . init ( ) ; if ( ( fromId ) != null ) { reviewers.remove ( fromId ) ; } add ( RecipientType.TO , reviewers ) ; add ( RecipientType.CC , extraCC ) ; rcptToAuthors ( RecipientType.CC ) ; }

Target:
protected void init ( ) throws com.google.gerrit.server.mail.EmailException { super . init ( ) ; if ( ( fromId ) != null ) { reviewers.remove ( fromId ) ; } add ( RecipientType.TO , reviewers ) ; add ( RecipientType.CC , extraCC ) ; rcptToAuthors ( RecipientType.CC ) ; bccStarredBy ( ) ; }
Source:
protected void onLoad ( ) { super . onLoad ( ) ; loadChangeInfo ( true , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.changes.ChangeInfo > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo info ) { info.init ( ) ; loadConfigInfo ( info , base ) ; } } ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo.EditInfo result ) { edit = result ; }
Source:
public void rebuildViaRestApi ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; com.google.gerrit.reviewdb.client.Change.Id id = r.getPatchSetId ( ) . getParentKey ( ) ; notesMigration.setWriteChanges ( true ) ; checker.assertNoChangeRef ( project , id ) ; rebuildHandler.apply ( parseChangeResource ( r.getChangeId ( ) ) , new com.google.gerrit.server.change.Rebuild.Input ( ) ) ; checker.checkChanges ( id ) ; }

Target:
public void rebuildViaRestApi ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; com.google.gerrit.reviewdb.client.Change.Id id = r.getPatchSetId ( ) . getParentKey ( ) ; setNotesMigration ( true , false ) ; checker.assertNoChangeRef ( project , id ) ; rebuildHandler.apply ( parseChangeResource ( r.getChangeId ( ) ) , new com.google.gerrit.server.change.Rebuild.Input ( ) ) ; checker.checkChanges ( id ) ; }
Source:
public Change.Id cherryPick ( com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet patch , java.lang.String message , java.lang.String ref , com.google.gerrit.server.project.RefControl refControl , int parent ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.git.IntegrationException , com.google.gerrit.server.project.InvalidChangeOperationException , com.google.gerrit.server.update.UpdateException , com.google.gwtorm.server.OrmException , java.io.IOException { return cherryPick ( change.getId ( ) , patch.getId ( ) , change.getDest ( ) , change.getTopic ( ) , change.getProject ( ) , org.eclipse.jgit.lib.ObjectId.fromString ( patch.getRevision ( ) . get ( ) ) , message , ref , refControl , parent ) ; }

Target:
public Change.Id cherryPick ( com.google.gerrit.server.update.BatchUpdate.Factory batchUpdateFactory , com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet patch , java.lang.String message , java.lang.String ref , com.google.gerrit.server.project.RefControl refControl , int parent ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.git.IntegrationException , com.google.gerrit.server.project.InvalidChangeOperationException , com.google.gerrit.server.update.UpdateException , com.google.gwtorm.server.OrmException , java.io.IOException { return cherryPick ( batchUpdateFactory , change.getId ( ) , patch.getId ( ) , change.getDest ( ) , change.getTopic ( ) , change.getProject ( ) , org.eclipse.jgit.lib.ObjectId.fromString ( patch.getRevision ( ) . get ( ) ) , message , ref , refControl , parent ) ; }
Source:
public void testMIXED_NoPreferredEmailUser ( ) { setFrom ( "MIXED" ) ; final java.lang.String name = "A U. Thor" ; final com.google.gerrit.reviewdb.client.Account.Id user = user ( name , null ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( user ) ; org.junit.Assert.assertNotNull ( r ) ; org.junit.Assert.assertEquals ( ( name + " (Code Review)" ) , r.name ) ; org.junit.Assert.assertEquals ( ident.getEmailAddress ( ) , r.email ) ; org.easymock.EasyMock.verify ( accountCache ) ; }

Target:
public void testMIXED_NoPreferredEmailUser ( ) { setFrom ( "MIXED" ) ; final java.lang.String name = "A U. Thor" ; final com.google.gerrit.reviewdb.client.Account.Id user = user ( name , null ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( user ) ; com.google.common.truth.Truth.assertThat ( r ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( r.name ) . isEqualTo ( ( name + " (Code Review)" ) ) ; com.google.common.truth.Truth.assertThat ( r.email ) . isEqualTo ( ident.getEmailAddress ( ) ) ; org.easymock.EasyMock.verify ( accountCache ) ; }
Source:
public void listNonEmptyGroupMembers ( ) throws java.lang.Exception { java.lang.String group = createGroup ( "group" ) ; java.lang.String user1 = createAccount ( "user1" , group ) ; java.lang.String user2 = createAccount ( "user2" , group ) ; assertMembers ( GET ( ( ( "/groups/" + group ) + "/members/" ) ) , user1 , user2 ) ; }

Target:
public void listNonEmptyGroupMembers ( ) throws java.lang.Exception { java.lang.String group = createGroup ( "group" ) ; java.lang.String user1 = createAccount ( "user1" , group ) ; java.lang.String user2 = createAccount ( "user2" , group ) ; assertMembers ( gApi.groups ( ) . id ( group ) . members ( ) , user1 , user2 ) ; }
Source:
private void addSuggestion ( java.util.Map < com.google.gerrit.reviewdb.client.Account.Id , com.google.gerrit.common.data.AccountInfo > map , com.google.gerrit.reviewdb.client.Account account , com.google.gerrit.common.data.AccountInfo info , java.lang.Boolean active ) { if ( map.containsKey ( account.getId ( ) ) ) { return ; } if ( ( active != null ) && ( active != ( account.isActive ( ) ) ) ) { return ; } if ( accountControlFactory.get ( ) . canSee ( account ) ) { map.put ( account.getId ( ) , info ) ; } }

Target:
public boolean isVisible ( com.google.gerrit.reviewdb.client.Account account ) throws com.google.gwtorm.server.OrmException { return accountControlFactory.get ( ) . canSee ( account ) ; }
Source:
public java.lang.String getSqlType ( final com.google.gwtorm.schema.ColumnModel col , final com.google.gwtorm.schema.sql.SqlDialect dialect ) { final java.lang.StringBuilder r = new java.lang.StringBuilder ( ) ; r.append ( dialect.getSqlTypeName ( getSqlTypeConstant ( ) ) ) ; if ( col.isNotNull ( ) ) { r.append ( " DEFAULT '1900-01-01 00:00:00'" ) ; r.append ( " NOT NULL" ) ; } return r.toString ( ) ; }

Target:
public java.lang.String getSqlType ( final com.google.gwtorm.schema.ColumnModel col , final com.google.gwtorm.schema.sql.SqlDialect dialect ) { final java.lang.StringBuilder r = new java.lang.StringBuilder ( ) ; r.append ( dialect.getSqlTypeName ( getSqlTypeConstant ( ) ) ) ; if ( col.isNotNull ( ) ) { r.append ( " DEFAULT " ) ; r.append ( getSqlDefault ( ) ) ; r.append ( " NOT NULL" ) ; } return r.toString ( ) ; }
Source:
private java.util.List < com.google.gerrit.server.query.Predicate < T > > sort ( java.util.Collection < ? extends com.google.gerrit.server.query.Predicate < T > > that ) { java.util.List < com.google.gerrit.server.query.Predicate < T > > r = new java.util.ArrayList < > ( that ) ; java.util.Collections.sort ( r , this ) ; return r ; }

Target:
private java.util.List < com.google.gerrit.index.query.Predicate < T > > sort ( java.util.Collection < ? extends com.google.gerrit.index.query.Predicate < T > > that ) { java.util.List < com.google.gerrit.index.query.Predicate < T > > r = new java.util.ArrayList < > ( that ) ; java.util.Collections.sort ( r , this ) ; return r ; }
Source:
private com.google.gerrit.reviewdb.client.ChangeMessage buildChangeMessage ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change dest , com.google.gerrit.reviewdb.client.Account.Id pullRequestAuthorId , java.lang.String pullRequestMessage ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.ChangeMessage cmsg = new com.google.gerrit.reviewdb.client.ChangeMessage ( new com.google.gerrit.reviewdb.client.ChangeMessage.Key ( dest.getId ( ) , com.google.gerrit.server.ChangeUtil.messageUUID ( db ) ) , pullRequestAuthorId , null ) ; cmsg.setMessage ( pullRequestMessage ) ; return cmsg ; }

Target:
private com.google.gerrit.reviewdb.client.ChangeMessage buildChangeMessage ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change dest , com.google.gerrit.reviewdb.client.PatchSet newPatchSet , com.google.gerrit.reviewdb.client.Account.Id pullRequestAuthorId , java.lang.String pullRequestMessage ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.ChangeMessage cmsg = new com.google.gerrit.reviewdb.client.ChangeMessage ( new com.google.gerrit.reviewdb.client.ChangeMessage.Key ( dest.getId ( ) , com.google.gerrit.server.ChangeUtil.messageUUID ( db ) ) , pullRequestAuthorId , com.google.gerrit.server.util.TimeUtil.nowTs ( ) , newPatchSet.getId ( ) ) ; cmsg.setMessage ( pullRequestMessage ) ; return cmsg ; }
Source:
private void removeUI ( ) { if ( ( replyToBox ) != null ) { replyToBox.unregisterReplyBox ( ) ; } com.google.gerrit.client.changes.CommentInfo info = getOriginal ( ) ; getDiffView ( ) . removeCommentBox ( info.side ( ) , ( ( info.line ( ) ) - 1 ) ) ; removeFromParent ( ) ; getSelfWidget ( ) . clear ( ) ; getPaddingWidget ( ) . clear ( ) ; }

Target:
private void removeUI ( ) { if ( ( replyToBox ) != null ) { replyToBox.unregisterReplyBox ( ) ; } com.google.gerrit.client.changes.CommentInfo info = getOriginal ( ) ; getDiffView ( ) . removeDraft ( info.side ( ) , ( ( info.line ( ) ) - 1 ) ) ; removeFromParent ( ) ; getSelfWidget ( ) . clear ( ) ; com.google.gerrit.client.diff.PaddingManager manager = getPaddingManager ( ) ; manager.remove ( this ) ; manager.resizePaddingWidget ( ) ; }
Source:
private void checkResult ( org.eclipse.jgit.lib.RefUpdate.Result result ) throws com.google.gwtorm.server.OrmException { if ( ( result != ( RefUpdate.Result.NEW ) ) && ( result != ( RefUpdate.Result.FORCED ) ) ) { throw new com.google.gwtorm.server.OrmException ( ( ( ( "failed to update " + ( refName ) ) + ": " ) + result ) ) ; } }

Target:
private void checkResult ( org.eclipse.jgit.lib.RefUpdate.Result result ) throws com.google.gwtorm.server.OrmException { if ( ! ( refUpdated ( result ) ) ) { throw new com.google.gwtorm.server.OrmException ( ( ( ( "failed to update " + ( refName ) ) + ": " ) + result ) ) ; } }
Source:
public void visit ( com.google.gitiles.doc.DivNode node ) { html.open ( "div" ) . attribute ( "class" , node.getStyleName ( ) ) ; visitChildren ( node ) ; html.close ( "div" ) ; }

Target:
private void visit ( com.google.gitiles.doc.BlockNote node ) { html.open ( "div" ) . attribute ( "class" , node.getClassName ( ) ) ; org.commonmark.node.Node f = node.getFirstChild ( ) ; if ( ( f == ( node.getLastChild ( ) ) ) && ( f instanceof org.commonmark.node.Paragraph ) ) { visitChildren ( f ) ; } else { visitChildren ( node ) ; } html.close ( "div" ) ; }
Source:
private void assertIncludes ( java.lang.String group , java.lang.String ... includes ) throws java.lang.Exception { java.lang.Iterable < java.lang.String > actualNames = com.google.common.collect.Iterables.transform ( gApi.groups ( ) . id ( group ) . includedGroups ( ) , new com.google.common.base.Function < com.google.gerrit.extensions.common.GroupInfo , java.lang.String > ( ) { @ java.lang.Override public java.lang.String apply ( com.google.gerrit.extensions.common.GroupInfo in ) { return in.name ; } } ) ; com.google.common.truth.Truth.assertThat ( actualNames ) . containsExactlyElementsIn ( java.util.Arrays.asList ( includes ) ) . inOrder ( ) ; }

Target:
private void assertIncludes ( java.lang.String group , java.lang.String ... expectedNames ) throws java.lang.Exception { assertIncludes ( gApi.groups ( ) . id ( group ) . includedGroups ( ) , expectedNames ) ; }
Source:
public void rejectMissingEmail ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; exception.expect ( com.google.gerrit.extensions.restapi.UnprocessableEntityException.class ) ; exception.expectMessage ( "email invalid" ) ; gApi.changes ( ) . id ( r.getChangeId ( ) ) . addReviewer ( "" ) ; }

Target:
public void rejectMissingEmail ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; com.google.gerrit.extensions.api.changes.AddReviewerResult result = gApi.changes ( ) . id ( r.getChangeId ( ) ) . addReviewer ( "" ) ; com.google.common.truth.Truth.assertThat ( result.error ) . isEqualTo ( " is not a valid user identifier" ) ; com.google.common.truth.Truth.assertThat ( result.reviewers ) . isNull ( ) ; }
Source:
public void visit ( org.pegdown.ast.ListItemNode node ) { wrapChildren ( "li" , node ) ; }

Target:
private static boolean isInTightList ( org.commonmark.node.Paragraph c ) { org.commonmark.node.Block b = c.getParent ( ) ; if ( b != null ) { org.commonmark.node.Block a = b.getParent ( ) ; return ( a instanceof org.commonmark.node.ListBlock ) && ( ( ( org.commonmark.node.ListBlock ) ( a ) ) . isTight ( ) ) ; } return false ; }
Source:
private void setNavigationOnClickListener ( @ android.support.annotation.IdRes int id , final com.google.reviewit.widget.ScrollWithHeadingsView root , final com.google.reviewit.app.Change change , final java.lang.String path , final java.util.Map < java.lang.String , com.google.gerrit.extensions.common.FileInfo > files ) { v ( id ) . setOnClickListener ( new android.view.View.OnClickListener ( ) { @ java.lang.Override public void onClick ( android.view.View v ) { root.clear ( ) ; init ( root , path , change , files ) ; displayFile ( root , change , path , files.get ( path ) ) ; } } ) ; }

Target:
private void setNavigationOnClickListener ( @ android.support.annotation.IdRes int id , final com.google.reviewit.app.Change change , final java.lang.String path , final java.util.Map < java.lang.String , com.google.gerrit.extensions.common.FileInfo > files ) { v ( id ) . setOnClickListener ( new android.view.View.OnClickListener ( ) { @ java.lang.Override public void onClick ( android.view.View v ) { removeDiffView ( ) ; createDiffView ( ) ; init ( path , change , files ) ; displayFile ( change , path , files.get ( path ) ) ; } } ) ; }
Source:
private java.util.List < com.google.gerrit.acceptance.rest.change.SuggestReviewerInfo > suggestReviewers ( java.lang.String changeId , java.lang.String query , int n ) throws java.io.IOException { return new com.google.gson.Gson ( ) . fromJson ( session.get ( ( ( ( ( ( "/changes/" + changeId ) + "/suggest_reviewers?q=" ) + query ) + "&n=" ) + n ) ) . getReader ( ) , new com.google.gson.reflect.TypeToken < java.util.List < com.google.gerrit.acceptance.rest.change.SuggestReviewerInfo > > ( ) { } . getType ( ) ) ; }

Target:
private java.util.List < com.google.gerrit.server.change.SuggestReviewers.SuggestedReviewerInfo > suggestReviewers ( java.lang.String changeId , java.lang.String query , int n ) throws java.io.IOException { return newGson ( ) . fromJson ( session.get ( ( ( ( ( ( "/changes/" + changeId ) + "/suggest_reviewers?q=" ) + query ) + "&n=" ) + n ) ) . getReader ( ) , new com.google.gson.reflect.TypeToken < java.util.List < com.google.gerrit.server.change.SuggestReviewers.SuggestedReviewerInfo > > ( ) { } . getType ( ) ) ; }
Source:
protected void onUnload ( ) { super . onUnload ( ) ; removeKeyHandlerRegs ( ) ; if ( ( resizeHandler ) != null ) { resizeHandler.removeHandler ( ) ; resizeHandler = null ; } if ( ( cmA ) != null ) { cmA.getWrapperElement ( ) . removeFromParent ( ) ; cmA = null ; } if ( ( cmB ) != null ) { cmB.getWrapperElement ( ) . removeFromParent ( ) ; cmB = null ; } com.google.gwt.user.client.Window.enableScrolling ( true ) ; }

Target:
protected void onUnload ( ) { super . onUnload ( ) ; removeKeyHandlerRegs ( ) ; if ( ( resizeHandler ) != null ) { resizeHandler.removeHandler ( ) ; resizeHandler = null ; } if ( ( cmA ) != null ) { cmA.getWrapperElement ( ) . removeFromParent ( ) ; cmA = null ; } if ( ( cmB ) != null ) { cmB.getWrapperElement ( ) . removeFromParent ( ) ; cmB = null ; } com.google.gwt.user.client.Window.enableScrolling ( true ) ; com.google.gerrit.client.Gerrit.setHeaderVisible ( true ) ; }
Source:
void showTable ( ) { this . myBody.clear ( ) ; this . myBody.add ( table ) ; this . myTable = table ; table.finishDisplay ( ) ; if ( ( this . onLoadCommand ) != null ) { this . onLoadCommand.execute ( ) ; this . onLoadCommand = null ; } }

Target:
public void setActive ( boolean active ) { this . active = active ; if ( ( myTable ) != null ) { myTable.setActive ( active ) ; } }
Source:
protected void onInsertComment ( final com.google.gerrit.client.patches.PatchLine pl ) { final int row = getCurrentRow ( ) ; switch ( pl.getType ( ) ) { case Type.DELETE : case Type.CONTEXT : createCommentEditor ( ( row + 1 ) , com.google.gerrit.client.patches.UnifiedDiffTable.PC , pl.getLineA ( ) , ( ( short ) ( 0 ) ) ) ; break ; case Type.INSERT : createCommentEditor ( ( row + 1 ) , com.google.gerrit.client.patches.UnifiedDiffTable.PC , pl.getLineB ( ) , ( ( short ) ( 1 ) ) ) ; break ; } }

Target:
protected void onInsertComment ( final com.google.gerrit.client.patches.PatchLine pl ) { final int row = getCurrentRow ( ) ; switch ( pl.getType ( ) ) { case Type.DELETE : case Type.CONTEXT : createCommentEditor ( ( row + 1 ) , com.google.gerrit.client.patches.UnifiedDiffTable.PC , pl.getLineA ( ) , ( ( short ) ( 0 ) ) ) ; break ; case Type.INSERT : createCommentEditor ( ( row + 1 ) , com.google.gerrit.client.patches.UnifiedDiffTable.PC , pl.getLineB ( ) , ( ( short ) ( 1 ) ) ) ; break ; case REPLACE : break ; } }
Source:
protected void doGet ( final javax.servlet.http.HttpServletRequest req , final javax.servlet.http.HttpServletResponse rsp ) throws java.io.IOException { final java.lang.String sid = webSession.get ( ) . getSessionId ( ) ; final com.google.gerrit.server.CurrentUser currentUser = webSession.get ( ) . getCurrentUser ( ) ; final java.lang.String what = "sign out" ; final long when = com.google.gerrit.common.TimeUtil.nowMs ( ) ; try { doLogout ( req , rsp ) ; } finally { audit.dispatch ( new com.google.gerrit.audit.AuditEvent ( sid , currentUser , what , when , null , null ) ) ; } }

Target:
protected void doGet ( final javax.servlet.http.HttpServletRequest req , final javax.servlet.http.HttpServletResponse rsp ) throws java.io.IOException { final java.lang.String sid = webSession.get ( ) . getSessionId ( ) ; final com.google.gerrit.server.CurrentUser currentUser = webSession.get ( ) . getUser ( ) ; final java.lang.String what = "sign out" ; final long when = com.google.gerrit.common.TimeUtil.nowMs ( ) ; try { doLogout ( req , rsp ) ; } finally { audit.dispatch ( new com.google.gerrit.audit.AuditEvent ( sid , currentUser , what , when , null , null ) ) ; } }
Source:
public static java.security.PublicKey parse ( final com.google.gerrit.reviewdb.client.AccountSshKey key ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException , java.security.spec.InvalidKeySpecException { try { final java.lang.String s = key.getEncodedKey ( ) ; if ( s == null ) { throw new java.security.spec.InvalidKeySpecException ( "No key string" ) ; } final byte [ ] bin = org.apache.commons.codec.binary.Base64.decodeBase64 ( org.eclipse.jgit.lib.Constants.encodeASCII ( s ) ) ; return new org.apache.sshd.common.util.Buffer ( bin ) . getRawPublicKey ( ) ; } catch ( java.lang.RuntimeException | org.apache.sshd.common.SshException e ) { throw new java.security.spec.InvalidKeySpecException ( "Cannot parse key" , e ) ; } }

Target:
public static java.security.PublicKey parse ( final com.google.gerrit.reviewdb.client.AccountSshKey key ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException , java.security.spec.InvalidKeySpecException { try { final java.lang.String s = key.getEncodedKey ( ) ; if ( s == null ) { throw new java.security.spec.InvalidKeySpecException ( "No key string" ) ; } final byte [ ] bin = org.apache.commons.codec.binary.Base64.decodeBase64 ( org.eclipse.jgit.lib.Constants.encodeASCII ( s ) ) ; return new org.apache.sshd.common.util.buffer.ByteArrayBuffer ( bin ) . getRawPublicKey ( ) ; } catch ( java.lang.RuntimeException | org.apache.sshd.common.SshException e ) { throw new java.security.spec.InvalidKeySpecException ( "Cannot parse key" , e ) ; } }
Source:
private static java.lang.String time ( final long now , final long time ) { BRANCH ( NaN ) ; SiteLibraryLoaderUtil : Add = $missing$ ; com.google.gerrit.sshd.commands.debug log ; com.google.gerrit.sshd.commands.the loaded ; }

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 ) ) ; }