auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.google.gerrit.server.query.Predicate < T > parse ( java.lang.String query ) throws com.google.gerrit.index.query.QueryParseException { if ( com.google.common.base.Strings.isNullOrEmpty ( query ) ) { throw new com.google.gerrit.index.query.QueryParseException ( "query is empty" ) ; } return toPredicate ( com.google.gerrit.index.query.QueryParser.parse ( query ) ) ; }

Target:
public com.google.gerrit.index.query.Predicate < T > parse ( java.lang.String query ) throws com.google.gerrit.index.query.QueryParseException { if ( com.google.common.base.Strings.isNullOrEmpty ( query ) ) { throw new com.google.gerrit.index.query.QueryParseException ( "query is empty" ) ; } return toPredicate ( com.google.gerrit.index.query.QueryParser.parse ( query ) ) ; }
Source:
public com.google.gerrit.server.project.TagResource parse ( com.google.gerrit.server.project.ProjectResource resource , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException , java.io.IOException { return new com.google.gerrit.server.project.TagResource ( resource.getControl ( ) , list.get ( resource , id ) ) ; }

Target:
public com.google.gerrit.extensions.restapi.RestView < com.google.gerrit.server.project.ProjectResource > list ( ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException { return list.get ( ) ; }
Source:
protected void preDisplay ( java.lang.String content ) { setShowTabs ( prefs.showTabs ( ) ) ; initEditor ( content ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.rpc.HttpResponse < com.google.gerrit.client.rpc.NativeString > fc ) { content = fc ; if ( prefs.syntaxHighlighting ( ) ) { injectMode ( fc.getContentType ( ) , modeCallback ) ; } else { modeCallback.onSuccess ( null ) ; } }
Source:
public com.google.gerrit.acceptance.HttpResponse get ( java.lang.String path ) throws java.io.IOException { org.apache.http.client.methods.HttpGet get = new org.apache.http.client.methods.HttpGet ( ( ( url ) + path ) ) ; return new com.google.gerrit.acceptance.HttpResponse ( getClient ( ) . execute ( get ) ) ; }

Target:
protected com.google.gerrit.acceptance.RestResponse execute ( org.apache.http.client.fluent.Request request ) throws java.io.IOException { return new com.google.gerrit.acceptance.RestResponse ( executor.execute ( request ) . returnResponse ( ) ) ; }
Source:
public static void removeSignedInListener ( final com.google.gerrit.client.SignedInListener l ) { com.google.gerrit.client.Gerrit.signedInListeners.remove ( l ) ; }

Target:
public static void addSignOutHandler ( final com.google.gerrit.client.SignOutHandler l ) { if ( ! ( com.google.gerrit.client.Gerrit.signOutHandlers.contains ( l ) ) ) { com.google.gerrit.client.Gerrit.signOutHandlers.add ( l ) ; } }
Source:
public static com.google.gerrit.server.config.ScheduleConfig create ( org.eclipse.jgit.lib.Config config , java.lang.String section ) { return com.google.gerrit.server.config.ScheduleConfig.builder ( config , section ) . build ( ) ; }

Target:
public static java.util.Optional < com.google.gerrit.server.config.ScheduleConfig.Schedule > createSchedule ( org.eclipse.jgit.lib.Config config , java.lang.String section ) { return com.google.gerrit.server.config.ScheduleConfig.builder ( config , section ) . buildSchedule ( ) ; }
Source:
public void noNotificationForChangeThatIsTurnedWipForWatchersInNotifyConfig ( ) throws java.lang.Exception { com.google.gerrit.server.mail.Address addr = new com.google.gerrit.server.mail.Address ( "Watcher" , "watcher@example.com" ) ; com.google.gerrit.server.git.NotifyConfig nc = new com.google.gerrit.server.git.NotifyConfig ( ) ; nc.addEmail ( addr ) ; nc.setName ( "team" ) ; nc.setHeader ( NotifyConfig.Header.TO ) ; nc.setTypes ( java.util.EnumSet.of ( NotifyType.NEW_PATCHSETS ) ) ; com.google.gerrit.server.git.ProjectConfig cfg = projectCache.checkedGet ( project ) . getConfig ( ) ; cfg.putNotifyConfig ( "team" , nc ) ; saveProjectConfig ( project , cfg ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = pushFactory.create ( db , admin.getIdent ( ) , testRepo , "subject" , "a" , "a1" ) . to ( "refs/for/master" ) ; r.assertOkStatus ( ) ; sender.clear ( ) ; r = pushFactory.create ( db , admin.getIdent ( ) , testRepo , "subject" , "a" , "a2" , r.getChangeId ( ) ) . to ( "refs/for/master%wip" ) ; r.assertOkStatus ( ) ; com.google.common.truth.Truth.assertThat ( sender.getMessages ( ) ) . isEmpty ( ) ; }

Target:
public void noNotificationForChangeThatIsTurnedWipForWatchersInNotifyConfig ( ) throws java.lang.Exception { com.google.gerrit.server.mail.Address addr = new com.google.gerrit.server.mail.Address ( "Watcher" , "watcher@example.com" ) ; com.google.gerrit.server.git.NotifyConfig nc = new com.google.gerrit.server.git.NotifyConfig ( ) ; nc.addEmail ( addr ) ; nc.setName ( "team" ) ; nc.setHeader ( NotifyConfig.Header.TO ) ; nc.setTypes ( java.util.EnumSet.of ( NotifyType.NEW_PATCHSETS ) ) ; com.google.gerrit.server.project.ProjectConfig cfg = projectCache.checkedGet ( project ) . getConfig ( ) ; cfg.putNotifyConfig ( "team" , nc ) ; saveProjectConfig ( project , cfg ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = pushFactory.create ( db , admin.getIdent ( ) , testRepo , "subject" , "a" , "a1" ) . to ( "refs/for/master" ) ; r.assertOkStatus ( ) ; sender.clear ( ) ; r = pushFactory.create ( db , admin.getIdent ( ) , testRepo , "subject" , "a" , "a2" , r.getChangeId ( ) ) . to ( "refs/for/master%wip" ) ; r.assertOkStatus ( ) ; com.google.common.truth.Truth.assertThat ( sender.getMessages ( ) ) . isEmpty ( ) ; }
Source:
private void padLineNumber ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m ) { m.openTd ( ) ; m.setStyleName ( Gerrit.RESOURCES.css ( ) . lineNumber ( ) ) ; m.closeTd ( ) ; }

Target:
private void padLineNumberForSideB ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m ) { m.openTd ( ) ; m.setStyleName ( Gerrit.RESOURCES.css ( ) . lineNumber ( ) ) ; m.closeTd ( ) ; }
Source:
public void onSuccess ( com.google.gwt.core.client.JavaScriptObject result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( id ) ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( id ) ) ; }
Source:
public void onKeyPress ( com.google.gwt.event.dom.client.KeyPressEvent event ) { upToChange ( true ) . run ( ) ; }

Target:
public void onKeyPress ( com.google.gwt.event.dom.client.KeyPressEvent event ) { toggleShowIntraline ( ) ; }
Source:
protected void configure ( ) { factory ( CreateCodeReviewNotes.Factory.class ) ; }

Target:
protected void configure ( ) { factory ( CreateCodeReviewNotes.Factory.class ) ; factory ( NotesBranchUtil.Factory.class ) ; }
Source:
public void display ( final com.google.gerrit.reviewdb.client.Patch.Key k , final com.google.gerrit.reviewdb.client.PatchSet.Id a , final com.google.gerrit.reviewdb.client.PatchSet.Id b , final com.google.gerrit.common.data.PatchScript s ) { patchKey = k ; idSideA = a ; idSideB = b ; render ( s ) ; }

Target:
public void display ( final com.google.gerrit.reviewdb.client.Patch.Key k , final com.google.gerrit.reviewdb.client.PatchSet.Id a , final com.google.gerrit.reviewdb.client.PatchSet.Id b , final com.google.gerrit.common.data.PatchScript s , final com.google.gerrit.common.data.PatchSetDetail d ) { patchKey = k ; idSideA = a ; idSideB = b ; render ( s , d ) ; }
Source:
public com.google.gerrit.extensions.api.projects.BranchApi create ( com.google.gerrit.extensions.api.projects.BranchInput input ) throws com.google.gerrit.extensions.restapi.RestApiException { try { createBranchFactory.create ( ref ) . apply ( project , input ) ; return this ; } catch ( java.io.IOException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot create branch" , e ) ; } }

Target:
public com.google.gerrit.extensions.api.projects.BranchApi create ( com.google.gerrit.extensions.api.projects.BranchInput input ) throws com.google.gerrit.extensions.restapi.RestApiException { try { createBranchFactory.create ( ref ) . apply ( project , input ) ; return this ; } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.api.ApiUtil.asRestApiException ( "Cannot create branch" , e ) ; } }
Source:
public void start ( final com.google.gerrit.sshd.Environment env ) throws java.io.IOException { err.write ( org.eclipse.jgit.lib.Constants.encodeASCII ( "gerrit: no shell available\n" ) ) ; in.close ( ) ; out.close ( ) ; err.close ( ) ; exit.onExit ( 127 ) ; }

Target:
public void start ( final org.apache.sshd.server.Environment env ) throws java.io.IOException { err.write ( org.eclipse.jgit.lib.Constants.encodeASCII ( "gerrit: no shell available\n" ) ) ; in.close ( ) ; out.close ( ) ; err.close ( ) ; exit.onExit ( 127 ) ; }
Source:
public boolean canPublish ( final com.google.gerrit.reviewdb.ReviewDb db ) throws com.google.gwtorm.client.OrmException { return ( isOwner ( ) ) && ( isVisible ( db ) ) ; }

Target:
public boolean canPublish ( final com.google.gerrit.reviewdb.ReviewDb db ) throws com.google.gwtorm.client.OrmException { return ( ( ( change.getStatus ( ) ) == ( Change.Status.DRAFT ) ) && ( isOwner ( ) ) ) && ( isVisible ( db ) ) ; }
Source:
java.util.List < com.googlesource.gerrit.plugins.replication.Destination > getDestinations ( ) ;

Target:
java.util.List < com.googlesource.gerrit.plugins.replication.Destination > getDestinations ( com.googlesource.gerrit.plugins.replication.ReplicationConfig.FilterType filterType ) ;
Source:
public void onSuccess ( com.google.gerrit.client.VoidResult result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( id.getParentKey ( ) ) ) ; hide ( ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.VoidResult result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChangeInEditMode ( id.getParentKey ( ) ) ) ; hide ( ) ; }
Source:
public com.google.gwtjsonrpc.client.VoidResult fromJson ( final java.lang.Object o ) { return com.google.gwtjsonrpc.client.VoidResult.INSTANCE ; }

Target:
public com.google.gwtjsonrpc.common.VoidResult fromJson ( final java.lang.Object o ) { return com.google.gwtjsonrpc.common.VoidResult.INSTANCE ; }
Source:
protected java.lang.Object getRowItemKey ( final com.google.gerrit.client.changes.ChangeInfo item ) { return item.legacyId ( ) ; }

Target:
protected java.lang.Object getRowItemKey ( final com.google.gerrit.client.info.ChangeInfo item ) { return item.legacyId ( ) ; }
Source:
private void assertCannotSubmit ( java.lang.String ref , com.google.gerrit.server.project.ProjectControl u ) { com.google.common.truth.Truth.assertThat ( u.controlForRef ( ref ) . canSubmit ( false ) ) . named ( ( "can submit " + ref ) ) . isFalse ( ) ; }

Target:
private void assertCannotSubmit ( java.lang.String ref , com.google.gerrit.server.permissions.ProjectControl u ) { com.google.common.truth.Truth.assertThat ( u.controlForRef ( ref ) . canSubmit ( false ) ) . named ( ( "can submit " + ref ) ) . isFalse ( ) ; }
Source:
public com.googlecode.prolog_cafe.lang.NumberTerm shiftRight ( com.googlecode.prolog_cafe.lang.NumberTerm t ) { if ( t.isDouble ( ) ) throw new com.googlecode.prolog_cafe.exceptions.IllegalTypeException ( "integer" , t ) ; return new com.googlecode.prolog_cafe.lang.IntegerTerm ( ( ( this . val ) > > ( t.intValue ( ) ) ) ) ; }

Target:
public com.googlecode.prolog_cafe.lang.NumberTerm shiftLeft ( com.googlecode.prolog_cafe.lang.NumberTerm t ) { if ( t instanceof com.googlecode.prolog_cafe.lang.DoubleTerm ) throw new com.googlecode.prolog_cafe.exceptions.IllegalTypeException ( "integer" , t ) ; return new com.googlecode.prolog_cafe.lang.IntegerTerm ( ( ( this . val ) << ( t.intValue ( ) ) ) ) ; }
Source:
private java.lang.String getSortValue ( ) { return ( account ) != null ? com.google.common.base.Objects.firstNonNull ( account.email , com.google.common.base.Strings.nullToEmpty ( account.name ) ) : com.google.common.base.Strings.nullToEmpty ( group.name ) ; }

Target:
private java.lang.String getSortValue ( ) { return ( account ) != null ? com.google.common.base.MoreObjects.firstNonNull ( account.email , com.google.common.base.Strings.nullToEmpty ( account.name ) ) : com.google.common.base.Strings.nullToEmpty ( group.name ) ; }
Source:
void set ( com.google.gerrit.client.changes.ChangeInfo info ) { this . changeId = info.legacyId ( ) ; display ( info ) ; reviewerSuggestOracle.setChange ( changeId ) ; openForm.setVisible ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ; }

Target:
void set ( com.google.gerrit.client.info.ChangeInfo info ) { this . changeId = info.legacyId ( ) ; display ( info ) ; reviewerSuggestOracle.setChange ( changeId ) ; openForm.setVisible ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ; }
Source:
public void onKeyUp ( final com.google.gwt.event.dom.client.KeyUpEvent event ) { if ( ( event.getNativeKeyCode ( ) ) == ( com.google.gwt.event.dom.client.KeyCodes.KEY_ESCAPE ) ) { hide ( ) ; } }

Target:
public void onKeyDown ( final com.google.gwt.event.dom.client.KeyDownEvent event ) { if ( ( event.getNativeKeyCode ( ) ) == ( com.google.gwt.event.dom.client.KeyCodes.KEY_ESCAPE ) ) { hide ( ) ; } }
Source:
public void testFollowAnotherBranch ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey p = createProject ( "a" ) ; org.eclipse.jgit.lib.Config cfg = new org.eclipse.jgit.lib.Config ( ) ; java.lang.String gitmodules = ( ( ( "" + ( ( "[submodule \"a\"]\n" + "path = a\n" ) + "url = ssh://localhost/" ) ) + ( p.get ( ) ) ) + "\n" ) + "branch = anotherbranch\n" ; cfg.fromText ( gitmodules ) ; java.lang.String thisServer = com.google.gerrit.acceptance.git.SubmoduleSectionParserIT.THIS_SERVER ; com.google.gerrit.reviewdb.client.Branch.NameKey targetBranch = new com.google.gerrit.reviewdb.client.Branch.NameKey ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) , "master" ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > res = new com.google.gerrit.server.util.SubmoduleSectionParser ( projectCache , cfg , thisServer , targetBranch ) . parseAllSections ( ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > expected = com.google.common.collect.Sets.newHashSet ( new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p , "anotherbranch" ) , "a" ) ) ; com.google.common.truth.Truth.assertThat ( res ) . containsExactlyElementsIn ( expected ) ; }

