auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.google.gerrit.extensions.restapi.Response < com.google.gerrit.server.change.CommentInfo > apply ( com.google.gerrit.server.change.DraftResource rsrc , com.google.gerrit.server.change.DeleteDraft.Input input ) throws com.google.gwtorm.server.OrmException { db.get ( ) . patchComments ( ) . delete ( java.util.Collections.singleton ( rsrc.getComment ( ) ) ) ; return com.google.gerrit.extensions.restapi.Response.none ( ) ; }

Target:
public com.google.gerrit.extensions.restapi.Response < com.google.gerrit.server.change.CommentInfo > apply ( com.google.gerrit.server.change.DraftResource rsrc , com.google.gerrit.server.change.DeleteDraft.Input input ) throws com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.server.notedb.ChangeUpdate update = updateFactory.create ( rsrc.getControl ( ) ) ; com.google.gerrit.reviewdb.client.PatchLineComment c = rsrc.getComment ( ) ; com.google.gerrit.server.PatchLineCommentsUtil.setCommentRevId ( c , patchListCache , rsrc.getChange ( ) , rsrc.getPatchSet ( ) ) ; plcUtil.deleteComments ( db.get ( ) , update , java.util.Collections.singleton ( c ) ) ; update.commit ( ) ; return com.google.gerrit.extensions.restapi.Response.none ( ) ; }
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 ; } cmA.getWrapperElement ( ) . removeFromParent ( ) ; cmB.getWrapperElement ( ) . removeFromParent ( ) ; com.google.gwt.user.client.Window.enableScrolling ( true ) ; com.google.gerrit.client.Gerrit.setHeaderVisible ( true ) ; }
Source:
protected void migrateData ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.schema.UpdateUI ui ) throws java.sql.SQLException { ui.message ( ( "Migrate user preference showUserInReview to " + "reviewCategoryStrategy" ) ) ; try ( java.sql.Statement stmt = newStatement ( db ) ) { stmt.executeUpdate ( ( "UPDATE accounts SET " + ( "REVIEW_CATEGORY_STRATEGY='NAME' " + "WHERE (SHOW_USER_IN_REVIEW='Y')" ) ) ) ; } }

Target:
protected void migrateData ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.schema.UpdateUI ui ) throws java.sql.SQLException { ui.message ( "Migrate user preference showUserInReview to reviewCategoryStrategy" ) ; try ( java.sql.Statement stmt = newStatement ( db ) ) { stmt.executeUpdate ( ( "UPDATE accounts SET " + ( "REVIEW_CATEGORY_STRATEGY='NAME' " + "WHERE (SHOW_USER_IN_REVIEW='Y')" ) ) ) ; } }
Source:
private static void putApprovals ( com.google.gerrit.server.notedb.ChangeUpdate update , java.util.Map < java.lang.String , com.google.common.base.Optional < java.lang.Short > > approvals ) { for ( java.util.Map.Entry < java.lang.String , com.google.common.base.Optional < java.lang.Short > > e : approvals.entrySet ( ) ) { if ( e.getValue ( ) . isPresent ( ) ) { update.putApproval ( e.getKey ( ) , e.getValue ( ) . get ( ) ) ; } else { update.removeApproval ( e.getKey ( ) ) ; } } }

Target:
private void openRepos ( java.util.Collection < com.google.gerrit.reviewdb.client.Project.NameKey > projects ) throws com.google.gerrit.server.git.IntegrationException { for ( com.google.gerrit.reviewdb.client.Project.NameKey project : projects ) { try { openRepo ( project ) ; } catch ( com.google.gerrit.server.project.NoSuchProjectException noProject ) { logWarn ( ( ( ( "Project " + ( noProject.project ( ) ) ) + " no longer exists, " ) + "abandoning open changes" ) ) ; abandonAllOpenChanges ( noProject.project ( ) ) ; } catch ( java.io.IOException e ) { throw new com.google.gerrit.server.git.IntegrationException ( ( "Error opening project " + project ) , e ) ; } } }
Source:
public void testCreateProjectWithBranches ( ) throws java.io.IOException { final java.lang.String newProjectName = "newProject" ; com.google.gerrit.server.project.CreateProject.Input in = new com.google.gerrit.server.project.CreateProject.Input ( ) ; in.createEmptyCommit = true ; in.branches = com.google.common.collect.Lists.newArrayListWithCapacity ( 3 ) ; in.branches.add ( "refs/heads/test" ) ; in.branches.add ( "refs/heads/master" ) ; in.branches.add ( "release" ) ; adminSession.put ( ( "/projects/" + newProjectName ) , in ) ; assertHead ( newProjectName , "refs/heads/test" ) ; assertEmptyCommit ( newProjectName , "refs/heads/test" , "refs/heads/master" , "refs/heads/release" ) ; }

Target:
public void testCreateProjectWithBranches ( ) throws java.io.IOException { final java.lang.String newProjectName = "newProject" ; com.google.gerrit.extensions.api.projects.ProjectInput in = new com.google.gerrit.extensions.api.projects.ProjectInput ( ) ; in.createEmptyCommit = true ; in.branches = com.google.common.collect.Lists.newArrayListWithCapacity ( 3 ) ; in.branches.add ( "refs/heads/test" ) ; in.branches.add ( "refs/heads/master" ) ; in.branches.add ( "release" ) ; adminSession.put ( ( "/projects/" + newProjectName ) , in ) ; assertHead ( newProjectName , "refs/heads/test" ) ; assertEmptyCommit ( newProjectName , "refs/heads/test" , "refs/heads/master" , "refs/heads/release" ) ; }
Source:
public void emptyPermissionRangeOmitsResult ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.PatchSetApproval cr = psa ( userId , "Code-Review" , 1 ) ; com.google.gerrit.reviewdb.client.PatchSetApproval v = psa ( userId , "Verified" , 1 ) ; org.junit.Assert.assertEquals ( com.google.common.collect.ImmutableList.of ( ) , norm.normalize ( change , com.google.common.collect.ImmutableList.of ( cr , v ) ) ) ; }

