auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void newPatchSetByOwnerOnReviewableChangeInNoteDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; pushTo ( sc , "refs/for/master" , sc.owner ) ; assertThat ( sender ) . sent ( "newpatchset" , sc ) . notTo ( sc.owner ) . to ( sc.reviewer ) . to ( sc.reviewerByEmail ) . cc ( sc.ccer ) . cc ( sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; }

Target:
public void newPatchSetByOwnerOnReviewableChangeInNoteDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; pushTo ( sc , "refs/for/master" , sc.owner ) ; assertThat ( sender ) . sent ( "newpatchset" , sc ) . notTo ( sc.owner ) . to ( sc.reviewer ) . cc ( sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; }
Source:
public void copyMinScoreOnRework ( ) throws java.lang.Exception { codeReview.setCopyMinScore ( true ) ; saveLabelConfig ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; revision ( r ) . review ( com.google.gerrit.extensions.api.changes.ReviewInput.reject ( ) ) ; r = amendChange ( r.getChangeId ( ) ) ; assertApproval ( r , ( - 2 ) ) ; }

Target:
public void copyMinScoreOnRework ( ) throws java.lang.Exception { codeReview.setCopyMinScore ( true ) ; saveLabelConfig ( ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; revision ( r ) . review ( com.google.gerrit.extensions.api.changes.ReviewInput.reject ( ) ) ; assertApproval ( r , ( - 2 ) ) ; r = amendChange ( r.getChangeId ( ) ) ; assertApproval ( r , ( - 2 ) ) ; }
Source:
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 ) ) ) ; }

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.revwalk.RevWalk rw ) { 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 , rw , allUsers ) , new com.google.gerrit.server.git.validators.CommitValidators.PluginCommitValidationListener ( pluginValidators ) , new com.google.gerrit.server.git.validators.CommitValidators.BlockExternalIdUpdateListener ( allUsers ) ) ) ; }
Source:
public void testHtmlInFind ( ) { java.lang.String rawFind = "<b>&quot;bold&quot;</b>" ; com.google.gwtexpui.safehtml.client.LinkFindReplace a = new com.google.gwtexpui.safehtml.client.LinkFindReplace ( rawFind , "/bold" ) ; org.junit.Assert.assertEquals ( rawFind , a.pattern ( ) . getSource ( ) ) ; org.junit.Assert.assertEquals ( ( ( "<a href=\"/bold\">" + rawFind ) + "</a>" ) , a.replace ( rawFind ) ) ; }

Target:
public void testHtmlInFind ( ) { java.lang.String rawFind = "<b>&quot;bold&quot;</b>" ; com.google.gwtexpui.safehtml.client.LinkFindReplace a = new com.google.gwtexpui.safehtml.client.LinkFindReplace ( rawFind , "/bold" ) ; com.google.common.truth.Truth.assertThat ( a.pattern ( ) . getSource ( ) ) . isEqualTo ( rawFind ) ; com.google.common.truth.Truth.assertThat ( a.replace ( rawFind ) ) . isEqualTo ( ( ( "<a href=\"/bold\">" + rawFind ) + "</a>" ) ) ; }
Source:
public static void assertAccountInfo ( com.google.gerrit.acceptance.TestAccount a , com.google.gerrit.extensions.common.AccountInfo ai ) { org.junit.Assert.assertTrue ( ( ( a.id.get ( ) ) == ( ai._accountId ) ) ) ; org.junit.Assert.assertEquals ( a.fullName , ai.name ) ; org.junit.Assert.assertEquals ( a.email , ai.email ) ; }

Target:
public static void assertAccountInfo ( com.google.gerrit.acceptance.TestAccount a , com.google.gerrit.extensions.common.AccountInfo ai ) { com.google.common.truth.Truth.assertThat ( a.id.get ( ) ) . isEqualTo ( ai._accountId ) ; com.google.common.truth.Truth.assertThat ( a.fullName ) . isEqualTo ( ai.name ) ; com.google.common.truth.Truth.assertThat ( a.email ) . isEqualTo ( ai.email ) ; }
Source:
public com.google.gerrit.client.reviewdb.PatchSet getCurrentPatchSet ( ) { if ( ( currentPatchSetId ) != null ) { for ( int i = ( patchSets.size ( ) ) - 1 ; i >= 0 ; i -- ) { final com.google.gerrit.client.reviewdb.PatchSet ps = patchSets.get ( i ) ; if ( ps.getKey ( ) . equals ( currentPatchSetId ) ) { return ps ; } } } return null ; }

Target:
public com.google.gerrit.client.reviewdb.PatchSet getCurrentPatchSet ( ) { if ( ( currentPatchSetId ) != null ) { for ( int i = ( patchSets.size ( ) ) - 1 ; i >= 0 ; i -- ) { final com.google.gerrit.client.reviewdb.PatchSet ps = patchSets.get ( i ) ; if ( ps.getId ( ) . equals ( currentPatchSetId ) ) { return ps ; } } } return null ; }
Source:
public void writeTo ( java.io.OutputStream out ) throws java.io.IOException { try ( java.io.OutputStreamWriter w = new java.io.OutputStreamWriter ( out , java.nio.charset.StandardCharsets.ISO_8859_1 ) ; java.io.OutputStream e = com.google.common.io.BaseEncoding.base64 ( ) . encodingStream ( w ) ) { src.writeTo ( e ) ; e.flush ( ) ; } }

Target:
public void close ( ) { }
Source:
public void onLoad ( ) { super . onLoad ( ) ; Util.ACCOUNT_SVC.myAccount ( new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.reviewdb.Account > ( ) { public void onSuccess ( final com.google.gerrit.client.reviewdb.Account result ) { display ( result.getGeneralPreferences ( ) ) ; enable ( true ) ; } } ) ; }