Target:
public void testFollowAnotherBranch ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey p = createProject ( "a" ) ; org.eclipse.jgit.lib.Config cfg = new org.eclipse.jgit.lib.Config ( ) ; cfg.fromText ( ( ( ( ( "" + ( ( "[submodule \"a\"]\n" + "path = a\n" ) + "url = ssh://localhost/" ) ) + ( p.get ( ) ) ) + "\n" ) + "branch = anotherbranch\n" ) ) ; com.google.gerrit.reviewdb.client.Branch.NameKey targetBranch = new com.google.gerrit.reviewdb.client.Branch.NameKey ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) , "master" ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > res = new com.google.gerrit.server.util.SubmoduleSectionParser ( projectCache , cfg , com.google.gerrit.acceptance.git.SubmoduleSectionParserIT.THIS_SERVER , targetBranch ) . parseAllSections ( ) ; java.util.Set < com.google.gerrit.reviewdb.client.SubmoduleSubscription > expected = com.google.common.collect.Sets.newHashSet ( new com.google.gerrit.reviewdb.client.SubmoduleSubscription ( targetBranch , new com.google.gerrit.reviewdb.client.Branch.NameKey ( p , "anotherbranch" ) , "a" ) ) ; com.google.common.truth.Truth.assertThat ( res ) . containsExactlyElementsIn ( expected ) ; }
Source:
private java.lang.String getReplyCommentName ( ) { return "savedReplyComment-" + ( com.google.gerrit.common.PageLinks.toChangeId ( project , changeId ) ) ; }