Target:
public void emptyPermissionRangeOmitsResult ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.PatchSetApproval cr = psa ( userId , "Code-Review" , 1 ) ; com.google.gerrit.reviewdb.client.PatchSetApproval v = psa ( userId , "Verified" , 1 ) ; org.junit.Assert.assertEquals ( new com.google.gerrit.server.git.LabelNormalizer.Result ( com.google.gerrit.server.git.LabelNormalizerTest.list ( ) , com.google.gerrit.server.git.LabelNormalizerTest.list ( ) , com.google.gerrit.server.git.LabelNormalizerTest.list ( cr , v ) ) , norm.normalize ( change , com.google.gerrit.server.git.LabelNormalizerTest.list ( cr , v ) ) ) ; }
Source:
private static java.lang.ClassLoader parentFor ( com.google.gerrit.server.plugins.Plugin.ApiType type ) throws com.google.gerrit.server.plugins.InvalidPluginException { switch ( type ) { case EXTENSION : return com.google.gerrit.extensions.annotations.PluginName.class . getClassLoader ( ) ; case PLUGIN : return com.google.gerrit.server.plugins.PluginLoader.class . getClassLoader ( ) ; default : throw new com.google.gerrit.server.plugins.InvalidPluginException ( ( "Unsupported ApiType " + type ) ) ; } }

Target:
private void cleanInBackground ( ) { int cnt = java.lang.Math.max ( 0 , ( ( cleanupHandles.size ( ) ) - ( running.size ( ) ) ) ) ; if ( 0 < cnt ) { cleaner.get ( ) . clean ( cnt ) ; } }
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 onFailure ( java.lang.Throwable caught ) { }
Source:
public com.google.gerrit.server.account.AccountResource.Capability parse ( com.google.gerrit.server.account.AccountResource parent , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gerrit.server.permissions.PermissionBackendException { com.google.gerrit.server.IdentifiedUser target = parent.getUser ( ) ; if ( ( self.get ( ) ) != target ) { permissionBackend.user ( self ) . check ( GlobalPermission.ADMINISTRATE_SERVER ) ; } com.google.gerrit.server.permissions.GlobalOrPluginPermission perm = parse ( id ) ; if ( permissionBackend.user ( target ) . test ( perm ) ) { return new com.google.gerrit.server.account.AccountResource.Capability ( target , perm.permissionName ( ) ) ; } throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; }

Target:
public com.google.gerrit.server.account.AccountResource.Capability parse ( com.google.gerrit.server.account.AccountResource parent , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gerrit.server.permissions.PermissionBackendException { com.google.gerrit.server.IdentifiedUser target = parent.getUser ( ) ; if ( ( self.get ( ) ) != target ) { permissionBackend.user ( self ) . check ( GlobalPermission.ADMINISTRATE_SERVER ) ; } com.google.gerrit.extensions.api.access.GlobalOrPluginPermission perm = parse ( id ) ; if ( permissionBackend.user ( target ) . test ( perm ) ) { return new com.google.gerrit.server.account.AccountResource.Capability ( target , perm.permissionName ( ) ) ; } throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; }
Source:
private synchronized void runHook ( com.google.gerrit.reviewdb.client.Project.NameKey project , java.nio.file.Path hook , java.util.List < java.lang.String > args ) { if ( ( project != null ) && ( java.nio.file.Files.exists ( hook ) ) ) { hookQueue.execute ( new com.google.gerrit.common.ChangeHookRunner.AsyncHookTask ( project , hook , args ) ) ; } }

Target:
private synchronized void runHook ( com.google.gerrit.reviewdb.client.Project.NameKey project , com.google.common.base.Optional < java.nio.file.Path > hook , java.util.List < java.lang.String > args ) { if ( ( project != null ) && ( hook.isPresent ( ) ) ) { hookQueue.execute ( new com.google.gerrit.common.ChangeHookRunner.AsyncHookTask ( project , hook.get ( ) , args ) ) ; } }
Source:
public void onPluginLoad ( ) { com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "project/(.*)/rev/(.*)/(.*)" , new com.googlesource.gerrit.plugins.xdocs.client.XDocScreen.Factory ( ) ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "project/(.*)/(.*)" , new com.googlesource.gerrit.plugins.xdocs.client.XDocScreen.HeadFactory ( ) ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "c/(.*)/([0-9]+(\\.{2}[0-9]+)?)/(.*),unified" , new com.googlesource.gerrit.plugins.xdocs.client.XDocUnifiedDiffScreen.Factory ( ) ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "c/(.*)/([0-9]+(\\.{2}[0-9]+)?)/(.*)" , new com.googlesource.gerrit.plugins.xdocs.client.XDocSideBySideDiffScreen.Factory ( ) ) ; }

Target:
public void onPluginLoad ( ) { com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "project/([^/]*)/rev/([^/]*)/(.*)" , new com.googlesource.gerrit.plugins.xdocs.client.XDocScreen.Factory ( ) ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "project/([^/]*)/(.*)" , new com.googlesource.gerrit.plugins.xdocs.client.XDocScreen.HeadFactory ( ) ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "c/([^/]*)/([0-9]+(\\.{2}[0-9]+)?)/(.*),unified" , new com.googlesource.gerrit.plugins.xdocs.client.XDocUnifiedDiffScreen.Factory ( ) ) ; com.google.gerrit.plugin.client.Plugin.get ( ) . screenRegex ( "c/([^/]*)/([0-9]+(\\.{2}[0-9]+)?)/(.*)" , new com.googlesource.gerrit.plugins.xdocs.client.XDocSideBySideDiffScreen.Factory ( ) ) ; }
Source:
private void verifyComment ( com.google.gerrit.reviewdb.client.PatchLineComment comment ) { com.google.common.base.Preconditions.checkArgument ( ( ( psId ) != null ) , "setPatchSetId must be called before putComment" ) ; com.google.common.base.Preconditions.checkArgument ( com.google.gerrit.server.notedb.CommentsInNotesUtil.getCommentPsId ( comment ) . equals ( psId ) , "Comment on %s doesn't match previous patch set %s" , com.google.gerrit.server.notedb.CommentsInNotesUtil.getCommentPsId ( comment ) , psId ) ; com.google.common.base.Preconditions.checkArgument ( ( ( comment.getRevId ( ) ) != null ) ) ; com.google.common.base.Preconditions.checkArgument ( comment.getAuthor ( ) . equals ( accountId ) , ( "The author for the following comment does not match the author of " + "this ChangeDraftUpdate (%s): %s" ) , accountId , comment ) ; }

