auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean canAbandon ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { return ( ( ( ( ( isOwner ( ) ) || ( getRefControl ( ) . isOwner ( ) ) ) || ( getProjectControl ( ) . isOwner ( ) ) ) || ( getUser ( ) . getCapabilities ( ) . canAdministrateServer ( ) ) ) || ( getRefControl ( ) . canAbandon ( ) ) ) && ( ! ( isPatchSetLocked ( db ) ) ) ; }

Target:
private boolean canAbandon ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { return ( ( ( ( ( isOwner ( ) ) || ( getRefControl ( ) . isOwner ( ) ) ) || ( getProjectControl ( ) . isOwner ( ) ) ) || ( getUser ( ) . getCapabilities ( ) . canAdministrateServer ( ) ) ) || ( getRefControl ( ) . canAbandon ( ) ) ) && ( ! ( isPatchSetLocked ( db ) ) ) ; }
Source:
protected static void renameColumn ( com.google.gerrit.reviewdb.server.ReviewDb db , java.lang.String table , java.lang.String from , java.lang.String to ) throws com.google.gwtorm.server.OrmException { com.google.gwtorm.jdbc.JdbcSchema s = ( ( com.google.gwtorm.jdbc.JdbcSchema ) ( db ) ) ; try ( com.google.gwtorm.jdbc.JdbcExecutor e = new com.google.gwtorm.jdbc.JdbcExecutor ( s ) ) { s.renameField ( e , table , from , to ) ; } }

Target:
protected static void renameColumn ( com.google.gerrit.reviewdb.server.ReviewDb db , java.lang.String table , java.lang.String from , java.lang.String to ) throws com.google.gwtorm.server.OrmException { com.google.gwtorm.jdbc.JdbcSchema s = ( ( com.google.gwtorm.jdbc.JdbcSchema ) ( db ) ) ; try ( com.google.gwtorm.jdbc.JdbcExecutor e = new com.google.gwtorm.jdbc.JdbcExecutor ( s ) ) { s.renameColumn ( e , table , from , to ) ; } }
Source:
public void mergeFrom ( com.google.gerrit.common.data.AccessSection section ) { for ( com.google.gerrit.common.data.Permission src : section.getPermissions ( ) ) { com.google.gerrit.common.data.Permission dst = getPermission ( src.getName ( ) ) ; if ( dst != null ) { dst.mergeFrom ( src ) ; } else { permissions.add ( dst ) ; } } }