Target:
private java.lang.String getReplyCommentName ( ) { return "savedReplyComment~" + ( com.google.gerrit.common.PageLinks.toChangeId ( project , changeId ) ) ; }
Source:
public void replace ( com.google.gerrit.server.query.change.ChangeData cd ) throws java.io.IOException { }

Target:
public com.google.common.util.concurrent.ListenableFuture < java.lang.Void > delete ( com.google.gerrit.server.query.change.ChangeData cd ) throws java.io.IOException { return com.google.common.util.concurrent.Futures.immediateFuture ( null ) ; }
Source:
protected com.google.gerrit.client.reviewdb.Project getProject ( ) { final com.google.gerrit.client.data.ProjectCache.Entry r ; r = com.google.gerrit.client.rpc.Common.getProjectCache ( ) . get ( change.getDest ( ) . getParentKey ( ) ) ; return r != null ? r.getProject ( ) : null ; }

Target:
protected com.google.gerrit.client.reviewdb.Project getProject ( ) { final com.google.gerrit.server.project.ProjectState r ; r = projectCache.get ( change.getDest ( ) . getParentKey ( ) ) ; return r != null ? r.getProject ( ) : null ; }
Source:
public void run ( ) throws java.lang.Exception { parseCommandLine ( ) ; this . service ( ) ; }

Target:
public void executeParseCommand ( ) throws java.lang.Exception { parseCommandLine ( ) ; }
Source:
void merge ( com.google.gerrit.reviewdb.Branch.NameKey branch ) ;

Target:
void merge ( com.google.gerrit.server.git.MergeOp.Factory mof , com.google.gerrit.reviewdb.Branch.NameKey branch ) ;
Source:
public com.googlesource.gerrit.plugins.github.oauth.GitHubLogin get ( javax.servlet.http.HttpServletRequest req ) { com.googlesource.gerrit.plugins.github.oauth.GitHubLogin login = super . get ( req ) ; login.initOAuthCookie ( req ) ; return login ; }

Target:
public com.googlesource.gerrit.plugins.github.oauth.GitHubLogin get ( javax.servlet.http.HttpServletRequest request ) { com.googlesource.gerrit.plugins.github.oauth.GitHubLogin login = super . get ( request ) ; login.initOAuthCookie ( request ) ; return login ; }
Source:
protected org.apache.wicket.request.IRequestCodingStrategy newRequestCodingStrategy ( ) { return new com.googlesource.gerrit.plugins.gitblit.app.StaticCodingStrategy ( ) ; }