Target:
protected void onLoad ( ) { super . onLoad ( ) ; Util.ACCOUNT_SVC.myAccount ( new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.reviewdb.Account > ( ) { public void onSuccess ( final com.google.gerrit.client.reviewdb.Account result ) { display ( result.getGeneralPreferences ( ) ) ; enable ( true ) ; } } ) ; }
Source:
public static void assertBranchInfo ( com.google.gerrit.server.project.ListBranches.BranchInfo expected , com.google.gerrit.server.project.ListBranches.BranchInfo actual ) { org.junit.Assert.assertEquals ( expected.ref , actual.ref ) ; if ( ( expected.revision ) != null ) { org.junit.Assert.assertEquals ( expected.revision , actual.revision ) ; } org.junit.Assert.assertEquals ( expected.canDelete , com.google.gerrit.acceptance.rest.project.BranchAssert.toBoolean ( actual.canDelete ) ) ; }

Target:
public static void assertBranchInfo ( com.google.gerrit.server.project.ListBranches.BranchInfo expected , com.google.gerrit.server.project.ListBranches.BranchInfo actual ) { com.google.common.truth.Truth.assertThat ( actual.ref ) . isEqualTo ( expected.ref ) ; if ( ( expected.revision ) != null ) { com.google.common.truth.Truth.assertThat ( actual.revision ) . isEqualTo ( expected.revision ) ; } com.google.common.truth.Truth.assertThat ( com.google.gerrit.acceptance.rest.project.BranchAssert.toBoolean ( actual.canDelete ) ) . isEqualTo ( expected.canDelete ) ; }
Source:
public com.google.common.collect.Multimap < com.google.gerrit.reviewdb.client.Branch.NameKey , com.google.gerrit.server.query.change.ChangeData > changesByBranch ( ) throws com.google.gwtorm.server.OrmException { com.google.common.collect.ListMultimap < com.google.gerrit.reviewdb.client.Branch.NameKey , com.google.gerrit.server.query.change.ChangeData > ret = com.google.common.collect.ArrayListMultimap.create ( ) ; for ( com.google.gerrit.server.query.change.ChangeData cd : changeData ) { ret.put ( cd.change ( ) . getDest ( ) , cd ) ; } return ret ; }

Target:
public com.google.common.collect.Multimap < com.google.gerrit.reviewdb.client.Branch.NameKey , com.google.gerrit.server.query.change.ChangeData > changesByBranch ( ) throws com.google.gwtorm.server.OrmException { com.google.common.collect.ListMultimap < com.google.gerrit.reviewdb.client.Branch.NameKey , com.google.gerrit.server.query.change.ChangeData > ret = com.google.common.collect.ArrayListMultimap.create ( ) ; for ( com.google.gerrit.server.query.change.ChangeData cd : changeData.values ( ) ) { ret.put ( cd.change ( ) . getDest ( ) , cd ) ; } return ret ; }
Source:
private com.google.gerrit.common.data.SubmitTypeRecord typeError ( java.lang.String err , java.lang.Exception e ) { if ( logErrors ) { if ( e == null ) { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err ) ; } else { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err , e ) ; } return com.google.gerrit.server.project.SubmitRuleEvaluator.defaultTypeError ( ) ; } else { return com.google.gerrit.server.project.SubmitRuleEvaluator.createTypeError ( err ) ; } }

Target:
private com.google.gerrit.common.data.SubmitTypeRecord typeError ( java.lang.String err , java.lang.Exception e ) { if ( logErrors ) { if ( e == null ) { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err ) ; } else { com.google.gerrit.server.project.SubmitRuleEvaluator.log.error ( err , e ) ; } return com.google.gerrit.server.project.SubmitRuleEvaluator.defaultTypeError ( ) ; } else { return com.google.gerrit.common.data.SubmitTypeRecord.error ( err ) ; } }
Source:
public void onSuccess ( com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.info.FileInfo > m ) { files.set ( base , new com.google.gerrit.reviewdb.client.PatchSet.Id ( changeId , rev._number ( ) ) , style , reply , fileTableMode , ( ( edit ) != null ) ) ; files.setValue ( m , myLastReply , ( comments != null ? comments.get ( 0 ) : null ) , ( drafts != null ? drafts.get ( 0 ) : null ) ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.info.FileInfo > m ) { files.set ( base , new com.google.gerrit.reviewdb.client.PatchSet.Id ( changeId , rev._number ( ) ) , getProject ( ) , style , reply , fileTableMode , ( ( edit ) != null ) ) ; files.setValue ( m , myLastReply , ( comments != null ? comments.get ( 0 ) : null ) , ( drafts != null ? drafts.get ( 0 ) : null ) ) ; }
Source:
private static java.lang.String loginRedirect ( java.lang.String token ) { if ( token == null ) { token = "" ; } else if ( token.startsWith ( "/" ) ) { token = token.substring ( 1 ) ; } return com.google.gerrit.client.Gerrit.selfRedirect ( ( "/login/" + token ) ) ; }

Target:
public static java.lang.String loginRedirect ( java.lang.String token ) { if ( token == null ) { token = "" ; } else if ( token.startsWith ( "/" ) ) { token = token.substring ( 1 ) ; } return com.google.gerrit.client.Gerrit.selfRedirect ( ( "/login/" + token ) ) ; }
Source:
private java.lang.String configurationToString ( ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; b.append ( ( ( "Supermanifest config (" + ( config.size ( ) ) ) + ") {\n" ) ) ; for ( com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.ConfigEntry c : config ) { b.append ( " " ) ; b.append ( c.toString ( ) ) ; b.append ( "\n" ) ; } b.append ( "}\n" ) ; return b.toString ( ) ; }

Target:
private java.lang.String configurationToString ( ) { java.lang.StringBuilder b = new java.lang.StringBuilder ( ) ; b.append ( "Supermanifest config (" ) . append ( config.size ( ) ) . append ( ") {\n" ) ; for ( com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.ConfigEntry c : config ) { b.append ( " " ) . append ( c ) . append ( "\n" ) ; } b.append ( "}\n" ) ; return b.toString ( ) ; }
Source:
public < T extends java.io.Closeable > void putEntry ( T out , java.lang.String path , byte [ ] data ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "unchecked" ) org.eclipse.jgit.api.ArchiveCommand.Format < T > fmt = ( ( org.eclipse.jgit.api.ArchiveCommand.Format < T > ) ( format ) ) ; fmt.putEntry ( out , path , FileMode.REGULAR_FILE , new org.eclipse.jgit.lib.ObjectLoader.SmallObject ( org.eclipse.jgit.lib.FileMode.TYPE_FILE , data ) ) ; }