Target:
private void verifyComment ( com.google.gerrit.reviewdb.client.PatchLineComment comment ) { com.google.common.base.Preconditions.checkState ( ( ( psId ) != null ) , "setPatchSetId must be called first" ) ; com.google.common.base.Preconditions.checkArgument ( com.google.gerrit.server.notedb.CommentsInNotesUtil.getCommentPsId ( comment ) . equals ( psId ) , "Comment on %s does not match configured patch set %s" , com.google.gerrit.server.notedb.CommentsInNotesUtil.getCommentPsId ( comment ) , psId ) ; com.google.common.base.Preconditions.checkArgument ( ( ( comment.getRevId ( ) ) != null ) ) ; com.google.common.base.Preconditions.checkArgument ( comment.getAuthor ( ) . equals ( accountId ) , ( "The author for the following comment does not match the author of" + " this ChangeDraftUpdate (%s): %s" ) , accountId , comment ) ; }
Source:
public java.lang.String getSqlType ( final com.google.gwtorm.schema.ColumnModel column , final com.google.gwtorm.schema.sql.SqlDialect dialect ) { return ( dialect.getSqlTypeName ( getSqlTypeConstant ( ) ) ) + " DEFAULT 0 NOT NULL" ; }

Target:
public java.lang.String getSqlType ( final com.google.gwtorm.schema.ColumnModel column , final com.google.gwtorm.schema.sql.SqlDialect dialect ) { final java.lang.StringBuilder r = new java.lang.StringBuilder ( ) ; r.append ( dialect.getSqlTypeName ( getSqlTypeConstant ( ) ) ) ; if ( column.isNotNull ( ) ) { r.append ( " DEFAULT 0" ) ; r.append ( " NOT NULL" ) ; } return r.toString ( ) ; }
Source:
public com.google.gitiles.GitilesView.Builder copyFrom ( com.google.gitiles.GitilesView other ) { hostName = other.hostName ; servletPath = other.servletPath ; switch ( type ) { case LOG : case DIFF : oldRevision = other.oldRevision ; case PATH : path = other.path ; case REVISION : revision = other.revision ; case REPOSITORY_INDEX : repositoryName = other.repositoryName ; default : break ; } return this ; }

Target:
public com.google.gitiles.GitilesView.Builder copyFrom ( com.google.gitiles.GitilesView other ) { hostName = other.hostName ; servletPath = other.servletPath ; switch ( type ) { case LOG : case DIFF : oldRevision = other.oldRevision ; case PATH : path = other.path ; case REVISION : revision = other.revision ; case REFS : case REPOSITORY_INDEX : repositoryName = other.repositoryName ; default : break ; } return this ; }
Source:
private static boolean isContentType ( com.google.gwt.http.client.Response res , java.lang.String want ) { java.lang.String type = res.getHeader ( "Content-Type" ) ; if ( type == null ) { return false ; } int semi = type.indexOf ( ';' ) ; if ( semi >= 0 ) { type = type.substring ( 0 , semi ) . trim ( ) ; } return want.equals ( type ) ; }

Target:
private static java.lang.String simpleType ( java.lang.String type ) { int semi = type.indexOf ( ';' ) ; if ( semi >= 0 ) { return type.substring ( 0 , semi ) . trim ( ) ; } return type ; }
Source:
private void appendLineNumber ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m , final int idx , boolean isForSideA ) { m.openTd ( ) ; m.setStyleName ( Gerrit.RESOURCES.css ( ) . lineNumber ( ) ) ; if ( isForSideA ) { m.addStyleName ( Gerrit.RESOURCES.css ( ) . rightBorder ( ) ) ; } m.append ( com.google.gwtexpui.safehtml.client.SafeHtml.asis ( ( ( "<a href=\"javascript:void(0)\">" + ( idx + 1 ) ) + "</a>" ) ) ) ; m.closeTd ( ) ; }

Target:
private void padLineNumberOnTableHeaderForSideB ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m ) { m.openTd ( ) ; m.setStyleName ( Gerrit.RESOURCES.css ( ) . lineNumber ( ) ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . fileColumnHeader ( ) ) ; m.closeTd ( ) ; }
Source:
private java.util.List < com.google.gerrit.reviewdb.client.AccountGroup.UUID > collectGroups ( org.eclipse.jgit.lib.ProgressMonitor progress ) throws com.google.gwtorm.server.OrmException { progress.beginTask ( "Collecting groups" , ProgressMonitor.UNKNOWN ) ; try ( com.google.gerrit.reviewdb.server.ReviewDb db = schemaFactory.open ( ) ) { return groups.getAll ( db ) . map ( AccountGroup :: getGroupUUID ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( ) ) ; } finally { progress.endTask ( ) ; } }

Target:
private java.util.List < com.google.gerrit.reviewdb.client.AccountGroup.UUID > collectGroups ( org.eclipse.jgit.lib.ProgressMonitor progress ) throws com.google.gwtorm.server.OrmException { progress.beginTask ( "Collecting groups" , ProgressMonitor.UNKNOWN ) ; try ( com.google.gerrit.reviewdb.server.ReviewDb db = schemaFactory.open ( ) ) { return groups.getAllUuids ( db ) . collect ( com.google.common.collect.ImmutableList.toImmutableList ( ) ) ; } finally { progress.endTask ( ) ; } }
Source:
public void preferInsertAtLineBreak2 ( ) 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 , 0 , 0 , 2 ) ) ; expected.add ( new org.eclipse.jgit.diff.Edit ( 6 , 6 , 8 , 10 ) ) ; com.google.common.truth.Truth.assertThat ( com.google.gerrit.server.patch.IntraLineLoaderTest.intraline ( a , b ) ) . isEqualTo ( expected ) ; }

Target:
public void preferInsertAtLineBreak2 ( ) throws java.lang.Exception { java.lang.String a = " abc\n def\n" ; java.lang.String b = " abc\n def\n" ; com.google.common.truth.Truth.assertThat ( com.google.gerrit.server.patch.IntraLineLoaderTest.intraline ( a , b ) ) . isEqualTo ( com.google.gerrit.server.patch.IntraLineLoaderTest.ref ( ) . insert ( " " ) . common ( " abc\n" ) . insert ( " " ) . common ( " def\n" ) . edits ) ; }
Source:
private static boolean isResourceNotModified ( javax.servlet.http.HttpServletRequest req , com.googlesource.gerrit.plugins.xdocs.XDocServlet.ResourceKey key , org.eclipse.jgit.lib.ObjectId revId ) { java.lang.String receivedETag = req.getHeader ( com.google.common.net.HttpHeaders.IF_NONE_MATCH ) ; if ( receivedETag != null ) { return receivedETag.equals ( com.googlesource.gerrit.plugins.xdocs.XDocServlet.computeETag ( key.project , revId , key.file ) ) ; } return false ; }

