auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void apply ( org.eclipse.jgit.dircache.DirCacheEntry ent ) { ent.setFileMode ( FileMode.REGULAR_FILE ) ; ent.setObjectId ( oid ) ; }

Target:
public void apply ( org.eclipse.jgit.dircache.DirCacheEntry ent ) { ent.setFileMode ( mode ) ; ent.setObjectId ( oid ) ; }
Source:
public void refsDraftComments ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( com.google.gerrit.reviewdb.client.RefNames.refsDraftComments ( accountId , changeId ) ) . isEqualTo ( "refs/draft-comments/23/1011123/67473" ) ; }

Target:
public void refsDraftComments ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( com.google.gerrit.reviewdb.client.RefNames.refsDraftComments ( changeId , accountId ) ) . isEqualTo ( "refs/draft-comments/73/67473/1011123" ) ; }
Source:
public boolean hasChange ( ) { return ( change ) != null ; }

Target:
public com.google.gerrit.server.notedb.ChangeNotes notes ( ) throws com.google.gwtorm.server.OrmException { if ( ( notes ) == null ) { notes = notesFactory.create ( change ( ) ) ; } return notes ; }
Source:
public void shouldThrowAnExceptionIfAnErrorOccurCreatingSharedDirectory ( ) throws java.lang.Exception { java.io.File configuredDirectory = tempFolder.newFile ( ) ; org.mockito.Mockito.when ( configMock.main ( ) . sharedDirectory ( ) ) . thenReturn ( configuredDirectory.getAbsolutePath ( ) ) ; module.getSharedDirectory ( ) ; }

Target:
public void shouldThrowAnExceptionIfAnErrorOccurCreatingSharedDirectory ( ) throws java.lang.Exception { java.io.File configuredDirectory = tempFolder.newFile ( ) ; org.mockito.Mockito.when ( configMock.main ( ) . sharedDirectory ( ) ) . thenReturn ( configuredDirectory.toPath ( ) ) ; module.getSharedDirectory ( ) ; }
Source:
protected java.io.File path ( java.io.File sitePath , com.google.gerrit.httpd.GitWebConfig gitWebConfig ) { return new java.io.File ( sitePath , "GerritSite.css" ) ; }

Target:
protected java.io.File path ( java.io.File etc , com.google.gerrit.httpd.GitWebConfig gitWebConfig ) { return new java.io.File ( etc , "GerritSite.css" ) ; }
Source:
public java.util.Map < java.lang.String , java.util.List < com.google.gerrit.extensions.common.CommentInfo > > comments ( ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return listComments.apply ( change ) ; } catch ( com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot get comments" , e ) ; } }

Target:
public java.util.Map < java.lang.String , java.util.List < com.google.gerrit.extensions.common.CommentInfo > > comments ( ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return listComments.apply ( change ) ; } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.api.ApiUtil.asRestApiException ( "Cannot get comments" , e ) ; } }
Source:
public void revokedByKeyNotPresentInStore ( ) throws java.lang.Exception { com.google.gerrit.gpg.testutil.TestKey k = add ( com.google.gerrit.gpg.testutil.TestKeys.revokedCompromisedKey ( ) ) ; save ( ) ; assertProblems ( k , "Key is revoked (key material has been compromised): test6 compromised" ) ; }

Target:
public void revokedByKeyNotPresentInStore ( ) throws java.lang.Exception { com.google.gerrit.gpg.testing.TestKey k = add ( com.google.gerrit.gpg.testing.TestKeys.revokedCompromisedKey ( ) ) ; save ( ) ; assertProblems ( k , "Key is revoked (key material has been compromised): test6 compromised" ) ; }
Source:
protected org.eclipse.jgit.lib.ObjectInserter delegate ( ) { return inserter ; }

Target:
private com.google.gerrit.server.git.SubmitStrategy createStrategy ( final com.google.gerrit.reviewdb.client.Project.SubmitType submitType ) throws com.google.gerrit.server.git.MergeException { return submitStrategyFactory.create ( submitType , db , repo , rw , inserter , canMergeFlag , getAlreadyAccepted ( branchTip ) , destBranch , destProject.isUseContentMerge ( ) ) ; }
Source:
public void assertErrorStatus ( ) { org.eclipse.jgit.transport.RemoteRefUpdate refUpdate = result.getRemoteUpdate ( ref ) ; com.google.common.truth.Truth.assertThat ( refUpdate.getStatus ( ) ) . named ( message ( refUpdate ) ) . isEqualTo ( Status.REJECTED_OTHER_REASON ) ; }

Target:
public void assertErrorStatus ( ) { org.eclipse.jgit.transport.RemoteRefUpdate refUpdate = result.getRemoteUpdate ( ref ) ; com.google.common.truth.Truth.assertThat ( refUpdate ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( refUpdate.getStatus ( ) ) . named ( message ( refUpdate ) ) . isEqualTo ( Status.REJECTED_OTHER_REASON ) ; }
Source:
public final native com.google.gerrit.client.rpc.NativeMap < com.google.gerrit.client.info.ActionInfo > actions ( ) ;

Target:
public final native boolean canDelete ( ) ;
Source:
public com.google.gerrit.server.project.RefControl controlForRef ( java.lang.String refName ) { return new com.google.gerrit.server.project.RefControl ( this , refName ) ; }

Target:
public com.google.gerrit.server.project.RefControl controlForRef ( java.lang.String refName ) { return refControlFactory.create ( this , refName ) ; }
Source:
public void copySettingsFrom ( final com.google.gerrit.reviewdb.client.Project update ) { description = update.description ; useContributorAgreements = update.useContributorAgreements ; useSignedOffBy = update.useSignedOffBy ; useContentMerge = update.useContentMerge ; requireChangeID = update.requireChangeID ; submitType = update.submitType ; state = update.state ; maxObjectSizeLimit = update.maxObjectSizeLimit ; }

Target:
public void copySettingsFrom ( final com.google.gerrit.reviewdb.client.Project update ) { description = update.description ; useContributorAgreements = update.useContributorAgreements ; useSignedOffBy = update.useSignedOffBy ; useContentMerge = update.useContentMerge ; requireChangeID = update.requireChangeID ; submitType = update.submitType ; state = update.state ; maxObjectSizeLimit = update.maxObjectSizeLimit ; createNewChangeForAllNotInTarget = update.createNewChangeForAllNotInTarget ; }
Source:
public void configure ( ) { factory ( ReviewDbBatchUpdate.AssistedFactory.class ) ; factory ( NoteDbBatchUpdate.AssistedFactory.class ) ; }

Target:
public void configure ( ) { factory ( ReviewDbBatchUpdate.AssistedFactory.class ) ; factory ( FusedNoteDbBatchUpdate.AssistedFactory.class ) ; factory ( UnfusedNoteDbBatchUpdate.AssistedFactory.class ) ; }
Source:
public void testVerifyAgainstDifferentOperation ( ) throws java.lang.Exception { java.lang.String token = auth.generateToken ( "o" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) , 1 ) ; com.google.common.truth.Truth.assertThat ( auth.verifyAgainstToken ( token , "p" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) ) ) . isFalse ( ) ; }