Target:
public < T extends java.io.Closeable > void putEntry ( T out , java.lang.String path , byte [ ] data ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "unchecked" ) org.eclipse.jgit.api.ArchiveCommand.Format < T > fmt = ( ( org.eclipse.jgit.api.ArchiveCommand.Format < T > ) ( format ) ) ; fmt.putEntry ( out , null , path , FileMode.REGULAR_FILE , new org.eclipse.jgit.lib.ObjectLoader.SmallObject ( org.eclipse.jgit.lib.FileMode.TYPE_FILE , data ) ) ; }
Source:
private com.google.inject.Injector createSshInjector ( final com.google.inject.Injector sysInjector ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( new com.google.gerrit.sshd.SshModule ( ) ) ; if ( slave ) { modules.add ( new com.google.gerrit.sshd.commands.SlaveCommandModule ( ) ) ; } else { modules.add ( new com.google.gerrit.sshd.commands.MasterCommandModule ( ) ) ; modules.add ( new com.google.gerrit.server.config.GerritMasterLifecycle ( ) ) ; } return sysInjector.createChildInjector ( modules ) ; }

Target:
private com.google.inject.Injector createSshInjector ( ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( new com.google.gerrit.sshd.SshModule ( ) ) ; if ( slave ) { modules.add ( new com.google.gerrit.sshd.commands.SlaveCommandModule ( ) ) ; } else { modules.add ( new com.google.gerrit.sshd.commands.MasterCommandModule ( ) ) ; } return sysInjector.createChildInjector ( modules ) ; }
Source:
public static void writeVarInt32 ( final java.io.OutputStream output , int value ) throws java.io.IOException { while ( true ) { if ( ( value & ( ~ 127 ) ) == 0 ) { output.write ( value ) ; return ; } else { output.write ( ( ( value & 127 ) | 128 ) ) ; value >>>= 7 ; } } }

Target:
public static void writeVarInt32 ( final java.io.OutputStream output , int value ) throws java.io.IOException { while ( true ) { if ( ( value & ( ~ 127 ) ) == 0 ) { output.write ( value ) ; return ; } output.write ( ( ( value & 127 ) | 128 ) ) ; value >>>= 7 ; } }
Source:
public com.google.gerrit.common.data.WebLinkInfoCommon apply ( com.google.gerrit.extensions.webui.WebLink webLink ) { com.google.gerrit.extensions.common.WebLinkInfo info = ( ( com.google.gerrit.extensions.webui.FileHistoryWebLink ) ( webLink ) ) . getFileHistoryWebLink ( project , revision , file ) ; com.google.gerrit.common.data.WebLinkInfoCommon commonInfo = new com.google.gerrit.common.data.WebLinkInfoCommon ( ) ; commonInfo.name = info.name ; commonInfo.imageUrl = info.imageUrl ; commonInfo.url = info.url ; commonInfo.target = info.target ; return commonInfo ; }

Target:
public com.google.gerrit.common.data.WebLinkInfoCommon apply ( com.google.gerrit.extensions.webui.WebLink webLink ) { com.google.gerrit.extensions.common.WebLinkInfo info = ( ( com.google.gerrit.extensions.webui.FileHistoryWebLink ) ( webLink ) ) . getFileHistoryWebLink ( project , revision , file ) ; if ( info == null ) { return null ; } com.google.gerrit.common.data.WebLinkInfoCommon commonInfo = new com.google.gerrit.common.data.WebLinkInfoCommon ( ) ; commonInfo.name = info.name ; commonInfo.imageUrl = info.imageUrl ; commonInfo.url = info.url ; commonInfo.target = info.target ; return commonInfo ; }
Source:
public static org.eclipse.jgit.revwalk.RevCommit makeCommit ( org.eclipse.jgit.lib.Repository repo , java.lang.String message , java.util.Map < java.io.File , byte [ ] > files ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { try ( org.eclipse.jgit.api.Git git = new org.eclipse.jgit.api.Git ( repo ) ) { if ( files != null ) { com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.addFiles ( git , files ) ; } return git.commit ( ) . setMessage ( message ) . call ( ) ; } }

Target:
public static org.eclipse.jgit.revwalk.RevCommit makeCommit ( org.eclipse.jgit.revwalk.RevWalk rw , org.eclipse.jgit.lib.Repository repo , java.lang.String message , java.util.Map < java.io.File , byte [ ] > files ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { try ( org.eclipse.jgit.api.Git git = new org.eclipse.jgit.api.Git ( repo ) ) { if ( files != null ) { com.googlesource.gerrit.plugins.uploadvalidator.TestUtils.addFiles ( git , files ) ; } return rw.parseCommit ( git.commit ( ) . setMessage ( message ) . call ( ) ) ; } }
Source:
public void restoreReviewableChangeByAdmin ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageAbandonedReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; restore ( sc.changeId , admin ) ; assertThat ( sender ) . sent ( "restore" , sc ) . notTo ( admin ) . to ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . to ( sc.reviewerByEmail ) . cc ( sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; }

Target:
public void restoreReviewableChangeByAdmin ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageAbandonedReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; restore ( sc.changeId , admin ) ; assertThat ( sender ) . sent ( "restore" , sc ) . notTo ( admin ) . to ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS ) ; }
Source:
public boolean isVisible ( com.google.gerrit.reviewdb.ReviewDb db ) throws com.google.gwtorm.client.OrmException { if ( ( ( change.getStatus ( ) ) == ( Change.Status.DRAFT ) ) && ( ! ( isDraftVisible ( db ) ) ) ) { return false ; } return isRefVisible ( ) ; }