Target:
private static boolean isResourceNotModified ( javax.servlet.http.HttpServletRequest req , com.googlesource.gerrit.plugins.xdocs.XDocServlet.ResourceKey key , org.eclipse.jgit.lib.ObjectId revId , org.eclipse.jgit.lib.ObjectId revIdB ) { java.lang.String receivedETag = req.getHeader ( com.google.common.net.HttpHeaders.IF_NONE_MATCH ) ; if ( receivedETag != null ) { return receivedETag.equals ( com.googlesource.gerrit.plugins.xdocs.XDocServlet.computeETag ( key.project , revId , key.file , revIdB , key.diffMode ) ) ; } return false ; }
Source:
public static GroupDescription.Internal forAccountGroup ( final com.google.gerrit.reviewdb.client.AccountGroup group ) { return new com.google.gerrit.common.data.GroupDescription.Internal ( ) { @ java.lang.Override public AccountGroup.UUID getGroupUUID ( ) { return group.getGroupUUID ( ) ; } @ java.lang.Override public java.lang.String getName ( ) { return group.getName ( ) ; } @ java.lang.Override public boolean isVisibleToAll ( ) { return group.isVisibleToAll ( ) ; } @ java.lang.Override public com.google.gerrit.reviewdb.client.AccountGroup getAccountGroup ( ) { return group ; } } ; }

Target:
public java.lang.String getEmailAddress ( ) { return null ; }
Source:
public java.util.Map < java.lang.String , com.google.gitiles.RepositoryDescription > listRepositories ( java.util.Set < java.lang.String > branches ) throws java.io.IOException { java.util.Map < java.lang.String , com.google.gitiles.RepositoryDescription > repos = com.google.common.collect.Maps.newTreeMap ( com.google.gitiles.DefaultAccess.US_COLLATOR ) ; for ( org.eclipse.jgit.lib.Repository repo : scanRepositories ( basePath , req ) ) { repos.put ( getRepositoryName ( repo ) , buildDescription ( repo , branches ) ) ; repo.close ( ) ; } return repos ; }

Target:
public java.util.Map < java.lang.String , com.google.gitiles.RepositoryDescription > listRepositories ( java.lang.String prefix , java.util.Set < java.lang.String > branches ) throws java.io.IOException { java.util.Map < java.lang.String , com.google.gitiles.RepositoryDescription > repos = com.google.common.collect.Maps.newTreeMap ( com.google.gitiles.DefaultAccess.US_COLLATOR ) ; for ( org.eclipse.jgit.lib.Repository repo : scanRepositories ( basePath , prefix , req ) ) { repos.put ( getRepositoryName ( repo ) , buildDescription ( repo , branches ) ) ; repo.close ( ) ; } return repos ; }
Source:
public void visit ( org.pegdown.ast.VerbatimNode node ) { html.open ( "pre" ) ; html.open ( "code" ) ; java.lang.String text = node.getText ( ) ; while ( text.startsWith ( "\n" ) ) { html.open ( "br" ) ; text = text.substring ( 1 ) ; } html.appendAndEscape ( text ) ; html.close ( "code" ) ; html.close ( "pre" ) ; }

Target:
public void visit ( org.pegdown.ast.VerbatimNode node ) { html.open ( "pre" ) . attribute ( "class" , "code" ) ; java.lang.String text = node.getText ( ) ; while ( text.startsWith ( "\n" ) ) { html.open ( "br" ) ; text = text.substring ( 1 ) ; } html.appendAndEscape ( text ) ; html.close ( "pre" ) ; }
Source:
public void testEvictProjectListOK ( ) throws java.lang.Exception { java.lang.String key = "all" ; java.lang.String keyJson = new com.google.gson.GsonBuilder ( ) . create ( ) . toJson ( key ) ; org.mockito.Mockito.when ( httpSessionMock.post ( buildCacheEndpoint ( Constants.PROJECT_LIST ) , keyJson ) ) . thenReturn ( new com.ericsson.gerrit.plugins.highavailability.forwarder.rest.HttpResponseHandler.HttpResult ( com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarderTest.SUCCESSFUL , com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarderTest.EMPTY_MSG ) ) ; com.google.common.truth.Truth.assertThat ( forwarder.evict ( Constants.PROJECT_LIST , key ) ) . isTrue ( ) ; }

Target:
private java.lang.String buildProjectListCacheEndpoint ( java.lang.String projectName ) { return com.google.common.base.Joiner.on ( "/" ) . join ( buildCacheEndpoint ( Constants.PROJECT_LIST ) , projectName ) ; }
Source:
protected void renderTextError ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , int statusCode , java.lang.String message ) throws java.io.IOException { res.setStatus ( statusCode ) ; res.setContentType ( com.google.gitiles.FormatType.TEXT.getMimeType ( ) ) ; res.setCharacterEncoding ( "UTF-8" ) ; setCacheHeaders ( req , res ) ; java.io.PrintWriter out = res.getWriter ( ) ; out.write ( message ) ; out.close ( ) ; }

Target:
protected void renderTextError ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , int statusCode , java.lang.String message ) throws java.io.IOException { res.setStatus ( statusCode ) ; setApiHeaders ( req , res , com.google.gitiles.FormatType.TEXT ) ; setCacheHeaders ( req , res ) ; java.io.PrintWriter out = res.getWriter ( ) ; out.write ( message ) ; out.close ( ) ; }
Source:
public void byBefore ( ) throws java.lang.Exception { Merge ( com.google.gerrit.server.query.change.I7aeb7d2e , com.google.gerrit.server.query.change.Ie93003f9 , com.google.gerrit.server.query.change.I16cdc920 ) ; resetTimeWithClockStep ( 30 , java.util.concurrent.TimeUnit.HOURS ) ; }