Target:
protected org.apache.wicket.request.IRequestCodingStrategy newRequestCodingStrategy ( ) { return new com.googlesource.gerrit.plugins.gitblit.app.StaticCodingStrategy ( "summary/" , "project/" ) ; }
Source:
private void assertProblems ( com.google.gerrit.gpg.testutil.TestKey tk , java.lang.String ... expected ) throws java.lang.Exception { com.google.gerrit.gpg.CheckResult result = new com.google.gerrit.gpg.PublicKeyChecker ( ) . check ( tk.getPublicKey ( ) ) ; org.junit.Assert.assertEquals ( java.util.Arrays.asList ( expected ) , result.getProblems ( ) ) ; }

Target:
private void assertProblems ( org.bouncycastle.openpgp.PGPPublicKey k , java.lang.String ... expected ) throws java.lang.Exception { com.google.gerrit.gpg.CheckResult result = new com.google.gerrit.gpg.PublicKeyChecker ( ) . setStore ( store ) . check ( k ) ; org.junit.Assert.assertEquals ( java.util.Arrays.asList ( expected ) , result.getProblems ( ) ) ; }
Source:
public final java.util.Set < java.lang.String > detailed_labels ( ) { return com.google.gerrit.client.rpc.Natives.keys ( detailed_labels0 ( ) ) ; }

Target:
public final java.util.Set < java.lang.String > permitted_labels ( ) { return com.google.gerrit.client.rpc.Natives.keys ( _permitted_labels ( ) ) ; }
Source:
public void error ( java.lang.String message , java.lang.Exception e , int errorCode ) { error ( ( e != null ? e.getMessage ( ) : message ) ) ; }