Target:
public boolean isVisible ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException { if ( ( ( change.getStatus ( ) ) == ( Change.Status.DRAFT ) ) && ( ! ( isDraftVisible ( db ) ) ) ) { return false ; } return isRefVisible ( ) ; }
Source:
public void onSuccess ( com.google.gwt.core.client.JsArray < com.google.gerrit.client.change.RestReviewerSuggestOracle.SuggestReviewerInfo > result ) { final java.util.List < com.google.gerrit.client.change.RestReviewerSuggestOracle.RestReviewerSuggestion > r = new java.util.ArrayList < com.google.gerrit.client.change.RestReviewerSuggestOracle.RestReviewerSuggestion > ( result.length ( ) ) ; for ( final com.google.gerrit.client.change.RestReviewerSuggestOracle.SuggestReviewerInfo reviewer : com.google.gerrit.client.rpc.Natives.asList ( result ) ) { r.add ( new com.google.gerrit.client.change.RestReviewerSuggestOracle.RestReviewerSuggestion ( reviewer ) ) ; } callback.onSuggestionsReady ( req , new com.google.gerrit.client.change.Response ( r ) ) ; }

Target:
public void onSuccess ( com.google.gwt.core.client.JsArray < com.google.gerrit.client.change.RestReviewerSuggestOracle.SuggestReviewerInfo > result ) { final java.util.List < com.google.gerrit.client.change.RestReviewerSuggestOracle.RestReviewerSuggestion > r = new java.util.ArrayList ( result.length ( ) ) ; for ( final com.google.gerrit.client.change.RestReviewerSuggestOracle.SuggestReviewerInfo reviewer : com.google.gerrit.client.rpc.Natives.asList ( result ) ) { r.add ( new com.google.gerrit.client.change.RestReviewerSuggestOracle.RestReviewerSuggestion ( reviewer ) ) ; } callback.onSuggestionsReady ( req , new com.google.gerrit.client.change.Response ( r ) ) ; }
Source:
private com.google.gerrit.acceptance.RestResponse getWithHeader ( java.lang.String endPoint , org.apache.http.Header header ) throws java.io.IOException { org.apache.http.client.fluent.Request get = org.apache.http.client.fluent.Request.Get ( ( ( ( url ) + "/a" ) + endPoint ) ) ; if ( header != null ) { get.addHeader ( header ) ; } return execute ( get ) ; }

Target:
public com.google.gerrit.acceptance.RestResponse getWithHeader ( java.lang.String endPoint , org.apache.http.Header header ) throws java.io.IOException { org.apache.http.client.fluent.Request get = org.apache.http.client.fluent.Request.Get ( ( ( ( url ) + "/a" ) + endPoint ) ) ; if ( header != null ) { get.addHeader ( header ) ; } return execute ( get ) ; }
Source:
private java.util.List < com.google.gerrit.extensions.common.WebLinkInfo > getFileWebLinks ( com.google.gerrit.reviewdb.client.Project project , java.lang.String rev , java.lang.String file ) { java.util.List < com.google.gerrit.extensions.common.WebLinkInfo > fileWebLinks = new java.util.ArrayList < > ( ) ; for ( com.google.gerrit.extensions.common.WebLinkInfo link : webLinks.get ( ) . getFileLinks ( project.getName ( ) , rev , file ) ) { if ( ( ! ( com.google.common.base.Strings.isNullOrEmpty ( link.name ) ) ) && ( ! ( com.google.common.base.Strings.isNullOrEmpty ( link.url ) ) ) ) { fileWebLinks.add ( link ) ; } } return fileWebLinks ; }

Target:
private java.util.List < com.google.gerrit.extensions.common.WebLinkInfo > getFileWebLinks ( com.google.gerrit.reviewdb.client.Project project , java.lang.String rev , java.lang.String file ) { java.util.List < com.google.gerrit.extensions.common.WebLinkInfo > fileWebLinks = new java.util.ArrayList < > ( ) ; for ( com.google.gerrit.extensions.common.WebLinkInfo link : webLinks.getFileLinks ( project.getName ( ) , rev , file ) ) { if ( ( ! ( com.google.common.base.Strings.isNullOrEmpty ( link.name ) ) ) && ( ! ( com.google.common.base.Strings.isNullOrEmpty ( link.url ) ) ) ) { fileWebLinks.add ( link ) ; } } return fileWebLinks ; }
Source:
private java.lang.String readOutput ( java.io.InputStream is ) throws java.io.IOException { output = new java.io.StringWriter ( ) ; java.io.InputStreamReader input = new java.io.InputStreamReader ( is ) ; char [ ] buffer = new char [ 4096 ] ; int n = 0 ; while ( ( n = input.read ( buffer ) ) != ( - 1 ) ) { output.write ( buffer , 0 , n ) ; } return output.toString ( ) ; }