Target:
public void byAfter ( ) throws java.lang.Exception { resetTimeWithClockStep ( 30 , java.util.concurrent.TimeUnit.HOURS ) ; org.eclipse.jgit.junit.TestRepository < com.google.gerrit.testutil.InMemoryRepositoryManager.Repo > repo = createProject ( "repo" ) ; com.google.gerrit.reviewdb.client.Change change1 = insert ( repo , newChange ( repo ) ) ; com.google.gerrit.reviewdb.client.Change change2 = insert ( repo , newChange ( repo ) ) ; com.google.gerrit.testutil.TestTimeUtil.setClockStep ( 0 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; assertQuery ( "after:2009-10-03" ) ; assertQuery ( "after:\"2009-10-01 20:59:59 -0400\"" , change2 ) ; assertQuery ( "after:\"2009-10-01 20:59:59 -0000\"" , change2 ) ; assertQuery ( "after:2009-10-01" , change2 ) ; assertQuery ( "after:2009-09-30" , change2 , change1 ) ; }
Source:
public org.parboiled.Rule note ( ) { org.parboiled.support.StringBuilderVar body = new org.parboiled.support.StringBuilderVar ( ) ; return NodeSequence ( string ( "***" ) , whitespace ( ) , typeOfNote ( ) , Newline ( ) , oneOrMore ( testNot ( string ( "***" ) , Newline ( ) ) , BaseParser.ANY , body.append ( matchedChar ( ) ) ) , string ( "***" ) , Newline ( ) , push ( new com.google.gitiles.doc.DivNode ( ( ( com.google.gitiles.doc.DivNode.Style ) ( pop ( ) ) ) , parse ( body ) . getChildren ( ) ) ) ) ; }

Target:
public org.parboiled.Rule [ ] blockPluginRules ( ) { return new org.parboiled.Rule [ ] { cols ( ) , note ( ) , toc ( ) } ; }
Source:
public void beginTask ( java.lang.String task , int totalUnits ) { ( this . currTask ) ++ ; this . task = task ; this . totUnits = totalUnits ; this . currUnit = 0 ; this . lastPercentage = 0 ; status.update ( Code.SYNC , status.getShortDescription ( ) , getStatusDescription ( ) ) ; }

Target:
public void beginTask ( java.lang.String taskName , int totalUnits ) { ( this . currTask ) ++ ; this . task = taskName ; this . totUnits = totalUnits ; this . currUnit = 0 ; this . lastPercentage = 0 ; status.update ( Code.SYNC , status.getShortDescription ( ) , getStatusDescription ( ) ) ; }
Source:
private com.google.inject.Injector createWebInjector ( ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( sshInjector.getInstance ( com.google.gerrit.httpd.WebModule.class ) ) ; return sysInjector.createChildInjector ( modules ) ; }

Target:
private com.google.inject.Injector createWebInjector ( ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( sshInjector.getInstance ( com.google.gerrit.httpd.WebModule.class ) ) ; modules.add ( sshInjector.getInstance ( com.google.gerrit.httpd.WebSshGlueModule.class ) ) ; return sysInjector.createChildInjector ( modules ) ; }
Source:
public void testVerifyAgainstMissingToken ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( auth.verifyAgainstToken ( "" , "o" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) ) ) . isFalse ( ) ; com.google.common.truth.Truth.assertThat ( auth.verifyAgainstToken ( null , "o" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) ) ) . isFalse ( ) ; }

Target:
public void testVerifyAgainstDifferentOperation ( ) throws java.lang.Exception { com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.AuthInfo info = auth.generateAuthInfo ( "o" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) , 1 ) ; com.google.common.truth.Truth.assertThat ( auth.verifyAuthInfo ( info.authToken , "p" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) ) ) . isFalse ( ) ; }
Source:
public void testFindAfterInsertGap ( ) { com.google.gerrit.client.diff.LineMapper mapper = new com.google.gerrit.client.diff.LineMapper ( ) ; mapper.appendInsert ( 10 ) ; org.junit.Assert.assertEquals ( 0 , mapper.lineOnOther ( Side.REVISION , 10 ) ) ; }

Target:
public void testFindAfterCommon ( ) { com.google.gerrit.client.diff.LineMapper mapper = new com.google.gerrit.client.diff.LineMapper ( ) ; mapper.appendCommon ( 10 ) ; org.junit.Assert.assertEquals ( new com.google.gerrit.client.diff.LineMapper.LineOnOtherInfo ( 10 , true ) , mapper.lineOnOther ( Side.PARENT , 10 ) ) ; org.junit.Assert.assertEquals ( new com.google.gerrit.client.diff.LineMapper.LineOnOtherInfo ( 10 , true ) , mapper.lineOnOther ( Side.REVISION , 10 ) ) ; }
Source:
public java.lang.String getDisplayString ( ) { final com.google.gerrit.common.data.AccountInfo accountInfo = reviewerInfo.getAccountInfo ( ) ; if ( accountInfo != null ) { return com.google.gerrit.client.FormatUtil.nameEmail ( accountInfo ) ; } return ( ( ( reviewerInfo.getGroup ( ) . getName ( ) ) + " (" ) + ( Util.C.suggestedGroupLabel ( ) ) ) + ")" ; }

Target:
public java.lang.String getDisplayString ( ) { final com.google.gerrit.common.data.AccountInfo accountInfo = reviewerInfo.getAccountInfo ( ) ; if ( accountInfo != null ) { return com.google.gerrit.client.FormatUtil.nameEmail ( com.google.gerrit.client.FormatUtil.asInfo ( accountInfo ) ) ; } return ( ( ( reviewerInfo.getGroup ( ) . getName ( ) ) + " (" ) + ( Util.C.suggestedGroupLabel ( ) ) ) + ")" ; }
Source:
void set ( com.google.gerrit.client.changes.ChangeInfo info ) { this . changeId = info.legacy_id ( ) ; display ( info ) ; openForm.setVisible ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ; }

Target:
void set ( com.google.gerrit.client.changes.ChangeInfo info ) { canEdit = ( info.has_actions ( ) ) && ( info.actions ( ) . containsKey ( "hashtags" ) ) ; this . changeId = info.legacy_id ( ) ; display ( info ) ; openForm.setVisible ( canEdit ) ; }
Source:
public java.util.List < com.google.gerrit.server.query.QueryResult < T > > query ( java.util.List < com.google.gerrit.server.query.Predicate < T > > queries ) throws com.google.gerrit.server.query.QueryParseException , com.google.gwtorm.server.OrmException { try { return query ( null , queries ) ; } catch ( com.google.gwtorm.server.OrmRuntimeException e ) { throw new com.google.gwtorm.server.OrmException ( e.getMessage ( ) , e ) ; } catch ( com.google.gwtorm.server.OrmException e ) { com.google.common.base.Throwables.propagateIfInstanceOf ( e.getCause ( ) , com.google.gerrit.server.query.QueryParseException.class ) ; throw e ; } }