Target:
void audit ( com.google.gerrit.sshd.SshScope.Context ctx , java.lang.Object result , com.google.gerrit.sshd.DispatchCommand cmd ) { audit ( ctx , result , extractWhat ( cmd ) , extractParameters ( cmd ) ) ; }
Source:
public void addReviewerToWipChangeInReviewDbNotifyAll ( ) throws java.lang.Exception { forAll ( ( adder ) -> { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isFalse ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageWipChange ( ) ; com.google.gerrit.acceptance.TestAccount reviewer = accounts.create ( "added" , "added@example.com" , "added" ) ; addReviewer ( adder , sc.changeId , sc.owner , reviewer.email , NotifyHandling.ALL ) ; assertThat ( sender ) . sent ( "newchange" , sc ) . to ( reviewer ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . noOneElse ( ) ; } ) ; }

Target:
public void addReviewerToWipChangeInNoteDbNotifyAllSingly ( ) throws java.lang.Exception { addReviewerToWipChangeInNoteDbNotifyAll ( singly ( ) ) ; }
Source:
static com.googlesource.gerrit.plugins.serviceuser.client.MessagesInfo create ( ) { com.googlesource.gerrit.plugins.serviceuser.client.MessagesInfo g = ( ( com.googlesource.gerrit.plugins.serviceuser.client.MessagesInfo ) ( createObject ( ) ) ) ; return g ; }

Target:
static com.googlesource.gerrit.plugins.serviceuser.client.ConfigInfo create ( ) { com.googlesource.gerrit.plugins.serviceuser.client.ConfigInfo g = ( ( com.googlesource.gerrit.plugins.serviceuser.client.ConfigInfo ) ( createObject ( ) ) ) ; return g ; }
Source:
protected void onOpenRow ( final int row ) { com.google.gwt.user.client.History.newItem ( link ( getRowItem ( row ) ) ) ; }

Target:
protected void preDisplay ( final com.google.gerrit.client.projects.ProjectMap result ) { if ( mySubname.equals ( subname ) ) { display ( result ) ; } }
Source:
public java.nio.file.FileVisitResult preVisitDirectory ( java.nio.file.Path dir , java.nio.file.attribute.BasicFileAttributes attrs ) throws java.io.IOException { if ( ( ! ( dir.equals ( basePath ) ) ) && ( isRepo ( dir ) ) ) { addProject ( dir ) ; return java.nio.file.FileVisitResult.SKIP_SUBTREE ; } return java.nio.file.FileVisitResult.CONTINUE ; }

Target:
public java.nio.file.FileVisitResult preVisitDirectory ( java.nio.file.Path dir , java.nio.file.attribute.BasicFileAttributes attrs ) throws java.io.IOException { if ( ( ! ( dir.equals ( startFolder ) ) ) && ( isRepo ( dir ) ) ) { addProject ( dir ) ; return java.nio.file.FileVisitResult.SKIP_SUBTREE ; } return java.nio.file.FileVisitResult.CONTINUE ; }
Source:
public void setGroups ( java.lang.Iterable < java.lang.String > groups ) { this . groups = com.google.gerrit.reviewdb.client.PatchSet.joinGroups ( groups ) ; }

Target:
public void setGroups ( java.util.List < java.lang.String > groups ) { if ( groups == null ) { groups = java.util.Collections.emptyList ( ) ; } this . groups = com.google.gerrit.reviewdb.client.PatchSet.joinGroups ( groups ) ; }
Source:
protected void loadDefaults ( ) { }

Target:
protected void loadDefaults ( ) { comments = com.google.common.collect.ImmutableListMultimap.of ( ) ; }
Source:
public void setContentType ( java.lang.String type ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public void setContentType ( java.lang.String type ) { headers.removeAll ( com.google.common.net.HttpHeaders.CONTENT_TYPE ) ; headers.put ( com.google.common.net.HttpHeaders.CONTENT_TYPE , type ) ; }
Source:
public void onSuccess ( final com.google.gerrit.client.admin.AccountGroupDetail result ) { enableForm ( true ) ; saveName.setEnabled ( false ) ; saveOwner.setEnabled ( false ) ; saveDesc.setEnabled ( false ) ; display ( result ) ; }

Target:
protected void preDisplay ( final com.google.gerrit.client.admin.AccountGroupDetail result ) { enableForm ( true ) ; saveName.setEnabled ( false ) ; saveOwner.setEnabled ( false ) ; saveDesc.setEnabled ( false ) ; display ( result ) ; }
Source:
public java.lang.String getTreePath ( ) { return path ; }

Target:
public java.lang.String getPathPart ( ) { return path ; }
Source:
boolean canEnableRenderEntireFile ( com.google.gerrit.client.account.DiffPreferences prefs ) { return ( ( fileSize.compareTo ( com.google.gerrit.client.diff.SideBySide.FileSize.HUGE ) ) < 0 ) || ( ( ( prefs.context ( ) ) != ( com.google.gerrit.extensions.client.DiffPreferencesInfo.WHOLE_FILE_CONTEXT ) ) && ( ( prefs.context ( ) ) < 100 ) ) ; }

Target:
boolean canRenderEntireFile ( com.google.gerrit.client.account.DiffPreferences prefs ) { return ( ( fileSize.compareTo ( com.google.gerrit.client.diff.SideBySide.FileSize.HUGE ) ) < 0 ) || ( ( ( prefs.context ( ) ) != ( com.google.gerrit.extensions.client.DiffPreferencesInfo.WHOLE_FILE_CONTEXT ) ) && ( ( prefs.context ( ) ) < 100 ) ) ; }
Source:
public void onSuccess ( final java.lang.Object result ) { refresh ( ) ; }

Target:
void doLinkIdentity ( ) { final com.google.gerrit.client.SignInDialog d = new com.google.gerrit.client.SignInDialog ( SignInDialog.Mode.LINK_IDENTIY ) ; d.center ( ) ; }
Source:
public void onFailure ( java.lang.Throwable caught ) { }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { event.preventDefault ( ) ; event.stopPropagation ( ) ; select ( ) ; }
Source:
private void postLoad ( ) { if ( ( haveAccount ) && ( haveEmails ) ) { updateEmailList ( ) ; registerNewEmail.setEnabled ( true ) ; save.setEnabled ( false ) ; new com.google.gerrit.client.ui.OnEditEnabler ( save , nameTxt ) ; } display ( ) ; }

Target:
private void postLoad ( ) { if ( ( haveAccount ) && ( haveEmails ) ) { updateEmailList ( ) ; registerNewEmail.setEnabled ( true ) ; save.setEnabled ( false ) ; onEditEnabler.updateOriginalValue ( nameTxt ) ; } display ( ) ; }
Source:
protected void configure ( ) { bind ( com.google.gerrit.httpd.GerritOptions.class ) . toInstance ( new com.google.gerrit.httpd.GerritOptions ( config , false , false , false ) ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.server.config.GerritOptions.class ) . toInstance ( new com.google.gerrit.server.config.GerritOptions ( config , false , false , false ) ) ; }
Source:
private final native void download_scheme0 ( java.lang.String n ) ;

Target:
private final native void downloadScheme0 ( java.lang.String n ) ;
Source:
int getRawAccountId ( ) { return accountId.get ( ) ; }

Target:
int getRawOldAccountId ( ) { return oldAccountId.get ( ) ; }
Source:
public long getHead ( ) throws java.io.IOException { return stores.head.spinGet ( com.googlesource.gerrit.plugins.events.fsstore.FsStore.MAX_GET_SPINS ) ; }

Target:
public long getHead ( ) throws java.io.IOException { return cachedHead.spinGet ( com.googlesource.gerrit.plugins.events.fsstore.FsStore.MAX_GET_SPINS ) ; }
Source:
private java.lang.String href ( java.lang.String url ) { if ( com.google.gitiles.doc.MarkdownHelper.isAbsolutePathToMarkdown ( url ) ) { return com.google.gitiles.GitilesView.doc ( ) . copyFrom ( view ) . setPathPart ( url ) . build ( ) . toUrl ( ) ; } return url ; }

Target:
private java.lang.String href ( java.lang.String url ) { if ( com.google.gitiles.doc.MarkdownUtil.isAbsolutePathToMarkdown ( url ) ) { return com.google.gitiles.GitilesView.doc ( ) . copyFrom ( view ) . setPathPart ( url ) . build ( ) . toUrl ( ) ; } return url ; }
Source:
public void test ( ) throws java.lang.Exception { java.lang.String [ ] invalidFilenamePattern = new java.lang.String [ ] { "[@:]" , "[#%*]" } ; org.eclipse.jgit.revwalk.RevCommit c = makeCommit ( ) ; java.util.List < com.google.gerrit.server.git.validators.CommitValidationMessage > m = com.googlesource.gerrit.plugins.uploadvalidator.InvalidFilenameValidator.performValidation ( repo , c , invalidFilenamePattern ) ; java.util.Set < java.lang.String > expected = new java.util.HashSet < > ( ) ; for ( java.lang.String filenames : getInvalidFilenames ( ) ) { expected.add ( ( "ERROR: invalid characters found in filename: " + filenames ) ) ; } com.google.common.truth.Truth.assertThat ( com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.transformMessages ( m ) ) . containsExactlyElementsIn ( expected ) ; }

Target:
public void test ( ) throws java.lang.Exception { java.lang.String [ ] invalidFilenamePattern = new java.lang.String [ ] { "\\[|\\]|\\*|#" , "[%:@]" } ; org.eclipse.jgit.revwalk.RevCommit c = makeCommit ( ) ; java.util.List < com.google.gerrit.server.git.validators.CommitValidationMessage > m = com.googlesource.gerrit.plugins.uploadvalidator.InvalidFilenameValidator.performValidation ( repo , c , invalidFilenamePattern ) ; java.util.Set < java.lang.String > expected = new java.util.HashSet < > ( ) ; for ( java.lang.String filenames : getInvalidFilenames ( ) ) { expected.add ( ( "ERROR: invalid characters found in filename: " + filenames ) ) ; } com.google.common.truth.Truth.assertThat ( com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.transformMessages ( m ) ) . containsExactlyElementsIn ( expected ) ; }
Source:
public void execute ( java.lang.String issue , java.lang.Iterable < com.googlesource.gerrit.plugins.hooks.workflow.ActionRequest > actions ) { throw new java.lang.RuntimeException ( "unimplemented" ) ; }

Target:
public void execute ( java.lang.String issue , com.googlesource.gerrit.plugins.hooks.workflow.ActionRequest actionRequest ) { try { its.performAction ( issue , actionRequest.getUnparsed ( ) ) ; } catch ( java.io.IOException e ) { com.googlesource.gerrit.plugins.hooks.workflow.ActionExecutor.log.error ( ( "Error while executing action " + actionRequest ) , e ) ; } }
Source:
public void evaluate ( ) throws java.lang.Throwable { beforeTest ( description ) ; base.evaluate ( ) ; }

Target:
public void evaluate ( ) throws java.lang.Throwable { try { beforeTest ( description ) ; base.evaluate ( ) ; } finally { afterTest ( ) ; } }
Source:
java.lang.String getFileUrl ( java.lang.String projectName , java.lang.String revision , java.lang.String fileName ) ;

Target:
com.google.gerrit.extensions.common.WebLinkInfo getFileWebLink ( java.lang.String projectName , java.lang.String revision , java.lang.String fileName ) ;
Source:
protected void updateMessageID ( ) throws javax.mail.MessagingException { if ( ( messageID ) != null ) { setHeader ( "Message-ID" , messageID ) ; } else { super . updateMessageID ( ) ; } }

Target:
protected void updateMessageID ( ) throws javax.mail.MessagingException { if ( ( messageID ) != null ) { super . setHeader ( com.google.gerrit.server.mail.MimeMessage.MESSAGE_ID , messageID ) ; } else { super . updateMessageID ( ) ; } }
Source:
protected void configure ( ) { factory ( PrologEnvironment.Factory.class ) ; }

Target:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicSet.setOf ( binder ( ) , com.google.gerrit.rules.PredicateProvider.class ) ; factory ( PrologEnvironment.Factory.class ) ; }
Source:
private void index ( com.google.gerrit.reviewdb.client.AccountGroup group ) throws java.io.IOException { indexCollection.getSearchIndex ( ) . replace ( group ) ; }

Target:
private void index ( com.google.gerrit.reviewdb.client.AccountGroup group ) throws java.io.IOException { for ( com.google.gerrit.server.index.group.GroupIndex groupIndex : indexCollection.getWriteIndexes ( ) ) { groupIndex.replace ( group ) ; } }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > event ) { setReviewedByCurrentUser ( event.getValue ( ) ) ; }