Target:
private java.lang.String readOutput ( java.io.InputStream is ) throws java.io.IOException { output = new java.io.StringWriter ( ) ; java.io.InputStreamReader input = new java.io.InputStreamReader ( is ) ; char [ ] buffer = new char [ 4096 ] ; int n ; while ( ( n = input.read ( buffer ) ) != ( - 1 ) ) { output.write ( buffer , 0 , n ) ; } return output.toString ( ) ; }
Source:
public void load ( org.eclipse.jgit.lib.Repository db , org.eclipse.jgit.lib.ObjectId id ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { reader = db.newObjectReader ( ) ; try { revision = ( id != null ) ? new org.eclipse.jgit.revwalk.RevWalk ( reader ) . parseCommit ( id ) : null ; onLoad ( ) ; } finally { reader.close ( ) ; reader = null ; } }

Target:
public void load ( org.eclipse.jgit.lib.Repository db , org.eclipse.jgit.lib.ObjectId id ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { try ( org.eclipse.jgit.revwalk.RevWalk walk = new org.eclipse.jgit.revwalk.RevWalk ( db ) ) { load ( walk , id ) ; } }
Source:
public void removeOldEvents ( int maxAge ) throws java.sql.SQLException { try ( java.sql.Connection conn = ds.getConnection ( ) ; java.sql.Statement stat = conn.createStatement ( ) ) { stat.execute ( java.lang.String.format ( "DELETE FROM %s WHERE %s < '%s'" , com.ericsson.gerrit.plugins.eventslog.sql.SQLTable.TABLE_NAME , com.ericsson.gerrit.plugins.eventslog.sql.SQLTable.DATE_ENTRY , new java.sql.Timestamp ( ( ( java.lang.System.currentTimeMillis ( ) ) - ( java.util.concurrent.TimeUnit.MILLISECONDS.convert ( maxAge , java.util.concurrent.TimeUnit.DAYS ) ) ) ) ) ) ; } }

Target:
public void removeOldEvents ( int maxAge ) throws java.sql.SQLException { execute ( java.lang.String.format ( "DELETE FROM %s WHERE %s < '%s'" , com.ericsson.gerrit.plugins.eventslog.sql.SQLTable.TABLE_NAME , com.ericsson.gerrit.plugins.eventslog.sql.SQLTable.DATE_ENTRY , new java.sql.Timestamp ( ( ( java.lang.System.currentTimeMillis ( ) ) - ( java.util.concurrent.TimeUnit.MILLISECONDS.convert ( maxAge , java.util.concurrent.TimeUnit.DAYS ) ) ) ) ) ) ; }
Source:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.server.git.validators.CommitValidationListener.class ) . to ( com.googlesource.gerrit.plugins.uploadvalidator.BlockedKeywordValidator.class ) ; bind ( com.google.gerrit.server.config.ProjectConfigEntry.class ) . annotatedWith ( com.google.gerrit.extensions.annotations.Exports.named ( com.googlesource.gerrit.plugins.uploadvalidator.BlockedKeywordValidator.KEY_CHECK_BLOCKED_KEYWORD_PATTERN ) ) . toInstance ( new com.google.gerrit.server.config.ProjectConfigEntry ( "Blocked Keyword Pattern" , null , ProjectConfigEntry.Type.ARRAY , null , false , ( "Pushes of commits that contain files with blocked keywords " + "will be rejected." ) ) ) ; install ( new com.google.gerrit.server.cache.CacheModule ( ) { @ java.lang.Override protected void configure ( ) { cache ( com.googlesource.gerrit.plugins.uploadvalidator.BlockedKeywordValidator.CACHE_NAME , java.lang.String.class , java.util.regex.Pattern.class ) . loader ( com.googlesource.gerrit.plugins.uploadvalidator.BlockedKeywordValidator.Loader.class ) ; } } ) ; }

Target:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.server.git.validators.CommitValidationListener.class ) . to ( com.googlesource.gerrit.plugins.uploadvalidator.BlockedKeywordValidator.class ) ; bind ( com.google.gerrit.server.config.ProjectConfigEntry.class ) . annotatedWith ( com.google.gerrit.extensions.annotations.Exports.named ( com.googlesource.gerrit.plugins.uploadvalidator.BlockedKeywordValidator.KEY_CHECK_BLOCKED_KEYWORD_PATTERN ) ) . toInstance ( new com.google.gerrit.server.config.ProjectConfigEntry ( "Blocked Keyword Pattern" , null , ProjectConfigEntry.Type.ARRAY , null , false , ( "Pushes of commits that contain files with blocked keywords " + "will be rejected." ) ) ) ; }
Source:
public void testFindReplace ( ) { final java.lang.String find = "find" ; final java.lang.String replace = "replace" ; final com.google.gwtexpui.safehtml.client.RawFindReplace a = new com.google.gwtexpui.safehtml.client.RawFindReplace ( find , replace ) ; org.junit.Assert.assertEquals ( find , a.pattern ( ) . getSource ( ) ) ; org.junit.Assert.assertEquals ( replace , a.replace ( find ) ) ; org.junit.Assert.assertEquals ( ( ( ( "find = " + find ) + ", replace = " ) + replace ) , a.toString ( ) ) ; }

Target:
public void testFindReplace ( ) { final java.lang.String find = "find" ; final java.lang.String replace = "replace" ; final com.google.gwtexpui.safehtml.client.RawFindReplace a = new com.google.gwtexpui.safehtml.client.RawFindReplace ( find , replace ) ; com.google.common.truth.Truth.assertThat ( a.pattern ( ) . getSource ( ) ) . isEqualTo ( find ) ; com.google.common.truth.Truth.assertThat ( a.replace ( find ) ) . isEqualTo ( replace ) ; com.google.common.truth.Truth.assertThat ( a.toString ( ) ) . isEqualTo ( ( ( ( "find = " + find ) + ", replace = " ) + replace ) ) ; }
Source:
private java.lang.String getDisplayName ( final com.google.gerrit.reviewdb.client.Account account ) { if ( account != null ) { java.lang.String result = ( ( account.getFullName ( ) ) == null ) ? anonymousCowardName : account.getFullName ( ) ; if ( ( account.getPreferredEmail ( ) ) != null ) { result += ( " (" + ( account.getPreferredEmail ( ) ) ) + ")" ; } return result ; } return anonymousCowardName ; }

Target:
private java.lang.String getDisplayName ( com.google.gerrit.reviewdb.client.Account account ) { if ( account != null ) { java.lang.String result = ( ( account.getFullName ( ) ) == null ) ? anonymousCowardName : account.getFullName ( ) ; if ( ( account.getPreferredEmail ( ) ) != null ) { result += ( " (" + ( account.getPreferredEmail ( ) ) ) + ")" ; } return result ; } return anonymousCowardName ; }
Source:
private void preMerge ( final com.google.gerrit.reviewdb.client.Project.SubmitType submitType , final java.util.List < com.google.gerrit.server.git.CodeReviewCommit > toMerge ) throws com.google.gerrit.server.git.MergeException { final com.google.gerrit.server.git.SubmitStrategy strategy = createStrategy ( submitType ) ; mergeTip = strategy.run ( branchTip , toMerge ) ; refLogIdent = strategy.getRefLogIdent ( ) ; commits.putAll ( strategy.getNewCommits ( ) ) ; }