Target:
public java.util.List < com.google.gerrit.server.query.QueryResult < T > > query ( java.util.List < com.google.gerrit.server.query.Predicate < T > > queries ) throws com.google.gerrit.server.query.QueryParseException , com.google.gwtorm.server.OrmException { try { return query ( null , queries ) ; } catch ( com.google.gwtorm.server.OrmRuntimeException e ) { throw new com.google.gwtorm.server.OrmException ( e.getMessage ( ) , e ) ; } catch ( com.google.gwtorm.server.OrmException e ) { com.google.common.base.Throwables.throwIfInstanceOf ( e.getCause ( ) , com.google.gerrit.server.query.QueryParseException.class ) ; throw e ; } }
Source:
public void testCUSTOM_FullyConfiguredUser ( ) { setFrom ( "A ${user} B <my.server@email.address>" ) ; final java.lang.String name = "A U. Thor" ; final java.lang.String email = "a.u.thor@test.example.com" ; final com.google.gerrit.reviewdb.client.Account.Id user = user ( name , email ) ; 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 ( ( ( "A " + name ) + " B" ) , r.name ) ; org.junit.Assert.assertEquals ( "my.server@email.address" , r.email ) ; org.easymock.EasyMock.verify ( accountCache ) ; }

Target:
public void testMIXED_NullUser ( ) { setFrom ( "MIXED" ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( null ) ; com.google.common.truth.Truth.assertThat ( r ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( r.name ) . isEqualTo ( ident.getName ( ) ) ; com.google.common.truth.Truth.assertThat ( r.email ) . isEqualTo ( ident.getEmailAddress ( ) ) ; org.easymock.EasyMock.verify ( accountCache ) ; }
Source:
public void testOwnerProject ( ) { grant ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.Util.ADMIN , "refs/*" ) ; com.google.gerrit.server.project.ProjectControl uBlah = util.user ( local , com.google.gerrit.server.project.Util.DEVS ) ; com.google.gerrit.server.project.ProjectControl uAdmin = util.user ( local , com.google.gerrit.server.project.Util.DEVS , com.google.gerrit.server.project.Util.ADMIN ) ; assertFalse ( "not owner" , uBlah.isOwner ( ) ) ; assertTrue ( "is owner" , uAdmin.isOwner ( ) ) ; }

Target:
public void testOwnerProject ( ) { com.google.gerrit.server.project.Util.grant ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.Util.ADMIN , "refs/*" ) ; com.google.gerrit.server.project.ProjectControl uBlah = util.user ( local , com.google.gerrit.server.project.Util.DEVS ) ; com.google.gerrit.server.project.ProjectControl uAdmin = util.user ( local , com.google.gerrit.server.project.Util.DEVS , com.google.gerrit.server.project.Util.ADMIN ) ; assertFalse ( "not owner" , uBlah.isOwner ( ) ) ; assertTrue ( "is owner" , uAdmin.isOwner ( ) ) ; }
Source:
private com.google.gerrit.server.project.ChangeControl incrementPatchSet ( com.google.gerrit.server.project.ChangeControl ctl , org.eclipse.jgit.revwalk.RevCommit commit ) throws java.lang.Exception { com.google.gerrit.server.change.PatchSetInserter ins ; try ( com.google.gerrit.server.update.BatchUpdate bu = newUpdate ( ctl.getChange ( ) . getOwner ( ) ) ) { ins = patchSetInserterFactory.create ( ctl , nextPatchSetId ( ctl ) , commit ) . setValidatePolicy ( CommitValidators.Policy.NONE ) . setFireRevisionCreated ( false ) . setNotify ( NotifyHandling.NONE ) ; bu.addOp ( ctl.getId ( ) , ins ) . execute ( ) ; } return reload ( ctl ) ; }

Target:
private com.google.gerrit.server.project.ChangeControl incrementPatchSet ( com.google.gerrit.server.project.ChangeControl ctl , org.eclipse.jgit.revwalk.RevCommit commit ) throws java.lang.Exception { com.google.gerrit.server.change.PatchSetInserter ins ; try ( com.google.gerrit.server.update.BatchUpdate bu = newUpdate ( ctl.getChange ( ) . getOwner ( ) ) ) { ins = patchSetInserterFactory.create ( ctl , nextPatchSetId ( ctl ) , commit ) . setValidate ( false ) . setFireRevisionCreated ( false ) . setNotify ( NotifyHandling.NONE ) ; bu.addOp ( ctl.getId ( ) , ins ) . execute ( ) ; } return reload ( ctl ) ; }
Source:
protected void initScript ( final com.google.gerrit.common.data.PatchScript script ) { if ( ( script.getEdits ( ) . size ( ) ) == 1 ) { final com.google.gerrit.common.data.SparseFileContent a = script.getA ( ) ; final com.google.gerrit.common.data.SparseFileContent b = script.getB ( ) ; onlyOneHunk = ( ( a.size ( ) ) == 0 ) || ( ( b.size ( ) ) == 0 ) ; } else { onlyOneHunk = false ; } }

Target:
protected void initScript ( final com.google.gerrit.common.data.PatchScript script ) { if ( ( script.getEdits ( ) . size ( ) ) == 1 ) { final com.google.gerrit.prettify.common.SparseFileContent a = script.getA ( ) ; final com.google.gerrit.prettify.common.SparseFileContent b = script.getB ( ) ; onlyOneHunk = ( ( a.size ( ) ) == 0 ) || ( ( b.size ( ) ) == 0 ) ; } else { onlyOneHunk = false ; } }
Source:
protected java.lang.ProcessBuilder newBuildProcess ( com.google.gerrit.httpd.raw.Label label ) throws java.io.IOException { java.util.Properties properties = loadBuildProperties ( sourceRoot.resolve ( ".primary_build_tool" ) ) ; java.lang.String buck = com.google.common.base.MoreObjects.firstNonNull ( properties.getProperty ( "bazel" ) , "bazel" ) ; java.lang.ProcessBuilder proc = new java.lang.ProcessBuilder ( buck , "build" , label.fullName ( ) ) ; if ( properties.containsKey ( "PATH" ) ) { proc.environment ( ) . put ( "PATH" , properties.getProperty ( "PATH" ) ) ; } return proc ; }

Target:
protected java.lang.ProcessBuilder newBuildProcess ( com.google.gerrit.httpd.raw.Label label ) throws java.io.IOException { java.util.Properties properties = loadBuildProperties ( sourceRoot.resolve ( ".primary_build_tool" ) ) ; java.lang.String bazel = com.google.common.base.MoreObjects.firstNonNull ( properties.getProperty ( "bazel" ) , "bazel" ) ; java.lang.ProcessBuilder proc = new java.lang.ProcessBuilder ( bazel , "build" , label.fullName ( ) ) ; if ( properties.containsKey ( "PATH" ) ) { proc.environment ( ) . put ( "PATH" , properties.getProperty ( "PATH" ) ) ; } return proc ; }
Source:
public com.google.gerrit.server.account.AccountInfo get ( com.google.gerrit.reviewdb.client.Account.Id id ) { if ( id == null ) { return null ; } com.google.gerrit.server.account.AccountInfo info = created.get ( id ) ; if ( info == null ) { info = new com.google.gerrit.server.account.AccountInfo ( id ) ; created.put ( id , info ) ; } return info ; }