Target:
public void onKeyPress ( final com.google.gwt.event.dom.client.KeyPressEvent event ) { final boolean isReviewed = ! ( reviewedPanels.getValue ( ) ) ; reviewedPanels.setValue ( isReviewed ) ; reviewedPanels.setReviewedByCurrentUser ( isReviewed ) ; }
Source:
public void addIntHeader ( java.lang.String name , int value ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public void setIntHeader ( java.lang.String name , int value ) { headers.removeAll ( name ) ; addIntHeader ( name , value ) ; }
Source:
public void fire ( com.google.gerrit.reviewdb.client.Project.NameKey project , org.eclipse.jgit.lib.RefUpdate refUpdate ) { fire ( project , refUpdate.getName ( ) , refUpdate.getOldObjectId ( ) , refUpdate.getNewObjectId ( ) , ReceiveCommand.Type.UPDATE ) ; }

Target:
public void fire ( com.google.gerrit.reviewdb.client.Project.NameKey project , org.eclipse.jgit.lib.RefUpdate refUpdate , com.google.gerrit.extensions.common.AccountInfo updater ) { fire ( project , refUpdate.getName ( ) , refUpdate.getOldObjectId ( ) , refUpdate.getNewObjectId ( ) , ReceiveCommand.Type.UPDATE , updater ) ; }
Source:
private static com.google.gerrit.client.rpc.RestApi api ( int id , java.lang.String commit , java.lang.String action ) { return new com.google.gerrit.client.rpc.RestApi ( ( ( ( ( ( "/changes/" + id ) + "/revisions/" ) + commit ) + "/" ) + action ) ) ; }

Target:
public static com.google.gerrit.client.rpc.RestApi reviewer ( int id , java.lang.String reviewer ) { return com.google.gerrit.client.changes.ChangeApi.change ( id ) . view ( "reviewers" ) . id ( reviewer ) ; }
Source:
boolean visibleForReplication ( ) { return ( ( user ) instanceof com.google.gerrit.server.ReplicationUser ) && ( ( ( com.google.gerrit.server.ReplicationUser ) ( user ) ) . isEverythingVisible ( ) ) ; }

Target:
public boolean allRefsAreVisible ( ) { return ( ( user ) instanceof com.google.gerrit.server.InternalUser ) || ( canPerformOnAllRefs ( Permission.READ ) ) ; }
Source:
public void onSuccess ( ) { com.google.gerrit.client.patches.UnifiedPatchScreen.TopView top = com.google.gerrit.client.Gerrit.getPatchScreenTopView ( ) ; com.google.gerrit.client.Gerrit.display ( token , new com.google.gerrit.client.patches.UnifiedPatchScreen ( id , top , baseId ) ) ; }

Target:
public void onSuccess ( ) { com.google.gerrit.client.Gerrit.display ( token , new com.google.gerrit.client.diff.Unified ( baseId , id.getParentKey ( ) , id.get ( ) , side , line ) ) ; }
Source:
public com.google.gerrit.reviewdb.client.PatchSet getPatchSet ( ) { com.google.common.base.Preconditions.checkState ( ( ( patchSet ) != null ) , "getPatchSet() only valid after patch set is created" ) ; return patchSet ; }

Target:
public com.google.gerrit.reviewdb.client.Change getChange ( ) { com.google.common.base.Preconditions.checkState ( ( ( change ) != null ) , "getChange() only valid after executing update" ) ; return change ; }
Source:
protected java.lang.ProcessBuilder newBuildProcess ( com.google.gerrit.httpd.raw.Label label ) throws java.io.IOException { return new java.lang.ProcessBuilder ( "bazel" , "build" , label.fullName ( ) ) ; }

Target:
private java.lang.ProcessBuilder newBuildProcess ( com.google.gerrit.httpd.raw.BazelBuild.Label label ) { return new java.lang.ProcessBuilder ( "bazel" , "build" , label.fullName ( ) ) ; }
Source:
public void unblockNoForce ( ) { com.google.gerrit.server.project.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.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.Util.DEVS ) ; assertCanUpdate ( "refs/heads/master" , u ) ; }

Target:
public void unblockNoForce ( ) { 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/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.testing.Util.DEVS ) ; assertCanUpdate ( "refs/heads/master" , u ) ; }
Source:
public com.google.gerrit.server.change.ChangeResource parse ( com.google.gerrit.server.project.ChangeControl control ) { return new com.google.gerrit.server.change.ChangeResource ( control ) ; }

Target:
public com.google.gerrit.server.change.ChangeResource parse ( com.google.gerrit.server.project.ChangeControl control ) { return new com.google.gerrit.server.change.ChangeResource ( control , rebaseChange ) ; }
Source:
public void setUserAccountId ( com.google.gerrit.reviewdb.client.Account.Id id ) { key = new com.google.gerrit.httpd.WebSessionManager.Key ( ( "id:" + id ) ) ; val = new com.google.gerrit.httpd.WebSessionManager.Val ( id , 0 , false , null , "" , 0 ) ; }