Target:
private void preMerge ( final com.google.gerrit.server.git.SubmitStrategy strategy , final java.util.List < com.google.gerrit.server.git.CodeReviewCommit > toMerge ) throws com.google.gerrit.server.git.MergeException { mergeTip = strategy.run ( branchTip , toMerge ) ; refLogIdent = strategy.getRefLogIdent ( ) ; commits.putAll ( strategy.getNewCommits ( ) ) ; }
Source:
protected void configure ( ) { factory ( AddBranch.Factory.class ) ; factory ( ChangeProjectAccess.Factory.class ) ; factory ( ReviewProjectAccess.Factory.class ) ; factory ( CreateProjectHandler.Factory.class ) ; factory ( ChangeProjectSettings.Factory.class ) ; factory ( DeleteBranches.Factory.class ) ; factory ( ListBranches.Factory.class ) ; factory ( VisibleProjectDetails.Factory.class ) ; factory ( ProjectAccessFactory.Factory.class ) ; factory ( ProjectDetailFactory.Factory.class ) ; }

Target:
protected void configure ( ) { factory ( AddBranch.Factory.class ) ; factory ( ChangeProjectAccess.Factory.class ) ; factory ( ReviewProjectAccess.Factory.class ) ; factory ( ChangeProjectSettings.Factory.class ) ; factory ( DeleteBranches.Factory.class ) ; factory ( ListBranches.Factory.class ) ; factory ( VisibleProjectDetails.Factory.class ) ; factory ( ProjectAccessFactory.Factory.class ) ; factory ( ProjectDetailFactory.Factory.class ) ; }
Source:
void display ( com.google.gerrit.client.changes.ChangeInfo info , java.lang.String revision , boolean canSubmit ) { this . revision = revision ; boolean hasUser = com.google.gerrit.client.Gerrit.isSignedIn ( ) ; com.google.gerrit.client.changes.ChangeInfo.RevisionInfo revInfo = info.revision ( revision ) ; com.google.gerrit.client.changes.ChangeInfo.CommitInfo commit = revInfo.commit ( ) ; changeId = info.legacy_id ( ) ; project = info.project ( ) ; subject = commit.subject ( ) ; message = commit.message ( ) ; initChangeActions ( info , hasUser ) ; initRevisionActions ( info , revInfo , canSubmit , hasUser ) ; }

Target:
void display ( com.google.gerrit.client.changes.ChangeInfo info , java.lang.String revision ) { this . revision = revision ; boolean hasUser = com.google.gerrit.client.Gerrit.isSignedIn ( ) ; com.google.gerrit.client.changes.ChangeInfo.RevisionInfo revInfo = info.revision ( revision ) ; com.google.gerrit.client.changes.ChangeInfo.CommitInfo commit = revInfo.commit ( ) ; changeId = info.legacy_id ( ) ; project = info.project ( ) ; subject = commit.subject ( ) ; message = commit.message ( ) ; initChangeActions ( info , hasUser ) ; initRevisionActions ( info , revInfo , hasUser ) ; }
Source:
private void initListId ( final java.lang.String messageClass ) throws javax.mail.MessagingException { final java.lang.StringBuilder listid = new java.lang.StringBuilder ( ) ; listid.append ( "gerrit-" ) ; listid.append ( messageClass ) ; listid.append ( "-" ) ; listid.append ( projectName.replace ( '/' , '-' ) ) ; listid.append ( "@" ) ; listid.append ( gerritHost ( ) ) ; final java.lang.String listidStr = listid.toString ( ) ; msg.setHeader ( "Mailing-List" , ( "list " + listidStr ) ) ; msg.setHeader ( "List-Id" , ( ( "<" + ( listidStr.replace ( '@' , '.' ) ) ) + ">" ) ) ; if ( ( settingsUrl ( ) ) != null ) { msg.setHeader ( "List-Unsubscribe" , ( ( "<" + ( settingsUrl ( ) ) ) + ">" ) ) ; } }

Target:
private void initListId ( ) throws javax.mail.MessagingException { final java.lang.StringBuilder listid = new java.lang.StringBuilder ( ) ; listid.append ( "gerrit-" ) ; listid.append ( projectName.replace ( '/' , '-' ) ) ; listid.append ( "@" ) ; listid.append ( gerritHost ( ) ) ; final java.lang.String listidStr = listid.toString ( ) ; msg.setHeader ( "Mailing-List" , ( "list " + listidStr ) ) ; msg.setHeader ( "List-Id" , ( ( "<" + ( listidStr.replace ( '@' , '.' ) ) ) + ">" ) ) ; if ( ( settingsUrl ( ) ) != null ) { msg.setHeader ( "List-Unsubscribe" , ( ( "<" + ( settingsUrl ( ) ) ) + ">" ) ) ; } }
Source:
public synchronized void schedule ( final com.google.gerrit.reviewdb.client.Branch.NameKey branch ) { com.google.gerrit.server.git.ChangeMergeQueue.MergeEntry e = active.get ( branch ) ; if ( e == null ) { e = new com.google.gerrit.server.git.ChangeMergeQueue.MergeEntry ( branch ) ; active.put ( branch , e ) ; } e.needMerge = true ; scheduleJob ( e ) ; }

Target:
public synchronized void schedule ( final com.google.gerrit.reviewdb.client.Branch.NameKey branch ) { com.google.gerrit.server.git.ChangeMergeQueue.MergeEntry e = active.get ( branch ) ; if ( e == null ) { e = new com.google.gerrit.server.git.ChangeMergeQueue.MergeEntry ( branch ) ; active.put ( branch , e ) ; e.needMerge = true ; scheduleJob ( e ) ; } else { e.needMerge = true ; } }
Source:
public java.util.List < com.google.gerrit.reviewdb.client.ChangeMessage > byChange ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.notedb.ChangeNotes notes ) throws com.google.gwtorm.server.OrmException { if ( ! ( migration.readChanges ( ) ) ) { return com.google.gerrit.server.ChangeMessagesUtil.sortChangeMessages ( db.changeMessages ( ) . byChange ( notes.getChangeId ( ) ) ) ; } else { return notes.load ( ) . getChangeMessages ( ) ; } }