Target:
public void mergeFrom ( com.google.gerrit.common.data.AccessSection section ) { for ( com.google.gerrit.common.data.Permission src : section.getPermissions ( ) ) { com.google.gerrit.common.data.Permission dst = getPermission ( src.getName ( ) ) ; if ( dst != null ) { dst.mergeFrom ( src ) ; } else { permissions.add ( src ) ; } } }
Source:
public java.lang.String apply ( com.google.gerrit.server.group.GroupResource resource ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException { if ( ! ( resource.isInternal ( ) ) ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( ) ; } com.google.gerrit.reviewdb.client.AccountGroup group = com.google.gerrit.common.data.GroupDescriptions.toAccountGroup ( resource.getGroup ( ) ) ; return com.google.common.base.Strings.nullToEmpty ( group.getDescription ( ) ) ; }

Target:
public java.lang.String apply ( com.google.gerrit.server.group.GroupResource resource ) throws com.google.gerrit.extensions.restapi.ResourceNotFoundException { com.google.gerrit.reviewdb.client.AccountGroup group = resource.toAccountGroup ( ) ; if ( group == null ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( ) ; } return com.google.common.base.Strings.nullToEmpty ( group.getDescription ( ) ) ; }
Source:
public void fire ( com.google.gerrit.reviewdb.client.Account account , java.lang.String agreementName ) { if ( ! ( listeners.iterator ( ) . hasNext ( ) ) ) { return ; } com.google.gerrit.server.extensions.events.AgreementSignup.Event event = new com.google.gerrit.server.extensions.events.AgreementSignup.Event ( util.accountInfo ( account ) , agreementName ) ; for ( com.google.gerrit.extensions.events.AgreementSignupListener l : listeners ) { try { l.onAgreementSignup ( event ) ; } catch ( java.lang.Exception e ) { util.logEventListenerError ( com.google.gerrit.server.extensions.events.AgreementSignup.log , e ) ; } } }

Target:
public void fire ( com.google.gerrit.reviewdb.client.Account account , java.lang.String agreementName ) { if ( ! ( listeners.iterator ( ) . hasNext ( ) ) ) { return ; } com.google.gerrit.server.extensions.events.AgreementSignup.Event event = new com.google.gerrit.server.extensions.events.AgreementSignup.Event ( util.accountInfo ( account ) , agreementName ) ; for ( com.google.gerrit.extensions.events.AgreementSignupListener l : listeners ) { try { l.onAgreementSignup ( event ) ; } catch ( java.lang.Exception e ) { util.logEventListenerError ( this , l , e ) ; } } }
Source:
public boolean isAssignee ( ) { com.google.gerrit.reviewdb.client.Account.Id currentAssignee = notes.getChange ( ) . getAssignee ( ) ; if ( ( currentAssignee != null ) && ( getUser ( ) . isIdentifiedUser ( ) ) ) { com.google.gerrit.reviewdb.client.Account.Id id = getUser ( ) . getAccountId ( ) ; return id.equals ( currentAssignee ) ; } return false ; }

Target:
private boolean isAssignee ( ) { com.google.gerrit.reviewdb.client.Account.Id currentAssignee = notes.getChange ( ) . getAssignee ( ) ; if ( ( currentAssignee != null ) && ( getUser ( ) . isIdentifiedUser ( ) ) ) { com.google.gerrit.reviewdb.client.Account.Id id = getUser ( ) . getAccountId ( ) ; return id.equals ( currentAssignee ) ; } return false ; }
Source:
static com.google.gerrit.server.query.change.ChangeData createForTest ( com.google.gerrit.reviewdb.client.Change.Id id , int currentPatchSetId ) { com.google.gerrit.server.query.change.ChangeData cd = new com.google.gerrit.server.query.change.ChangeData ( null , null , null , null , null , null , null , null , id ) ; cd.currentPatchSet = new com.google.gerrit.reviewdb.client.PatchSet ( new com.google.gerrit.reviewdb.client.PatchSet.Id ( id , currentPatchSetId ) ) ; return cd ; }

Target:
static com.google.gerrit.server.query.change.ChangeData createForTest ( com.google.gerrit.reviewdb.client.Change.Id id , int currentPatchSetId ) { com.google.gerrit.server.query.change.ChangeData cd = new com.google.gerrit.server.query.change.ChangeData ( null , null , null , null , null , null , null , null , null , id ) ; cd.currentPatchSet = new com.google.gerrit.reviewdb.client.PatchSet ( new com.google.gerrit.reviewdb.client.PatchSet.Id ( id , currentPatchSetId ) ) ; return cd ; }
Source:
java.lang.String elide ( final java.lang.String s ) { if ( ( s == null ) || ( ( s.length ( ) ) < 40 ) ) { return null ; } return ( ( s.substring ( 0 , 30 ) ) + "..." ) + ( s.substring ( ( ( s.length ( ) ) - 10 ) ) ) ; }

Target:
java.lang.String elide ( final java.lang.String s ) { if ( ( s == null ) || ( ( s.length ( ) ) < 40 ) ) { return s ; } return ( ( s.substring ( 0 , 30 ) ) + "..." ) + ( s.substring ( ( ( s.length ( ) ) - 10 ) ) ) ; }
Source:
static com.google.gerrit.acceptance.GerritServer.Description forTestClass ( com.google.gerrit.acceptance.Description testDesc , java.lang.String configName ) { return new com.google.gerrit.acceptance.AutoValue_GerritServer_Description ( testDesc , configName , true , ( ! ( com.google.gerrit.acceptance.GerritServer.Description.has ( com.google.gerrit.acceptance.NoHttpd.class , testDesc.getTestClass ( ) ) ) ) , com.google.gerrit.acceptance.GerritServer.Description.has ( com.google.gerrit.acceptance.Sandboxed.class , testDesc.getTestClass ( ) ) , com.google.gerrit.acceptance.GerritServer.Description.has ( com.google.gerrit.acceptance.UseSsh.class , testDesc.getTestClass ( ) ) , null , null ) ; }

Target:
static com.google.gerrit.acceptance.GerritServer.Description forTestClass ( com.google.gerrit.acceptance.Description testDesc , java.lang.String configName ) { return new com.google.gerrit.acceptance.AutoValue_GerritServer_Description ( testDesc , configName , true , ( ! ( com.google.gerrit.acceptance.GerritServer.Description.has ( com.google.gerrit.acceptance.NoHttpd.class , testDesc.getTestClass ( ) ) ) ) , com.google.gerrit.acceptance.GerritServer.Description.has ( com.google.gerrit.acceptance.Sandboxed.class , testDesc.getTestClass ( ) ) , com.google.gerrit.acceptance.GerritServer.Description.has ( com.google.gerrit.acceptance.UseSsh.class , testDesc.getTestClass ( ) ) , null , null , null , null ) ; }
Source:
public com.google.gwtjsonrpc.common.VoidResult run ( final com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gerrit.httpd.rpc.account.Failure , com.google.gwtorm.server.OrmException { final com.google.gerrit.reviewdb.client.Account.Id me = getAccountId ( ) ; for ( final com.google.gerrit.reviewdb.client.AccountProjectWatch.Key keyId : keys ) { if ( ! ( me.equals ( keyId.getParentKey ( ) ) ) ) throw new com.google.gerrit.httpd.rpc.account.Failure ( new com.google.gerrit.common.errors.NoSuchEntityException ( ) ) ; } db.accountProjectWatches ( ) . deleteKeys ( keys ) ; return com.google.gwtjsonrpc.common.VoidResult.INSTANCE ; }

Target:
public com.google.gwtjsonrpc.common.VoidResult run ( final com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gerrit.httpd.rpc.account.Failure , com.google.gwtorm.server.OrmException { final com.google.gerrit.reviewdb.client.Account.Id me = getAccountId ( ) ; for ( final com.google.gerrit.reviewdb.client.AccountProjectWatch.Key keyId : keys ) { if ( ! ( me.equals ( keyId.getParentKey ( ) ) ) ) { throw new com.google.gerrit.httpd.rpc.account.Failure ( new com.google.gerrit.common.errors.NoSuchEntityException ( ) ) ; } } db.accountProjectWatches ( ) . deleteKeys ( keys ) ; return com.google.gwtjsonrpc.common.VoidResult.INSTANCE ; }
Source:
public com.google.gerrit.extensions.restapi.Response < java.lang.String > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Unignore.Input input ) throws com.google.gerrit.extensions.restapi.RestApiException { try { if ( canUnignore ( rsrc ) ) { stars.unignore ( rsrc ) ; } return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "failed to unignore change" , e ) ; } }

Target:
public com.google.gerrit.extensions.restapi.Response < java.lang.String > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Unignore.Input input ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gwtorm.server.OrmException { if ( canUnignore ( rsrc ) ) { stars.unignore ( rsrc ) ; } return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; }
Source:
private static void addOptions ( com.google.gerrit.client.rpc.RestApi call , com.google.gerrit.common.changes.ListChangesOption option1 , com.google.gerrit.common.changes.ListChangesOption ... options ) { java.util.EnumSet < com.google.gerrit.common.changes.ListChangesOption > s = java.util.EnumSet.of ( option1 , options ) ; call.addParameterRaw ( "O" , java.lang.Integer.toHexString ( com.google.gerrit.common.changes.ListChangesOption.toBits ( s ) ) ) ; }

Target:
static void addOptions ( com.google.gerrit.client.rpc.RestApi call , java.util.EnumSet < com.google.gerrit.common.changes.ListChangesOption > s ) { call.addParameterRaw ( "O" , java.lang.Integer.toHexString ( com.google.gerrit.common.changes.ListChangesOption.toBits ( s ) ) ) ; }
Source:
private static java.util.List < com.google.gerrit.client.changes.CommentInfo > copyPath ( java.lang.String path , com.google.gwt.core.client.JsArray < com.google.gerrit.client.changes.CommentInfo > l ) { for ( int i = 0 ; i < ( l.length ( ) ) ; i ++ ) { l.get ( i ) . setPath ( path ) ; } return com.google.gerrit.client.rpc.Natives.asList ( l ) ; }

Target:
private static java.util.List < com.google.gerrit.client.changes.CommentInfo > copyPath ( java.lang.String path , com.google.gwt.core.client.JsArray < com.google.gerrit.client.changes.CommentInfo > l ) { for ( int i = 0 ; i < ( l.length ( ) ) ; i ++ ) { l.get ( i ) . path ( path ) ; } return com.google.gerrit.client.rpc.Natives.asList ( l ) ; }
Source:
com.google.common.hash.Funnel < K > funnel ( ) { return new com.google.common.hash.Funnel < K > ( ) { private static final long serialVersionUID = 1L ; @ java.lang.Override public void funnel ( K from , com.google.common.hash.PrimitiveSink into ) { try { java.io.ObjectOutputStream ser = new java.io.ObjectOutputStream ( new com.google.gerrit.server.cache.h2.H2CacheImpl.SinkOutputStream ( into ) ) ; try { ser.writeObject ( from ) ; ser.flush ( ) ; } finally { ser.close ( ) ; } } catch ( java.io.IOException err ) { throw new java.lang.RuntimeException ( "Cannot hash as Serializable" , err ) ; } } } ; }

Target:
com.google.common.hash.Funnel < K > funnel ( ) { return new com.google.common.hash.Funnel < K > ( ) { private static final long serialVersionUID = 1L ; @ java.lang.Override public void funnel ( K from , com.google.common.hash.PrimitiveSink into ) { try ( java.io.ObjectOutputStream ser = new java.io.ObjectOutputStream ( new com.google.gerrit.server.cache.h2.H2CacheImpl.SinkOutputStream ( into ) ) ) { ser.writeObject ( from ) ; ser.flush ( ) ; } catch ( java.io.IOException err ) { throw new java.lang.RuntimeException ( "Cannot hash as Serializable" , err ) ; } } } ; }
Source:
private java.util.List < com.google.gerrit.reviewdb.client.PatchSetApproval > safeGetApprovals ( com.google.gerrit.server.git.CodeReviewCommit n ) { try { return approvalsUtil.byPatchSet ( db.get ( ) , n.patchsetId ) ; } catch ( com.google.gwtorm.server.OrmException e ) { com.google.gerrit.server.git.MergeUtil.log.error ( ( "Can't read approval records for " + ( n.patchsetId ) ) , e ) ; return java.util.Collections.emptyList ( ) ; } }

Target:
private java.util.List < com.google.gerrit.reviewdb.client.PatchSetApproval > safeGetApprovals ( com.google.gerrit.server.git.CodeReviewCommit n ) { try { return approvalsUtil.byPatchSet ( db.get ( ) , n.notes , n.patchsetId ) ; } catch ( com.google.gwtorm.server.OrmException e ) { com.google.gerrit.server.git.MergeUtil.log.error ( ( "Can't read approval records for " + ( n.patchsetId ) ) , e ) ; return java.util.Collections.emptyList ( ) ; } }
Source:
private void reportTotal ( java.lang.String type ) { java.lang.Long cnt = reported.get ( type ) ; if ( cnt != null ) { java.lang.System.out.println ( ( ( ( "Total " + type ) + "s: " ) + cnt ) ) ; } }

Target:
private boolean reportTotal ( java.lang.String type ) { java.lang.Long cnt = reported.get ( type ) ; if ( cnt != null ) { java.lang.System.out.println ( ( ( ( "Total " + type ) + "s: " ) + cnt ) ) ; return true ; } return false ; }
Source:
public com.google.gerrit.reviewdb.Change update ( com.google.gerrit.reviewdb.Change change ) { if ( ( ( change.getStatus ( ) ) == ( Change.Status.ABANDONED ) ) && ( change.currentPatchSetId ( ) . equals ( patchSetId ) ) ) { change.setStatus ( Change.Status.NEW ) ; com.google.gerrit.server.ChangeUtil.updated ( change ) ; return change ; } else { return null ; } }

Target:
public com.google.gerrit.reviewdb.client.Change update ( com.google.gerrit.reviewdb.client.Change change ) { if ( ( ( change.getStatus ( ) ) == ( Change.Status.ABANDONED ) ) && ( change.currentPatchSetId ( ) . equals ( patchSetId ) ) ) { change.setStatus ( Change.Status.NEW ) ; com.google.gerrit.server.ChangeUtil.updated ( change ) ; return change ; } else { return null ; } }
Source:
public void changeProjectAccess ( com.google.gerrit.reviewdb.Project.NameKey projectName , java.lang.String baseRevision , java.lang.String msg , java.util.List < com.google.gerrit.common.data.AccessSection > sections , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.common.data.ProjectAccess > cb ) { org.eclipse.jgit.lib.ObjectId base = org.eclipse.jgit.lib.ObjectId.fromString ( baseRevision ) ; changeProjectAccessFactory.create ( projectName , base , sections , msg ) . to ( cb ) ; }

Target:
public void changeProjectAccess ( com.google.gerrit.reviewdb.Project.NameKey projectName , java.lang.String baseRevision , java.lang.String msg , java.util.List < com.google.gerrit.common.data.AccessSection > sections , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.common.data.ProjectAccess > cb ) { org.eclipse.jgit.lib.ObjectId base ; if ( ( baseRevision != null ) && ( ! ( baseRevision.isEmpty ( ) ) ) ) { base = org.eclipse.jgit.lib.ObjectId.fromString ( baseRevision ) ; } else { base = null ; } changeProjectAccessFactory.create ( projectName , base , sections , msg ) . to ( cb ) ; }
Source:
public void doFilter ( javax.servlet.ServletRequest request , javax.servlet.ServletResponse response , javax.servlet.FilterChain chain ) throws java.io.IOException , javax.servlet.ServletException { javax.servlet.http.HttpServletRequest req = ( ( javax.servlet.http.HttpServletRequest ) ( request ) ) ; if ( ! ( org.eclipse.jgit.http.server.GitSmartHttpTools.isGitClient ( req ) ) ) { chain.doFilter ( request , response ) ; return ; } com.google.gerrit.httpd.ProjectDigestFilter.Response rsp = new com.google.gerrit.httpd.ProjectDigestFilter.Response ( ( ( javax.servlet.http.HttpServletResponse ) ( response ) ) ) ; if ( verify ( req , rsp ) ) { chain.doFilter ( req , rsp ) ; } }

Target:
public void doFilter ( javax.servlet.ServletRequest request , javax.servlet.ServletResponse response , javax.servlet.FilterChain chain ) throws java.io.IOException , javax.servlet.ServletException { javax.servlet.http.HttpServletRequest req = ( ( javax.servlet.http.HttpServletRequest ) ( request ) ) ; if ( ! ( org.eclipse.jgit.http.server.GitSmartHttpTools.isGitClient ( req ) ) ) { chain.doFilter ( request , response ) ; return ; } com.google.gerrit.httpd.ProjectDigestFilter.Response rsp = new com.google.gerrit.httpd.ProjectDigestFilter.Response ( req , ( ( javax.servlet.http.HttpServletResponse ) ( response ) ) ) ; if ( verify ( req , rsp ) ) { chain.doFilter ( req , rsp ) ; } }
Source:
protected com.google.gerrit.extensions.restapi.Response < ? > applyImpl ( com.google.gerrit.server.update.BatchUpdate.Factory updateFactory , com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.PublishDraftPatchSet.Input input ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.update.UpdateException { return publish.apply ( rsrc.getControl ( ) . getUser ( ) , rsrc.getChange ( ) , rsrc.getChange ( ) . currentPatchSetId ( ) , null ) ; }

Target:
protected com.google.gerrit.extensions.restapi.Response < ? > applyImpl ( com.google.gerrit.server.update.BatchUpdate.Factory updateFactory , com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.PublishDraftPatchSet.Input input ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.update.UpdateException { return publish.apply ( updateFactory , rsrc.getControl ( ) . getUser ( ) , rsrc.getChange ( ) , rsrc.getChange ( ) . currentPatchSetId ( ) , null ) ; }
Source:
public com.google.gerrit.extensions.common.ChangeInfo get ( java.util.EnumSet < com.google.gerrit.extensions.client.ListChangesOption > s ) throws com.google.gerrit.extensions.restapi.RestApiException { try { com.google.gerrit.server.CurrentUser u = user.get ( ) ; if ( u.isIdentifiedUser ( ) ) { ( ( com.google.gerrit.server.IdentifiedUser ) ( u ) ) . clearStarredChanges ( ) ; } return changeJson.get ( ) . addOptions ( s ) . format ( change ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot retrieve change" , e ) ; } }

Target:
public com.google.gerrit.extensions.common.ChangeInfo get ( java.util.EnumSet < com.google.gerrit.extensions.client.ListChangesOption > s ) throws com.google.gerrit.extensions.restapi.RestApiException { try { com.google.gerrit.server.CurrentUser u = user.get ( ) ; if ( u.isIdentifiedUser ( ) ) { ( ( com.google.gerrit.server.IdentifiedUser ) ( u ) ) . clearStarredChanges ( ) ; } return changeJson.create ( s ) . format ( change ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot retrieve change" , e ) ; } }
Source:
protected void configure ( ) { bind ( com.google.gerrit.acceptance.AccountCreator.class ) ; factory ( PushOneCommit.Factory.class ) ; factory ( SubmoduleOp.Factory.class ) ; install ( com.google.gerrit.acceptance.InProcessProtocol.module ( ) ) ; install ( new com.google.gerrit.server.ssh.NoSshModule ( ) ) ; install ( new com.google.gerrit.server.git.AsyncReceiveCommits.Module ( ) ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.acceptance.AccountCreator.class ) ; factory ( PushOneCommit.Factory.class ) ; install ( com.google.gerrit.acceptance.InProcessProtocol.module ( ) ) ; install ( new com.google.gerrit.server.ssh.NoSshModule ( ) ) ; install ( new com.google.gerrit.server.git.AsyncReceiveCommits.Module ( ) ) ; }
Source:
protected void onLoad ( ) { file.set ( id , content ) ; file.setText ( fileName ) ; file.setEnabled ( fileName.isEmpty ( ) ) ; content.setText ( fileContent ) ; save.setEnabled ( false ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { content.setFocus ( true ) ; } } ) ; }

Target:
protected void onLoad ( ) { file.set ( id , content ) ; file.setText ( fileName ) ; file.setEnabled ( fileName.isEmpty ( ) ) ; content.setText ( fileContent ) ; save.setEnabled ( false ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { if ( fileName.isEmpty ( ) ) { file.setFocus ( true ) ; } else { content.setFocus ( true ) ; } } } ) ; }
Source:
public com.google.gerrit.reviewdb.Change update ( com.google.gerrit.reviewdb.Change change ) { if ( ( ( change.getStatus ( ) ) == ( Change.Status.DRAFT ) ) && ( change.currentPatchSetId ( ) . equals ( patchSetId ) ) ) { change.setStatus ( Change.Status.NEW ) ; com.google.gerrit.server.ChangeUtil.updated ( change ) ; return change ; } else { return null ; } }

Target:
public com.google.gerrit.reviewdb.Change update ( com.google.gerrit.reviewdb.Change change ) { if ( ( change.getStatus ( ) ) == ( Change.Status.DRAFT ) ) { change.setStatus ( Change.Status.NEW ) ; com.google.gerrit.server.ChangeUtil.updated ( change ) ; return change ; } else { return null ; } }
Source:
public void setAuthorNameText ( final com.google.gerrit.client.account.AccountInfo author , final java.lang.String nameText ) { header.setWidget ( 0 , 0 , new com.google.gerrit.client.AvatarImage ( author , 26 ) ) ; header.setText ( 0 , 1 , nameText ) ; body.getElement ( ) . setAttribute ( "email" , author.email ( ) ) ; body.getElement ( ) . setAttribute ( "name" , author.name ( ) ) ; }

Target:
public void setAuthorNameText ( final com.google.gerrit.client.account.AccountInfo author , final java.lang.String nameText ) { header.setWidget ( 0 , 0 , new com.google.gerrit.client.AvatarImage ( author ) ) ; header.setText ( 0 , 1 , nameText ) ; body.getElement ( ) . setAttribute ( "email" , author.email ( ) ) ; body.getElement ( ) . setAttribute ( "name" , author.name ( ) ) ; }
Source:
private com.google.gerrit.server.git.validators.CommitValidators forGerritCommits ( com.google.gerrit.server.project.RefControl refControl , com.google.gerrit.server.ssh.SshInfo sshInfo , org.eclipse.jgit.lib.Repository repo ) { return new com.google.gerrit.server.git.validators.CommitValidators ( com.google.common.collect.ImmutableList.of ( new com.google.gerrit.server.git.validators.CommitValidators.UploadMergesPermissionValidator ( refControl ) , new com.google.gerrit.server.git.validators.CommitValidators.AmendedGerritMergeCommitValidationListener ( refControl , gerritIdent ) , new com.google.gerrit.server.git.validators.CommitValidators.AuthorUploaderValidator ( refControl , canonicalWebUrl ) , new com.google.gerrit.server.git.validators.CommitValidators.SignedOffByValidator ( refControl ) , new com.google.gerrit.server.git.validators.CommitValidators.ChangeIdValidator ( refControl , canonicalWebUrl , installCommitMsgHookCommand , sshInfo ) , new com.google.gerrit.server.git.validators.CommitValidators.ConfigValidator ( refControl , repo , allUsers ) , new com.google.gerrit.server.git.validators.CommitValidators.PluginCommitValidationListener ( pluginValidators ) , new com.google.gerrit.server.git.validators.CommitValidators.BlockExternalIdUpdateListener ( allUsers ) ) ) ; }

Target:
public com.google.gerrit.server.git.validators.CommitValidators forGerritCommits ( com.google.gerrit.server.project.RefControl refControl , com.google.gerrit.server.ssh.SshInfo sshInfo , org.eclipse.jgit.lib.Repository repo ) { return new com.google.gerrit.server.git.validators.CommitValidators ( com.google.common.collect.ImmutableList.of ( new com.google.gerrit.server.git.validators.CommitValidators.UploadMergesPermissionValidator ( refControl ) , new com.google.gerrit.server.git.validators.CommitValidators.AmendedGerritMergeCommitValidationListener ( refControl , gerritIdent ) , new com.google.gerrit.server.git.validators.CommitValidators.AuthorUploaderValidator ( refControl , canonicalWebUrl ) , new com.google.gerrit.server.git.validators.CommitValidators.SignedOffByValidator ( refControl ) , new com.google.gerrit.server.git.validators.CommitValidators.ChangeIdValidator ( refControl , canonicalWebUrl , installCommitMsgHookCommand , sshInfo ) , new com.google.gerrit.server.git.validators.CommitValidators.ConfigValidator ( refControl , repo , allUsers ) , new com.google.gerrit.server.git.validators.CommitValidators.PluginCommitValidationListener ( pluginValidators ) , new com.google.gerrit.server.git.validators.CommitValidators.BlockExternalIdUpdateListener ( allUsers ) ) ) ; }
Source:
public com.google.gerrit.acceptance.RestResponse post ( java.lang.String endPoint , java.lang.Object content ) throws java.io.IOException { org.apache.http.client.fluent.Request post = org.apache.http.client.fluent.Request.Post ( ( ( ( url ) + "/a" ) + endPoint ) ) ; if ( content != null ) { post.addHeader ( new org.apache.http.message.BasicHeader ( "Content-Type" , "application/json" ) ) ; post.body ( new org.apache.http.entity.StringEntity ( OutputFormat.JSON_COMPACT.newGson ( ) . toJson ( content ) , java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ) ; } return execute ( post ) ; }

Target:
public com.google.gerrit.acceptance.RestResponse post ( java.lang.String endPoint , java.lang.Object content ) throws java.io.IOException { org.apache.http.client.fluent.Request post = org.apache.http.client.fluent.Request.Post ( ( ( ( url ) + "/a" ) + endPoint ) ) ; if ( content != null ) { post.addHeader ( new org.apache.http.message.BasicHeader ( "Content-Type" , "application/json" ) ) ; post.body ( new org.apache.http.entity.StringEntity ( OutputFormat.JSON_COMPACT.newGson ( ) . toJson ( content ) , java.nio.charset.StandardCharsets.UTF_8 ) ) ; } return execute ( post ) ; }
Source:
private void add ( com.google.gerrit.reviewdb.ReviewDb db , java.util.List < com.google.gerrit.sshd.SshKeyCacheEntry > kl , com.google.gerrit.reviewdb.AccountSshKey k ) { try { kl.add ( new com.google.gerrit.sshd.SshKeyCacheEntry ( k.getKey ( ) , com.google.gerrit.sshd.SshUtil.parse ( k ) ) ) ; } catch ( java.lang.OutOfMemoryError e ) { throw e ; } catch ( java.lang.Throwable e ) { markInvalid ( db , k ) ; } }

Target:
private void add ( com.google.gerrit.reviewdb.ReviewDb db , java.util.List < com.google.gerrit.sshd.SshKeyCacheEntry > kl , com.google.gerrit.reviewdb.AccountSshKey k ) { try { kl.add ( new com.google.gerrit.sshd.SshKeyCacheEntry ( k.getKey ( ) , k ) ) ; } catch ( java.lang.OutOfMemoryError e ) { throw e ; } catch ( java.lang.Throwable e ) { markInvalid ( db , k ) ; } }
Source:
public com.google.gerrit.server.data.PatchSetAttribute asPatchSetAttribute ( org.eclipse.jgit.revwalk.RevWalk revWalk , com.google.gerrit.server.notedb.ChangeNotes notes , com.google.gerrit.reviewdb.client.PatchSet patchSet ) { try ( com.google.gerrit.reviewdb.server.ReviewDb db = schema.open ( ) ) { return asPatchSetAttribute ( db , revWalk , notes , patchSet ) ; } catch ( com.google.gwtorm.server.OrmException e ) { com.google.gerrit.server.events.EventFactory.log.error ( "Cannot open database connection" , e ) ; return new com.google.gerrit.server.data.PatchSetAttribute ( ) ; } }

Target:
public com.google.gerrit.server.data.PatchSetAttribute asPatchSetAttribute ( org.eclipse.jgit.revwalk.RevWalk revWalk , com.google.gerrit.reviewdb.client.Change change , com.google.gerrit.reviewdb.client.PatchSet patchSet ) { try ( com.google.gerrit.reviewdb.server.ReviewDb db = schema.open ( ) ) { return asPatchSetAttribute ( db , revWalk , change , patchSet ) ; } catch ( com.google.gwtorm.server.OrmException e ) { com.google.gerrit.server.events.EventFactory.log.error ( "Cannot open database connection" , e ) ; return new com.google.gerrit.server.data.PatchSetAttribute ( ) ; } }
Source:
public void onStop ( com.google.gerrit.server.plugins.Plugin plugin ) { synchronized ( caches ) { for ( java.util.Map.Entry < java.lang.String , com.google.inject.Provider < com.google.common.cache.Cache < ? , ? > > > entry : cacheMap.byPlugin ( plugin.getName ( ) ) . entrySet ( ) ) { com.google.common.cache.Cache < ? , ? > cache = entry.getValue ( ) . get ( ) ; if ( caches.remove ( cache ) ) { ( ( com.google.gerrit.server.cache.h2.H2CacheImpl < ? , ? > ) ( cache ) ) . stop ( ) ; } } } }

Target:
public void onStop ( java.lang.String plugin ) { synchronized ( caches ) { for ( java.util.Map.Entry < java.lang.String , com.google.inject.Provider < com.google.common.cache.Cache < ? , ? > > > entry : cacheMap.byPlugin ( plugin ) . entrySet ( ) ) { com.google.common.cache.Cache < ? , ? > cache = entry.getValue ( ) . get ( ) ; if ( caches.remove ( cache ) ) { ( ( com.google.gerrit.server.cache.h2.H2CacheImpl < ? , ? > ) ( cache ) ) . stop ( ) ; } } } }
Source:
public static void copyLabels ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.common.data.LabelTypes labelTypes , com.google.gerrit.reviewdb.client.PatchSet.Id source , com.google.gerrit.reviewdb.client.PatchSet dest , com.google.gerrit.server.change.PatchSetInserter.ChangeKind changeKind ) throws com.google.gwtorm.server.OrmException { java.lang.Iterable < com.google.gerrit.reviewdb.client.PatchSetApproval > sourceApprovals = db.patchSetApprovals ( ) . byPatchSet ( source ) ; com.google.gerrit.server.ApprovalsUtil.copyLabels ( db , labelTypes , sourceApprovals , source , dest , changeKind ) ; }

Target:
public void copyLabels ( com.google.gerrit.common.data.LabelTypes labelTypes , com.google.gerrit.reviewdb.client.PatchSet.Id source , com.google.gerrit.reviewdb.client.PatchSet dest , com.google.gerrit.server.change.PatchSetInserter.ChangeKind changeKind ) throws com.google.gwtorm.server.OrmException { java.lang.Iterable < com.google.gerrit.reviewdb.client.PatchSetApproval > sourceApprovals = db.patchSetApprovals ( ) . byPatchSet ( source ) ; copyLabels ( labelTypes , sourceApprovals , source , dest , changeKind ) ; }
Source:
private void setuser ( final com.google.gerrit.pgm.init.api.Section database , java.lang.String username , java.lang.String password ) { if ( ( username != null ) && ( ! ( username.isEmpty ( ) ) ) ) { database.set ( "username" , username ) ; } if ( ( password != null ) && ( ! ( password.isEmpty ( ) ) ) ) { sec.setString ( "database" , null , "password" , password ) ; } }

Target:
private void setuser ( final com.google.gerrit.pgm.init.api.Section database , java.lang.String username , java.lang.String password ) { if ( ( username != null ) && ( ! ( username.isEmpty ( ) ) ) ) { database.set ( "username" , username ) ; } if ( ( password != null ) && ( ! ( password.isEmpty ( ) ) ) ) { sec.set ( "database" , null , "password" , password ) ; } }
Source:
private com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo openRepo ( com.google.gerrit.reviewdb.client.Project.NameKey project ) throws java.io.IOException { org.eclipse.jgit.lib.Repository repo = repoManager.openMetadataRepository ( project ) ; org.eclipse.jgit.lib.ObjectInserter ins = repo.newObjectInserter ( ) ; return new com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo ( repo , new org.eclipse.jgit.revwalk.RevWalk ( ins.newReader ( ) ) , ins , new com.google.gerrit.server.git.ChainedReceiveCommands ( ) , true ) ; }

Target:
private com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo openRepo ( com.google.gerrit.reviewdb.client.Project.NameKey p ) throws java.io.IOException { org.eclipse.jgit.lib.Repository repo = repoManager.openMetadataRepository ( p ) ; org.eclipse.jgit.lib.ObjectInserter ins = repo.newObjectInserter ( ) ; return new com.google.gerrit.server.notedb.NoteDbUpdateManager.OpenRepo ( repo , new org.eclipse.jgit.revwalk.RevWalk ( ins.newReader ( ) ) , ins , new com.google.gerrit.server.git.ChainedReceiveCommands ( ) , true ) ; }
Source:
private void appendSkipLine ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m , final int skipCnt ) { m.openTr ( ) ; m.openTd ( ) ; m.setStyleName ( com.google.gerrit.client.patches.S_ICON_CELL ) ; m.nbsp ( ) ; m.closeTd ( ) ; m.openTd ( ) ; m.setStyleName ( "SkipLine" ) ; m.setAttribute ( "colspan" , 4 ) ; m.append ( PatchUtil.M.patchSkipRegion ( skipCnt ) ) ; m.closeTd ( ) ; m.closeTr ( ) ; }

Target:
private void appendSkipLine ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m , final int skipCnt ) { m.openTr ( ) ; m.openTd ( ) ; m.setStyleName ( com.google.gerrit.client.patches.S_ICON_CELL ) ; m.closeTd ( ) ; m.openTd ( ) ; m.setStyleName ( "SkipLine" ) ; m.setAttribute ( "colspan" , 4 ) ; m.append ( PatchUtil.M.patchSkipRegion ( skipCnt ) ) ; m.closeTd ( ) ; m.closeTr ( ) ; }
Source:
public void topic ( java.lang.String topic ) throws com.google.gerrit.extensions.restapi.RestApiException { com.google.gerrit.server.change.PutTopic.Input in = new com.google.gerrit.server.change.PutTopic.Input ( ) ; in.topic = topic ; try { putTopic.apply ( change , in ) ; } catch ( com.google.gwtorm.server.OrmException | java.io.IOException | com.google.gerrit.server.git.UpdateException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot set topic" , e ) ; } }

Target:
public void topic ( java.lang.String topic ) throws com.google.gerrit.extensions.restapi.RestApiException { com.google.gerrit.server.change.PutTopic.Input in = new com.google.gerrit.server.change.PutTopic.Input ( ) ; in.topic = topic ; try { putTopic.apply ( change , in ) ; } catch ( com.google.gerrit.server.git.UpdateException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot set topic" , e ) ; } }
Source:
com.google.gerrit.server.change.PostReviewers.Addition ccCurrentUser ( com.google.gerrit.server.CurrentUser user , com.google.gerrit.server.change.RevisionResource revision ) { return new com.google.gerrit.server.change.PostReviewers.Addition ( user.getUserName ( ) , revision.getChangeResource ( ) , com.google.common.collect.ImmutableSet.of ( user.getAccountId ( ) ) , null , com.google.gerrit.extensions.client.ReviewerState.CC , com.google.gerrit.extensions.api.changes.NotifyHandling.NONE , com.google.common.collect.ImmutableListMultimap.of ( ) ) ; }

Target:
com.google.gerrit.server.change.PostReviewers.Addition ccCurrentUser ( com.google.gerrit.server.CurrentUser user , com.google.gerrit.server.change.RevisionResource revision ) { return new com.google.gerrit.server.change.PostReviewers.Addition ( user.getUserName ( ) , revision.getChangeResource ( ) , com.google.common.collect.ImmutableSet.of ( user.getAccountId ( ) ) , null , com.google.gerrit.extensions.client.ReviewerState.CC , com.google.gerrit.extensions.api.changes.NotifyHandling.NONE , com.google.common.collect.ImmutableListMultimap.of ( ) , true ) ; }
Source:
void onSyntaxHighlighting ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > e ) { prefs.syntaxHighlighting ( e.getValue ( ) ) ; mode.setEnabled ( prefs.syntaxHighlighting ( ) ) ; if ( prefs.syntaxHighlighting ( ) ) { setMode ( view.getContentType ( ) ) ; } view.setSyntaxHighlighting ( prefs.syntaxHighlighting ( ) ) ; }

Target:
void onSyntaxHighlighting ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > e ) { prefs.syntaxHighlighting ( e.getValue ( ) ) ; if ( ( view ) != null ) { mode.setEnabled ( prefs.syntaxHighlighting ( ) ) ; if ( prefs.syntaxHighlighting ( ) ) { setMode ( view.getContentType ( ) ) ; } view.setSyntaxHighlighting ( prefs.syntaxHighlighting ( ) ) ; } }
Source:
private java.io.File getLauncherLoadedFrom ( ) { java.io.File war ; try { war = com.google.gerrit.launcher.GerritLauncher.getDistributionArchive ( ) ; } catch ( java.io.IOException e ) { if ( ( e instanceof java.io.FileNotFoundException ) && ( GerritLauncher.NOT_ARCHIVED.equals ( e.getMessage ( ) ) ) ) { return null ; } else { com.google.inject.ProvisionException pe = new com.google.inject.ProvisionException ( "Error reading gerrit.war" ) ; pe.initCause ( e ) ; throw pe ; } } return war ; }

Target:
private java.io.File getLauncherLoadedFrom ( ) { java.io.File war ; try { war = com.google.gerrit.launcher.GerritLauncher.getDistributionArchive ( ) ; } catch ( java.io.IOException e ) { if ( ( e instanceof java.io.FileNotFoundException ) && ( GerritLauncher.NOT_ARCHIVED.equals ( e.getMessage ( ) ) ) ) { return null ; } com.google.inject.ProvisionException pe = new com.google.inject.ProvisionException ( "Error reading gerrit.war" ) ; pe.initCause ( e ) ; throw pe ; } return war ; }
Source:
private java.util.List < com.google.gerrit.reviewdb.RefRight > filterMatching ( java.util.Collection < com.google.gerrit.reviewdb.RefRight > rights , com.google.gerrit.reviewdb.ApprovalCategory.Id category ) { java.util.List < com.google.gerrit.reviewdb.RefRight > result = new java.util.ArrayList < com.google.gerrit.reviewdb.RefRight > ( ) ; for ( com.google.gerrit.reviewdb.RefRight right : rights ) { if ( ( com.google.gerrit.server.project.RefControl.matches ( change.getDest ( ) . get ( ) , right.getRefPattern ( ) ) ) && ( category.equals ( right.getApprovalCategoryId ( ) ) ) ) { result.add ( right ) ; } } return result ; }

Target:
private java.util.List < com.google.gerrit.reviewdb.RefRight > filterMatching ( java.util.Collection < com.google.gerrit.reviewdb.RefRight > rights ) { java.util.List < com.google.gerrit.reviewdb.RefRight > result = new java.util.ArrayList < com.google.gerrit.reviewdb.RefRight > ( ) ; for ( com.google.gerrit.reviewdb.RefRight right : rights ) { if ( com.google.gerrit.server.project.RefControl.matches ( change.getDest ( ) . get ( ) , right.getRefPattern ( ) ) ) { result.add ( right ) ; } } return result ; }
Source:
protected java.lang.String getChangeUrl ( ) { if ( ( getGerritUrl ( ) ) != null ) { final java.lang.StringBuilder r = new java.lang.StringBuilder ( ) ; r.append ( getGerritUrl ( ) ) ; r.append ( change.getChangeId ( ) ) ; return r.toString ( ) ; } return null ; }

Target:
protected java.lang.String getChangeUrl ( ) { if ( ( ( change ) != null ) && ( ( getGerritUrl ( ) ) != null ) ) { final java.lang.StringBuilder r = new java.lang.StringBuilder ( ) ; r.append ( getGerritUrl ( ) ) ; r.append ( change.getChangeId ( ) ) ; return r.toString ( ) ; } return null ; }
Source:
public void preDisplay ( final com.google.gerrit.common.data.ProjectDetail result ) { enableForm ( result.canModifyAgreements , result.canModifyDescription , result.canModifyMergeType ) ; saveProject.setVisible ( ( ( ( result.canModifyAgreements ) || ( result.canModifyDescription ) ) || ( result.canModifyMergeType ) ) ) ; saveProject.setEnabled ( false ) ; display ( result ) ; }

Target:
public void preDisplay ( final com.google.gerrit.common.data.ProjectDetail result ) { enableForm ( result.canModifyAgreements , result.canModifyDescription , result.canModifyMergeType ) ; saveProject.setVisible ( ( ( ( result.canModifyAgreements ) || ( result.canModifyDescription ) ) || ( result.canModifyMergeType ) ) ) ; display ( result ) ; }
Source:
private com.google.gerrit.reviewdb.client.PatchSetApproval getSubmitter ( com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Change c = db.changes ( ) . get ( patchSetId.getParentKey ( ) ) ; com.google.gerrit.server.notedb.ChangeNotes notes = changeNotesFactory.create ( c ) . load ( ) ; return approvalsUtil.getSubmitter ( db , notes , patchSetId ) ; }

Target:
private com.google.gerrit.reviewdb.client.PatchSetApproval getSubmitter ( com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Change c = db.changes ( ) . get ( patchSetId.getParentKey ( ) ) ; com.google.gerrit.server.notedb.ChangeNotes notes = changeNotesFactory.create ( db , c ) . load ( ) ; return approvalsUtil.getSubmitter ( db , notes , patchSetId ) ; }
Source:
public void testPushNewPatchsetToRefsChanges ( ) throws com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { com.google.gerrit.acceptance.PushOneCommit.Result r = pushTo ( "refs/for/master" ) ; r.assertOkStatus ( ) ; com.google.gerrit.acceptance.PushOneCommit push = pushFactory.create ( db , admin.getIdent ( ) , PushOneCommit.SUBJECT , "b.txt" , "anotherContent" , r.getChangeId ( ) ) ; r = push.to ( git , ( "refs/changes/" + ( r.getChange ( ) . change ( ) . getId ( ) . get ( ) ) ) ) ; r.assertOkStatus ( ) ; }

Target:
public void testPushNewPatchsetToRefsChanges ( ) throws com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { com.google.gerrit.acceptance.PushOneCommit.Result r = pushTo ( "refs/for/master" ) ; r.assertOkStatus ( ) ; com.google.gerrit.acceptance.PushOneCommit push = pushFactory.create ( db , admin.getIdent ( ) , git , PushOneCommit.SUBJECT , "b.txt" , "anotherContent" , r.getChangeId ( ) ) ; r = push.to ( ( "refs/changes/" + ( r.getChange ( ) . change ( ) . getId ( ) . get ( ) ) ) ) ; r.assertOkStatus ( ) ; }
Source:
public com.google.gerrit.common.data.GroupReference resolve ( com.google.gerrit.common.data.GroupReference group ) { if ( group != null ) { com.google.gerrit.common.data.GroupReference ref = byUUID.get ( group.getUUID ( ) ) ; if ( ref != null ) { return ref ; } byUUID.put ( group.getUUID ( ) , group ) ; } return group ; }

Target:
public com.google.gerrit.common.data.GroupReference resolve ( com.google.gerrit.common.data.GroupReference group ) { if ( group != null ) { if ( ( ( group.getUUID ( ) ) == null ) || ( ( group.getUUID ( ) . get ( ) ) == null ) ) { return group ; } com.google.gerrit.common.data.GroupReference ref = byUUID.get ( group.getUUID ( ) ) ; if ( ref != null ) { return ref ; } byUUID.put ( group.getUUID ( ) , group ) ; } return group ; }
Source:
private static org.apache.lucene.search.Query not ( com.google.gerrit.server.index.Schema < com.google.gerrit.server.query.change.ChangeData > schema , com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > p ) throws com.google.gerrit.server.query.QueryParseException { com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > n = p.getChild ( 0 ) ; if ( n instanceof com.google.gerrit.server.index.TimestampRangePredicate ) { return com.google.gerrit.lucene.QueryBuilder.notTimestamp ( ( ( com.google.gerrit.server.index.TimestampRangePredicate < com.google.gerrit.server.query.change.ChangeData > ) ( n ) ) ) ; } org.apache.lucene.search.BooleanQuery q = new org.apache.lucene.search.BooleanQuery ( ) ; q.add ( new org.apache.lucene.search.MatchAllDocsQuery ( ) , org.apache.lucene.search.BooleanClause.Occur.MUST ) ; q.add ( com.google.gerrit.lucene.QueryBuilder.toQuery ( schema , n ) , org.apache.lucene.search.BooleanClause.Occur.MUST_NOT ) ; return q ; }

Target:
private org.apache.lucene.search.Query not ( com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > p ) throws com.google.gerrit.server.query.QueryParseException { com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > n = p.getChild ( 0 ) ; if ( n instanceof com.google.gerrit.server.index.TimestampRangePredicate ) { return notTimestamp ( ( ( com.google.gerrit.server.index.TimestampRangePredicate < com.google.gerrit.server.query.change.ChangeData > ) ( n ) ) ) ; } org.apache.lucene.search.BooleanQuery q = new org.apache.lucene.search.BooleanQuery ( ) ; q.add ( new org.apache.lucene.search.MatchAllDocsQuery ( ) , org.apache.lucene.search.BooleanClause.Occur.MUST ) ; q.add ( toQuery ( n ) , org.apache.lucene.search.BooleanClause.Occur.MUST_NOT ) ; return q ; }
Source:
public void testNestedQuotes1 ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_WikifyQuoteTest.html ( " > > prior\n > \n > next\n" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.wikify ( ) ; org.junit.Assert.assertEquals ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyQuoteTest.quote ( ( ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyQuoteTest.quote ( "prior" ) ) + "next\n" ) ) , n.asString ( ) ) ; }

Target:
public void testNestedQuotes1 ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_WikifyQuoteTest.html ( " > > prior\n > \n > next\n" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.wikify ( ) ; com.google.common.truth.Truth.assertThat ( n.asString ( ) ) . isEqualTo ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyQuoteTest.quote ( ( ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyQuoteTest.quote ( "prior" ) ) + "next\n" ) ) ) ; }
Source:
private void merge ( com.google.gerrit.acceptance.PushOneCommit.Result r ) throws java.lang.Exception { revision ( r ) . review ( com.google.gerrit.extensions.api.changes.ReviewInput.approve ( ) ) ; revision ( r ) . submit ( ) ; org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( project ) ; try { org.junit.Assert.assertEquals ( r.getCommitId ( ) , repo.getRef ( "refs/heads/master" ) . getObjectId ( ) ) ; } finally { repo.close ( ) ; } }

Target:
private void merge ( com.google.gerrit.acceptance.PushOneCommit.Result r ) throws java.lang.Exception { revision ( r ) . review ( com.google.gerrit.extensions.api.changes.ReviewInput.approve ( ) ) ; revision ( r ) . submit ( ) ; org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( project ) ; try { com.google.common.truth.Truth.assertThat ( repo.getRef ( "refs/heads/master" ) . getObjectId ( ) ) . isEqualTo ( r.getCommitId ( ) ) ; } finally { repo.close ( ) ; } }
Source:
private static com.google.gerrit.common.data.LabelType type ( com.google.gerrit.common.data.LabelTypes types , java.lang.String toFind ) { if ( ( types.byLabel ( toFind ) ) != null ) { return types.byLabel ( toFind ) ; } for ( com.google.gerrit.common.data.LabelType lt : types.getLabelTypes ( ) ) { if ( toFind.equalsIgnoreCase ( lt.getName ( ) ) ) { return lt ; } } return null ; }

Target:
protected static com.google.gerrit.common.data.LabelType type ( com.google.gerrit.common.data.LabelTypes types , java.lang.String toFind ) { if ( ( types.byLabel ( toFind ) ) != null ) { return types.byLabel ( toFind ) ; } for ( com.google.gerrit.common.data.LabelType lt : types.getLabelTypes ( ) ) { if ( toFind.equalsIgnoreCase ( lt.getName ( ) ) ) { return lt ; } } return null ; }