auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
com.google.gerrit.httpd.WebSessionManager.Val get ( final com.google.gerrit.httpd.WebSessionManager.Key key ) { com.google.gerrit.httpd.WebSessionManager.Val val = self.getIfPresent ( key.token ) ; if ( ( val != null ) && ( ( val.expiresAt ) <= ( com.google.gerrit.httpd.WebSessionManager.now ( ) ) ) ) { self.invalidate ( key.token ) ; return null ; } return val ; }

Target:
com.google.gerrit.httpd.WebSessionManager.Val get ( final com.google.gerrit.httpd.WebSessionManager.Key key ) { com.google.gerrit.httpd.WebSessionManager.Val val = self.getIfPresent ( key.token ) ; if ( ( val != null ) && ( ( val.expiresAt ) <= ( com.google.gerrit.server.util.TimeUtil.nowMs ( ) ) ) ) { self.invalidate ( key.token ) ; return null ; } return val ; }
Source:
private static java.lang.String defaultOf ( com.google.gerrit.reviewdb.client.Project proj ) { return com.google.common.base.Objects.firstNonNull ( proj.getLocalDefaultDashboard ( ) , com.google.common.base.Strings.nullToEmpty ( proj.getDefaultDashboard ( ) ) ) ; }

Target:
public static java.lang.String defaultOf ( com.google.gerrit.reviewdb.client.Project proj ) { final java.lang.String defaultId = com.google.common.base.Objects.firstNonNull ( proj.getLocalDefaultDashboard ( ) , com.google.common.base.Strings.nullToEmpty ( proj.getDefaultDashboard ( ) ) ) ; if ( defaultId.startsWith ( com.google.gerrit.server.git.GitRepositoryManager.REFS_DASHBOARDS ) ) { return defaultId.substring ( com.google.gerrit.server.git.GitRepositoryManager.REFS_DASHBOARDS.length ( ) ) ; } else { return defaultId ; } }
Source:
void send ( java.lang.String message ) { com.google.gerrit.client.changes.ChangeApi.createChange ( project , branch , message , base , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.changes.ChangeInfo > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( result.legacy_id ( ) ) ) ; hide ( ) ; } } ) ; }

Target:
void send ( java.lang.String message ) { com.google.gerrit.client.changes.ChangeApi.createDraftChange ( project , branch , message , base , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.changes.ChangeInfo > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChange ( result.legacy_id ( ) ) ) ; hide ( ) ; } } ) ; }
Source:
public void visit ( org.pegdown.ast.StrongEmphSuperNode node ) { if ( node.isClosed ( ) ) { wrapChildren ( ( node.isStrong ( ) ? "strong" : "em" ) , node ) ; } else { html.appendAndEscape ( node.getChars ( ) ) ; visitChildren ( node ) ; } }

Target:
public void visit ( org.commonmark.node.Link node ) { html.open ( "a" ) . attribute ( "href" , href ( node.getDestination ( ) ) ) . attribute ( "title" , node.getTitle ( ) ) ; visitChildren ( node ) ; html.close ( "a" ) ; }
Source:
public void contextDestroyed ( final javax.servlet.ServletContextEvent event ) { try { final com.google.gerrit.server.GerritServer gs = injector.getInstance ( com.google.inject.Key.get ( com.google.gerrit.server.GerritServer.class ) ) ; gs.closeDataSource ( ) ; } catch ( com.google.inject.ConfigurationException ce ) { } catch ( java.security.ProviderException ce ) { } com.google.gerrit.git.WorkQueue.terminate ( ) ; super . contextDestroyed ( event ) ; }

Target:
public void contextDestroyed ( final javax.servlet.ServletContextEvent event ) { try { injector.getInstance ( com.google.gerrit.server.ssh.GerritSshDaemon.class ) . stop ( ) ; } catch ( com.google.inject.ConfigurationException e ) { } catch ( java.security.ProviderException e ) { } try { final com.google.gerrit.server.GerritServer gs = injector.getInstance ( com.google.gerrit.server.GerritServer.class ) ; gs.closeDataSource ( ) ; } catch ( com.google.inject.ConfigurationException ce ) { } catch ( java.security.ProviderException ce ) { } com.google.gerrit.git.WorkQueue.terminate ( ) ; super . contextDestroyed ( event ) ; }
Source:
public boolean isVisible ( ) { return ( ( group.isVisibleToAll ( ) ) || ( user.getEffectiveGroups ( ) . contains ( group.getGroupUUID ( ) ) ) ) || ( isOwner ( ) ) ; }

Target:
public boolean isVisible ( ) { com.google.gerrit.reviewdb.client.AccountGroup accountGroup = com.google.gerrit.common.data.GroupDescriptions.toAccountGroup ( group ) ; return ( ( ( accountGroup != null ) && ( accountGroup.isVisibleToAll ( ) ) ) || ( user.getEffectiveGroups ( ) . contains ( group.getGroupUUID ( ) ) ) ) || ( isOwner ( ) ) ; }
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 ) . cc ( sc.reviewerByEmail , 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 ( ) ; restore ( sc.changeId , admin ) ; assertThat ( sender ) . sent ( "restore" , sc ) . 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 ) . noOneElse ( ) ; }
Source:
private static java.util.List < com.google.gerrit.server.change.RevisionResource > toResources ( com.google.gerrit.server.change.ChangeResource change , com.google.gerrit.reviewdb.client.PatchSet ps ) { return java.util.Collections.singletonList ( new com.google.gerrit.server.change.RevisionResource ( change , ps ) ) ; }

Target:
private java.util.List < com.google.gerrit.server.change.RevisionResource > byLegacyPatchSetId ( com.google.gerrit.server.change.ChangeResource change , java.lang.String id ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.PatchSet ps = dbProvider.get ( ) . patchSets ( ) . get ( new com.google.gerrit.reviewdb.client.PatchSet.Id ( change.getChange ( ) . getId ( ) , java.lang.Integer.parseInt ( id ) ) ) ; if ( ps != null ) { return java.util.Collections.singletonList ( new com.google.gerrit.server.change.RevisionResource ( change , ps ) ) ; } return java.util.Collections.emptyList ( ) ; }
Source:
protected java.lang.ProcessBuilder newBuildProcess ( com.google.gerrit.httpd.raw.Label label ) throws java.io.IOException { java.util.Properties properties = com.google.gerrit.httpd.raw.BuckUtils.loadBuckProperties ( sourceRoot.resolve ( "buck-out/gen/tools/buck/buck.properties" ) ) ; java.lang.String buck = com.google.common.base.MoreObjects.firstNonNull ( properties.getProperty ( "buck" ) , "buck" ) ; java.lang.ProcessBuilder proc = new java.lang.ProcessBuilder ( buck , "build" , label.fullName ( ) ) ; if ( properties.containsKey ( "PATH" ) ) { proc.environment ( ) . put ( "PATH" , properties.getProperty ( "PATH" ) ) ; } return proc ; }