Target:
public java.util.List < com.google.gerrit.reviewdb.client.ChangeMessage > byChange ( com.google.gerrit.reviewdb.server.ReviewDb db , com.google.gerrit.server.notedb.ChangeNotes notes ) throws com.google.gwtorm.server.OrmException { if ( ! ( migration.readChanges ( ) ) ) { return com.google.gerrit.server.ChangeMessagesUtil.sortChangeMessages ( db.changeMessages ( ) . byChange ( notes.getChangeId ( ) ) ) ; } return notes.load ( ) . getChangeMessages ( ) ; }
Source:
private void deleteOrUpdateDraftChange ( com.google.gerrit.server.git.BatchUpdate.ChangeContext ctx ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.project.NoSuchChangeException , com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.reviewdb.client.Change c = ctx.getChange ( ) ; if ( deletedOnlyPatchSet ( ) ) { deleteChangeOp = deleteChangeOpProvider.get ( ) ; deleteChangeOp.updateChange ( ctx ) ; return ; } if ( c.currentPatchSetId ( ) . equals ( psId ) ) { c.setCurrentPatchSet ( previousPatchSetInfo ( ctx ) ) ; } ctx.saveChange ( ) ; }

Target:
private void deleteOrUpdateDraftChange ( com.google.gerrit.server.git.BatchUpdate.ChangeContext ctx ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.project.NoSuchChangeException , com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.reviewdb.client.Change c = ctx.getChange ( ) ; if ( deletedOnlyPatchSet ( ) ) { deleteChangeOp = deleteChangeOpProvider.get ( ) ; deleteChangeOp.updateChange ( ctx ) ; return ; } if ( c.currentPatchSetId ( ) . equals ( psId ) ) { c.setCurrentPatchSet ( previousPatchSetInfo ( ctx ) ) ; } }
Source:
public void onLoad ( ) { enableForm ( false ) ; saveOwner.setEnabled ( false ) ; saveDesc.setEnabled ( false ) ; super . onLoad ( ) ; Util.PROJECT_SVC.projectDetail ( projectId , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.admin.ProjectDetail > ( ) { public void onSuccess ( final com.google.gerrit.client.admin.ProjectDetail result ) { enableForm ( true ) ; saveOwner.setEnabled ( false ) ; saveDesc.setEnabled ( false ) ; display ( result ) ; } } ) ; }

Target:
protected void onLoad ( ) { enableForm ( false ) ; saveOwner.setEnabled ( false ) ; saveDesc.setEnabled ( false ) ; super . onLoad ( ) ; Util.PROJECT_SVC.projectDetail ( projectId , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.admin.ProjectDetail > ( ) { public void onSuccess ( final com.google.gerrit.client.admin.ProjectDetail result ) { enableForm ( true ) ; saveOwner.setEnabled ( false ) ; saveDesc.setEnabled ( false ) ; display ( result ) ; } } ) ; }
Source:
public com.google.gerrit.common.data.ChangeDetail call ( ) throws com.google.gerrit.common.errors.EmailException , com.google.gerrit.common.errors.NoSuchEntityException , com.google.gerrit.server.patch.PatchSetInfoNotAvailableException , com.google.gerrit.server.project.InvalidChangeOperationException , com.google.gerrit.server.project.NoSuchChangeException , com.google.gerrit.server.project.NoSuchProjectException , com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.errors.IncorrectObjectTypeException , org.eclipse.jgit.errors.MissingObjectException { rebaseChange.rebase ( patchSetId , currentUser.getAccountId ( ) ) ; return changeDetailFactory.create ( patchSetId.getParentKey ( ) ) . call ( ) ; }

Target:
public com.google.gerrit.common.data.ChangeDetail call ( ) throws com.google.gerrit.common.errors.EmailException , com.google.gerrit.common.errors.NoSuchEntityException , com.google.gerrit.server.patch.PatchSetInfoNotAvailableException , com.google.gerrit.server.project.InvalidChangeOperationException , com.google.gerrit.server.project.NoSuchChangeException , com.google.gerrit.server.project.NoSuchProjectException , com.google.gwtorm.server.OrmException , java.io.IOException , org.eclipse.jgit.errors.IncorrectObjectTypeException , org.eclipse.jgit.errors.MissingObjectException { rebaseChange.rebase ( patchSetId , currentUser ) ; return changeDetailFactory.create ( patchSetId.getParentKey ( ) ) . call ( ) ; }
Source:
private void initWildCardProject ( final com.google.gerrit.reviewdb.ReviewDb c ) throws com.google.gwtorm.client.OrmException { final com.google.gerrit.reviewdb.Project p ; p = new com.google.gerrit.reviewdb.Project ( com.google.gerrit.server.schema.SchemaCreator.DEFAULT_WILD_NAME , com.google.gerrit.server.config.WildProjectNameProvider.WILD_PROJECT_ID ) ; p.setDescription ( "Rights inherited by all other projects" ) ; p.setUseContributorAgreements ( false ) ; c.projects ( ) . insert ( java.util.Collections.singleton ( p ) ) ; }

Target:
private void initWildCardProject ( final com.google.gerrit.reviewdb.ReviewDb c ) throws com.google.gwtorm.client.OrmException { final com.google.gerrit.reviewdb.Project p ; p = new com.google.gerrit.reviewdb.Project ( com.google.gerrit.server.schema.SchemaCreator.DEFAULT_WILD_NAME ) ; p.setDescription ( "Rights inherited by all other projects" ) ; p.setUseContributorAgreements ( false ) ; c.projects ( ) . insert ( java.util.Collections.singleton ( p ) ) ; }
Source:
java.util.Set < com.google.gerrit.server.account.externalids.ExternalId > all ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException , java.io.IOException { checkReadEnabled ( ) ; if ( readFromGit ) { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( allUsersName ) ) { return com.google.gerrit.server.account.externalids.ExternalIdReader.all ( repo , com.google.gerrit.server.account.externalids.ExternalIdReader.readRevision ( repo ) ) ; } } return com.google.gerrit.server.account.externalids.ExternalId.from ( db.accountExternalIds ( ) . all ( ) . toList ( ) ) ; }