Target:
public com.google.gerrit.server.account.AccountInfo get ( com.google.gerrit.reviewdb.client.Account.Id id ) { if ( id == null ) { return null ; } com.google.gerrit.server.account.AccountInfo info = created.get ( id ) ; if ( info == null ) { info = new com.google.gerrit.server.account.AccountInfo ( id ) ; if ( detailed ) { info._account_id = id.get ( ) ; } created.put ( id , info ) ; } return info ; }
Source:
public void run ( ) { if ( ( ! ( popup.isShowing ( ) ) ) || ( ! ( popup.isVisible ( ) ) ) ) { popup.showRelativeTo ( target ) ; } }

Target:
public void run ( ) { if ( ( popup ) == null ) { popup = createPopupPanel ( account ) ; } if ( ( ! ( popup.isShowing ( ) ) ) || ( ! ( popup.isVisible ( ) ) ) ) { popup.showRelativeTo ( target ) ; } }
Source:
public void addGroupMember ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.AccountGroup.NameKey groupName , com.google.gerrit.reviewdb.client.Account.Id accountId ) throws com.google.gwtorm.server.OrmException , java.io.IOException { java.util.Optional < com.google.gerrit.reviewdb.client.AccountGroup > foundGroup = groups.get ( db , groupName ) ; if ( ! ( foundGroup.isPresent ( ) ) ) { return ; } com.google.gerrit.reviewdb.client.AccountGroup group = foundGroup.get ( ) ; addGroupMembers ( db , group , com.google.common.collect.ImmutableSet.of ( accountId ) ) ; }

Target:
public void addGroupMember ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.reviewdb.client.AccountGroup.UUID groupUuid , com.google.gerrit.reviewdb.client.Account.Id accountId ) throws com.google.gwtorm.server.OrmException , java.io.IOException { addGroupMembers ( db , groupUuid , com.google.common.collect.ImmutableSet.of ( accountId ) ) ; }
Source:
boolean execute ( ) { try { com.ericsson.gerrit.plugins.highavailability.forwarder.rest.HttpResponseHandler.HttpResult result = send ( ) ; if ( result.isSuccessful ( ) ) { return true ; } com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarder.log.error ( "Unable to {}: {}" , name , result.getMessage ( ) ) ; } catch ( java.io.IOException e ) { com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarder.log.error ( "Error trying to {}" , name , e ) ; } return false ; }

Target:
void tryOnce ( ) throws com.ericsson.gerrit.plugins.highavailability.forwarder.rest.ForwardingException { try { com.ericsson.gerrit.plugins.highavailability.forwarder.rest.HttpResponseHandler.HttpResult result = send ( ) ; if ( ! ( result.isSuccessful ( ) ) ) { throw new com.ericsson.gerrit.plugins.highavailability.forwarder.rest.ForwardingException ( true , ( ( ( "Unable to " + ( name ) ) + ": " ) + ( result.getMessage ( ) ) ) ) ; } } catch ( java.io.IOException e ) { throw new com.ericsson.gerrit.plugins.highavailability.forwarder.rest.ForwardingException ( isRecoverable ( e ) , e.getMessage ( ) , e ) ; } }
Source:
private java.lang.String group ( java.lang.String name , java.lang.String ownerGroup ) throws java.io.IOException { name = name ( name ) ; com.google.gerrit.extensions.api.groups.GroupInput in = new com.google.gerrit.extensions.api.groups.GroupInput ( ) ; in.ownerId = ownerGroup ; adminSession.put ( ( "/groups/" + name ) , in ) . consume ( ) ; return name ; }

Target:
private java.lang.String group ( java.lang.String name ) throws java.lang.Exception { name = name ( name ) ; gApi.groups ( ) . create ( name ) ; return name ; }
Source:
public org.eclipse.jgit.lib.Config getConfig ( ) { org.eclipse.jgit.lib.Config config = new org.eclipse.jgit.lib.Config ( ) ; config.setStringList ( "gitiles" , null , "allowOriginRegex" , com.google.common.collect.ImmutableList.of ( "http://localhost" ) ) ; return config ; }

Target:
public org.eclipse.jgit.lib.Config getConfig ( ) { org.eclipse.jgit.lib.Config config = new org.eclipse.jgit.lib.Config ( ) ; config.setBoolean ( "markdown" , null , "blocknote" , true ) ; config.setBoolean ( "markdown" , null , "multicolumn" , true ) ; config.setBoolean ( "markdown" , null , "namedanchor" , true ) ; config.setBoolean ( "markdown" , null , "smartquote" , true ) ; config.setStringList ( "gitiles" , null , "allowOriginRegex" , com.google.common.collect.ImmutableList.of ( "http://localhost" ) ) ; return config ; }
Source:
protected void onLoad ( ) { super . onLoad ( ) ; }

Target:
protected void onInitUI ( ) { table = new com.google.gerrit.client.changes.DashboardTable ( this , params ) { @ java.lang.Override public void finishDisplay ( ) { super . finishDisplay ( ) ; display ( ) ; } } ; super . onInitUI ( ) ; java.lang.String title = table.getTitle ( ) ; if ( title != null ) { setWindowTitle ( title ) ; setPageTitle ( title ) ; } add ( table ) ; }
Source:
static com.google.gerrit.server.notedb.ChangeNotesState empty ( com.google.gerrit.reviewdb.client.Change change ) { return new com.google.gerrit.server.notedb.AutoValue_ChangeNotesState ( null , change.getId ( ) , null , com.google.common.collect.ImmutableSet.of ( ) , com.google.common.collect.ImmutableSet.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.gerrit.server.ReviewerSet.empty ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableListMultimap.of ( ) , com.google.common.collect.ImmutableListMultimap.of ( ) , null ) ; }