Target:
public void testVerifyAuthInfo ( ) throws java.lang.Exception { com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.AuthInfo info = auth.generateAuthInfo ( "o" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) , 1 ) ; com.google.common.truth.Truth.assertThat ( auth.verifyAuthInfo ( info.authToken , "o" , org.eclipse.jgit.lfs.lib.LongObjectId.zeroId ( ) ) ) . isTrue ( ) ; }
Source:
protected static java.lang.String getGroupName ( com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid ) { return java.lang.String.format ( "Group <%s>" , uuid ) ; }

Target:
public java.lang.String getUrl ( ) { return null ; }
Source:
public com.google.gerrit.server.ssh.Command createCommand ( final java.lang.String requestCommand ) { final com.google.gerrit.server.ssh.DispatchCommand c = dispatcher.get ( ) ; c.setCommandLine ( requestCommand ) ; return c ; }

Target:
public org.apache.sshd.server.CommandFactory.Command createCommand ( final java.lang.String requestCommand ) { return new com.google.gerrit.server.ssh.CommandFactoryProvider.Trampoline ( requestCommand ) ; }
Source:
public void run ( ) { try { running = true ; task.run ( ) ; } finally { running = false ; } }

Target:
public int getTaskId ( ) { return taskId ; }
Source:
public final void ignoreWhitespace ( com.google.gerrit.reviewdb.client.AccountDiffPreference.Whitespace i ) { setIgnoreWhitespaceRaw ( i.toString ( ) ) ; }

Target:
public final void ignoreWhitespace ( com.google.gerrit.extensions.client.DiffPreferencesInfo.Whitespace i ) { setIgnoreWhitespaceRaw ( i.toString ( ) ) ; }
Source:
public final Project.NameKey getNameKey ( ) { return new com.google.gerrit.reviewdb.client.Project.NameKey ( getName ( ) ) ; }