Target:
protected java.lang.ProcessBuilder newBuildProcess ( com.google.gerrit.httpd.raw.Label label ) throws java.io.IOException { java.util.Properties properties = loadBuildProperties ( sourceRoot.resolve ( "buck-out/gen/tools/buck/buck.properties" ) ) ; java.lang.String buck = com.google.common.base.MoreObjects.firstNonNull ( properties.getProperty ( "buck" ) , "buck" ) ; java.lang.ProcessBuilder proc = new java.lang.ProcessBuilder ( buck , "build" , label.fullName ( ) ) ; if ( properties.containsKey ( "PATH" ) ) { proc.environment ( ) . put ( "PATH" , properties.getProperty ( "PATH" ) ) ; } return proc ; }
Source:
public UiAction.Description getDescription ( com.google.gerrit.server.change.ChangeResource rsrc ) { com.google.gerrit.reviewdb.client.Change.Status status = rsrc.getChange ( ) . getStatus ( ) ; com.google.gerrit.server.permissions.PermissionBackend.ForChange perm = rsrc.permissions ( ) . database ( db ) ; return new com.google.gerrit.extensions.webui.UiAction.Description ( ) . setLabel ( "Delete" ) . setTitle ( ( "Delete change " + ( rsrc.getId ( ) ) ) ) . setVisible ( com.google.gerrit.extensions.conditions.BooleanCondition.and ( couldDeleteWhenIn ( status ) , perm.testCond ( ChangePermission.DELETE ) ) ) ; }