Target:
public void setUserAccountId ( com.google.gerrit.reviewdb.client.Account.Id id , com.google.gerrit.server.account.AuthMethod method ) { key = new com.google.gerrit.httpd.WebSessionManager.Key ( ( "id:" + id ) ) ; val = new com.google.gerrit.httpd.WebSessionManager.Val ( id , 0 , false , null , "" , 0 ) ; authMethod = method ; }
Source:
public void deleteReviewerFromReviewableChangeByOwnerCcingSelfNotifyNone ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; setEmailStrategy ( sc.owner , EmailStrategy.CC_ON_OWN_COMMENTS ) ; removeReviewer ( sc , extraReviewer , NotifyHandling.NONE ) ; assertThat ( sender ) . notSent ( ) ; }

Target:
public void deleteReviewerFromReviewableChangeByOwnerCcingSelfNotifyNone ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChangeWithExtraReviewer ( ) ; setEmailStrategy ( sc.owner , EmailStrategy.CC_ON_OWN_COMMENTS ) ; removeReviewer ( sc , extraReviewer , NotifyHandling.NONE ) ; assertThat ( sender ) . notSent ( ) ; }
Source:
public java.lang.String getUrl ( java.lang.String baseUrl , java.lang.String path ) throws java.net.MalformedURLException { if ( ( baseUrl.indexOf ( "://" ) ) > 0 ) { return new java.net.URL ( new java.net.URL ( baseUrl ) , path ) . toExternalForm ( ) ; } else { return ( baseUrl + ( baseUrl.endsWith ( "/" ) ? "" : "/" ) ) + ( path.startsWith ( "/" ) ? path.substring ( 1 ) : path ) ; } }

Target:
private static java.lang.String getUrl ( java.lang.String baseUrl , java.lang.String path ) throws java.net.MalformedURLException { return new java.net.URL ( new java.net.URL ( baseUrl ) , path ) . toExternalForm ( ) ; }
Source:
public java.util.Collection < com.google.gerrit.reviewdb.client.AccountGroup.UUID > getByInclude ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupId ) ;

Target:
public void evictMembersOf ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupId ) ;
Source:
public void onSuccess ( final com.google.gerrit.reviewdb.client.Account result ) { registerNewEmail.setEnabled ( true ) ; onSaveSuccess ( result ) ; if ( onSave != null ) { onSave.onSuccess ( result ) ; } }

Target:
public void onSuccess ( com.google.gerrit.reviewdb.client.Account result ) { registerNewEmail.setEnabled ( true ) ; onSaveSuccess ( com.google.gerrit.client.FormatUtil.asInfo ( result ) ) ; if ( onSave != null ) { onSave.onSuccess ( result ) ; } }
Source:
abstract com.google.gerrit.client.diff.SkipManager getSkipManager ( ) ;

Target:
abstract java.lang.String getLineNumberClassName ( ) ;
Source:
private static com.google.gerrit.server.index.QueryOptions options ( int start , int limit ) { return com.google.gerrit.server.index.change.IndexedChangeQuery.createOptions ( com.google.gerrit.server.index.change.IndexRewriterTest.CONFIG , start , limit , com.google.common.collect.ImmutableSet.< java.lang.String > of ( ) ) ; }