Target:
java.util.Set < com.google.gerrit.server.account.externalids.ExternalId > all ( com.google.gerrit.reviewdb.server.ReviewDb db ) throws com.google.gwtorm.server.OrmException , java.io.IOException { checkReadEnabled ( ) ; if ( readFromGit ) { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( allUsersName ) ) { return all ( repo , com.google.gerrit.server.account.externalids.ExternalIdReader.readRevision ( repo ) ) ; } } return com.google.gerrit.server.account.externalids.ExternalId.from ( db.accountExternalIds ( ) . all ( ) . toList ( ) ) ; }
Source:
com.google.gerrit.server.restapi.change.PostReviewers.Addition ccCurrentUser ( com.google.gerrit.server.CurrentUser user , com.google.gerrit.server.change.RevisionResource revision ) { return new com.google.gerrit.server.restapi.change.PostReviewers.Addition ( user.getUserName ( ) . orElse ( null ) , 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.restapi.change.PostReviewers.Addition ccCurrentUser ( com.google.gerrit.server.CurrentUser user , com.google.gerrit.server.change.RevisionResource revision ) { return new com.google.gerrit.server.restapi.change.PostReviewers.Addition ( user.getUserName ( ) . orElse ( null ) , 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:
public com.google.gerrit.extensions.api.accounts.GpgKeyApi gpgKey ( com.google.gerrit.server.account.AccountResource account , com.google.gerrit.extensions.restapi.IdString idStr ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.GpgException { try { return gpgKeyApiFactory.create ( gpgKeys.parse ( account , idStr ) ) ; } catch ( org.bouncycastle.openpgp.PGPException | com.google.gwtorm.server.OrmException | java.io.IOException e ) { throw new com.google.gerrit.server.GpgException ( e ) ; } }

Target:
public com.google.gerrit.extensions.api.accounts.GpgKeyApi gpgKey ( com.google.gerrit.server.account.AccountResource account , com.google.gerrit.extensions.restapi.IdString idStr ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.GpgException { try { return gpgKeyApiFactory.create ( gpgKeys.get ( ) . parse ( account , idStr ) ) ; } catch ( org.bouncycastle.openpgp.PGPException | com.google.gwtorm.server.OrmException | java.io.IOException e ) { throw new com.google.gerrit.server.GpgException ( e ) ; } }
Source:
public java.lang.String toRevision ( final com.google.gerrit.reviewdb.client.Project.NameKey project , final com.google.gerrit.reviewdb.client.PatchSet ps ) { com.google.gerrit.common.data.ParameterizedString pattern = new com.google.gerrit.common.data.ParameterizedString ( type.getRevision ( ) ) ; final java.util.Map < java.lang.String , java.lang.String > p = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; p.put ( "project" , encode ( project.get ( ) ) ) ; p.put ( "commit" , encode ( ps.getRevision ( ) . get ( ) ) ) ; return ( baseUrl ) + ( pattern.replace ( p ) ) ; }

Target:
public java.lang.String toRevision ( final com.google.gerrit.reviewdb.client.Project.NameKey project , final com.google.gerrit.reviewdb.client.PatchSet ps ) { return toRevision ( project.get ( ) , ps.getRevision ( ) . get ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.eclipse.jgit.internal.storage.dfs.DfsRepository r = new org.eclipse.jgit.internal.storage.dfs.InMemoryRepository ( new org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription ( "repo" ) ) ; repo = new org.eclipse.jgit.junit.TestRepository < org.eclipse.jgit.internal.storage.dfs.DfsRepository > ( r ) ; servlet = new com.google.gitiles.PathServlet ( new com.google.gitiles.TestGitilesAccess ( repo.getRepository ( ) ) , com.google.gitiles.PathServletTest.RENDERER , TestGitilesUrls.URLS ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.eclipse.jgit.internal.storage.dfs.DfsRepository r = new org.eclipse.jgit.internal.storage.dfs.InMemoryRepository ( new org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription ( "repo" ) ) ; repo = new org.eclipse.jgit.junit.TestRepository ( r ) ; servlet = new com.google.gitiles.PathServlet ( new com.google.gitiles.TestGitilesAccess ( repo.getRepository ( ) ) , com.google.gitiles.PathServletTest.RENDERER , TestGitilesUrls.URLS ) ; }
Source:
private void verifyComment ( com.google.gerrit.reviewdb.client.PatchLineComment c ) { com.google.common.base.Preconditions.checkArgument ( ( ( c.getRevId ( ) ) != null ) , "RevId required for comment: %s" , c ) ; com.google.common.base.Preconditions.checkArgument ( c.getAuthor ( ) . equals ( getUser ( ) . getAccountId ( ) ) , ( "The author for the following comment does not match the author of" + " this ChangeDraftUpdate (%s): %s" ) , getUser ( ) . getAccountId ( ) , c ) ; }

Target:
private void verifyComment ( com.google.gerrit.reviewdb.client.PatchLineComment c ) { com.google.common.base.Preconditions.checkArgument ( ( ( c.getRevId ( ) ) != null ) , "RevId required for comment: %s" , c ) ; com.google.common.base.Preconditions.checkArgument ( c.getAuthor ( ) . equals ( getAccountId ( ) ) , ( "The author for the following comment does not match the author of" + " this ChangeDraftUpdate (%s): %s" ) , getAccountId ( ) , c ) ; }
Source:
public void run ( ) { try { final java.io.BufferedReader br = new java.io.BufferedReader ( new java.io.InputStreamReader ( in , "ISO-8859-1" ) ) ; try { java.lang.String line ; while ( ( line = br.readLine ( ) ) != null ) { com.google.gerrit.httpd.gitweb.GitwebServlet.log.error ( ( "CGI: " + line ) ) ; } } finally { br.close ( ) ; } } catch ( java.io.IOException e ) { com.google.gerrit.httpd.gitweb.GitwebServlet.log.debug ( "Unexpected error copying stderr from CGI" , e ) ; } }

Target:
public void run ( ) { try ( java.io.BufferedReader br = new java.io.BufferedReader ( new java.io.InputStreamReader ( in , "ISO-8859-1" ) ) ) { java.lang.String line ; while ( ( line = br.readLine ( ) ) != null ) { com.google.gerrit.httpd.gitweb.GitwebServlet.log.error ( ( "CGI: " + line ) ) ; } } catch ( java.io.IOException e ) { com.google.gerrit.httpd.gitweb.GitwebServlet.log.debug ( "Unexpected error copying stderr from CGI" , e ) ; } }