Target:
public UiAction.Description getDescription ( com.google.gerrit.server.change.ChangeResource rsrc ) { com.google.gerrit.reviewdb.client.Change.Status status = rsrc.getChange ( ) . getStatus ( ) ; com.google.gerrit.server.permissions.PermissionBackend.ForChange perm = rsrc.permissions ( ) . database ( db ) ; return new com.google.gerrit.extensions.webui.UiAction.Description ( ) . setLabel ( "Delete" ) . setTitle ( ( "Delete change " + ( rsrc.getId ( ) ) ) ) . setVisible ( com.google.gerrit.extensions.conditions.BooleanCondition.and ( com.google.gerrit.server.restapi.change.DeleteChange.isChangeDeletable ( status ) , perm.testCond ( ChangePermission.DELETE ) ) ) ; }
Source:
public void inheritRead_OverridesAndDeniesOfRef ( ) { com.google.gerrit.server.project.Util.allow ( parent , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/*" ) ; com.google.gerrit.server.project.Util.deny ( local , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/*" ) ; com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local ) ; assertCanAccess ( u ) ; assertCannotRead ( "refs/foobar" , u ) ; assertCannotRead ( "refs/tags/foobar" , u ) ; assertCanRead ( "refs/heads/foobar" , u ) ; }

Target:
public void inheritRead_OverridesAndDeniesOfRef ( ) { com.google.gerrit.server.project.testing.Util.allow ( parent , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/*" ) ; com.google.gerrit.server.project.testing.Util.deny ( local , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/*" ) ; com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local ) ; assertCanAccess ( u ) ; assertCannotRead ( "refs/foobar" , u ) ; assertCannotRead ( "refs/tags/foobar" , u ) ; assertCanRead ( "refs/heads/foobar" , u ) ; }
Source:
public final com.google.gerrit.server.notedb.AbstractChangeUpdate.Status apply ( org.eclipse.jgit.lib.CommitBuilder cb , org.eclipse.jgit.lib.ObjectInserter ins ) throws com.google.gwtorm.server.OrmException , java.io.IOException { if ( isEmpty ( ) ) { return com.google.gerrit.server.notedb.AbstractChangeUpdate.Status.EMPTY ; } return applyImpl ( cb , ins ) ; }

Target:
protected org.eclipse.jgit.lib.PersonIdent newAuthorIdent ( ) { com.google.gerrit.server.CurrentUser u = getUser ( ) ; if ( u instanceof com.google.gerrit.server.IdentifiedUser ) { return com.google.gerrit.server.notedb.ChangeNoteUtil.newIdent ( u.asIdentifiedUser ( ) . getAccount ( ) , when , serverIdent , anonymousCowardName ) ; } else if ( u instanceof com.google.gerrit.server.InternalUser ) { return serverIdent ; } throw new java.lang.IllegalStateException ( ) ; }
Source:
public void updateMessageNoChange ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( modifier.createEdit ( change , getCurrentPatchSet ( changeId ) ) ) . isEqualTo ( RefUpdate.Result.NEW ) ; com.google.common.base.Optional < com.google.gerrit.server.edit.ChangeEdit > edit = editUtil.byChange ( change ) ; exception.expect ( com.google.gerrit.server.edit.UnchangedCommitMessageException.class ) ; exception.expectMessage ( "New commit message cannot be same as existing commit message" ) ; modifier.modifyMessage ( edit.get ( ) , edit.get ( ) . getEditCommit ( ) . getFullMessage ( ) ) ; }

Target:
public void updateMessageNoChange ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( modifier.createEdit ( change , getCurrentPatchSet ( changeId ) ) ) . isEqualTo ( RefUpdate.Result.NEW ) ; java.util.Optional < com.google.gerrit.server.edit.ChangeEdit > edit = editUtil.byChange ( change ) ; exception.expect ( com.google.gerrit.server.edit.UnchangedCommitMessageException.class ) ; exception.expectMessage ( "New commit message cannot be same as existing commit message" ) ; modifier.modifyMessage ( edit.get ( ) , edit.get ( ) . getEditCommit ( ) . getFullMessage ( ) ) ; }
Source:
public void onShowView ( ) { super . onShowView ( ) ; if ( ( cmA ) != null ) { cmA.refresh ( ) ; } if ( ( cmB ) != null ) { cmB.refresh ( ) ; } com.google.gwt.user.client.Window.enableScrolling ( false ) ; for ( com.google.gerrit.client.diff.CommentBox box : initialBoxes ) { box.resizePaddingWidget ( ) ; } ( ( cmB ) != null ? cmB : cmA ) . focus ( ) ; }

Target:
public void execute ( ) { if ( ( cmA ) != null ) { cmA.setOption ( "viewportMargin" , 10 ) ; } if ( ( cmB ) != null ) { cmB.setOption ( "viewportMargin" , 10 ) ; } }
Source:
public static java.util.Optional < com.google.gerrit.common.data.SubmitRecord > findOkRecord ( java.util.Collection < com.google.gerrit.common.data.SubmitRecord > in ) { if ( in == null ) { return java.util.Optional.empty ( ) ; } return in.stream ( ) . filter ( ( r ) -> ( r.status ) == ( com.google.gerrit.common.data.SubmitRecord.Status.OK ) ) . findFirst ( ) ; }

Target:
public static boolean allRecordsOK ( java.util.Collection < com.google.gerrit.common.data.SubmitRecord > in ) { if ( ( in == null ) || ( in.isEmpty ( ) ) ) { return true ; } return in.stream ( ) . noneMatch ( ( r ) -> ( r.status ) != ( com.google.gerrit.common.data.SubmitRecord.Status.OK ) ) ; }
Source:
private com.google.gerrit.extensions.common.GroupInfo createGroup ( java.lang.String name ) throws java.io.IOException { name = name ( name ) ; com.google.gerrit.extensions.api.groups.GroupInput in = new com.google.gerrit.extensions.api.groups.GroupInput ( ) ; in.ownerId = "Administrators" ; com.google.gerrit.acceptance.RestResponse r = adminSession.put ( ( "/groups/" + name ) , in ) ; com.google.common.truth.Truth.assertThat ( r.getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_CREATED ) ; return parseGroup ( r ) ; }

Target:
private com.google.gerrit.reviewdb.client.AccountGroup getFromCache ( java.lang.String name ) throws java.lang.Exception { return groupCache.get ( new com.google.gerrit.reviewdb.client.AccountGroup.NameKey ( name ) ) ; }
Source:
public void onSuccess ( final java.util.List < com.google.gerrit.reviewdb.AccountGroup > result ) { final java.util.ArrayList < com.google.gerrit.client.ui.AccountGroupSuggestOracle.AccountGroupSuggestion > r = new java.util.ArrayList < com.google.gerrit.client.ui.AccountGroupSuggestOracle.AccountGroupSuggestion > ( result.size ( ) ) ; for ( final com.google.gerrit.reviewdb.AccountGroup p : result ) { r.add ( new com.google.gerrit.client.ui.AccountGroupSuggestOracle.AccountGroupSuggestion ( p ) ) ; } callback.onSuggestionsReady ( req , new com.google.gerrit.client.ui.Response ( r ) ) ; }

Target:
public void onSuccess ( final java.util.List < com.google.gerrit.reviewdb.AccountGroupName > result ) { final java.util.ArrayList < com.google.gerrit.client.ui.AccountGroupSuggestOracle.AccountGroupSuggestion > r = new java.util.ArrayList < com.google.gerrit.client.ui.AccountGroupSuggestOracle.AccountGroupSuggestion > ( result.size ( ) ) ; for ( final com.google.gerrit.reviewdb.AccountGroupName p : result ) { r.add ( new com.google.gerrit.client.ui.AccountGroupSuggestOracle.AccountGroupSuggestion ( p ) ) ; } callback.onSuggestionsReady ( req , new com.google.gerrit.client.ui.Response ( r ) ) ; }
Source:
private void refresh ( ) { com.google.gerrit.client.projects.ProjectMap.match ( subname , new com.google.gerrit.client.ui.IgnoreOutdatedFilterResultsCallbackWrapper < com.google.gerrit.client.projects.ProjectMap > ( this , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.projects.ProjectMap > ( this ) { @ java.lang.Override protected void preDisplay ( final com.google.gerrit.client.projects.ProjectMap result ) { projects.display ( result ) ; } } ) ) ; }

Target:
private void refresh ( ) { setToken ( ( ( ( subname ) == null ) || ( "" . equals ( subname ) ) ? com.google.gerrit.common.PageLinks.ADMIN_PROJECTS : ( ( com.google.gerrit.common.PageLinks.ADMIN_PROJECTS ) + "?filter=" ) + ( com.google.gwt.http.client.URL.encodeQueryString ( subname ) ) ) ) ; com.google.gerrit.client.projects.ProjectMap.match ( subname , new com.google.gerrit.client.ui.IgnoreOutdatedFilterResultsCallbackWrapper < com.google.gerrit.client.projects.ProjectMap > ( this , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.projects.ProjectMap > ( this ) { @ java.lang.Override protected void preDisplay ( final com.google.gerrit.client.projects.ProjectMap result ) { projects.display ( result ) ; } } ) ) ; }
Source:
protected void run ( ) throws com.google.gerrit.sshd.commands.UnloggedFailure { try { if ( versionManager.isKnownIndex ( name ) ) { if ( versionManager.activateLatestIndex ( name ) ) { stdout.println ( "Activated latest index version" ) ; } else { stdout.println ( "Not activating index, already using latest version" ) ; } } else { stderr.println ( "Cannot activate index, unknown based on this name" ) ; } } catch ( com.google.gerrit.server.index.ReindexerAlreadyRunningException e ) { throw die ( ( "Failed to activate latest index: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
protected void run ( ) throws com.google.gerrit.sshd.commands.UnloggedFailure { try { if ( versionManager.isKnownIndex ( name ) ) { if ( versionManager.activateLatestIndex ( name ) ) { stdout.println ( "Activated latest index version" ) ; } else { stdout.println ( "Not activating index, already using latest version" ) ; } } else { stderr.println ( java.lang.String.format ( "Cannot activate index %s: unknown" , name ) ) ; } } catch ( com.google.gerrit.server.index.ReindexerAlreadyRunningException e ) { throw die ( ( "Failed to activate latest index: " + ( e.getMessage ( ) ) ) ) ; } }
Source:
public void setAssigneeToSelfOnReviewableChangeInNoteDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; assign ( sc , sc.owner , sc.owner ) ; assertThat ( sender ) . sent ( "setassignee" , sc ) . notTo ( sc.owner , sc.reviewer , sc.ccer , sc.starrer , sc.assignee ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) ; }

Target:
public void setAssigneeToSelfOnReviewableChangeInNoteDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; assign ( sc , sc.owner , sc.owner ) ; assertThat ( sender ) . sent ( "setassignee" , sc ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . noOneElse ( ) ; }
Source:
public boolean updateChange ( com.google.gerrit.server.git.BatchUpdate.ChangeContext ctx ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Change change = ctx.getChange ( ) ; com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId = change.currentPatchSetId ( ) ; com.google.gerrit.reviewdb.client.ChangeMessage changeMessage = com.google.gerrit.server.ChangeMessagesUtil.newMessage ( ctx , ( "Created a revert of this change as I" + ( computedChangeId.name ( ) ) ) , ChangeMessagesUtil.TAG_REVERT ) ; cmUtil.addChangeMessage ( ctx.getDb ( ) , ctx.getUpdate ( patchSetId ) , changeMessage ) ; return true ; }

Target:
public boolean updateChange ( com.google.gerrit.server.update.BatchUpdate.ChangeContext ctx ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Change change = ctx.getChange ( ) ; com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId = change.currentPatchSetId ( ) ; com.google.gerrit.reviewdb.client.ChangeMessage changeMessage = com.google.gerrit.server.ChangeMessagesUtil.newMessage ( ctx , ( "Created a revert of this change as I" + ( computedChangeId.name ( ) ) ) , ChangeMessagesUtil.TAG_REVERT ) ; cmUtil.addChangeMessage ( ctx.getDb ( ) , ctx.getUpdate ( patchSetId ) , changeMessage ) ; return true ; }
Source:
public static void suggest ( java.lang.String prefix , int limit , com.google.gwtjsonrpc.common.AsyncCallback < com.google.gerrit.client.projects.ProjectMap > cb ) { new com.google.gerrit.client.rpc.RestApi ( ( "/projects/" + ( com.google.gwt.http.client.URL.encode ( prefix ) . replaceAll ( "[?]" , "%3F" ) ) ) ) . addParameterRaw ( "type" , "ALL" ) . addParameter ( "n" , limit ) . addParameterTrue ( "d" ) . send ( com.google.gerrit.client.rpc.NativeMap.copyKeysIntoChildren ( cb ) ) ; }

Target:
public static void match ( java.lang.String match , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.projects.ProjectMap > cb ) { new com.google.gerrit.client.rpc.RestApi ( "/projects/" ) . addParameter ( "m" , match ) . addParameterRaw ( "type" , "ALL" ) . addParameterTrue ( "d" ) . get ( com.google.gerrit.client.rpc.NativeMap.copyKeysIntoChildren ( cb ) ) ; }
Source:
public void assertHasPackFile ( com.google.gerrit.reviewdb.client.Project ... projects ) throws java.io.IOException , org.eclipse.jgit.errors.RepositoryNotFoundException { for ( com.google.gerrit.reviewdb.client.Project.NameKey p : projects ) { org.junit.Assert.assertTrue ( ( ( "Project " + ( p.get ( ) ) ) + " has no pack files." ) , ( ( getPackFiles ( p ) . length ) > 0 ) ) ; } }

Target:
public void assertHasPackFile ( com.google.gerrit.reviewdb.client.Project ... projects ) throws java.io.IOException , org.eclipse.jgit.errors.RepositoryNotFoundException { for ( com.google.gerrit.reviewdb.client.Project.NameKey p : projects ) { com.google.common.truth.Truth.assert_ ( ) . withFailureMessage ( ( ( "Project " + ( p.get ( ) ) ) + " has no pack files." ) ) . that ( getPackFiles ( p ) ) . isNotEmpty ( ) ; } }
Source:
private void decodeHashtags ( org.apache.lucene.document.Document doc , com.google.gerrit.server.query.change.ChangeData cd ) { org.apache.lucene.index.IndexableField [ ] hashtag = doc.getFields ( com.google.gerrit.lucene.LuceneChangeIndex.HASHTAG_FIELD ) ; java.util.Set < java.lang.String > hashtags = com.google.common.collect.Sets.newHashSetWithExpectedSize ( hashtag.length ) ; for ( org.apache.lucene.index.IndexableField r : hashtag ) { hashtags.add ( r.binaryValue ( ) . utf8ToString ( ) ) ; } cd.setHashtags ( hashtags ) ; }

Target:
private void decodeHashtags ( com.google.common.collect.Multimap < java.lang.String , org.apache.lucene.index.IndexableField > doc , com.google.gerrit.server.query.change.ChangeData cd ) { java.util.Collection < org.apache.lucene.index.IndexableField > hashtag = doc.get ( com.google.gerrit.lucene.LuceneChangeIndex.HASHTAG_FIELD ) ; java.util.Set < java.lang.String > hashtags = com.google.common.collect.Sets.newHashSetWithExpectedSize ( hashtag.size ( ) ) ; for ( org.apache.lucene.index.IndexableField r : hashtag ) { hashtags.add ( r.binaryValue ( ) . utf8ToString ( ) ) ; } cd.setHashtags ( hashtags ) ; }
Source:
public void mergeByOtherNotifyOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS , com.google.gerrit.server.account.WatchConfig.NotifyType.SUBMITTED_CHANGES ) ; merge ( sc.changeId , other , com.google.gerrit.extensions.api.changes.NotifyHandling.OWNER ) ; assertThat ( sender ) . sent ( "merged" , sc ) . notTo ( sc.reviewer , sc.ccer , sc.starrer , other ) . notTo ( sc.reviewerByEmail , sc.ccerByEmail ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS , com.google.gerrit.server.account.WatchConfig.NotifyType.SUBMITTED_CHANGES ) ; }

Target:
public void mergeByOtherNotifyOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageChange ( ) ; merge ( sc.changeId , other , com.google.gerrit.extensions.api.changes.NotifyHandling.OWNER ) ; assertThat ( sender ) . sent ( "merged" , sc ) . to ( sc.owner ) . noOneElse ( ) ; }
Source:
public void onLoad ( ) { if ( ( diffTable ) == null ) { initUI ( ) ; } super . onLoad ( ) ; Util.DETAIL_SVC.unifiedPatchDetail ( patchId , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.data.UnifiedPatchDetail > ( ) { public void onSuccess ( final com.google.gerrit.client.data.UnifiedPatchDetail r ) { if ( isAttached ( ) ) { display ( r ) ; } } } ) ; }

Target:
public void onLoad ( ) { if ( ( diffTable ) == null ) { initUI ( ) ; } super . onLoad ( ) ; PatchUtil.DETAIL_SVC.unifiedPatchDetail ( patchId , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.data.UnifiedPatchDetail > ( ) { public void onSuccess ( final com.google.gerrit.client.data.UnifiedPatchDetail r ) { if ( isAttached ( ) ) { display ( r ) ; } } } ) ; }
Source:
public com.google.gerrit.extensions.restapi.Response < java.lang.String > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Ignore.Input input ) throws com.google.gerrit.extensions.restapi.RestApiException { try { if ( ( rsrc.isUserOwner ( ) ) || ( isIgnored ( rsrc ) ) ) { return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; } stars.ignore ( rsrc ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "failed to ignore change" , e ) ; } return com.google.gerrit.extensions.restapi.Response.ok ( "" ) ; }

Target:
public com.google.gerrit.extensions.restapi.Response < java.lang.String > apply ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.server.change.Ignore.Input input ) throws com.google.gerrit.extensions.restapi.RestApiException { try { if ( canIgnore ( rsrc ) ) { stars.ignore ( 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 ignore change" , e ) ; } }
Source:
public boolean isRefVisible ( ) { return getRefControl ( ) . isVisible ( ) ; }

Target:
public boolean isVisible ( com.google.gerrit.reviewdb.server.ReviewDb db , @ com.google.gerrit.common.Nullable com.google.gerrit.server.query.change.ChangeData cd ) throws com.google.gwtorm.server.OrmException { if ( ( getChange ( ) . isPrivate ( ) ) && ( ! ( isPrivateVisible ( db , cd ) ) ) ) { return false ; } if ( ( ( getChange ( ) . getStatus ( ) ) == ( Change.Status.DRAFT ) ) && ( ! ( isDraftVisible ( db , cd ) ) ) ) { return false ; } return getRefControl ( ) . isVisible ( ) ; }
Source:
public void run ( ) { net.codemirror.lib.CodeMirror.LineHandle handle = cm.extras ( ) . activeLine ( ) ; int line = ( cm.getLineNumber ( handle ) ) + 1 ; if ( Patch.COMMIT_MSG.equals ( path ) ) { line = adjustCommitMessageLine ( line ) ; } java.lang.String token = com.google.gerrit.client.Dispatcher.toEditScreen ( revision , path , line ) ; if ( ! ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ) { com.google.gerrit.client.Gerrit.doSignIn ( token ) ; } else { com.google.gerrit.client.Gerrit.display ( token ) ; } }

Target:
private void init ( net.codemirror.lib.Pos anchor ) { bubble = new com.google.gerrit.client.diff.InsertCommentBubble ( getCommentManager ( ) , cm ) ; add ( bubble ) ; cm.addWidget ( anchor , bubble.getElement ( ) ) ; }
Source:
public void parseBranch ( ) throws java.lang.Exception { assertParseSucceeds ( ( "Update change\n" + ( ( "\n" + "Patch-Set: 1\n" ) + "Branch: refs/heads/master" ) ) ) ; assertParseSucceeds ( ( "Update change\n" + ( ( "\n" + "Patch-Set: 1\n" ) + "Branch: master" ) ) ) ; assertParseFails ( ( "Update change\n" + ( ( ( "\n" + "Patch-Set: 1\n" ) + "Branch: refs/heads/master\n" ) + "Branch: refs/heads/stable" ) ) ) ; }

Target:
public void parseBranch ( ) throws java.lang.Exception { assertParseSucceeds ( ( "Update change\n" + ( ( ( "\n" + "Branch: refs/heads/master\n" ) + "Patch-Set: 1\n" ) + "Subject: This is a test change\n" ) ) ) ; assertParseSucceeds ( ( "Update change\n" + ( ( ( "\n" + "Branch: master\n" ) + "Patch-Set: 1\n" ) + "Subject: This is a test change\n" ) ) ) ; assertParseFails ( ( "Update change\n" + ( ( ( "\n" + "Patch-Set: 1\n" ) + "Branch: refs/heads/master\n" ) + "Branch: refs/heads/stable" ) ) ) ; }
Source:
public void createdOnIsPopulatedForGroupsCreatedBeforeAudit ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.AccountGroup.Id groupId = createGroup ( "Ancient group for schema migration" ) ; setCreatedOnToVeryOldTimestamp ( groupId ) ; removeAuditEntriesFor ( groupId ) ; schema151.migrateData ( db , new com.google.gerrit.testutil.TestUpdateUI ( ) ) ; com.google.gerrit.reviewdb.client.AccountGroup group = db.accountGroups ( ) . get ( groupId ) ; com.google.common.truth.Truth.assertThat ( group.getCreatedOn ( ) ) . isEqualTo ( com.google.gerrit.reviewdb.client.AccountGroup.auditCreationInstantTs ( ) ) ; }

Target:
public void createdOnIsPopulatedForGroupsCreatedBeforeAudit ( ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.AccountGroup.Id groupId = createGroup ( "Ancient group for schema migration" ) ; setCreatedOnToVeryOldTimestamp ( groupId ) ; removeAuditEntriesFor ( groupId ) ; schema151.migrateData ( db , new com.google.gerrit.testutil.TestUpdateUI ( ) ) ; java.sql.Timestamp createdOn = getCreatedOn ( groupId ) ; com.google.common.truth.Truth.assertThat ( createdOn ) . isEqualTo ( com.google.gerrit.reviewdb.client.AccountGroup.auditCreationInstantTs ( ) ) ; }
Source:
public com.google.gerrit.server.config.GetServerInfo.ServerInfo apply ( com.google.gerrit.server.config.ConfigResource rsrc ) throws java.net.MalformedURLException { com.google.gerrit.server.config.GetServerInfo.ServerInfo info = new com.google.gerrit.server.config.GetServerInfo.ServerInfo ( ) ; info.auth = new com.google.gerrit.server.config.GetServerInfo.AuthInfo ( authConfig , realm ) ; info.contactStore = getContactStoreInfo ( ) ; info.download = new com.google.gerrit.server.config.GetServerInfo.DownloadInfo ( downloadSchemes , downloadCommands , archiveFormats ) ; info.gerrit = new com.google.gerrit.server.config.GetServerInfo.GerritInfo ( allProjectsName , allUsersName ) ; info.gitWeb = getGitWebInfo ( gitWebConfig ) ; return info ; }

Target:
public com.google.gerrit.server.config.GetServerInfo.ServerInfo apply ( com.google.gerrit.server.config.ConfigResource rsrc ) throws java.net.MalformedURLException { com.google.gerrit.server.config.GetServerInfo.ServerInfo info = new com.google.gerrit.server.config.GetServerInfo.ServerInfo ( ) ; info.auth = new com.google.gerrit.server.config.GetServerInfo.AuthInfo ( authConfig , realm ) ; info.change = getChangeInfo ( config ) ; info.contactStore = getContactStoreInfo ( ) ; info.download = new com.google.gerrit.server.config.GetServerInfo.DownloadInfo ( downloadSchemes , downloadCommands , archiveFormats ) ; info.gerrit = getGerritInfo ( config , allProjectsName , allUsersName ) ; info.gitWeb = getGitWebInfo ( gitWebConfig ) ; info.suggest = getSuggestInfo ( config ) ; info.user = getUserInfo ( anonymousCowardName ) ; return info ; }
Source:
private void grantTagPermissions ( ) throws java.lang.Exception { grant ( Permission.CREATE , project , ( ( org.eclipse.jgit.lib.Constants.R_TAGS ) + "*" ) ) ; grant ( Permission.PUSH_TAG , project , ( ( org.eclipse.jgit.lib.Constants.R_TAGS ) + "*" ) ) ; grant ( Permission.PUSH_SIGNED_TAG , project , ( ( org.eclipse.jgit.lib.Constants.R_TAGS ) + "*" ) ) ; }

Target:
private void grantTagPermissions ( ) throws java.lang.Exception { grant ( Permission.CREATE , project , ( ( org.eclipse.jgit.lib.Constants.R_TAGS ) + "*" ) ) ; grant ( Permission.CREATE_TAG , project , ( ( org.eclipse.jgit.lib.Constants.R_TAGS ) + "*" ) ) ; grant ( Permission.CREATE_SIGNED_TAG , project , ( ( org.eclipse.jgit.lib.Constants.R_TAGS ) + "*" ) ) ; }
Source:
private boolean isTrusted ( final com.google.gerrit.reviewdb.AccountExternalId id ) { if ( id.isScheme ( AccountExternalId.LEGACY_GAE ) ) { return isAllowGoogleAccountUpgrade ( ) ; } if ( id.isScheme ( AccountExternalId.SCHEME_MAILTO ) ) { return true ; } if ( id.isScheme ( AccountExternalId.SCHEME_UUID ) ) { return true ; } for ( final java.lang.String p : trusted ) { if ( matches ( p , id ) ) { return true ; } } return false ; }

Target:
private boolean isTrusted ( final com.google.gerrit.reviewdb.AccountExternalId id ) { if ( id.isScheme ( AccountExternalId.LEGACY_GAE ) ) { return isAllowGoogleAccountUpgrade ( ) ; } if ( id.isScheme ( AccountExternalId.SCHEME_MAILTO ) ) { return true ; } if ( id.isScheme ( AccountExternalId.SCHEME_UUID ) ) { return true ; } if ( id.isScheme ( AccountExternalId.SCHEME_USERNAME ) ) { return true ; } for ( final java.lang.String p : trusted ) { if ( matches ( p , id ) ) { return true ; } } return false ; }
Source:
final void swap ( final com.google.gwtexpui.user.client.View v ) { if ( ( ( next ) != null ) && ( ( next.getWidget ( ) ) == v ) ) { if ( ( current ) != null ) { main.remove ( current ) ; } current = next ; next = null ; current.setVisible ( true ) ; } }

Target:
final void swap ( final com.google.gwtexpui.user.client.View v ) { if ( ( ( next ) != null ) && ( ( next.getWidget ( ) ) == v ) ) { if ( ( current ) != null ) { main.remove ( current ) ; } current = next ; next = null ; current.setVisible ( true ) ; onShowView ( ( ( V ) ( v ) ) ) ; } }
Source:
public com.google.common.base.Optional < com.google.gerrit.server.query.change.ChangeData.ChangedLines > changedLines ( ) throws com.google.gwtorm.server.OrmException { if ( ( changedLines ) == null ) { if ( ! ( lazyLoad ) ) { return com.google.common.base.Optional.absent ( ) ; } changedLines = computeChangedLines ( ) ; } return changedLines ; }

Target:
public java.util.List < com.google.gerrit.common.data.SubmitRecord > submitRecords ( com.google.gerrit.server.project.SubmitRuleOptions options ) throws com.google.gwtorm.server.OrmException { java.util.List < com.google.gerrit.common.data.SubmitRecord > records = submitRecords.get ( options ) ; if ( records == null ) { if ( ! ( lazyLoad ) ) { return java.util.Collections.emptyList ( ) ; } records = new com.google.gerrit.server.project.SubmitRuleEvaluator ( this ) . setOptions ( options ) . evaluate ( ) ; submitRecords.put ( options , records ) ; } return records ; }
Source:
public void display ( final com.google.gerrit.client.data.ChangeDetail detail ) { infoBlock.display ( detail ) ; description.setHTML ( com.google.gerrit.client.ui.DomUtil.linkify ( com.google.gerrit.client.ui.DomUtil.escape ( detail.getDescription ( ) ) ) ) ; descriptionPanel.setOpen ( true ) ; }

Target:
public void display ( final com.google.gerrit.client.reviewdb.Change chg , final com.google.gerrit.client.reviewdb.PatchSetInfo info , final com.google.gerrit.client.data.AccountInfoCache acc ) { infoBlock.display ( chg , acc ) ; description.setHTML ( com.google.gerrit.client.ui.DomUtil.linkify ( com.google.gerrit.client.ui.DomUtil.escape ( info.getMessage ( ) ) ) ) ; descriptionPanel.setOpen ( true ) ; }
Source:
void onLeftSide ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > e ) { view.diffTable.setVisibleA ( e.getValue ( ) ) ; }

Target:
void onCursoBlinkRate ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > e ) { java.lang.String v = e.getValue ( ) ; if ( ( v != null ) && ( ( v.length ( ) ) > 0 ) ) { prefs.cursorBlinkRate ( java.lang.Math.max ( 0 , java.lang.Integer.parseInt ( v ) ) ) ; view.getCmFromSide ( DisplaySide.A ) . setOption ( "cursorBlinkRate" , prefs.cursorBlinkRate ( ) ) ; view.getCmFromSide ( DisplaySide.B ) . setOption ( "cursorBlinkRate" , prefs.cursorBlinkRate ( ) ) ; } }
Source:
public static java.io.File createTempDirectory ( ) { final java.lang.String name = com.google.gerrit.acceptance.TempFileUtil.createUniqueTestFolderName ( ) ; final java.io.File directory = new java.io.File ( com.google.gerrit.acceptance.TempFileUtil.temp , name ) ; if ( ! ( directory.mkdirs ( ) ) ) { throw new java.lang.RuntimeException ( ( ( "failed to create folder '" + ( directory.getAbsolutePath ( ) ) ) + "'" ) ) ; } return directory ; }

Target:
private static void deleteNowOrOnExit ( java.io.File dir ) { if ( ! ( dir.delete ( ) ) ) { dir.deleteOnExit ( ) ; } }
Source:
private static com.google.gwtorm.schema.java.JavaColumnModel [ ] scanFields ( java.lang.Class < ? > in ) throws com.google.gwtorm.server.OrmException { final java.util.Collection < com.google.gwtorm.schema.java.JavaColumnModel > col = new java.util.ArrayList < com.google.gwtorm.schema.java.JavaColumnModel > ( ) ; while ( in != null ) { for ( final java.lang.reflect.Field f : in.getDeclaredFields ( ) ) { if ( ( f.getAnnotation ( com.google.gwtorm.client.Column.class ) ) != null ) { col.add ( new com.google.gwtorm.schema.java.JavaColumnModel ( f ) ) ; } } in = in.getSuperclass ( ) ; } if ( col.isEmpty ( ) ) { throw new com.google.gwtorm.server.OrmException ( "Cannot create new encoder, no @Column fields found" ) ; } return com.google.gwtorm.protobuf.CodecGen.sort ( col ) ; }

Target:
private static com.google.gwtorm.schema.java.JavaColumnModel [ ] scanFields ( java.lang.Class < ? > in ) throws com.google.gwtorm.server.OrmException { final java.util.Collection < com.google.gwtorm.schema.java.JavaColumnModel > col = new java.util.ArrayList < com.google.gwtorm.schema.java.JavaColumnModel > ( ) ; while ( in != null ) { for ( final java.lang.reflect.Field f : com.google.gwtorm.schema.java.JavaColumnModel.getDeclaredFields ( in ) ) { if ( ( f.getAnnotation ( com.google.gwtorm.client.Column.class ) ) != null ) { col.add ( new com.google.gwtorm.schema.java.JavaColumnModel ( f ) ) ; } } in = in.getSuperclass ( ) ; } if ( col.isEmpty ( ) ) { throw new com.google.gwtorm.server.OrmException ( "Cannot create new encoder, no @Column fields found" ) ; } return com.google.gwtorm.protobuf.CodecGen.sort ( col ) ; }
Source:
public void fire ( com.google.gerrit.extensions.common.ChangeInfo change , com.google.gerrit.extensions.common.RevisionInfo revision , com.google.gerrit.extensions.common.AccountInfo reviewer ) { if ( ! ( listeners.iterator ( ) . hasNext ( ) ) ) { return ; } com.google.gerrit.server.extensions.events.ReviewerAdded.Event e = new com.google.gerrit.server.extensions.events.ReviewerAdded.Event ( change , revision , reviewer ) ; for ( com.google.gerrit.extensions.events.ReviewerAddedListener l : listeners ) { l.onReviewerAdded ( e ) ; } }

Target:
public void fire ( com.google.gerrit.extensions.common.ChangeInfo change , com.google.gerrit.extensions.common.RevisionInfo revision , com.google.gerrit.extensions.common.AccountInfo reviewer ) { if ( ! ( listeners.iterator ( ) . hasNext ( ) ) ) { return ; } com.google.gerrit.server.extensions.events.ReviewerAdded.Event event = new com.google.gerrit.server.extensions.events.ReviewerAdded.Event ( change , revision , reviewer ) ; for ( com.google.gerrit.extensions.events.ReviewerAddedListener l : listeners ) { try { l.onReviewerAdded ( event ) ; } catch ( java.lang.Exception e ) { com.google.gerrit.server.extensions.events.ReviewerAdded.log.warn ( "Error in event listener, e" ) ; } } }
Source:
public void getDiffPreferences ( ) throws com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.acceptance.RestResponse r = session.get ( ( ( "/accounts/" + ( admin.email ) ) + "/preferences.diff" ) ) ; org.junit.Assert.assertEquals ( HttpStatus.SC_OK , r.getStatusCode ( ) ) ; com.google.gerrit.acceptance.rest.account.GetDiffPreferencesIT.DiffPreferencesInfo diffPreferences = new com.google.gson.Gson ( ) . fromJson ( r.getReader ( ) , new com.google.gson.reflect.TypeToken < com.google.gerrit.acceptance.rest.account.GetDiffPreferencesIT.DiffPreferencesInfo > ( ) { } . getType ( ) ) ; com.google.gerrit.acceptance.rest.account.GetDiffPreferencesIT.assertDiffPreferences ( new com.google.gerrit.reviewdb.client.AccountDiffPreference ( admin.id ) , diffPreferences ) ; }

Target:
public void getDiffPreferences ( ) throws com.google.gwtorm.server.OrmException , java.io.IOException { com.google.gerrit.acceptance.RestResponse r = session.get ( ( ( "/accounts/" + ( admin.email ) ) + "/preferences.diff" ) ) ; org.junit.Assert.assertEquals ( HttpStatus.SC_OK , r.getStatusCode ( ) ) ; com.google.gerrit.server.account.GetDiffPreferences.DiffPreferencesInfo diffPreferences = newGson ( ) . fromJson ( r.getReader ( ) , com.google.gerrit.server.account.GetDiffPreferences.DiffPreferencesInfo.class ) ; com.google.gerrit.acceptance.rest.account.GetDiffPreferencesIT.assertDiffPreferences ( new com.google.gerrit.reviewdb.client.AccountDiffPreference ( admin.id ) , diffPreferences ) ; }
Source:
public static < T extends com.google.gwt.core.client.JavaScriptObject > T parseJSON ( java.lang.String json ) { if ( ( com.google.gerrit.client.rpc.Natives.parser ) == null ) { com.google.gerrit.client.rpc.Natives.parser = com.google.gerrit.client.rpc.Natives.bestJsonParser ( ) ; } return com.google.gerrit.client.rpc.Natives.< T > parse0 ( com.google.gerrit.client.rpc.Natives.parser , json ) ; }

Target:
public static < T extends com.google.gwt.core.client.JavaScriptObject > T parseJSON ( java.lang.String json ) { if ( json.startsWith ( "\"" ) ) { return ( ( T ) ( com.google.gerrit.client.rpc.NativeString.wrap ( com.google.gerrit.client.rpc.Natives.parseString ( com.google.gerrit.client.rpc.Natives.parser , json ) ) ) ) ; } return com.google.gerrit.client.rpc.Natives.< T > parseObject ( com.google.gerrit.client.rpc.Natives.parser , json ) ; }
Source:
public static void getContent ( com.google.gerrit.reviewdb.client.PatchSet.Id id , java.lang.String filename , com.google.gwt.user.client.rpc.AsyncCallback < java.lang.String > cb ) { com.google.gerrit.client.changes.ChangeFileApi.contentEditOrPs ( id , filename ) . get ( new com.google.gerrit.client.changes.ChangeFileApi.CallbackWrapper < com.google.gerrit.client.rpc.NativeString , java.lang.String > ( cb ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.rpc.NativeString b64 ) { if ( b64 != null ) { wrapped.onSuccess ( com.google.gerrit.client.changes.ChangeFileApi.b64decode ( b64.asString ( ) ) ) ; } } } ) ; }

Target:
private static com.google.gerrit.client.changes.ChangeFileApi.CallbackWrapper < com.google.gerrit.client.rpc.NativeString , java.lang.String > wrapper ( com.google.gwt.user.client.rpc.AsyncCallback < java.lang.String > cb ) { return new com.google.gerrit.client.changes.ChangeFileApi.CallbackWrapper < com.google.gerrit.client.rpc.NativeString , java.lang.String > ( cb ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.rpc.NativeString b64 ) { if ( b64 != null ) { wrapped.onSuccess ( com.google.gerrit.client.changes.ChangeFileApi.b64decode ( b64.asString ( ) ) ) ; } } } ; }
Source:
public com.google.gerrit.server.project.ThemeInfo getTheme ( ) { com.google.gerrit.server.project.ThemeInfo theme = this . theme ; if ( theme == null ) { synchronized ( this ) { theme = this . theme ; if ( theme == null ) { theme = loadTheme ( ) ; this . theme = theme ; } } } if ( theme == ( ThemeInfo.INHERIT ) ) { com.google.gerrit.server.project.ProjectState parent = com.google.common.collect.Iterables.getFirst ( parents ( ) , null ) ; return parent != null ? parent.getTheme ( ) : null ; } return theme ; }

Target:
public com.google.gerrit.extensions.api.projects.ThemeInfo getTheme ( ) { com.google.gerrit.extensions.api.projects.ThemeInfo theme = this . theme ; if ( theme == null ) { synchronized ( this ) { theme = this . theme ; if ( theme == null ) { theme = loadTheme ( ) ; this . theme = theme ; } } } if ( theme == ( com.google.gerrit.extensions.api.projects.ThemeInfo.INHERIT ) ) { com.google.gerrit.server.project.ProjectState parent = com.google.common.collect.Iterables.getFirst ( parents ( ) , null ) ; return parent != null ? parent.getTheme ( ) : null ; } return theme ; }
Source:
private void emptycell ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m , final int colspan ) { m.openTd ( ) ; m.addStyleName ( com.google.gerrit.client.changes.S_DATA_CELL ) ; m.addStyleName ( "DiffLinkCell" ) ; m.setAttribute ( "colspan" , colspan ) ; m.nbsp ( ) ; m.closeTd ( ) ; }

Target:
private void emptycell ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m , final int colspan ) { m.openTd ( ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . dataCell ( ) ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . diffLinkCell ( ) ) ; m.setAttribute ( "colspan" , colspan ) ; m.nbsp ( ) ; m.closeTd ( ) ; }
Source:
public void printJson ( final java.lang.StringBuilder sb , final org.eclipse.jgit.diff.Edit o ) { sb.append ( '[' ) ; append ( sb , o ) ; if ( o instanceof org.eclipse.jgit.diff.ReplaceEdit ) { for ( org.eclipse.jgit.diff.Edit e : ( ( org.eclipse.jgit.diff.ReplaceEdit ) ( o ) ) . getInternalEdits ( ) ) { sb.append ( ',' ) ; append ( sb , e ) ; } } sb.append ( ']' ) ; }

Target:
public void printJson ( final java.lang.StringBuilder sb , final com.google.gerrit.prettify.common.LineEdit o ) { sb.append ( '[' ) ; append ( sb , o ) ; if ( ( o.getEdits ( ) ) != null ) { for ( com.google.gerrit.prettify.common.BaseEdit e : o.getEdits ( ) ) { sb.append ( ',' ) ; append ( sb , e ) ; } } sb.append ( ']' ) ; }
Source:
public boolean xsrfValidate ( ) { final java.lang.String keyIn = getXsrfKeyIn ( ) ; if ( ( keyIn == null ) || ( "" . equals ( keyIn ) ) ) { return ! ( session.isSignedIn ( ) ) ; } else if ( ( session.isSignedIn ( ) ) && ( session.isValidAuthorization ( keyIn ) ) ) { session.getCurrentUser ( ) . setAccessPath ( AccessPath.JSON_RPC ) ; return true ; } return false ; }

Target:
public boolean xsrfValidate ( ) { final java.lang.String keyIn = getXsrfKeyIn ( ) ; if ( ( keyIn == null ) || ( "" . equals ( keyIn ) ) ) { return ! ( session.isSignedIn ( ) ) ; } else if ( ( session.isSignedIn ( ) ) && ( session.isValidXGerritAuth ( keyIn ) ) ) { session.getCurrentUser ( ) . setAccessPath ( AccessPath.JSON_RPC ) ; return true ; } return false ; }
Source:
public void mergeByOtherCcingSelfNotifyOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS , com.google.gerrit.server.account.WatchConfig.NotifyType.SUBMITTED_CHANGES ) ; setEmailStrategy ( other , EmailStrategy.CC_ON_OWN_COMMENTS ) ; merge ( sc.changeId , other , com.google.gerrit.extensions.api.changes.NotifyHandling.OWNER ) ; assertThat ( sender ) . sent ( "merged" , sc ) . to ( sc.owner ) . notTo ( sc.reviewer , sc.ccer , sc.starrer , other ) . notTo ( sc.reviewerByEmail , sc.ccerByEmail ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS , com.google.gerrit.server.account.WatchConfig.NotifyType.SUBMITTED_CHANGES ) ; }

Target:
public void mergeByOtherNotifyNone ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageChange ( ) ; merge ( sc.changeId , other , com.google.gerrit.extensions.api.changes.NotifyHandling.NONE ) ; assertThat ( sender ) . notSent ( ) ; }