Target:
private static com.google.gerrit.server.index.QueryOptions options ( int start , int limit ) { return com.google.gerrit.server.index.change.IndexedChangeQuery.createOptions ( com.google.gerrit.server.index.change.ChangeIndexRewriterTest.CONFIG , start , limit , com.google.common.collect.ImmutableSet.< java.lang.String > of ( ) ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( formatter , project , resource , revId , metaConfigRevId ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( formatter , project , resource , revId , metaConfigRevId , parentsHash ) ; }
Source:
public com.google.gerrit.reviewdb.client.Change reloadChange ( ) throws com.google.gwtorm.server.OrmException { change = db.changes ( ) . get ( legacyId ) ; return change ; }

Target:
public com.google.gerrit.reviewdb.client.Change reloadChange ( ) throws com.google.gwtorm.server.OrmException { change = db.changes ( ) . get ( legacyId ) ; if ( ( change ) == null ) { throw new com.google.gwtorm.server.OrmException ( ( "Unable to load change " + ( legacyId ) ) ) ; } return change ; }
Source:
public void addReviewer ( com.google.gerrit.extensions.api.changes.AddReviewerInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { try { postReviewers.apply ( change , in ) ; } catch ( com.google.gwtorm.server.OrmException | java.io.IOException | com.google.gerrit.server.update.UpdateException | com.google.gerrit.server.permissions.PermissionBackendException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot add change reviewer" , e ) ; } }

Target:
public com.google.gerrit.extensions.api.changes.AddReviewerResult addReviewer ( com.google.gerrit.extensions.api.changes.AddReviewerInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return postReviewers.apply ( change , in ) ; } catch ( com.google.gwtorm.server.OrmException | java.io.IOException | com.google.gerrit.server.update.UpdateException | com.google.gerrit.server.permissions.PermissionBackendException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot add change reviewer" , e ) ; } }
Source:
public com.google.gerrit.extensions.api.changes.FileApi file ( java.lang.String path ) { return fileApi.create ( files.parse ( revision , com.google.gerrit.extensions.restapi.IdString.fromDecoded ( path ) ) ) ; }

Target:
public com.google.gerrit.extensions.api.changes.FileApi file ( java.lang.String path ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return fileApi.create ( files.parse ( revision , com.google.gerrit.extensions.restapi.IdString.fromDecoded ( path ) ) ) ; } catch ( java.io.IOException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot retrieve file" , e ) ; } }
Source:
public boolean match ( final com.google.gerrit.server.query.change.ChangeData object ) throws com.google.gwtorm.server.OrmException { return ! ( args.plcUtil.draftByChangeAuthor ( args.db.get ( ) , object.notes ( ) , accountId ) . isEmpty ( ) ) ; }

Target:
public boolean match ( final com.google.gerrit.server.query.change.ChangeData object ) throws com.google.gwtorm.server.OrmException { return ! ( args.commentsUtil.draftByChangeAuthor ( args.db.get ( ) , object.notes ( ) , accountId ) . isEmpty ( ) ) ; }
Source:
public com.google.gerrit.server.project.ProjectData toProjectData ( ) { return new com.google.gerrit.server.project.ProjectData ( getProject ( ) , parents ( ) . transform ( ( s ) -> s.getProject ( ) . getNameKey ( ) ) ) ; }

Target:
public com.google.gerrit.index.project.ProjectData toProjectData ( ) { return new com.google.gerrit.index.project.ProjectData ( getProject ( ) , parents ( ) . transform ( ( s ) -> s.getProject ( ) . getNameKey ( ) ) ) ; }
Source:
public static org.eclipse.jgit.api.Git cloneProject ( java.lang.String url ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { return com.google.gerrit.acceptance.git.GitUtil.cloneProject ( url , true ) ; }

Target:
public static org.eclipse.jgit.api.Git cloneProject ( java.lang.String url ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { return com.google.gerrit.acceptance.GitUtil.cloneProject ( url , true ) ; }
Source:
public void testCUSTOM_NullUser ( ) { setFrom ( "A ${user} B <my.server@email.address>" ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( null ) ; org.junit.Assert.assertNotNull ( r ) ; org.junit.Assert.assertEquals ( ident.getName ( ) , r.name ) ; org.junit.Assert.assertEquals ( "my.server@email.address" , r.email ) ; org.easymock.EasyMock.verify ( accountCache ) ; }

Target:
public void testCUSTOM_NullUser ( ) { setFrom ( "A ${user} B <my.server@email.address>" ) ; 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 ( "my.server@email.address" ) ; org.easymock.EasyMock.verify ( accountCache ) ; }
Source:
public java.lang.String apply ( com.google.gerrit.server.account.GetSshKeys.SshKeyInfo keyInfo ) { return keyInfo.sshPublicKey ; }

Target:
public java.lang.String apply ( com.google.gerrit.server.account.GetSshKeys.SshKeyInfo keyInfo ) { return org.apache.commons.lang.StringUtils.substringBeforeLast ( keyInfo.sshPublicKey , " " ) ; }
Source:
public void onSuccess ( T value ) { this . result = value ; remaining.remove ( this ) ; this . applyAllSuccess ( ) ; }

Target:
public void onFailure ( java.lang.Throwable caught ) { failure ( this , caught ) ; }
Source:
public org.eclipse.jgit.lib.ObjectId insert ( int objectType , long length , java.io.InputStream in ) throws java.io.IOException { return idFor ( objectType , length , in ) ; }

Target:
protected org.eclipse.jgit.lib.ObjectInserter delegate ( ) { return delegate ; }
Source:
java.lang.String getRemoteDisplayname ( javax.servlet.http.HttpServletRequest req ) { if ( ( displaynameHeader ) != null ) { return com.google.common.base.Strings.emptyToNull ( req.getHeader ( displaynameHeader ) ) ; } return null ; }

Target:
java.lang.String getRemoteDisplayname ( javax.servlet.http.HttpServletRequest req ) { if ( ( displaynameHeader ) != null ) { java.lang.String raw = req.getHeader ( displaynameHeader ) ; return com.google.common.base.Strings.emptyToNull ( new java.lang.String ( raw.getBytes ( java.nio.charset.StandardCharsets.ISO_8859_1 ) , java.nio.charset.StandardCharsets.UTF_8 ) ) ; } return null ; }
Source:
public com.googlesource.gerrit.plugins.its.phabricator.conduit.results.ManiphestUpdate maniphestUpdate ( int taskId , java.lang.String comment ) throws com.googlesource.gerrit.plugins.its.phabricator.conduit.ConduitException { return maniphestUpdate ( taskId , comment , null ) ; }

Target:
public com.googlesource.gerrit.plugins.its.phabricator.conduit.results.ManiphestEdit maniphestEdit ( int taskId , java.lang.Iterable < java.lang.String > projects , java.lang.String action ) throws com.googlesource.gerrit.plugins.its.phabricator.conduit.ConduitException { return maniphestEdit ( taskId , null , projects , action ) ; }
Source:
public void nameOfNewGroupMustNotBeNull ( ) throws java.lang.Exception { expectedException.expect ( java.lang.NullPointerException.class ) ; com.google.gerrit.server.group.db.GroupNameNotes.loadForNewGroup ( repo , groupUuid , null ) ; }

Target:
public void nameOfNewGroupMustNotBeNull ( ) throws java.lang.Exception { expectedException.expect ( java.lang.NullPointerException.class ) ; com.google.gerrit.server.group.db.GroupNameNotes.forNewGroup ( repo , groupUuid , null ) ; }
Source:
public com.google.gerrit.common.data.PermissionRange getRange ( java.lang.String permission ) { return getRefControl ( ) . getRange ( permission ) ; }

Target:
public java.util.List < com.google.gerrit.common.data.PermissionRange > getLabelRanges ( ) { return getRefControl ( ) . getLabelRanges ( isOwner ( ) ) ; }
Source:
private static void setUserAuth ( final org.apache.sshd.SshServer daemon ) { daemon.setUserAuthFactories ( java.util.Arrays.< org.apache.sshd.common.NamedFactory < org.apache.sshd.server.UserAuth > > asList ( new org.apache.sshd.server.auth.UserAuthPublicKey.Factory ( ) ) ) ; }

Target:
private void initUserAuth ( final com.google.gerrit.server.GerritServer srv ) { setUserAuthFactories ( java.util.Arrays.< org.apache.sshd.common.NamedFactory < org.apache.sshd.server.UserAuth > > asList ( new org.apache.sshd.server.auth.UserAuthPublicKey.Factory ( ) ) ) ; setPublickeyAuthenticator ( new com.google.gerrit.server.ssh.DatabasePubKeyAuth ( srv ) ) ; }
Source:
public java.lang.String format ( ) { return new java.lang.StringBuilder ( ) . append ( formatValue ( ) ) . append ( ' ' ) . append ( text ) . toString ( ) ; }

Target:
public java.lang.String format ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( formatValue ( ) ) ; if ( ! ( text.isEmpty ( ) ) ) { sb.append ( ' ' ) . append ( text ) ; } return sb.toString ( ) ; }
Source:
public java.util.Collection < com.google.gerrit.reviewdb.RefRight > getInheritedRights ( ) { if ( isSpecialWildProject ( ) ) { return java.util.Collections.emptyList ( ) ; } return inheritedRights.get ( ) ; }

Target:
public java.util.Collection < com.google.gerrit.reviewdb.RefRight > getInheritedRights ( ) { if ( ( inheritedRights ) == null ) { inheritedRights = computeInheritedRights ( ) ; } return inheritedRights ; }