Target:
public final Project.NameKey name_key ( ) { return new com.google.gerrit.reviewdb.client.Project.NameKey ( name ( ) ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { setOpen ( ( ! ( isOpen ( ) ) ) ) ; callback.run ( ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { setOpen ( ( ! ( isOpen ( ) ) ) ) ; if ( ( clickCallback ) != null ) { clickCallback.run ( ) ; } }
Source:
public void execute ( ) { for ( final com.google.gerrit.client.SignedInListener l : com.google.gerrit.client.Gerrit.signedInListeners ) { l.onSignIn ( ) ; } }

Target:
public void execute ( ) { for ( final com.google.gerrit.client.SignedInListener l : com.google.gerrit.client.Gerrit.signedInListeners ) { l.onSignIn ( ) ; } if ( ( com.google.gerrit.client.Gerrit.currentScreen ) != null ) { com.google.gerrit.client.Gerrit.currentScreen.onSignIn ( ) ; } }
Source:
public boolean canPerform ( java.lang.String permissionName ) { return ! ( access ( permissionName ) . isEmpty ( ) ) ; }

Target:
public boolean canPerform ( java.lang.String permissionName ) { if ( GlobalCapability.ADMINISTRATE_SERVER.equals ( permissionName ) ) { return canAdministrateServer ( ) ; } else { return ! ( access ( permissionName ) . isEmpty ( ) ) ; } }
Source:
public com.google.gerrit.extensions.api.changes.Changes.QueryParameter withLimit ( int limit ) { this . limit = limit ; return this ; }

Target:
public com.google.gerrit.extensions.api.changes.Changes.QueryRequest withLimit ( int limit ) { this . limit = limit ; return this ; }
Source:
public final com.google.gerrit.client.projects.ConfigInfo.ConfigParameterValue value ( java.lang.String v ) { set_value ( v ) ; return this ; }

Target:
public final com.google.gerrit.client.projects.ConfigInfo.ConfigParameterValue value ( java.lang.String v ) { setValue ( v ) ; return this ; }
Source:
protected void onCellSingleClick ( int row , int column ) { if ( ( column == 1 ) || ( column == 3 ) ) { onCellDoubleClick ( row , column ) ; } }

Target:
protected void onCellSingleClick ( int row , int column ) { if ( ( column == 1 ) || ( column == 4 ) ) { onCellDoubleClick ( row , column ) ; } }
Source:
boolean canSubmit ( boolean isChangeOwner ) { if ( RefNames.REFS_CONFIG.equals ( refName ) ) { return projectControl.isOwner ( ) ; } return canPerform ( Permission.SUBMIT , isChangeOwner ) ; }

Target:
boolean canForceEditTopicName ( ) { return canPerform ( Permission.EDIT_TOPIC_NAME , false , true ) ; }
Source:
public void visit ( org.commonmark.node.HtmlBlock node ) { }

Target:
public void visit ( org.commonmark.node.HtmlBlock node ) { html.append ( htmlSanitizer.sanitize ( node.getLiteral ( ) ) ) ; }
Source:
public void setUseSignedOffBy ( final com.google.gerrit.reviewdb.client.Project.InheritableBoolean sbo ) { useSignedOffBy = sbo ; }

Target:
public void setRequireChangeID ( final com.google.gerrit.extensions.common.InheritableBoolean cid ) { requireChangeID = cid ; }
Source:
private void setNew ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.reviewdb.client.ChangeMessage msg ) { sendMergeFail ( c , msg , true ) ; }

Target:
private void logWarn ( java.lang.String msg ) { if ( com.google.gerrit.server.git.MergeOp.log.isWarnEnabled ( ) ) { com.google.gerrit.server.git.MergeOp.log.warn ( ( ( logPrefix ) + msg ) ) ; } }
Source:
private java.lang.String createChange ( ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { com.google.gerrit.acceptance.git.PushOneCommit push = new com.google.gerrit.acceptance.git.PushOneCommit ( db , admin.getIdent ( ) ) ; return push.to ( git , "refs/for/master" ) . getChangeId ( ) ; }

Target:
private java.lang.String createChange ( ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { com.google.gerrit.acceptance.PushOneCommit push = pushFactory.create ( db , admin.getIdent ( ) ) ; return push.to ( git , "refs/for/master" ) . getChangeId ( ) ; }
Source:
public void review ( com.google.gerrit.extensions.api.changes.ReviewInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { try { review.apply ( revision , in ) ; } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.api.ApiUtil.asRestApiException ( "Cannot post review" , e ) ; } }

Target:
public com.google.gerrit.extensions.api.changes.ReviewResult review ( com.google.gerrit.extensions.api.changes.ReviewInput in ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return review.apply ( revision , in ) . value ( ) ; } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.api.ApiUtil.asRestApiException ( "Cannot post review" , e ) ; } }
Source:
private static java.lang.String decode ( java.lang.String str ) { try { return java.net.URLDecoder.decode ( str , com.google.common.base.Charsets.UTF_8.name ( ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { return str ; } }

Target:
private static java.lang.String decode ( java.lang.String str ) { try { return java.net.URLDecoder.decode ( str , java.nio.charset.StandardCharsets.UTF_8.name ( ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { return str ; } }
Source:
public static void createGroup ( java.lang.String groupName , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.groups.GroupInfo > cb ) { com.google.gwt.core.client.JavaScriptObject in = com.google.gwt.core.client.JavaScriptObject.createObject ( ) ; new com.google.gerrit.client.rpc.RestApi ( "/groups/" ) . id ( groupName ) . ifNoneMatch ( ) . put ( in , cb ) ; }

Target:
public static void createGroup ( java.lang.String groupName , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.groups.GroupInfo > cb ) { com.google.gwt.core.client.JavaScriptObject in = com.google.gwt.core.client.JavaScriptObject.createObject ( ) ; new com.google.gerrit.client.rpc.RestApi ( "groups" ) . id ( groupName ) . ifNoneMatch ( ) . put ( in , cb ) ; }
Source:
public static com.google.gerrit.server.account.AuthRequest forEmail ( java.lang.String email ) { com.google.gerrit.server.account.AuthRequest r = new com.google.gerrit.server.account.AuthRequest ( ExternalId.Key.create ( com.google.gerrit.server.account.ExternalId.SCHEME_MAILTO , email ) ) ; r.setEmailAddress ( email ) ; return r ; }

Target:
public static com.google.gerrit.server.account.AuthRequest forEmail ( java.lang.String email ) { com.google.gerrit.server.account.AuthRequest r = new com.google.gerrit.server.account.AuthRequest ( ExternalId.Key.create ( com.google.gerrit.server.account.externalids.ExternalId.SCHEME_MAILTO , email ) ) ; r.setEmailAddress ( email ) ; return r ; }
Source:
public static boolean isLegalReviewerGroup ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupUUID ) { return ! ( ( AccountGroup.ANONYMOUS_USERS.equals ( groupUUID ) ) || ( AccountGroup.REGISTERED_USERS.equals ( groupUUID ) ) ) ; }

Target:
public static boolean isLegalReviewerGroup ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupUUID ) { return ! ( com.google.gerrit.server.group.SystemGroupBackend.isSystemGroup ( groupUUID ) ) ; }
Source:
public final com.google.gerrit.reviewdb.client.AccountGeneralPreferences.TimeFormat timeFormat ( ) { java.lang.String s = timeFormatRaw ( ) ; return s != null ? com.google.gerrit.reviewdb.client.AccountGeneralPreferences.TimeFormat.valueOf ( s ) : null ; }

Target:
public final com.google.gerrit.extensions.client.GeneralPreferencesInfo.TimeFormat timeFormat ( ) { java.lang.String s = timeFormatRaw ( ) ; return s != null ? com.google.gerrit.extensions.client.GeneralPreferencesInfo.TimeFormat.valueOf ( s ) : null ; }
Source:
public void backupRefNameForUnsupportedNamespace ( ) throws java.lang.Exception { java.lang.String ref = "refs/changes/45/12345/1" ; com.google.common.truth.Truth.assertThat ( com.googlesource.gerrit.plugins.refprotection.BackupRef.get ( ref ) ) . isEqualTo ( ref ) ; }

Target:
public void backupTimestampRefNameForUnsupportedNamespace ( ) throws java.lang.Exception { java.lang.String ref = "refs/changes/45/12345/1" ; com.google.common.truth.Truth.assertThat ( com.googlesource.gerrit.plugins.refprotection.BackupRef.get ( null , ref ) ) . isEqualTo ( ref ) ; }
Source:
public com.google.gerrit.server.patch.IntraLineDiff getIntraLineDiff ( com.google.gerrit.server.patch.IntraLineDiffKey key ) ;

Target:
public com.google.gerrit.server.patch.IntraLineDiff getIntraLineDiff ( com.google.gerrit.server.patch.IntraLineDiffKey key , com.google.gerrit.server.patch.IntraLineDiffArgs args ) ;
Source:
public com.google.gerrit.extensions.common.AccountInfo setAssignee ( com.google.gerrit.extensions.api.changes.AssigneeInput input ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return putAssignee.apply ( change , input ) . value ( ) ; } catch ( com.google.gerrit.server.git.UpdateException | java.io.IOException | com.google.gwtorm.server.OrmException | com.google.gerrit.server.permissions.PermissionBackendException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot set assignee" , e ) ; } }

Target:
public com.google.gerrit.extensions.common.AccountInfo setAssignee ( com.google.gerrit.extensions.api.changes.AssigneeInput input ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return putAssignee.apply ( change , input ) ; } catch ( com.google.gerrit.server.update.UpdateException | java.io.IOException | com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot set assignee" , e ) ; } }
Source:
private void setNew ( com.google.gerrit.reviewdb.client.Change c , com.google.gerrit.reviewdb.client.ChangeMessage msg ) { sendMergeFail ( c , msg , true ) ; }

Target:
private com.google.gerrit.server.project.ChangeControl changeControl ( com.google.gerrit.reviewdb.client.Change c ) throws com.google.gerrit.server.project.NoSuchChangeException { return changeControlFactory.controlFor ( c , identifiedUserFactory.create ( c.getOwner ( ) ) ) ; }
Source:
protected abstract java.lang.String readStringImpl ( java.lang.String def , java.lang.String fmt , java.lang.Object ... args ) ;

Target:
public abstract boolean yesno ( java.lang.Boolean def , java.lang.String fmt , java.lang.Object ... args ) ;
Source:
public void evictInclude ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupId ) ;

Target:
public java.util.Set < com.google.gerrit.reviewdb.client.AccountGroup.UUID > memberIn ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupId ) ;
Source:
public void addIntHeader ( java.lang.String name , int value ) { headers.put ( name , java.lang.Integer.toString ( value ) ) ; }

Target:
public void addIntHeader ( java.lang.String name , int value ) { addHeader ( name , java.lang.Integer.toString ( value ) ) ; }
Source:
protected void deny ( com.google.gerrit.server.git.ProjectConfig project , java.lang.String permission , com.google.gerrit.reviewdb.client.AccountGroup.UUID id , java.lang.String ref ) throws java.lang.Exception { com.google.gerrit.server.project.Util.deny ( project , permission , id , ref ) ; saveProjectConfig ( project ) ; }

Target:
protected void deny ( com.google.gerrit.server.git.ProjectConfig project , java.lang.String permission , com.google.gerrit.reviewdb.client.AccountGroup.UUID id , java.lang.String ref ) throws java.lang.Exception { com.google.gerrit.server.project.testing.Util.deny ( project , permission , id , ref ) ; saveProjectConfig ( project ) ; }
Source:
public int compare ( final com.google.gerrit.reviewdb.client.PatchSetApproval a , final com.google.gerrit.reviewdb.client.PatchSetApproval b ) { return a.getGranted ( ) . compareTo ( b.getGranted ( ) ) ; }

Target:
private void preMerge ( final com.google.gerrit.server.git.SubmitStrategy strategy ) throws com.google.gerrit.server.git.MergeException { openBranch ( ) ; validateChangeList ( ) ; mergeTip = strategy.run ( branchTip , toMerge ) ; refLogIdent = strategy.getRefLogIdent ( ) ; commits.putAll ( strategy.getNewCommits ( ) ) ; }
Source:
public boolean enterSSLVerify ( com.google.gerrit.pgm.init.api.Section section ) { return ( com.googlesource.gerrit.plugins.hooks.its.InitIts.TrueFalseEnum.TRUE ) == ( section.select ( "Verify SSL Certificates" , "sslVerify" , com.googlesource.gerrit.plugins.hooks.its.InitIts.TrueFalseEnum.TRUE ) ) ; }

Target:
public boolean enterSSLVerify ( com.google.gerrit.pgm.init.Section section ) { return ( com.googlesource.gerrit.plugins.hooks.its.InitIts.TrueFalseEnum.TRUE ) == ( section.select ( "Verify SSL Certificates" , "sslVerify" , com.googlesource.gerrit.plugins.hooks.its.InitIts.TrueFalseEnum.TRUE ) ) ; }
Source:
void onQuote ( com.google.gwt.event.dom.client.ClickEvent e ) { e.stopPropagation ( ) ; if ( ! ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ) { com.google.gerrit.client.Gerrit.doSignIn ( getCommentManager ( ) . getDiffScreen ( ) . getToken ( ) ) ; } addReplyBox ( true ) ; }

Target:
void onQuote ( com.google.gwt.event.dom.client.ClickEvent e ) { e.stopPropagation ( ) ; if ( ! ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ) { com.google.gerrit.client.Gerrit.doSignIn ( getCommentManager ( ) . host.getToken ( ) ) ; } addReplyBox ( true ) ; }
Source:
public com.google.gerrit.server.project.SubmitRuleEvaluator setOptions ( com.google.gerrit.server.project.SubmitRuleOptions opts ) { checkNotStarted ( ) ; if ( opts != null ) { optsBuilder = opts.toBuilder ( ) ; } else { optsBuilder = com.google.gerrit.server.project.SubmitRuleOptions.defaults ( ) ; } return this ; }

Target:
public com.google.gerrit.server.project.SubmitRuleEvaluator setOptions ( com.google.gerrit.server.project.SubmitRuleOptions opts ) { checkNotStarted ( ) ; if ( opts != null ) { optsBuilder = opts.toBuilder ( ) ; } else { optsBuilder = com.google.gerrit.server.project.SubmitRuleOptions.builder ( ) ; } return this ; }
Source:
public void abandonReviewableChangeNotifyOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; abandon ( sc.changeId , sc.owner , com.google.gerrit.extensions.api.changes.NotifyHandling.OWNER ) ; assertThat ( sender ) . notSent ( ) ; }

Target:
public void abandonReviewableChangeNotifyOwner ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; abandon ( sc.changeId , sc.owner , com.google.gerrit.acceptance.server.mail.OWNER ) ; assertThat ( sender ) . notSent ( ) ; }
Source:
com.google.gerrit.sshd.SshScope.Context newContext ( com.google.gwtorm.server.SchemaFactory < com.google.gerrit.reviewdb.server.ReviewDb > sf , com.google.gerrit.sshd.SshSession s , java.lang.String cmd ) { return new com.google.gerrit.sshd.SshScope.Context ( sf , s , cmd , java.lang.System.currentTimeMillis ( ) ) ; }

Target:
com.google.gerrit.sshd.SshScope.Context newContext ( com.google.gwtorm.server.SchemaFactory < com.google.gerrit.reviewdb.server.ReviewDb > sf , com.google.gerrit.sshd.SshSession s , java.lang.String cmd ) { return new com.google.gerrit.sshd.SshScope.Context ( sf , s , cmd , com.google.gerrit.server.util.TimeUtil.nowMs ( ) ) ; }
Source:
public java.lang.String describeForException ( ) { return "label " + ( label ( ) ) ; }

Target:
public com.google.gerrit.server.permissions.LabelPermission.ForUser forUser ( ) { return forUser ; }
Source:
public void delete ( com.google.gerrit.server.query.change.ChangeData cd ) throws java.io.IOException { deleteAsync ( cd ) . checkedGet ( ) ; }

Target:
public void delete ( com.google.gerrit.server.query.change.ChangeData cd ) throws java.io.IOException { try { deleteTask ( cd ) . call ( ) ; } catch ( java.lang.RuntimeException e ) { throw e ; } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.index.ChangeIndexer.MAPPER.apply ( e ) ; } }
Source:
protected void configure ( ) { get ( com.google.gerrit.server.project.ProjectResource.PROJECT_KIND , "quota" ) . to ( com.googlesource.gerrit.plugins.quota.GetQuota.class ) ; }

Target:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.googlesource.gerrit.plugins.quota.QuotaResource.QUOTA_KIND ) ; get ( com.google.gerrit.server.project.ProjectResource.PROJECT_KIND , "quota" ) . to ( com.googlesource.gerrit.plugins.quota.GetQuota.class ) ; child ( com.google.gerrit.server.config.ConfigResource.CONFIG_KIND , "quota" ) . to ( com.googlesource.gerrit.plugins.quota.GetQuotas.class ) ; }
Source:
public long getDateHeader ( java.lang.String name ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public long getDateHeader ( java.lang.String name ) { java.lang.String v = getHeader ( name ) ; return v != null ? org.apache.http.client.utils.DateUtils.parseDate ( v ) . getTime ( ) : 0 ; }
Source:
protected java.lang.String getTaskDescription ( ) { java.lang.StringBuilder m = new java.lang.StringBuilder ( ) ; m.append ( getFormattedMaskedArguments ( " " ) ) ; return m.toString ( ) ; }

Target:
protected java.lang.String getTaskDescription ( ) { java.lang.StringBuilder m = new java.lang.StringBuilder ( ) ; m.append ( context.getCommandLine ( ) ) ; return m.toString ( ) ; }
Source:
protected void onInitUI ( ) { super . onInitUI ( ) ; initPath ( ) ; setHeaderVisible ( false ) ; setWindowTitle ( com.google.gerrit.client.diff.FileInfo.getFileName ( path ) ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo c ) { project.setInnerText ( c.project ( ) ) ; com.google.gwtexpui.safehtml.client.SafeHtml.setInnerHTML ( filePath , com.google.gerrit.client.diff.Header.formatPath ( path , null , null ) ) ; }
Source:
com.google.gerrit.httpd.raw.PolyGerritUiServlet getPolyGerritUiBowerServlet ( @ com.google.inject.name.Named ( value = com.google.gerrit.httpd.raw.StaticModule.CACHE ) com.google.common.cache.Cache < java.nio.file.Path , com.google.gerrit.httpd.raw.ResourceServlet.Resource > cache ) { return new com.google.gerrit.httpd.raw.PolyGerritUiServlet ( cache , polyGerritBasePath ( ) . resolveSibling ( "bower_components" ) ) ; }

Target:
com.google.gerrit.httpd.raw.BowerComponentsServlet getBowerComponentsServlet ( @ com.google.inject.name.Named ( value = com.google.gerrit.httpd.raw.StaticModule.CACHE ) com.google.common.cache.Cache < java.nio.file.Path , com.google.gerrit.httpd.raw.ResourceServlet.Resource > cache ) { return new com.google.gerrit.httpd.raw.BowerComponentsServlet ( cache , getPaths ( ) . buckOut ) ; }
Source:
private void configureCacheSection ( ) { ui.header ( "Cache section" ) ; promptAndSetString ( "Cache thread pool size" , com.ericsson.gerrit.plugins.highavailability.CACHE_SECTION , com.ericsson.gerrit.plugins.highavailability.THREAD_POOL_SIZE_KEY , com.ericsson.gerrit.plugins.highavailability.Setup.str ( com.ericsson.gerrit.plugins.highavailability.DEFAULT_THREAD_POOL_SIZE ) ) ; }

Target:
private void configureCacheSection ( ) { ui.header ( "Cache section" ) ; promptAndSetString ( "Cache thread pool size" , com.ericsson.gerrit.plugins.highavailability.Configuration.CACHE_SECTION , com.ericsson.gerrit.plugins.highavailability.Configuration.THREAD_POOL_SIZE_KEY , com.ericsson.gerrit.plugins.highavailability.Setup.str ( com.ericsson.gerrit.plugins.highavailability.Configuration.DEFAULT_THREAD_POOL_SIZE ) ) ; }
Source:
public void manualCertificationDoesNotExternalId ( ) throws java.lang.Exception { addExternalId ( "foo" , "otherId" , null ) ; assertProblems ( com.google.gerrit.server.git.gpg.TestKey.key5 ( ) , ( "Key must contain a valid certification for one of the following " + ( ( ( "identities:\n" + " foo:otherId\n" ) + " gerrit:user\n" ) + " username:user" ) ) ) ; }

Target:
public void manualCertificationDoesNotExternalId ( ) throws java.lang.Exception { addExternalId ( "foo" , "otherId" , null ) ; assertProblems ( com.google.gerrit.gpg.testutil.TestKey.key5 ( ) , ( "Key must contain a valid certification for one of the following " + ( ( ( "identities:\n" + " foo:otherId\n" ) + " gerrit:user\n" ) + " username:user" ) ) ) ; }
Source:
public < T extends com.google.gwt.core.client.JavaScriptObject > void delete ( com.google.gwtjsonrpc.common.AsyncCallback < T > cb ) { send ( com.google.gwt.http.client.RequestBuilder.DELETE , cb ) ; }

Target:
public < T extends com.google.gwt.core.client.JavaScriptObject > void delete ( com.google.gwt.user.client.rpc.AsyncCallback < T > cb ) { send ( com.google.gwt.http.client.RequestBuilder.DELETE , cb ) ; }
Source:
public static synchronized void useSystemTime ( ) { org.joda.time.DateTimeUtils.setCurrentMillisSystem ( ) ; }

Target:
public static synchronized void useSystemTime ( ) { com.google.gerrit.testutil.TestTimeUtil.clockMs = null ; org.joda.time.DateTimeUtils.setCurrentMillisSystem ( ) ; }
Source:
public void close ( ) { rs.close ( ) ; }

Target:
public com.google.gwtorm.server.ResultSet < T > read ( ) throws com.google.gwtorm.server.OrmException { return source.read ( ) ; }
Source:
com.google.gwtorm.client.ResultSet < com.google.gerrit.reviewdb.Change > query ( com.google.gerrit.reviewdb.ReviewDb db , int slim , java.lang.String sortKey ) throws com.google.gwtorm.client.OrmException { return db.changes ( ) . allOpenPrev ( sortKey , slim ) ; }

Target:
com.google.gwtorm.client.ResultSet < com.google.gerrit.reviewdb.Change > query ( com.google.gerrit.reviewdb.ReviewDb db , int lim , java.lang.String key ) throws com.google.gerrit.common.errors.InvalidQueryException , com.google.gwtorm.client.OrmException { return searchQuery ( db , query , lim , key , com.google.gerrit.httpd.rpc.ChangeListServiceImpl.QUERY_PREV ) ; }
Source:
public void testInvalidSchemeWithBackreference ( ) { try { new com.google.gwtexpui.safehtml.client.LinkFindReplace ( ".*(script:[^;]*)" , "java$1" ) . replace ( "Look at this script: alert(1);" ) ; org.junit.Assert.fail ( "Expected IllegalStateException" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void testInvalidSchemeWithBackreference ( ) { exception.expect ( java.lang.IllegalArgumentException.class ) ; new com.google.gwtexpui.safehtml.client.LinkFindReplace ( ".*(script:[^;]*)" , "java$1" ) . replace ( "Look at this script: alert(1);" ) ; }
Source:
public void setUseContributorAgreements ( final boolean u ) { useContributorAgreements = u ; }

Target:
public void setRequireChangeID ( final com.google.gerrit.reviewdb.client.Project.InheritedBoolean cid ) { requireChangeID = cid ; }
Source:
public static void setAccountDiffPreference ( com.google.gerrit.reviewdb.client.AccountDiffPreference accountDiffPref ) { com.google.gerrit.client.Gerrit.myAccountDiffPref = accountDiffPref ; }

Target:
public static void setDiffPreferences ( com.google.gerrit.extensions.client.DiffPreferencesInfo accountDiffPref ) { com.google.gerrit.client.Gerrit.myAccountDiffPref = accountDiffPref ; }
Source:
public com.google.gerrit.server.IdentifiedUser runAs ( com.google.gerrit.reviewdb.client.Account.Id id , com.google.gerrit.server.CurrentUser caller ) { return new com.google.gerrit.server.IdentifiedUser ( capabilityControlFactory , authConfig , anonymousCowardName , canonicalUrl , accountCache , groupBackend , disableReverseDnsLookup , remotePeerProvider , dbProvider , id , caller ) ; }

Target:
public com.google.gerrit.server.IdentifiedUser runAs ( com.google.gerrit.reviewdb.client.Account.Id id , com.google.gerrit.server.CurrentUser caller ) { return new com.google.gerrit.server.IdentifiedUser ( capabilityControlFactory , authConfig , realm , anonymousCowardName , canonicalUrl , accountCache , groupBackend , disableReverseDnsLookup , remotePeerProvider , dbProvider , id , caller ) ; }
Source:
com.google.gerrit.server.git.AbandonOp create ( @ com.google.inject.assistedinject.Assisted com.google.gerrit.reviewdb.client.Account account , @ com.google.inject.assistedinject.Assisted java.lang.String msgTxt , @ com.google.inject.assistedinject.Assisted com.google.gerrit.extensions.api.changes.NotifyHandling notifyHandling ) ;

Target:
com.google.gerrit.server.git.AbandonOp create ( @ com.google.inject.assistedinject.Assisted com.google.gerrit.reviewdb.client.Account account , @ com.google.inject.assistedinject.Assisted java.lang.String msgTxt , @ com.google.inject.assistedinject.Assisted com.google.gerrit.extensions.api.changes.NotifyHandling notifyHandling , @ com.google.inject.assistedinject.Assisted com.google.common.collect.Multimap < com.google.gerrit.extensions.api.changes.RecipientType , com.google.gerrit.reviewdb.client.Account.Id > accountsToNotify ) ;
Source:
public int hashCode ( ) { return com.google.common.base.Objects.hashCode ( storeName ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( storeName ) ; }
Source:
java.lang.String pluginRulesFileName ( ) { return java.lang.String.format ( com.googlesource.gerrit.plugins.its.base.ItsHookModule.CONFIG_FILE_NAME , ( "-" + ( pluginName ) ) ) ; }

Target:
java.nio.file.Path itsPath ( com.google.gerrit.server.config.SitePaths sitePaths ) { return sitePaths.etc_dir.normalize ( ) . resolve ( com.googlesource.gerrit.plugins.its.base.ItsHookModule.ITS_FOLDER ) ; }
Source:
public void onKeyPress ( com.google.gwt.event.dom.client.KeyPressEvent event ) { header.reviewedAndNext ( ) . run ( ) ; }

Target:
public void onKeyPress ( com.google.gwt.event.dom.client.KeyPressEvent event ) { toggleReviewed ( ) . run ( ) ; }
Source:
private com.google.gerrit.server.plugins.JarScanner createJarScanner ( java.io.File srcJar ) throws com.google.gerrit.server.plugins.InvalidPluginException { try { return new com.google.gerrit.server.plugins.JarScanner ( srcJar ) ; } catch ( java.io.IOException e ) { throw new com.google.gerrit.server.plugins.InvalidPluginException ( ( "Cannot scan plugin file " + srcJar ) , e ) ; } }

Target:
private com.google.gerrit.server.plugins.JarScanner createJarScanner ( java.nio.file.Path srcJar ) throws com.google.gerrit.server.plugins.InvalidPluginException { try { return new com.google.gerrit.server.plugins.JarScanner ( srcJar ) ; } catch ( java.io.IOException e ) { throw new com.google.gerrit.server.plugins.InvalidPluginException ( ( "Cannot scan plugin file " + srcJar ) , e ) ; } }
Source:
public java.lang.String getDisplayString ( ) { return ( ( java.lang.String.valueOf ( change.legacy_id ( ) . get ( ) ) ) + ": " ) + ( change.subject ( ) ) ; }

Target:
public java.lang.String getDisplayString ( ) { return ( ( java.lang.String.valueOf ( change.legacyId ( ) . get ( ) ) ) + ": " ) + ( change.subject ( ) ) ; }
Source:
private static com.google.gerrit.reviewdb.client.Change newChange ( ) { return com.google.gerrit.testutil.TestChanges.newChange ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) , new com.google.gerrit.reviewdb.client.Account.Id ( 12345 ) ) ; }

Target:
private static com.google.gerrit.reviewdb.client.Change newChange ( ) { return com.google.gerrit.testing.TestChanges.newChange ( new com.google.gerrit.reviewdb.client.Project.NameKey ( "project" ) , new com.google.gerrit.reviewdb.client.Account.Id ( 12345 ) ) ; }
Source:
public void checkChanges ( java.lang.Iterable < com.google.gerrit.reviewdb.client.Change.Id > changeIds ) throws java.lang.Exception { checkActual ( readExpected ( changeIds ) , new java.util.ArrayList < java.lang.String > ( ) ) ; }

Target:
public void checkChanges ( com.google.gerrit.reviewdb.client.Change ... changeIds ) throws java.lang.Exception { checkActual ( readExpected ( java.util.Arrays.stream ( changeIds ) ) , new java.util.ArrayList < > ( ) ) ; }
Source:
public com.google.gerrit.client.diff.DiffApi ignoreWhitespace ( com.google.gerrit.client.diff.DiffApi.IgnoreWhitespace w ) { if ( ( w != null ) && ( w != ( com.google.gerrit.client.diff.DiffApi.IgnoreWhitespace.NONE ) ) ) { call.addParameter ( "ignore-whitespace" , w ) ; } return this ; }

Target:
public com.google.gerrit.client.diff.DiffApi ignoreWhitespace ( com.google.gerrit.extensions.client.DiffPreferencesInfo.Whitespace w ) { if ( ( w != null ) && ( w != ( com.google.gerrit.extensions.client.DiffPreferencesInfo.Whitespace.IGNORE_ALL ) ) ) { call.addParameter ( "whitespace" , w ) ; } return this ; }
Source:
public void onShowView ( ) { super . onShowView ( ) ; if ( ( cmA ) != null ) { cmA.refresh ( ) ; } if ( ( cmB ) != null ) { cmB.refresh ( ) ; } }

Target:
public void execute ( ) { for ( java.lang.Runnable r : resizeCallbacks ) { r.run ( ) ; } resizeCallbacks = null ; }
Source:
public void onClick ( final com.google.gwt.event.dom.client.ClickEvent event ) { doSave ( null ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { com.google.gwt.user.client.Window.open ( com.google.gerrit.client.Gerrit.getConfig ( ) . getEditFullNameUrl ( ) , "_blank" , null ) ; }
Source:
void apply ( com.google.gerrit.server.notedb.ChangeUpdate update ) throws com.google.gwtorm.server.OrmException { checkUpdate ( update ) ; update.setChangeMessage ( message.getMessage ( ) ) ; setHashtags ( update ) ; setTopic ( update ) ; }

Target:
void apply ( com.google.gerrit.server.notedb.ChangeUpdate update ) throws com.google.gwtorm.server.OrmException { checkUpdate ( update ) ; update.setChangeMessage ( message.getMessage ( ) ) ; setTopic ( update ) ; setStatus ( update ) ; }
Source:
void evictAllNoReindex ( ) ;

Target:
void evictAll ( ) ;
Source:
public void testEvictCacheThrowsException ( ) throws java.lang.Exception { setupMocks ( Constants.DEFAULT , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.EMPTY_JSON2 , false , true ) ; com.google.common.truth.Truth.assertThat ( restClient.evict ( com.ericsson.gerrit.plugins.evictcache.RestSessionTest.SOURCE_NAME , Constants.DEFAULT , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.EMPTY_JSON ) ) . isFalse ( ) ; }

Target:
public void testEvictCacheFailed ( ) throws java.lang.Exception { setupMocks ( Constants.DEFAULT , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.EMPTY_JSON2 , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.FAIL_RESPONSE , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.DO_NOT_THROW_EXCEPTION ) ; com.google.common.truth.Truth.assertThat ( restClient.evict ( com.ericsson.gerrit.plugins.evictcache.RestSessionTest.SOURCE_NAME , Constants.DEFAULT , com.ericsson.gerrit.plugins.evictcache.RestSessionTest.EMPTY_JSON ) ) . isFalse ( ) ; }
Source:
private java.util.List < com.google.gerrit.server.diff.PatchListEntry > getPatches ( org.eclipse.jgit.lib.ObjectId revisionIdA , org.eclipse.jgit.lib.ObjectId revisionIdB ) throws java.lang.Exception { return patchListCache.get ( getKey ( revisionIdA , revisionIdB ) , project ) . getPatches ( ) ; }

Target:
private java.util.List < com.google.gerrit.server.patch.PatchListEntry > getPatches ( org.eclipse.jgit.lib.ObjectId revisionIdA , org.eclipse.jgit.lib.ObjectId revisionIdB ) throws java.lang.Exception { return patchListCache.get ( getKey ( revisionIdA , revisionIdB ) , project ) . getPatches ( ) ; }
Source:
private static boolean isStateChange ( javax.servlet.http.HttpServletRequest req ) { java.lang.String method = req.getMethod ( ) ; return ! ( ( "GET" . equals ( method ) ) || ( "HEAD" . equals ( method ) ) ) ; }

Target:
private static boolean isGetOrHead ( javax.servlet.http.HttpServletRequest req ) { return ( "GET" . equals ( req.getMethod ( ) ) ) || ( "HEAD" . equals ( req.getMethod ( ) ) ) ; }
Source:
void setShowTabs ( boolean b ) { if ( b ) { diffTable.addStyleName ( DiffTable.style.showTabs ( ) ) ; } else { diffTable.removeStyleName ( DiffTable.style.showTabs ( ) ) ; } }

Target:
private void checkAndAddSkip ( java.util.List < com.google.gerrit.client.patches.SkippedLine > list , com.google.gerrit.client.patches.SkippedLine toAdd ) { if ( ( toAdd.getSize ( ) ) > 1 ) { list.add ( toAdd ) ; } }
Source:
public com.googlesource.gerrit.plugins.lfs.AuthInfo generateAuthInfo ( java.lang.String operation , org.eclipse.jgit.lfs.lib.AnyLongObjectId id , int expirationSeconds ) { com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.LfsFsAuthToken token = new com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.LfsFsAuthToken ( operation , id , expirationSeconds ) ; return new com.googlesource.gerrit.plugins.lfs.AuthInfo ( processor.serialize ( token ) , token.expiresAt ) ; }

Target:
public com.googlesource.gerrit.plugins.lfs.AuthInfo generateAuthInfo ( java.lang.String operation , org.eclipse.jgit.lfs.lib.AnyLongObjectId id , java.time.Instant now , java.lang.Long expiresIn ) { com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.LfsFsAuthToken token = new com.googlesource.gerrit.plugins.lfs.fs.LfsFsRequestAuthorizer.LfsFsAuthToken ( operation , id , now , expiresIn ) ; return new com.googlesource.gerrit.plugins.lfs.AuthInfo ( processor.serialize ( token ) , token.issued , token.expiresIn ) ; }
Source:
public void put ( K key , V value ) ;

Target:
public com.google.common.util.concurrent.ListenableFuture < java.lang.Void > putAsync ( K key , V value ) ;
Source:
public com.google.gerrit.server.account.AccountGroupCollection get ( final com.google.gerrit.reviewdb.AccountGroup.ExternalNameKey externalName ) { return byExternalName.get ( externalName ) ; }

Target:
public com.google.common.util.concurrent.ListenableFuture < com.google.gerrit.server.account.AccountGroupCollection > get ( com.google.gerrit.reviewdb.AccountGroup.ExternalNameKey externalName ) { return byExternalName.get ( externalName ) ; }
Source:
public void testCreateProjectWithNonExistingOwner_UnprocessableEntity ( ) throws java.io.IOException { com.google.gerrit.acceptance.rest.project.CreateProjectIT.ProjectInput in = new com.google.gerrit.acceptance.rest.project.CreateProjectIT.ProjectInput ( ) ; in.owners = java.util.Collections.singletonList ( "non-existing-group" ) ; com.google.gerrit.acceptance.RestResponse r = session.put ( "/projects/newProject" , in ) ; org.junit.Assert.assertEquals ( HttpStatus.SC_UNPROCESSABLE_ENTITY , r.getStatusCode ( ) ) ; }

Target:
public void testCreateProjectWithNonExistingOwner_UnprocessableEntity ( ) throws java.io.IOException { com.google.gerrit.server.project.CreateProject.Input in = new com.google.gerrit.server.project.CreateProject.Input ( ) ; in.owners = java.util.Collections.singletonList ( "non-existing-group" ) ; com.google.gerrit.acceptance.RestResponse r = session.put ( "/projects/newProject" , in ) ; org.junit.Assert.assertEquals ( HttpStatus.SC_UNPROCESSABLE_ENTITY , r.getStatusCode ( ) ) ; }
Source:
public boolean canRunReceivePack ( ) { return com.google.gerrit.common.CollectionsUtil.isAnyIncludedIn ( receiveGroups , getEffectiveUserGroups ( ) ) ; }

Target:
public boolean canRunReceivePack ( ) { for ( com.google.gerrit.reviewdb.AccountGroup.UUID group : receiveGroups ) { if ( match ( group ) ) { return true ; } } return false ; }
Source:
public java.lang.Iterable < com.google.gerrit.common.data.EditList.Hunk > getHunks ( ) { return new com.google.gerrit.common.data.EditList ( edits , getContext ( ) , a.size ( ) , b.size ( ) ) . getHunks ( ) ; }

Target:
private com.google.gerrit.prettify.common.EditList getEditList ( ) { return new com.google.gerrit.prettify.common.EditList ( edits , getContext ( ) , a.size ( ) , b.size ( ) ) ; }
Source:
public void start ( ) { graphiteReporter.start ( 1 , java.util.concurrent.TimeUnit.MINUTES ) ; }

Target:
public void start ( ) { graphiteReporter.start ( rate , com.googlesource.gerrit.plugins.metricsreporters.GerritGraphiteReporter.DEFAULT_RATE_UNIT ) ; }
Source:
private void initChannels ( ) { setChannelFactories ( java.util.Arrays.< org.apache.sshd.common.NamedFactory < org.apache.sshd.common.Channel > > asList ( new org.apache.sshd.server.channel.ChannelSession.Factory ( ) , new org.apache.sshd.common.forward.TcpipServerChannel.DirectTcpipFactory ( ) ) ) ; }

Target:
private void initSignatures ( ) { setSignatureFactories ( org.apache.sshd.common.BaseBuilder.setUpDefaultSignatures ( true ) ) ; }
Source:
private static org.eclipse.jgit.revwalk.RevCommit lookupCommit ( org.eclipse.jgit.lib.Repository repository , com.google.gerrit.reviewdb.client.PatchSet patchSet ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectId patchSetCommitId = com.google.gerrit.server.edit.ChangeEditModifier.getPatchSetCommitId ( patchSet ) ; try ( org.eclipse.jgit.revwalk.RevWalk revWalk = new org.eclipse.jgit.revwalk.RevWalk ( repository ) ) { return revWalk.parseCommit ( patchSetCommitId ) ; } }

Target:
private static org.eclipse.jgit.revwalk.RevCommit lookupCommit ( org.eclipse.jgit.lib.Repository repository , org.eclipse.jgit.lib.ObjectId commitId ) throws java.io.IOException { try ( org.eclipse.jgit.revwalk.RevWalk revWalk = new org.eclipse.jgit.revwalk.RevWalk ( repository ) ) { return revWalk.parseCommit ( commitId ) ; } }
Source:
public void assertNoChangeRef ( com.google.gerrit.reviewdb.client.Project.NameKey project , com.google.gerrit.reviewdb.client.Change.Id changeId ) throws java.lang.Exception { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openMetadataRepository ( project ) ) { com.google.common.truth.Truth.assertThat ( repo.exactRef ( com.google.gerrit.server.notedb.ChangeNoteUtil.changeRefName ( changeId ) ) ) . isNull ( ) ; } }

Target:
public void assertNoChangeRef ( com.google.gerrit.reviewdb.client.Project.NameKey project , com.google.gerrit.reviewdb.client.Change.Id changeId ) throws java.lang.Exception { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( project ) ) { com.google.common.truth.Truth.assertThat ( repo.exactRef ( com.google.gerrit.server.notedb.ChangeNoteUtil.changeRefName ( changeId ) ) ) . isNull ( ) ; } }
Source:
public void putApproval ( java.lang.String label , short value ) { approvals.put ( label , com.google.common.base.Optional.of ( value ) ) ; }

Target:
public void putApprovalFor ( com.google.gerrit.reviewdb.client.Account.Id reviewer , java.lang.String label , short value ) { approvals.put ( label , reviewer , com.google.common.base.Optional.of ( value ) ) ; }
Source:
public java.util.Set < com.google.gerrit.reviewdb.ApprovalCategory.Id > getApprovalCategories ( ) { return byCategory ( ) . keySet ( ) ; }

Target:
public com.google.gerrit.common.data.ApprovalType byLabel ( java.lang.String labelName ) { return byLabel ( ) . get ( labelName.toLowerCase ( ) ) ; }
Source:
public boolean canRemoveGroup ( com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid ) { return isOwner ( ) ; }

Target:
public boolean canAddGroup ( ) { return isOwner ( ) ; }
Source:
private void postRPC ( ) { if ( ( ( mySigned ) != null ) && ( ( available ) != null ) ) { display ( ) ; } }

Target:
private void postRPC ( ) { if ( ( ( mySigned ) != null ) && ( ( available ) != null ) ) { renderSelf ( ) ; display ( ) ; } }
Source:
void authenticationSuccess ( java.lang.String user , com.google.gerrit.server.CurrentUser id ) { username = user ; identity = id ; authError = null ; }

Target:
void authenticationSuccess ( java.lang.String user , com.google.gerrit.server.CurrentUser id ) { username = user ; identity = id ; identity.setAccessPath ( AccessPath.SSH_COMMAND ) ; authError = null ; }
Source:
java.util.Optional < java.util.Map < java.lang.String , com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.RateLimit > > getRatelimits ( com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.Type type ) { if ( ( rateLimits ) != null ) { return java.util.Optional.ofNullable ( rateLimits.row ( type ) ) ; } return java.util.Optional.empty ( ) ; }

Target:
com.google.common.base.Optional < java.util.Map < java.lang.String , com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.RateLimit > > getRatelimits ( com.googlesource.gerrit.plugins.quota.AccountLimitsConfig.Type type ) { if ( ( rateLimits ) != null ) { return com.google.common.base.Optional.fromNullable ( rateLimits.row ( type ) ) ; } return com.google.common.base.Optional.absent ( ) ; }