auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addProject ( java.nio.file.Path p ) { com.google.gerrit.reviewdb.client.Project.NameKey nameKey = getProjectName ( p ) ; if ( getBasePath ( nameKey ) . equals ( startFolder ) ) { if ( isUnreasonableName ( nameKey ) ) { com.google.gerrit.server.git.LocalDiskRepositoryManager.log.warn ( ( "Ignoring unreasonably named repository " + ( p.toAbsolutePath ( ) ) ) ) ; } else { found.add ( nameKey ) ; } } }

Target:
private void addProject ( java.nio.file.Path p ) { com.google.gerrit.reviewdb.client.Project.NameKey nameKey = com.google.gerrit.server.git.LocalDiskRepositoryManager.getProjectName ( startFolder , p ) ; if ( getBasePath ( nameKey ) . equals ( startFolder ) ) { if ( isUnreasonableName ( nameKey ) ) { com.google.gerrit.server.git.LocalDiskRepositoryManager.log.warn ( ( "Ignoring unreasonably named repository " + ( p.toAbsolutePath ( ) ) ) ) ; } else { found.add ( nameKey ) ; } } }
Source:
public void suggestReviewersWithoutLimitOptionSpecified ( ) throws java.lang.Exception { java.lang.String changeId = createChange ( ) . getChangeId ( ) ; java.lang.String query = "users3" ; java.util.List < com.google.gerrit.server.change.SuggestReviewers.SuggestedReviewerInfo > suggestedReviewerInfos = newGson ( ) . fromJson ( adminSession.get ( ( ( ( "/changes/" + changeId ) + "/suggest_reviewers?q=" ) + query ) ) . getReader ( ) , new com.google.gson.reflect.TypeToken < java.util.List < com.google.gerrit.server.change.SuggestReviewers.SuggestedReviewerInfo > > ( ) { } . getType ( ) ) ; org.junit.Assert.assertEquals ( 1 , suggestedReviewerInfos.size ( ) ) ; }

Target:
public void suggestReviewersWithoutLimitOptionSpecified ( ) throws java.lang.Exception { java.lang.String changeId = createChange ( ) . getChangeId ( ) ; java.lang.String query = "users3" ; java.util.List < com.google.gerrit.server.change.SuggestReviewers.SuggestedReviewerInfo > suggestedReviewerInfos = newGson ( ) . fromJson ( adminSession.get ( ( ( ( "/changes/" + changeId ) + "/suggest_reviewers?q=" ) + query ) ) . getReader ( ) , new com.google.gson.reflect.TypeToken < java.util.List < com.google.gerrit.server.change.SuggestReviewers.SuggestedReviewerInfo > > ( ) { } . getType ( ) ) ; com.google.common.truth.Truth.assertThat ( suggestedReviewerInfos ) . hasSize ( 1 ) ; }
Source:
public void testCreate ( ) throws java.io.FileNotFoundException { final com.google.gerrit.server.config.SitePaths site = new com.google.gerrit.server.config.SitePaths ( new java.io.File ( "." ) ) ; final com.google.gerrit.pgm.util.ConsoleUI ui = org.easymock.EasyMock.createStrictMock ( com.google.gerrit.pgm.util.ConsoleUI.class ) ; org.easymock.EasyMock.replay ( ui ) ; com.google.gerrit.pgm.init.Libraries lib = new com.google.gerrit.pgm.init.Libraries ( new com.google.inject.Provider < com.google.gerrit.pgm.init.LibraryDownloader > ( ) { @ java.lang.Override public com.google.gerrit.pgm.init.LibraryDownloader get ( ) { return new com.google.gerrit.pgm.init.LibraryDownloader ( ui , site ) ; } } ) ; org.junit.Assert.assertNotNull ( lib.bouncyCastle ) ; org.junit.Assert.assertNotNull ( lib.mysqlDriver ) ; org.easymock.EasyMock.verify ( ui ) ; }

Target:
public void testCreate ( ) throws java.io.FileNotFoundException { final com.google.gerrit.server.config.SitePaths site = new com.google.gerrit.server.config.SitePaths ( new java.io.File ( "." ) ) ; final com.google.gerrit.pgm.util.ConsoleUI ui = org.easymock.EasyMock.createStrictMock ( com.google.gerrit.pgm.util.ConsoleUI.class ) ; org.easymock.EasyMock.replay ( ui ) ; com.google.gerrit.pgm.init.Libraries lib = new com.google.gerrit.pgm.init.Libraries ( new com.google.inject.Provider < com.google.gerrit.pgm.init.LibraryDownloader > ( ) { @ java.lang.Override public com.google.gerrit.pgm.init.LibraryDownloader get ( ) { return new com.google.gerrit.pgm.init.LibraryDownloader ( ui , site ) ; } } ) ; org.junit.Assert.assertNotNull ( lib.bouncyCastleProvider ) ; org.junit.Assert.assertNotNull ( lib.mysqlDriver ) ; org.easymock.EasyMock.verify ( ui ) ; }
Source:
public void open ( ) { if ( ! ( fileList.isLoaded ( ) ) ) { sp.setHeight ( "22px" ) ; } sp.setWidth ( ( ( ( com.google.gwt.user.client.Window.getClientWidth ( ) ) - 60 ) + "px" ) ) ; setPopupPositionAndShow ( this ) ; }

Target:
public void open ( ) { if ( ! ( fileList.isLoaded ( ) ) ) { sp.setHeight ( "22px" ) ; } sp.setWidth ( ( ( ( com.google.gwt.user.client.Window.getClientWidth ( ) ) - 60 ) + "px" ) ) ; setPopupPositionAndShow ( this ) ; if ( fileList.isLoaded ( ) ) { fileList.setRegisterKeys ( true ) ; fileList.movePointerTo ( callerKey ) ; } }
Source:
int shutdown ( ) { int cnt = 0 ; if ( ( pool ) != null ) { cnt = pool.shutdownNow ( ) . size ( ) ; pool.unregisterWorkQueue ( ) ; pool = null ; } return cnt ; }

Target:
int shutdown ( ) { int cnt = 0 ; if ( ( pool ) != null ) { for ( java.lang.Runnable r : pool.getQueue ( ) ) { com.googlesource.gerrit.plugins.replication.Destination.repLog.warn ( java.lang.String.format ( "Cancelling replication event %s" , r ) ) ; } cnt = pool.shutdownNow ( ) . size ( ) ; pool.unregisterWorkQueue ( ) ; pool = null ; } return cnt ; }
Source:
public static void setCacheable ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , long age , java.util.concurrent.TimeUnit unit ) { if ( req.isSecure ( ) ) { com.google.gwtexpui.server.CacheHeaders.setCacheablePrivate ( res , age , unit ) ; } else { com.google.gwtexpui.server.CacheHeaders.setCacheablePublic ( res , age , unit ) ; } }