Target:
static com.google.gerrit.server.notedb.ChangeNotesState empty ( com.google.gerrit.reviewdb.client.Change change ) { return new com.google.gerrit.server.notedb.AutoValue_ChangeNotesState ( null , change.getId ( ) , null , com.google.common.collect.ImmutableSet.of ( ) , com.google.common.collect.ImmutableSet.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.gerrit.server.ReviewerSet.empty ( ) , com.google.gerrit.server.ReviewerByEmailSet.empty ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableListMultimap.of ( ) , com.google.common.collect.ImmutableListMultimap.of ( ) , null , null ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; schemaFactory = org.easymock.EasyMock.createStrictMock ( com.google.gwtorm.server.SchemaFactory.class ) ; schema = org.easymock.EasyMock.createStrictMock ( com.google.gerrit.reviewdb.server.ReviewDb.class ) ; subscriptions = org.easymock.EasyMock.createStrictMock ( com.google.gerrit.reviewdb.server.SubmoduleSubscriptionAccess.class ) ; urlProvider = org.easymock.EasyMock.createStrictMock ( com.google.inject.Provider.class ) ; repoManager = org.easymock.EasyMock.createStrictMock ( com.google.gerrit.server.git.GitRepositoryManager.class ) ; gitRefUpdated = org.easymock.EasyMock.createStrictMock ( com.google.gerrit.server.extensions.events.GitReferenceUpdated.class ) ; changeHooks = org.easymock.EasyMock.createNiceMock ( com.google.gerrit.common.ChangeHooks.class ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mockMaker = org.easymock.EasyMock.createStrictControl ( ) ; schemaFactory = mockMaker.createMock ( com.google.gwtorm.server.SchemaFactory.class ) ; schema = mockMaker.createMock ( com.google.gerrit.reviewdb.server.ReviewDb.class ) ; subscriptions = mockMaker.createMock ( com.google.gerrit.reviewdb.server.SubmoduleSubscriptionAccess.class ) ; urlProvider = mockMaker.createMock ( com.google.inject.Provider.class ) ; repoManager = mockMaker.createMock ( com.google.gerrit.server.git.GitRepositoryManager.class ) ; gitRefUpdated = mockMaker.createMock ( com.google.gerrit.server.extensions.events.GitReferenceUpdated.class ) ; changeHooks = mockMaker.createMock ( com.google.gerrit.common.ChangeHooks.class ) ; }
Source:
private static java.util.List < com.google.gerrit.client.reviewdb.PatchLineComment > get ( final java.util.Map < java.lang.Integer , java.util.List < com.google.gerrit.client.reviewdb.PatchLineComment > > m , final int i ) { final java.util.List < com.google.gerrit.client.reviewdb.PatchLineComment > r = m.get ( i ) ; return r != null ? r : java.util.Collections.< com.google.gerrit.client.reviewdb.PatchLineComment > emptyList ( ) ; }

Target:
private static java.util.List < com.google.gerrit.client.reviewdb.PatchLineComment > get ( final java.util.Map < java.lang.Integer , java.util.List < com.google.gerrit.client.reviewdb.PatchLineComment > > m , final int i ) { final java.util.List < com.google.gerrit.client.reviewdb.PatchLineComment > r = m.get ( i ) ; return r != null ? com.google.gerrit.client.patches.CommentDetail.orderComments ( r ) : java.util.Collections.< com.google.gerrit.client.reviewdb.PatchLineComment > emptyList ( ) ; }
Source:
private boolean createProject ( org.eclipse.jgit.transport.URIish replicateURI , java.lang.String head ) { if ( ! ( replicateURI.isRemote ( ) ) ) { com.googlesource.gerrit.plugins.replication.ReplicationQueue.createLocally ( replicateURI , head ) ; } else if ( com.googlesource.gerrit.plugins.replication.ReplicationQueue.isSSH ( replicateURI ) ) { createRemoteSsh ( replicateURI , head ) ; } else { com.googlesource.gerrit.plugins.replication.ReplicationQueue.repLog.warn ( java.lang.String.format ( ( "Cannot create new project on remote site %s." + ( " Only local paths and SSH URLs are supported" + " for remote repository creation" ) ) , replicateURI ) ) ; return false ; } return true ; }

Target:
private boolean createProject ( org.eclipse.jgit.transport.URIish replicateURI , java.lang.String head ) { if ( ! ( replicateURI.isRemote ( ) ) ) { com.googlesource.gerrit.plugins.replication.ReplicationQueue.createLocally ( replicateURI , head ) ; } else if ( com.googlesource.gerrit.plugins.replication.ReplicationQueue.isSSH ( replicateURI ) ) { createRemoteSsh ( replicateURI , head ) ; } else { com.googlesource.gerrit.plugins.replication.ReplicationQueue.repLog.warn ( ( "Cannot create new project on remote site {}." + ( " Only local paths and SSH URLs are supported" + " for remote repository creation" ) ) , replicateURI ) ; return false ; } return true ; }
Source:
private void deleteLock ( java.lang.String project , java.lang.String lockId , com.googlesource.gerrit.plugins.lfs.locks.LfsLocksContext action ) throws java.io.IOException { com.googlesource.gerrit.plugins.lfs.locks.LfsDeleteLockInput input = action.input ( com.googlesource.gerrit.plugins.lfs.locks.LfsDeleteLockInput.class ) ; com.googlesource.gerrit.plugins.lfs.locks.LfsPutLocksAction.log.debug ( "Delete (-f {}) lock for in project {}" , java.lang.Boolean.TRUE.equals ( input.force ) , lockId , project ) ; com.googlesource.gerrit.plugins.lfs.locks.LfsLock lock = new com.googlesource.gerrit.plugins.lfs.locks.LfsLock ( "random_id" , "some/path/to/file" , now ( ) , new com.googlesource.gerrit.plugins.lfs.locks.LfsLockOwner ( "Lock Owner <lock_owner@example.com>" ) ) ; action.sendResponse ( lock ) ; }

Target:
public void run ( com.google.gerrit.server.project.ProjectState project , com.google.gerrit.server.CurrentUser user ) throws java.io.IOException , org.eclipse.jgit.lfs.errors.LfsException { com.googlesource.gerrit.plugins.lfs.locks.LfsDeleteLockInput input = context.input ( com.googlesource.gerrit.plugins.lfs.locks.LfsDeleteLockInput.class ) ; com.googlesource.gerrit.plugins.lfs.locks.LfsPutLocksAction.log.debug ( "Delete (-f {}) lock for in project {}" , java.lang.Boolean.TRUE.equals ( input.force ) , lockId , project ) ; com.googlesource.gerrit.plugins.lfs.locks.LfsLock lock = new com.googlesource.gerrit.plugins.lfs.locks.LfsLock ( lockId , "some/path/to/file" , now ( ) , new com.googlesource.gerrit.plugins.lfs.locks.LfsLockOwner ( "Lock Owner <lock_owner@example.com>" ) ) ; context.sendResponse ( lock ) ; }