Target:
public static void setCacheable ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , long age , java.util.concurrent.TimeUnit unit , boolean mustRevalidate ) { if ( req.isSecure ( ) ) { com.google.gwtexpui.server.CacheHeaders.setCacheablePrivate ( res , age , unit , mustRevalidate ) ; } else { com.google.gwtexpui.server.CacheHeaders.setCacheablePublic ( res , age , unit , mustRevalidate ) ; } }
Source:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerialization.writeCanBeNull ( out , oldId ) ; out.writeInt ( ( ( parentNum ) == null ? 0 : parentNum ) ) ; org.eclipse.jgit.lib.ObjectIdSerialization.writeNotNull ( out , newId ) ; java.lang.Character c = PatchListKey.WHITESPACE_TYPES.get ( whitespace ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid whitespace type: " + ( whitespace ) ) ) ; } out.writeChar ( c ) ; }

Target:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerializer.write ( out , oldId ) ; out.writeInt ( ( ( parentNum ) == null ? 0 : parentNum ) ) ; org.eclipse.jgit.lib.ObjectIdSerializer.writeWithoutMarker ( out , newId ) ; java.lang.Character c = PatchListKey.WHITESPACE_TYPES.get ( whitespace ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid whitespace type: " + ( whitespace ) ) ) ; } out.writeChar ( c ) ; }
Source:
public void onSuccess ( com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.diff.FileInfo > m ) { files.setRevisions ( ( base != null ? new com.google.gerrit.reviewdb.client.PatchSet.Id ( changeId , base._number ( ) ) : null ) , new com.google.gerrit.reviewdb.client.PatchSet.Id ( changeId , rev._number ( ) ) ) ; files.setValue ( m , myLastReply , comments.get ( 0 ) , drafts.get ( 0 ) ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.diff.FileInfo > m ) { files.set ( ( base != null ? new com.google.gerrit.reviewdb.client.PatchSet.Id ( changeId , base._number ( ) ) : null ) , new com.google.gerrit.reviewdb.client.PatchSet.Id ( changeId , rev._number ( ) ) , style , editMessage , reply , ( ( edit ) != null ) ) ; files.setValue ( m , myLastReply , comments.get ( 0 ) , drafts.get ( 0 ) , fileTableMode ) ; }
Source:
private static void set ( org.eclipse.jgit.lib.Config cfg , java.lang.String section , java.lang.String key , java.lang.String val ) { if ( com.google.common.base.Strings.isNullOrEmpty ( val ) ) { cfg.unset ( UserConfigSections.MY , section , key ) ; } else { cfg.setString ( UserConfigSections.MY , section , key , val ) ; } }

Target:
private static void set ( org.eclipse.jgit.lib.Config cfg , java.lang.String section , java.lang.String key , @ com.google.gerrit.common.Nullable java.lang.String val ) { if ( ( val == null ) || ( val.trim ( ) . isEmpty ( ) ) ) { cfg.unset ( UserConfigSections.MY , section.trim ( ) , key ) ; } else { cfg.setString ( UserConfigSections.MY , section.trim ( ) , key , val.trim ( ) ) ; } }
Source:
public void onCellClicked ( com.google.gwt.user.client.ui.SourcesTableEvents sender , int row , int cell ) { if ( ( cell != 1 ) && ( ( getRowItem ( row ) ) != null ) ) { movePointerTo ( row ) ; } }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { final com.google.gwt.user.client.ui.HTMLTable.Cell cell = table.getCellForEvent ( event ) ; if ( ( ( cell != null ) && ( ( cell.getCellIndex ( ) ) != 1 ) ) && ( ( getRowItem ( cell.getRowIndex ( ) ) ) != null ) ) { movePointerTo ( cell.getRowIndex ( ) ) ; } }
Source:
static com.google.gerrit.server.query.change.QueryOptions convertOptions ( com.google.gerrit.server.query.change.QueryOptions opts ) { int backendLimit = opts.config ( ) . maxLimit ( ) ; int limit = com.google.common.primitives.Ints.saturatedCast ( ( ( ( long ) ( opts.limit ( ) ) ) + ( opts.start ( ) ) ) ) ; limit = java.lang.Math.min ( limit , backendLimit ) ; return com.google.gerrit.server.query.change.QueryOptions.create ( opts.config ( ) , 0 , limit ) ; }

Target:
static com.google.gerrit.server.query.change.QueryOptions convertOptions ( com.google.gerrit.server.query.change.QueryOptions opts ) { int backendLimit = opts.config ( ) . maxLimit ( ) ; int limit = com.google.common.primitives.Ints.saturatedCast ( ( ( ( long ) ( opts.limit ( ) ) ) + ( opts.start ( ) ) ) ) ; limit = java.lang.Math.min ( limit , backendLimit ) ; return com.google.gerrit.server.query.change.QueryOptions.create ( opts.config ( ) , 0 , limit , opts.fields ( ) ) ; }
Source:
public void unblockMoreSpecificRefInLocalWithExclusiveFlag_Fails ( ) { com.google.gerrit.server.project.Util.block ( parent , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/heads/*" ) ; com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/heads/master" , true ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.Util.DEVS ) ; assertCannotUpdate ( "refs/heads/master" , u ) ; }

Target:
public void unblockOtherPermissionWithMoreSpecificRefAndExclusiveFlag_Fails ( ) { com.google.gerrit.server.project.testing.Util.block ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/heads/*" ) ; com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.testing.Util.DEVS , "refs/heads/master" ) ; com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.SUBMIT , com.google.gerrit.server.project.testing.Util.DEVS , "refs/heads/master" , true ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.testing.Util.DEVS ) ; assertCannotUpdate ( "refs/heads/master" , u ) ; }
Source:
public void process ( java.lang.String pluginName , java.io.InputStream in ) throws java.io.IOException { java.io.File tmpPlugin = com.google.gerrit.server.plugins.JarPluginProvider.storeInTemp ( pluginName , in , site ) ; java.lang.String pluginVersion = com.google.gerrit.pgm.init.InitPlugins.getVersion ( tmpPlugin ) ; if ( deleteTempPluginFile ) { tmpPlugin.delete ( ) ; } result.add ( new com.google.gerrit.common.PluginData ( pluginName , pluginVersion , tmpPlugin ) ) ; }

Target:
public void process ( java.lang.String pluginName , java.io.InputStream in ) throws java.io.IOException { java.nio.file.Path tmpPlugin = com.google.gerrit.server.plugins.JarPluginProvider.storeInTemp ( pluginName , in , site ) ; java.lang.String pluginVersion = com.google.gerrit.pgm.init.InitPlugins.getVersion ( tmpPlugin ) ; if ( deleteTempPluginFile ) { java.nio.file.Files.delete ( tmpPlugin ) ; } result.add ( new com.google.gerrit.common.PluginData ( pluginName , pluginVersion , tmpPlugin ) ) ; }
Source:
public java.sql.Connection getConnection ( java.lang.String username , java.lang.String password ) throws java.sql.SQLException { return java.sql.DriverManager.getConnection ( url , username , password ) ; }

Target:
public java.sql.Connection getConnection ( java.lang.String user , java.lang.String password ) throws java.sql.SQLException { if ( ( driver ) != null ) { final java.util.Properties info = new java.util.Properties ( connectionInfo ) ; if ( user != null ) { info.put ( "user" , user ) ; } if ( password != null ) { info.put ( "password" , password ) ; } return driver.connect ( url , info ) ; } return java.sql.DriverManager.getConnection ( url , user , password ) ; }
Source:
public com.google.gerrit.server.notedb.ChangeNotes createFromIdOnlyWhenNoteDbDisabled ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change.Id changeId ) throws com.google.gwtorm.server.OrmException { com.google.common.base.Preconditions.checkState ( ( ! ( args.migration.readChanges ( ) ) ) , ( "do not call" + " createFromIdOnlyWhenNoteDbDisabled when NoteDb is enabled" ) ) ; com.google.gerrit.reviewdb.client.Change change = com.google.gerrit.server.notedb.ChangeNotes.Factory.unwrap ( db ) . changes ( ) . get ( changeId ) ; com.google.common.base.Preconditions.checkArgument ( ( change != null ) , "change %s not found in ReviewDb" , changeId ) ; return new com.google.gerrit.server.notedb.ChangeNotes ( args , change.getProject ( ) , change ) . load ( ) ; }

Target:
public com.google.gerrit.server.notedb.ChangeNotes createFromIdOnlyWhenNoteDbDisabled ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.Change.Id changeId ) throws com.google.gwtorm.server.OrmException { com.google.common.base.Preconditions.checkState ( ( ! ( args.migration.readChanges ( ) ) ) , ( "do not call" + " createFromIdOnlyWhenNoteDbDisabled when NoteDb is enabled" ) ) ; com.google.gerrit.reviewdb.client.Change change = com.google.gerrit.server.notedb.ChangeNotes.Factory.unwrap ( db ) . changes ( ) . get ( changeId ) ; com.google.common.base.Preconditions.checkNotNull ( change , "change %s not found in ReviewDb" , changeId ) ; return new com.google.gerrit.server.notedb.ChangeNotes ( args , change.getProject ( ) , change ) . load ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { java.lang.Class.forName ( com.mysql.jdbc.Driver.class . getName ( ) ) ; final java.lang.String host = "localhost" ; final java.lang.String database = "gwtorm" ; final java.lang.String user = "gwtorm" ; final java.lang.String pass = "gwtorm" ; final java.lang.String url = ( ( "jdbc:mysql://" + host ) + "/" ) + database ; try { db = java.sql.DriverManager.getConnection ( url , user , pass ) ; } catch ( java.lang.Throwable t ) { org.junit.Assume.assumeNoException ( t ) ; } executor = new com.google.gwtorm.jdbc.JdbcExecutor ( db ) ; dialect = new com.google.gwtorm.schema.sql.DialectMySQL ( ) . refine ( db ) ; final java.util.Properties p = new java.util.Properties ( ) ; p.setProperty ( "driver" , com.mysql.jdbc.Driver.class . getName ( ) ) ; p.setProperty ( "url" , db.getMetaData ( ) . getURL ( ) ) ; p.setProperty ( "user" , user ) ; p.setProperty ( "password" , pass ) ; phoneBook = new com.google.gwtorm.jdbc.Database < com.google.gwtorm.data.PhoneBookDb > ( new com.google.gwtorm.jdbc.SimpleDataSource ( p ) , com.google.gwtorm.data.PhoneBookDb.class ) ; phoneBook2 = new com.google.gwtorm.jdbc.Database < com.google.gwtorm.data.PhoneBookDb2 > ( new com.google.gwtorm.jdbc.SimpleDataSource ( p ) , com.google.gwtorm.data.PhoneBookDb2.class ) ; drop ( "TABLE address_id" ) ; drop ( "TABLE addresses" ) ; drop ( "TABLE cnt" ) ; drop ( "TABLE foo" ) ; drop ( "TABLE people" ) ; }

Target:
public void tearDown ( ) { drop ( "TABLE address_id" ) ; drop ( "TABLE addresses" ) ; drop ( "TABLE cnt" ) ; drop ( "TABLE bar" ) ; drop ( "TABLE foo" ) ; drop ( "TABLE people" ) ; if ( ( executor ) != null ) { executor.close ( ) ; } executor = null ; if ( ( db ) != null ) { try { db.close ( ) ; } catch ( java.sql.SQLException e ) { throw new java.lang.RuntimeException ( "Cannot close database" , e ) ; } } db = null ; }
Source:
private void parseCreate ( final org.spearce.jgit.transport.ReceiveCommand cmd ) { if ( ( com.google.gerrit.server.ssh.commands.Receive.isHead ( cmd ) ) && ( canPerform ( com.google.gerrit.client.reviewdb.ApprovalCategory.PUSH_HEAD , com.google.gerrit.client.reviewdb.ApprovalCategory.PUSH_HEAD_CREATE ) ) ) { } else if ( ( com.google.gerrit.server.ssh.commands.Receive.isTag ( cmd ) ) && ( canPerform ( com.google.gerrit.client.reviewdb.ApprovalCategory.PUSH_TAG , ( ( short ) ( 1 ) ) ) ) ) { parseCreateTag ( cmd ) ; } else { com.google.gerrit.server.ssh.commands.Receive.reject ( cmd ) ; } }

Target:
private void parseCreate ( final org.spearce.jgit.transport.ReceiveCommand cmd ) { if ( projectControl.canCreateRef ( cmd.getRefName ( ) ) ) { if ( com.google.gerrit.server.ssh.commands.Receive.isTag ( cmd ) ) { parseCreateTag ( cmd ) ; } } else { com.google.gerrit.server.ssh.commands.Receive.reject ( cmd ) ; } }
Source:
static void postSignIn ( final com.google.gerrit.client.reviewdb.Account acct , final com.google.gwt.user.client.rpc.AsyncCallback < ? > ac ) { com.google.gerrit.client.Gerrit.myAccount = acct ; com.google.gerrit.client.Gerrit.refreshMenuBar ( ) ; for ( final com.google.gerrit.client.SignedInListener l : com.google.gerrit.client.Gerrit.signedInListeners ) { l.onSignIn ( ) ; } final com.google.gerrit.client.ui.Screen cs = com.google.gerrit.client.Gerrit.body.getView ( ) ; if ( cs != null ) { cs.onSignIn ( ) ; } if ( ac != null ) { ac.onSuccess ( null ) ; } }

Target:
public void onSuccess ( final com.google.gerrit.client.reviewdb.Account result ) { if ( result != null ) { com.google.gerrit.client.Gerrit.myAccount = result ; } else { com.google.gwt.user.client.Cookies.removeCookie ( com.google.gerrit.client.Gerrit.ACCOUNT_COOKIE ) ; } com.google.gerrit.client.Gerrit.refreshMenuBar ( ) ; showInitialScreen ( ) ; }
Source:
private org.apache.http.conn.HttpClientConnectionManager customConnectionManager ( ) { org.apache.http.config.Registry < org.apache.http.conn.socket.ConnectionSocketFactory > socketFactoryRegistry = org.apache.http.config.RegistryBuilder.< org.apache.http.conn.socket.ConnectionSocketFactory > create ( ) . register ( "https" , sslSocketFactory ) . register ( "http" , PlainConnectionSocketFactory.INSTANCE ) . build ( ) ; org.apache.http.impl.conn.PoolingHttpClientConnectionManager connManager = new org.apache.http.impl.conn.PoolingHttpClientConnectionManager ( socketFactoryRegistry ) ; connManager.setDefaultMaxPerRoute ( com.ericsson.gerrit.plugins.syncindex.HttpClientProvider.CONNECTIONS_PER_ROUTE ) ; connManager.setMaxTotal ( com.ericsson.gerrit.plugins.syncindex.HttpClientProvider.MAX_CONNECTIONS ) ; connManager.setValidateAfterInactivity ( com.ericsson.gerrit.plugins.syncindex.HttpClientProvider.MAX_CONNECTION_INACTIVITY ) ; return connManager ; }

Target:
private org.apache.http.conn.HttpClientConnectionManager customConnectionManager ( ) { org.apache.http.config.Registry < org.apache.http.conn.socket.ConnectionSocketFactory > socketFactoryRegistry = org.apache.http.config.RegistryBuilder.< org.apache.http.conn.socket.ConnectionSocketFactory > create ( ) . register ( "https" , sslSocketFactory ) . register ( "http" , PlainConnectionSocketFactory.INSTANCE ) . build ( ) ; org.apache.http.impl.conn.PoolingHttpClientConnectionManager connManager = new org.apache.http.impl.conn.PoolingHttpClientConnectionManager ( socketFactoryRegistry ) ; connManager.setDefaultMaxPerRoute ( com.ericsson.gerrit.plugins.multimaster.HttpClientProvider.CONNECTIONS_PER_ROUTE ) ; connManager.setMaxTotal ( com.ericsson.gerrit.plugins.multimaster.HttpClientProvider.MAX_CONNECTIONS ) ; connManager.setValidateAfterInactivity ( com.ericsson.gerrit.plugins.multimaster.HttpClientProvider.MAX_CONNECTION_INACTIVITY ) ; return connManager ; }
Source:
public boolean evict ( final java.lang.String cacheName , final java.lang.Object key ) { return new com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarder.Request ( ( "evict for cache " + cacheName ) ) { @ java.lang.Override com.ericsson.gerrit.plugins.highavailability.forwarder.rest.HttpResponseHandler.HttpResult send ( ) throws java.io.IOException { java.lang.String json = com.ericsson.gerrit.plugins.highavailability.forwarder.rest.GsonParser.toJson ( cacheName , key ) ; return httpSession.post ( com.google.common.base.Joiner.on ( "/" ) . join ( pluginRelativePath , "cache" , cacheName ) , json ) ; } } . execute ( ) ; }

Target:
public boolean evict ( final java.lang.String cacheName , final java.lang.Object key ) { return new com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarder.Request ( ( ( ( ( "evict for cache " + cacheName ) + "[" ) + key ) + "]" ) ) { @ java.lang.Override com.ericsson.gerrit.plugins.highavailability.forwarder.rest.HttpResponseHandler.HttpResult send ( ) throws java.io.IOException { java.lang.String json = com.ericsson.gerrit.plugins.highavailability.forwarder.rest.GsonParser.toJson ( cacheName , key ) ; return httpSession.post ( com.google.common.base.Joiner.on ( "/" ) . join ( pluginRelativePath , "cache" , cacheName ) , json ) ; } } . execute ( ) ; }
Source:
private boolean combineA ( final int i ) { final org.eclipse.jgit.diff.Edit s = edits.get ( i ) ; final org.eclipse.jgit.diff.Edit e = edits.get ( ( i - 1 ) ) ; return ( ( s.getBeginA ( ) ) - ( e.getEndA ( ) ) ) <= ( 2 * ( context ) ) ; }

Target:
private boolean combineA ( final int i ) { final com.google.gerrit.prettify.common.BaseEdit s = edits.get ( i ) ; final com.google.gerrit.prettify.common.BaseEdit e = edits.get ( ( i - 1 ) ) ; return ( ( s.getBeginA ( ) ) - ( e.getEndA ( ) ) ) <= ( 2 * ( context ) ) ; }
Source:
public void start ( org.apache.sshd.server.Environment env ) { startThread ( new com.google.gerrit.sshd.commands.CommandRunnable ( ) { @ java.lang.Override public void run ( ) throws java.lang.Exception { parseCommandLine ( impl ) ; final java.io.PrintWriter stdout = toPrintWriter ( out ) ; try { impl.display ( stdout ) ; } finally { stdout.flush ( ) ; } } } ) ; }

Target:
protected void parseCommandLine ( ) throws com.google.gerrit.sshd.commands.UnloggedFailure { parseCommandLine ( impl ) ; }
Source:
public com.google.gerrit.extensions.restapi.Response < com.google.gerrit.server.change.ChangeJson.CommitInfo > apply ( com.google.gerrit.server.change.RevisionResource resource ) throws com.google.gerrit.server.patch.PatchSetInfoNotAvailableException , com.google.gwtorm.server.OrmException { com.google.gerrit.extensions.restapi.Response < com.google.gerrit.server.change.ChangeJson.CommitInfo > r = com.google.gerrit.extensions.restapi.Response.ok ( json.toCommit ( resource.getPatchSet ( ) ) ) ; if ( resource.isCacheable ( ) ) { r.caching ( com.google.gerrit.extensions.restapi.CacheControl.PRIVATE ( 7 , java.util.concurrent.TimeUnit.DAYS ) ) ; } return r ; }

Target:
public com.google.gerrit.extensions.restapi.Response < com.google.gerrit.server.change.ChangeJson.CommitInfo > apply ( com.google.gerrit.server.change.RevisionResource resource ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException { try { com.google.gerrit.extensions.restapi.Response < com.google.gerrit.server.change.ChangeJson.CommitInfo > r = com.google.gerrit.extensions.restapi.Response.ok ( json.toCommit ( resource.getPatchSet ( ) ) ) ; if ( resource.isCacheable ( ) ) { r.caching ( com.google.gerrit.extensions.restapi.CacheControl.PRIVATE ( 7 , java.util.concurrent.TimeUnit.DAYS ) ) ; } return r ; } catch ( com.google.gerrit.server.patch.PatchSetInfoNotAvailableException e ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( e.getMessage ( ) ) ; } }
Source:
void setContext ( final int context ) { operation ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { getSkipManager ( ) . removeAll ( ) ; getSkipManager ( ) . render ( context , diff ) ; updateRenderEntireFile ( ) ; } } ) ; }

Target:
java.lang.Runnable maybeNextVimSearch ( final net.codemirror.lib.CodeMirror cm ) { return new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( cm.vim ( ) . hasSearchHighlight ( ) ) { cm.vim ( ) . handleKey ( "n" ) ; } else { getChunkManager ( ) . diffChunkNav ( cm , Direction.NEXT ) . run ( ) ; } } } ; }
Source:
private boolean isDraftPatchSet ( com.google.gerrit.reviewdb.client.PatchSet.Id id , com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.PatchSet ps = db.patchSets ( ) . get ( id ) ; if ( ps == null ) { throw new com.google.gwtorm.server.OrmException ( ( ( "Patch set " + id ) + " not found" ) ) ; } return ps.isDraft ( ) ; }

Target:
public boolean isReviewer ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { return isReviewer ( db , null ) ; }
Source:
protected void configure ( ) { final com.google.inject.TypeLiteral < com.google.gerrit.server.cache.Cache < com.google.gerrit.reviewdb.Project.NameKey , com.google.gerrit.server.project.ProjectState > > type = new com.google.inject.TypeLiteral < com.google.gerrit.server.cache.Cache < com.google.gerrit.reviewdb.Project.NameKey , com.google.gerrit.server.project.ProjectState > > ( ) { } ; core ( type , com.google.gerrit.server.project.ProjectCacheImpl.CACHE_NAME ) . populateWith ( com.google.gerrit.server.project.ProjectCacheImpl.Loader.class ) ; bind ( com.google.gerrit.server.project.ProjectCacheImpl.class ) ; bind ( com.google.gerrit.server.project.ProjectCache.class ) . to ( com.google.gerrit.server.project.ProjectCacheImpl.class ) ; }

Target:
protected void configure ( ) { final com.google.inject.TypeLiteral < com.google.gerrit.server.cache.Cache < com.google.gerrit.reviewdb.Project.NameKey , com.google.gerrit.server.project.ProjectState > > type = new com.google.inject.TypeLiteral < com.google.gerrit.server.cache.Cache < com.google.gerrit.reviewdb.Project.NameKey , com.google.gerrit.server.project.ProjectState > > ( ) { } ; cache ( type , com.google.gerrit.server.project.ProjectCacheImpl.CACHE_NAME ) . populateWith ( com.google.gerrit.server.project.ProjectCacheImpl.Loader.class ) ; bind ( com.google.gerrit.server.project.ProjectCacheImpl.class ) ; bind ( com.google.gerrit.server.project.ProjectCache.class ) . to ( com.google.gerrit.server.project.ProjectCacheImpl.class ) ; }
Source:
public void copyLabels ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.common.data.LabelTypes labelTypes , com.google.gerrit.reviewdb.client.PatchSet.Id source , com.google.gerrit.reviewdb.client.PatchSet dest , com.google.gerrit.server.change.PatchSetInserter.ChangeKind changeKind ) throws com.google.gwtorm.server.OrmException { java.lang.Iterable < com.google.gerrit.reviewdb.client.PatchSetApproval > sourceApprovals = db.patchSetApprovals ( ) . byPatchSet ( source ) ; copyLabels ( db , labelTypes , sourceApprovals , source , dest , changeKind ) ; }

Target:
public void copyLabels ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.common.data.LabelTypes labelTypes , com.google.gerrit.reviewdb.client.PatchSet.Id source , com.google.gerrit.reviewdb.client.PatchSet dest , com.google.gerrit.server.change.ChangeKind changeKind ) throws com.google.gwtorm.server.OrmException { java.lang.Iterable < com.google.gerrit.reviewdb.client.PatchSetApproval > sourceApprovals = db.patchSetApprovals ( ) . byPatchSet ( source ) ; copyLabels ( db , labelTypes , sourceApprovals , source , dest , changeKind ) ; }
Source:
private void format ( java.io.OutputStream out ) throws java.io.IOException { out.write ( com.google.gerrit.server.change.GetPatch.formatEmailHeader ( commit ) . getBytes ( com.google.common.base.Charsets.UTF_8 ) ) ; org.eclipse.jgit.diff.DiffFormatter fmt = new org.eclipse.jgit.diff.DiffFormatter ( out ) ; fmt.setRepository ( repo ) ; fmt.format ( base.getTree ( ) , commit.getTree ( ) ) ; fmt.flush ( ) ; }

Target:
private void format ( java.io.OutputStream out ) throws java.io.IOException { out.write ( com.google.gerrit.server.change.GetPatch.formatEmailHeader ( commit ) . getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; org.eclipse.jgit.diff.DiffFormatter fmt = new org.eclipse.jgit.diff.DiffFormatter ( out ) ; fmt.setRepository ( repo ) ; fmt.format ( base.getTree ( ) , commit.getTree ( ) ) ; fmt.flush ( ) ; }
Source:
public com.google.gerrit.extensions.api.changes.ReviewerInfo format ( com.google.gerrit.extensions.api.changes.ReviewerInfo out , com.google.gerrit.server.permissions.PermissionBackend.ForChange perm , com.google.gerrit.server.query.change.ChangeData cd ) throws com.google.gerrit.server.permissions.PermissionBackendException , com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.PatchSet.Id psId = cd.change ( ) . currentPatchSetId ( ) ; return format ( out , perm , cd , approvalsUtil.byPatchSetUser ( db.get ( ) , cd.notes ( ) , perm.user ( ) , psId , new com.google.gerrit.reviewdb.client.Account.Id ( out._accountId ) , null , null ) ) ; }

Target:
public com.google.gerrit.extensions.api.changes.ReviewerInfo format ( com.google.gerrit.server.CurrentUser user , com.google.gerrit.extensions.api.changes.ReviewerInfo out , com.google.gerrit.server.permissions.PermissionBackend.ForChange perm , com.google.gerrit.server.query.change.ChangeData cd ) throws com.google.gerrit.server.permissions.PermissionBackendException , com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.PatchSet.Id psId = cd.change ( ) . currentPatchSetId ( ) ; return format ( user , out , perm , cd , approvalsUtil.byPatchSetUser ( db.get ( ) , cd.notes ( ) , perm.user ( ) , psId , new com.google.gerrit.reviewdb.client.Account.Id ( out._accountId ) , null , null ) ) ; }
Source:
private void verifyComment ( com.google.gerrit.reviewdb.client.PatchLineComment c ) { com.google.common.base.Preconditions.checkArgument ( ( ( c.getRevId ( ) ) != null ) ) ; com.google.common.base.Preconditions.checkArgument ( c.getAuthor ( ) . equals ( getUser ( ) . getAccountId ( ) ) , ( "The author for the following comment does not match the author of" + " this ChangeDraftUpdate (%s): %s" ) , getUser ( ) . getAccountId ( ) , c ) ; }

Target:
private void verifyComment ( com.google.gerrit.reviewdb.client.PatchLineComment c ) { com.google.common.base.Preconditions.checkArgument ( ( ( c.getRevId ( ) ) != null ) , "RevId required for comment: %s" , c ) ; com.google.common.base.Preconditions.checkArgument ( c.getAuthor ( ) . equals ( getUser ( ) . getAccountId ( ) ) , ( "The author for the following comment does not match the author of" + " this ChangeDraftUpdate (%s): %s" ) , getUser ( ) . getAccountId ( ) , c ) ; }
Source:
public com.google.gerrit.server.git.WorkQueue.Task.State getState ( ) { if ( ( isDone ( ) ) && ( ! ( isPeriodic ( ) ) ) ) { return com.google.gerrit.server.git.WorkQueue.Task.State.DONE ; } else if ( isRunning ( ) ) { return com.google.gerrit.server.git.WorkQueue.Task.State.RUNNING ; } else if ( isCancelled ( ) ) { return com.google.gerrit.server.git.WorkQueue.Task.State.CANCELLED ; } final long delay = getDelay ( java.util.concurrent.TimeUnit.MILLISECONDS ) ; if ( delay <= 0 ) { return com.google.gerrit.server.git.WorkQueue.Task.State.READY ; } else if ( 0 < delay ) { return com.google.gerrit.server.git.WorkQueue.Task.State.SLEEPING ; } return com.google.gerrit.server.git.WorkQueue.Task.State.OTHER ; }

Target:
public com.google.gerrit.server.git.WorkQueue.Task.State getState ( ) { if ( isCancelled ( ) ) { return com.google.gerrit.server.git.WorkQueue.Task.State.CANCELLED ; } else if ( ( isDone ( ) ) && ( ! ( isPeriodic ( ) ) ) ) { return com.google.gerrit.server.git.WorkQueue.Task.State.DONE ; } else if ( running.get ( ) ) { return com.google.gerrit.server.git.WorkQueue.Task.State.RUNNING ; } final long delay = getDelay ( java.util.concurrent.TimeUnit.MILLISECONDS ) ; if ( delay <= 0 ) { return com.google.gerrit.server.git.WorkQueue.Task.State.READY ; } else if ( 0 < delay ) { return com.google.gerrit.server.git.WorkQueue.Task.State.SLEEPING ; } return com.google.gerrit.server.git.WorkQueue.Task.State.OTHER ; }
Source:
private void serveGwtUi ( ) { serve ( "/gerrit_ui/*" ) . with ( com.google.inject.Key.get ( javax.servlet.http.HttpServlet.class , com.google.inject.name.Names.named ( com.google.gerrit.httpd.raw.StaticModule.GWT_UI_SERVLET ) ) ) ; if ( ( warFs ) == null ) { filter ( "/" ) . through ( new com.google.gerrit.httpd.raw.RecompileGwtUiFilter ( buckOut , unpackedWar ) ) ; } }

Target:
private void serveGwtUi ( ) { serveRegex ( "^/gerrit_ui/(?!rpc/)(.*)$" ) . with ( com.google.inject.Key.get ( javax.servlet.http.HttpServlet.class , com.google.inject.name.Names.named ( com.google.gerrit.httpd.raw.StaticModule.GWT_UI_SERVLET ) ) ) ; if ( ( ( warFs ) == null ) && ( ( buckOut ) != null ) ) { filter ( "/" ) . through ( new com.google.gerrit.httpd.raw.RecompileGwtUiFilter ( buckOut , unpackedWar ) ) ; } }
Source:
public void onSend ( ) { java.lang.String topic = newTopic.getText ( ) ; Util.DETAIL_SVC.alterTopic ( change.getId ( ) , topic , getMessageText ( ) , createCallback ( ) ) ; }

Target:
public void onSend ( ) { java.lang.String topic = newTopic.getText ( ) ; com.google.gerrit.client.changes.ChangeApi.topic ( change.getId ( ) . get ( ) , topic , getMessageText ( ) , new com.google.gwtjsonrpc.common.AsyncCallback < java.lang.String > ( ) { @ java.lang.Override public void onSuccess ( java.lang.String result ) { sent = true ; com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( change.getId ( ) ) ) ; hide ( ) ; } @ java.lang.Override public void onFailure ( java.lang.Throwable caught ) { enableButtons ( true ) ; } } ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { java.util.List < java.lang.String > value = getValues ( row ) ; java.util.List < java.lang.String > nextValue = getValues ( ( row + 1 ) ) ; populate ( row , nextValue , false ) ; populate ( ( row + 1 ) , value , ( ( row + 1 ) == ( ( table.getRowCount ( ) ) - 1 ) ) ) ; widget.setEnabled ( true ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { moveDown ( row ) ; }
Source:
private void addHeader ( com.googlesource.gerrit.plugins.xdocs.client.ChangeInfo change ) { com.google.gwt.user.client.ui.HorizontalPanel p = new com.google.gwt.user.client.ui.HorizontalPanel ( ) ; p.setStyleName ( "xdocs-header" ) ; p.add ( getPathHeader ( change ) ) ; iconPanel = new com.google.gwt.user.client.ui.FlowPanel ( ) ; iconPanel.setStyleName ( "xdocs-icon-panel" ) ; p.add ( iconPanel ) ; addNavigationButtons ( change ) ; add ( p ) ; }

Target:
private void addHeader ( com.googlesource.gerrit.plugins.xdocs.client.ChangeInfo change ) { com.google.gwt.user.client.ui.HorizontalPanel p = new com.google.gwt.user.client.ui.HorizontalPanel ( ) ; p.setStyleName ( "xdocs-header" ) ; p.add ( getPathHeader ( change ) ) ; iconPanel = new com.google.gwt.user.client.ui.FlowPanel ( ) ; iconPanel.setStyleName ( "xdocs-icon-panel" ) ; p.add ( iconPanel ) ; additionalIconPanel = new com.google.gwt.user.client.ui.FlowPanel ( ) ; iconPanel.add ( additionalIconPanel ) ; addNavigationButtons ( change ) ; add ( p ) ; }
Source:
protected void configure ( ) { final com.google.gerrit.sshd.CommandName gerrit = com.google.gerrit.sshd.Commands.named ( "gerrit" ) ; command ( gerrit , "approve" ) . to ( com.google.gerrit.sshd.commands.ApproveCommand.class ) ; command ( gerrit , "create-project" ) . to ( com.google.gerrit.sshd.commands.AdminCreateProject.class ) ; command ( gerrit , "receive-pack" ) . to ( com.google.gerrit.sshd.commands.Receive.class ) ; command ( gerrit , "replicate" ) . to ( com.google.gerrit.sshd.commands.AdminReplicate.class ) ; }

Target:
protected void configure ( ) { final com.google.gerrit.sshd.CommandName gerrit = com.google.gerrit.sshd.Commands.named ( "gerrit" ) ; command ( gerrit , "approve" ) . to ( com.google.gerrit.sshd.commands.ApproveCommand.class ) ; command ( gerrit , "create-project" ) . to ( com.google.gerrit.sshd.commands.AdminCreateProject.class ) ; command ( gerrit , "gsql" ) . to ( com.google.gerrit.sshd.commands.AdminQueryShell.class ) ; command ( gerrit , "receive-pack" ) . to ( com.google.gerrit.sshd.commands.Receive.class ) ; command ( gerrit , "replicate" ) . to ( com.google.gerrit.sshd.commands.AdminReplicate.class ) ; }
Source:
public java.lang.String apply ( com.google.gerrit.server.change.RevisionResource rev , com.googlesource.gerrit.plugins.cookbook.HelloRevisionAction.Input input ) { final java.lang.String greeting = ( input.french ) ? "Bonjour" : "Hello" ; return java.lang.String.format ( "%s %s from change %s, patch set %d!" , greeting , ( com.google.common.base.Strings.isNullOrEmpty ( input.message ) ? com.google.common.base.Objects.firstNonNull ( user.get ( ) . getUserName ( ) , "world" ) : input.message ) , rev.getChange ( ) . getId ( ) . toString ( ) , rev.getPatchSet ( ) . getPatchSetId ( ) ) ; }

Target:
public java.lang.String apply ( com.google.gerrit.server.change.RevisionResource rev , com.googlesource.gerrit.plugins.cookbook.HelloRevisionAction.Input input ) { final java.lang.String greeting = ( input.french ) ? "Bonjour" : "Hello" ; return java.lang.String.format ( "%s %s from change %s, patch set %d!" , greeting , ( com.google.common.base.Strings.isNullOrEmpty ( input.message ) ? com.google.common.base.MoreObjects.firstNonNull ( user.get ( ) . getUserName ( ) , "world" ) : input.message ) , rev.getChange ( ) . getId ( ) . toString ( ) , rev.getPatchSet ( ) . getPatchSetId ( ) ) ; }
Source:
protected java.io.PrintWriter startRenderText ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res ) throws java.io.IOException { res.setContentType ( com.google.gitiles.FormatType.TEXT.getMimeType ( ) ) ; res.setCharacterEncoding ( "UTF-8" ) ; res.setHeader ( com.google.common.net.HttpHeaders.CONTENT_DISPOSITION , "attachment" ) ; setCacheHeaders ( req , res ) ; return res.getWriter ( ) ; }

Target:
protected void setApiHeaders ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , com.google.gitiles.FormatType type ) { res.setContentType ( type.getMimeType ( ) ) ; res.setCharacterEncoding ( com.google.common.base.Charsets.UTF_8.name ( ) ) ; res.setHeader ( com.google.common.net.HttpHeaders.CONTENT_DISPOSITION , "attachment" ) ; setCacheHeaders ( req , res ) ; }
Source:
public void newPatchSetByOtherOnReviewableChangeOwnerSelfCcNotifyOwnerReviewersInReviewDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isFalse ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; pushTo ( sc , "refs/for/master%notify=OWNER_REVIEWERS" , other , EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "newpatchset" , sc ) . notTo ( sc.starrer , other ) . notTo ( sc.reviewerByEmail , sc.ccerByEmail ) . to ( sc.owner , sc.reviewer , sc.ccer ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; }

Target:
public void newPatchSetByOtherOnReviewableChangeOwnerSelfCcNotifyOwnerReviewersInReviewDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isFalse ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; pushTo ( sc , "refs/for/master%notify=OWNER_REVIEWERS" , other , EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "newpatchset" , sc ) . to ( sc.owner , sc.reviewer , sc.ccer ) . noOneElse ( ) ; }
Source:
public void testIsEnabledRefNoParentMatchingBranchMiddleDisabled ( ) { java.lang.String [ ] branches = new java.lang.String [ ] { "^refs/heads/foo.*" , "^refs/heads/test.*" , "^refs/heads/baz.*" } ; setupIsEnabled ( "false" , null , branches ) ; com.googlesource.gerrit.plugins.its.base.its.ItsConfig itsConfig = createItsConfig ( ) ; replayMocks ( ) ; assertFalse ( itsConfig.isEnabled ( "testProject" , "refs/heads/testBranch" ) ) ; }

Target:
public void testIsEnabledRefParentNoBranchDisabled ( ) { java.lang.String [ ] branches = new java.lang.String [ ] { } ; setupIsEnabled ( "false" , "false" , branches ) ; com.googlesource.gerrit.plugins.its.base.its.ItsConfig itsConfig = createItsConfig ( ) ; replayMocks ( ) ; com.google.gerrit.reviewdb.client.Project.NameKey projectNK = new com.google.gerrit.reviewdb.client.Project.NameKey ( "testProject" ) ; assertFalse ( itsConfig.isEnabled ( projectNK , "refs/heads/testBranch" ) ) ; }
Source:
private void initRevisionsAction ( com.google.gerrit.client.changes.ChangeInfo info , java.lang.String revision ) { revisionsAction = new com.google.gerrit.client.change.RevisionsAction ( info.legacy_id ( ) , revision , style , headerLine , revisions ) ; }

Target:
private void initIncludedInAction ( com.google.gerrit.client.changes.ChangeInfo info ) { if ( ( info.status ( ) ) == ( com.google.gerrit.reviewdb.client.Change.Status.MERGED ) ) { includedInAction = new com.google.gerrit.client.change.IncludedInAction ( info.legacy_id ( ) , style , headerLine , includedIn ) ; includedIn.setVisible ( true ) ; } }
Source:
public static void match ( java.lang.String match , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.groups.GroupMap > cb ) { if ( ( match == null ) || ( "" . equals ( match ) ) ) { com.google.gerrit.client.groups.GroupMap.all ( cb ) ; } else { new com.google.gerrit.client.rpc.RestApi ( "/groups/" ) . addParameter ( "m" , match ) . get ( com.google.gerrit.client.rpc.NativeMap.copyKeysIntoChildren ( cb ) ) ; } }

Target:
private static com.google.gerrit.client.rpc.RestApi groups ( ) { return new com.google.gerrit.client.rpc.RestApi ( "/groups/" ) ; }
Source:
public java.lang.String getCommand ( com.google.gerrit.extensions.config.DownloadScheme scheme , java.lang.String project ) { if ( ( ! ( commandAllowed ) ) || ( ! ( scheme instanceof com.googlesource.gerrit.plugins.download.scheme.RepoScheme ) ) ) { return null ; } return ( scheme.getUrl ( project ) ) + " ${ref}" ; }

Target:
public java.lang.String getCommand ( com.google.gerrit.extensions.config.DownloadScheme scheme , java.lang.String project , java.lang.String ref ) { if ( ( ! ( commandAllowed ) ) || ( ! ( scheme instanceof com.googlesource.gerrit.plugins.download.scheme.RepoScheme ) ) ) { return null ; } return ( ( scheme.getUrl ( project ) ) + " " ) + ref ; }
Source:
private static java.util.jar.JarEntry findSource ( java.util.jar.JarFile jar , java.lang.String file ) { if ( file.endsWith ( ".html" ) ) { int d = file.lastIndexOf ( '.' ) ; return jar.getJarEntry ( ( ( file.substring ( 0 , d ) ) + ".md" ) ) ; } return null ; }

Target:
private static com.google.common.base.Optional < com.google.gerrit.server.plugins.PluginEntry > findSource ( com.google.gerrit.server.plugins.PluginContentScanner scanner , java.lang.String file ) throws java.io.IOException { if ( file.endsWith ( ".html" ) ) { int d = file.lastIndexOf ( '.' ) ; return scanner.getEntry ( ( ( file.substring ( 0 , d ) ) + ".md" ) ) ; } return com.google.common.base.Optional.absent ( ) ; }
Source:
public void delete ( com.google.gerrit.server.query.change.ChangeData cd ) throws java.io.IOException { org.apache.lucene.index.Term id = idTerm ( cd ) ; if ( cd.getChange ( ) . getStatus ( ) . isOpen ( ) ) { openIndex.delete ( id ) ; } else { closedIndex.delete ( id ) ; } }

Target:
private static < V > com.google.common.util.concurrent.ListenableFuture < java.lang.Void > allOf ( com.google.common.util.concurrent.ListenableFuture < V > ... f ) { return com.google.common.util.concurrent.Futures.transform ( com.google.common.util.concurrent.Futures.allAsList ( f ) , new com.google.common.base.Function < java.util.List < V > , java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void apply ( java.util.List < V > input ) { return null ; } } ) ; }
Source:
public java.lang.String call ( ) throws java.lang.Exception { log.debug ( "Adding comment to issue {}" , comment , issueKey ) ; client ( ) . addComment ( issueKey , comment ) ; log.debug ( "Added comment to issue {}" , comment , issueKey ) ; return issueKey ; }

Target:
public void addComment ( final java.lang.String issueKey , final java.lang.String comment ) throws java.io.IOException { execute ( ( ) -> { log.debug ( "Adding comment to issue {}" , comment , issueKey ) ; client ( ) . addComment ( issueKey , comment ) ; log.debug ( "Added comment to issue {}" , comment , issueKey ) ; return issueKey ; } ) ; }
Source:
public Iterable < java.lang.String > get ( com.google.gerrit.server.account.AccountState input , com.google.gerrit.server.index.account.FillArgs args ) { return com.google.common.collect.FluentIterable.from ( input.getProjectWatches ( ) ) . transform ( new Function < com.google.gerrit.reviewdb.client.AccountProjectWatch , java.lang.String > ( ) { @ java.lang.Override public java.lang.String apply ( com.google.gerrit.reviewdb.client.AccountProjectWatch in ) { return in.getProjectNameKey ( ) . get ( ) ; } } ) . toSet ( ) ; }

Target:
public Iterable < java.lang.String > get ( com.google.gerrit.server.account.AccountState input , com.google.gerrit.server.index.account.FillArgs args ) { return com.google.common.collect.FluentIterable.from ( input.getProjectWatches ( ) . keySet ( ) ) . transform ( new Function < com.google.gerrit.server.account.WatchConfig.ProjectWatchKey , java.lang.String > ( ) { @ java.lang.Override public java.lang.String apply ( com.google.gerrit.server.account.WatchConfig.ProjectWatchKey in ) { return in.project ( ) . get ( ) ; } } ) . toSet ( ) ; }
Source:
static java.util.List < java.util.Map < java.lang.String , java.lang.String > > getTags ( javax.servlet.http.HttpServletRequest req , com.google.gitiles.TimeCache timeCache , org.eclipse.jgit.revwalk.RevWalk walk , int limit ) throws java.io.IOException { return com.google.gitiles.RefServlet.getRefs ( req , Constants.R_TAGS , com.google.gitiles.RefServlet.tagComparator ( timeCache , walk ) , limit ) ; }

Target:
static java.util.List < java.util.Map < java.lang.String , java.lang.Object > > getTags ( javax.servlet.http.HttpServletRequest req , com.google.gitiles.TimeCache timeCache , org.eclipse.jgit.revwalk.RevWalk walk , int limit ) throws java.io.IOException { return com.google.gitiles.RefServlet.getRefs ( org.eclipse.jgit.http.server.ServletUtils.getRepository ( req ) . getRefDatabase ( ) , com.google.gitiles.ViewFilter.getView ( req ) , Constants.R_TAGS , com.google.gitiles.RefServlet.tagComparator ( timeCache , walk ) , null , limit ) ; }
Source:
private javax.crypto.Mac newMac ( ) throws com.google.gwtjsonrpc.server.XsrfException { try { final javax.crypto.Mac m = javax.crypto.Mac.getInstance ( com.google.gwtjsonrpc.server.XsrfUtil.MAC_ALG ) ; m.init ( key ) ; return m ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new com.google.gwtjsonrpc.server.XsrfException ( ( ( com.google.gwtjsonrpc.server.XsrfUtil.MAC_ALG ) + " not supported" ) , e ) ; } catch ( java.security.InvalidKeyException e ) { throw new com.google.gwtjsonrpc.server.XsrfException ( "Invalid private key" , e ) ; } }

Target:
private javax.crypto.Mac newMac ( ) throws com.google.gwtjsonrpc.server.XsrfException { try { final javax.crypto.Mac m = javax.crypto.Mac.getInstance ( com.google.gwtjsonrpc.server.SignedToken.MAC_ALG ) ; m.init ( key ) ; return m ; } catch ( java.security.NoSuchAlgorithmException e ) { throw new com.google.gwtjsonrpc.server.XsrfException ( ( ( com.google.gwtjsonrpc.server.SignedToken.MAC_ALG ) + " not supported" ) , e ) ; } catch ( java.security.InvalidKeyException e ) { throw new com.google.gwtjsonrpc.server.XsrfException ( "Invalid private key" , e ) ; } }