auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private com.google.gerrit.reviewdb.client.Change newChange ( int accountId ) { com.google.gerrit.reviewdb.client.Change.Id changeId = new com.google.gerrit.reviewdb.client.Change.Id ( 1 ) ; com.google.gerrit.reviewdb.client.Change c = new com.google.gerrit.reviewdb.client.Change ( new com.google.gerrit.reviewdb.client.Change.Key ( "Iabcd1234abcd1234abcd1234abcd1234abcd1234" ) , changeId , new com.google.gerrit.reviewdb.client.Account.Id ( accountId ) , new com.google.gerrit.reviewdb.client.Branch.NameKey ( project , "master" ) , com.google.gerrit.server.util.TimeUtil.nowTs ( ) ) ; com.google.gerrit.server.notedb.ChangeNotesTest.incrementPatchSet ( c ) ; return c ; }

Target:
private com.google.gerrit.reviewdb.client.Change newChange ( ) { com.google.gerrit.reviewdb.client.Change.Id changeId = new com.google.gerrit.reviewdb.client.Change.Id ( 1 ) ; com.google.gerrit.reviewdb.client.Change c = new com.google.gerrit.reviewdb.client.Change ( new com.google.gerrit.reviewdb.client.Change.Key ( "Iabcd1234abcd1234abcd1234abcd1234abcd1234" ) , changeId , com.google.gerrit.server.notedb.ChangeNotesTest.CHANGE_OWNER.getId ( ) , new com.google.gerrit.reviewdb.client.Branch.NameKey ( project , "master" ) , com.google.gerrit.server.util.TimeUtil.nowTs ( ) ) ; com.google.gerrit.server.notedb.ChangeNotesTest.incrementPatchSet ( c ) ; return c ; }
Source:
private void assertHead ( java.lang.String projectName , java.lang.String expectedRef ) throws java.io.IOException , org.eclipse.jgit.errors.RepositoryNotFoundException { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( new com.google.gerrit.reviewdb.client.Project.NameKey ( projectName ) ) ) { com.google.common.truth.Truth.assertThat ( repo.getRef ( Constants.HEAD ) . getTarget ( ) . getName ( ) ) . isEqualTo ( expectedRef ) ; } }

Target:
private void assertHead ( java.lang.String projectName , java.lang.String expectedRef ) throws java.io.IOException , org.eclipse.jgit.errors.RepositoryNotFoundException { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( new com.google.gerrit.reviewdb.client.Project.NameKey ( projectName ) ) ) { com.google.common.truth.Truth.assertThat ( repo.exactRef ( Constants.HEAD ) . getTarget ( ) . getName ( ) ) . isEqualTo ( expectedRef ) ; } }
Source:
public void onFailure ( java.lang.Throwable caught ) { }

Target:
void onSave ( @ java.lang.SuppressWarnings ( value = "unused" ) com.google.gwt.event.dom.client.ClickEvent e ) { com.google.gerrit.client.changes.ChangeFileApi.putContent ( id , file.getText ( ) , content.getText ( ) , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.VoidResult > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.VoidResult result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChangeInEditMode ( id.getParentKey ( ) ) ) ; hide ( ) ; } } ) ; }
Source:
public void onClick ( final com.google.gwt.user.client.ui.Widget sender ) { if ( ( send ) == sender ) { com.google.gerrit.client.changes.PublishCommentScreen.lastState = null ; onSend ( ) ; } else if ( ( cancel ) == sender ) { com.google.gerrit.client.changes.PublishCommentScreen.lastState = null ; saveStateOnUnload = false ; goChange ( ) ; } }

Target:
public void onClick ( final com.google.gwt.event.dom.client.ClickEvent event ) { final com.google.gwt.user.client.ui.Widget sender = ( ( com.google.gwt.user.client.ui.Widget ) ( event.getSource ( ) ) ) ; if ( ( send ) == sender ) { com.google.gerrit.client.changes.PublishCommentScreen.lastState = null ; onSend ( ) ; } else if ( ( cancel ) == sender ) { com.google.gerrit.client.changes.PublishCommentScreen.lastState = null ; saveStateOnUnload = false ; goChange ( ) ; } }
Source:
private java.lang.Runnable adjustGutters ( final net.codemirror.lib.CodeMirror cm ) { return new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { net.codemirror.lib.CodeMirror.FromTo fromTo = cm.getViewport ( ) ; int size = ( ( fromTo.getTo ( ) ) - ( fromTo.getFrom ( ) ) ) + 1 ; if ( ( cm.getOldViewportSize ( ) ) == size ) { return ; } cm.setOldViewportSize ( size ) ; diffTable.sidePanel.adjustGutters ( cmB ) ; } } ; }

Target:
private void resizeBoxPaddings ( ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { for ( com.google.gerrit.client.diff.CommentBox box : allBoxes ) { box.resizePaddingWidget ( ) ; } } } ) ; }
Source:
public static com.google.gerrit.extensions.client.EditPreferencesInfo defaults ( ) { com.google.gerrit.extensions.client.EditPreferencesInfo i = new com.google.gerrit.extensions.client.EditPreferencesInfo ( ) ; i.tabSize = 8 ; i.lineLength = 100 ; i.cursorBlinkRate = 0 ; i.hideTopMenu = false ; i.showTabs = true ; i.showWhitespaceErrors = false ; i.syntaxHighlighting = true ; i.hideLineNumbers = false ; i.matchBrackets = true ; i.autoCloseBrackets = false ; i.theme = Theme.DEFAULT ; i.keyMapType = KeyMapType.DEFAULT ; return i ; }

Target:
public static com.google.gerrit.extensions.client.EditPreferencesInfo defaults ( ) { com.google.gerrit.extensions.client.EditPreferencesInfo i = new com.google.gerrit.extensions.client.EditPreferencesInfo ( ) ; i.tabSize = 8 ; i.lineLength = 100 ; i.indentUnit = 2 ; i.cursorBlinkRate = 0 ; i.hideTopMenu = false ; i.showTabs = true ; i.showWhitespaceErrors = false ; i.syntaxHighlighting = true ; i.hideLineNumbers = false ; i.matchBrackets = true ; i.autoCloseBrackets = false ; i.showBase = false ; i.theme = Theme.DEFAULT ; i.keyMapType = KeyMapType.DEFAULT ; return i ; }
Source:
protected void bccStarredBy ( ) { if ( ! ( NotifyHandling.ALL.equals ( notify ) ) ) { return ; } try { for ( com.google.gerrit.reviewdb.client.Account.Id accountId : args.starredChangesUtil.byChangeFromIndex ( change.getId ( ) ) ) { super . add ( RecipientType.BCC , accountId ) ; } } catch ( com.google.gwtorm.server.OrmException | com.google.gerrit.server.project.NoSuchChangeException err ) { com.google.gerrit.server.mail.ChangeEmail.log.warn ( "Cannot BCC users that starred updated change" , err ) ; } }

Target:
protected void bccStarredBy ( ) { if ( ! ( NotifyHandling.ALL.equals ( notify ) ) ) { return ; } try { for ( com.google.gerrit.reviewdb.client.Account.Id accountId : args.starredChangesUtil.byChangeFromIndex ( change.getId ( ) , StarredChangesUtil.DEFAULT_LABEL ) ) { super . add ( RecipientType.BCC , accountId ) ; } } catch ( com.google.gwtorm.server.OrmException | com.google.gerrit.server.project.NoSuchChangeException err ) { com.google.gerrit.server.mail.ChangeEmail.log.warn ( "Cannot BCC users that starred updated change" , err ) ; } }
Source:
private boolean updateMergeable ( com.google.gerrit.reviewdb.client.Project.NameKey project ) { if ( ( mergeabilityChecker ) != null ) { try { mergeabilityChecker.update ( project ) ; } catch ( java.io.IOException e ) { com.google.gerrit.server.index.ChangeBatchIndexer.log.error ( "Error in mergeability checker" , e ) ; return false ; } } return true ; }

Target:
private boolean updateMergeable ( com.google.gerrit.reviewdb.client.Project.NameKey project ) { if ( ( mergeabilityChecker ) != null ) { try { mergeabilityChecker.newCheck ( ) . addProject ( project ) . run ( ) ; } catch ( java.io.IOException e ) { com.google.gerrit.server.index.ChangeBatchIndexer.log.error ( "Error in mergeability checker" , e ) ; return false ; } } return true ; }
Source:
private void lookupPriorReviewers ( ) { if ( ( db ) != null ) { try { for ( com.google.gerrit.client.reviewdb.ChangeApproval ap : db.changeApprovals ( ) . byChange ( change.getId ( ) ) ) { if ( ( ap.getValue ( ) ) != 0 ) { reviewers.add ( ap.getAccountId ( ) ) ; } else { extraCC.add ( ap.getAccountId ( ) ) ; } } } catch ( com.google.gwtorm.client.OrmException err ) { } } }

Target:
protected void init ( ) throws javax.mail.MessagingException { super . init ( ) ; if ( ( fromId ) != null ) { reviewers.remove ( fromId ) ; } add ( RecipientType.TO , reviewers ) ; add ( RecipientType.CC , extraCC ) ; rcptToAuthors ( RecipientType.CC ) ; }
Source:
public void byId ( ) throws java.lang.Exception { org.eclipse.jgit.junit.TestRepository < com.google.gerrit.testutil.InMemoryRepositoryManager.Repo > repo = createProject ( "repo" ) ; com.google.gerrit.reviewdb.client.Change change1 = insert ( newChange ( repo ) ) ; com.google.gerrit.reviewdb.client.Change change2 = insert ( newChange ( repo ) ) ; assertQuery ( "12345" ) ; assertQuery ( change1.getId ( ) . get ( ) , change1 ) ; assertQuery ( change2.getId ( ) . get ( ) , change2 ) ; }

Target:
public void byOwner ( ) throws java.lang.Exception { org.eclipse.jgit.junit.TestRepository < com.google.gerrit.testutil.InMemoryRepositoryManager.Repo > repo = createProject ( "repo" ) ; com.google.gerrit.reviewdb.client.Change change1 = insert ( repo , newChange ( repo ) , userId ) ; com.google.gerrit.reviewdb.client.Account.Id user2 = accountManager.authenticate ( com.google.gerrit.server.account.AuthRequest.forUser ( "anotheruser" ) ) . getAccountId ( ) ; com.google.gerrit.reviewdb.client.Change change2 = insert ( repo , newChange ( repo ) , user2 ) ; assertQuery ( ( "owner:" + ( userId.get ( ) ) ) , change1 ) ; assertQuery ( ( "owner:" + user2 ) , change2 ) ; }
Source:
private com.googlecode.prolog_cafe.lang.PrologMachineCopy consultRules ( java.lang.String name , java.io.Reader rules ) { com.googlecode.prolog_cafe.lang.BufferingPrologControl ctl = newEmptyMachine ( systemLoader ) ; java.io.PushbackReader in = new java.io.PushbackReader ( rules , com.googlecode.prolog_cafe.lang.Prolog.PUSHBACK_SIZE ) ; if ( ! ( ctl.execute ( Prolog.BUILTIN , "consult_stream" , com.googlecode.prolog_cafe.lang.SymbolTerm.intern ( name ) , new com.googlecode.prolog_cafe.lang.JavaObjectTerm ( in ) ) ) ) { return null ; } return com.googlecode.prolog_cafe.lang.PrologMachineCopy.save ( ctl ) ; }

Target:
private com.googlecode.prolog_cafe.lang.PrologMachineCopy consultRules ( java.lang.String name , java.io.Reader rules ) throws com.googlecode.prolog_cafe.compiler.CompileException { com.googlecode.prolog_cafe.lang.BufferingPrologControl ctl = newEmptyMachine ( systemLoader ) ; java.io.PushbackReader in = new java.io.PushbackReader ( rules , com.googlecode.prolog_cafe.lang.Prolog.PUSHBACK_SIZE ) ; try { if ( ! ( ctl.execute ( Prolog.BUILTIN , "consult_stream" , com.googlecode.prolog_cafe.lang.SymbolTerm.intern ( name ) , new com.googlecode.prolog_cafe.lang.JavaObjectTerm ( in ) ) ) ) { return null ; } } catch ( java.lang.RuntimeException e ) { throw new com.googlecode.prolog_cafe.compiler.CompileException ( ( "Error while consulting rules from " + name ) , e ) ; } return com.googlecode.prolog_cafe.lang.PrologMachineCopy.save ( ctl ) ; }
Source:
private static java.lang.String imgSrc ( java.lang.String val ) { if ( ( ( val.startsWith ( "http:" ) ) || ( val.startsWith ( "https:" ) ) ) && ( com.google.gitiles.doc.html.HtmlBuilder.URI.getValueFilter ( ) . matcher ( val ) . find ( ) ) ) { return com.google.gitiles.doc.html.HtmlBuilder.URI.escape ( val ) ; } if ( com.google.gitiles.doc.html.HtmlBuilder.isImageDataUri ( val ) ) { return val ; } return com.google.gitiles.doc.html.HtmlBuilder.IMAGE_DATA.getInnocuousOutput ( ) ; }

Target:
private static java.lang.String imgSrc ( java.lang.String val ) { if ( com.google.gitiles.doc.html.HtmlBuilder.isValidHttpUri ( val ) ) { return com.google.gitiles.doc.html.HtmlBuilder.URI.escape ( val ) ; } if ( com.google.gitiles.doc.html.HtmlBuilder.isImageDataUri ( val ) ) { return val ; } return com.google.gitiles.doc.html.HtmlBuilder.IMAGE_DATA.getInnocuousOutput ( ) ; }
Source:
private static java.util.Set < java.lang.String > scanSectionNames ( com.google.gerrit.server.git.ProjectConfig config ) { java.util.Set < java.lang.String > names = new java.util.HashSet < > ( ) ; for ( com.google.gerrit.common.data.AccessSection section : config.getAccessSections ( ) ) { names.add ( section.getName ( ) ) ; } return names ; }

Target:
private static java.util.Set < java.lang.String > scanSectionNames ( com.google.gerrit.server.project.ProjectConfig config ) { java.util.Set < java.lang.String > names = new java.util.HashSet < > ( ) ; for ( com.google.gerrit.common.data.AccessSection section : config.getAccessSections ( ) ) { names.add ( section.getName ( ) ) ; } return names ; }
Source:
public void run ( ) { try { running = true ; task.run ( ) ; } finally { running = false ; } }

Target:
public boolean cancel ( boolean mayInterruptIfRunning ) { if ( task.cancel ( mayInterruptIfRunning ) ) { if ( ( ( runnable ) instanceof com.google.gerrit.server.git.WorkQueue.CancelableRunnable ) && ( running.compareAndSet ( false , true ) ) ) { ( ( com.google.gerrit.server.git.WorkQueue.CancelableRunnable ) ( runnable ) ) . cancel ( ) ; } executor.remove ( this ) ; executor.purge ( ) ; return true ; } else { return false ; } }
Source:
protected void loadDefaults ( ) { approvals = com.google.common.collect.ImmutableListMultimap.of ( ) ; reviewers = com.google.common.collect.ImmutableSetMultimap.of ( ) ; submitRecords = com.google.common.collect.ImmutableList.of ( ) ; changeMessages = com.google.common.collect.ImmutableListMultimap.of ( ) ; commentsForBase = com.google.common.collect.ImmutableListMultimap.of ( ) ; commentsForPS = com.google.common.collect.ImmutableListMultimap.of ( ) ; }

Target:
protected void loadDefaults ( ) { approvals = com.google.common.collect.ImmutableListMultimap.of ( ) ; reviewers = com.google.common.collect.ImmutableSetMultimap.of ( ) ; submitRecords = com.google.common.collect.ImmutableList.of ( ) ; changeMessages = com.google.common.collect.ImmutableListMultimap.of ( ) ; commentsForBase = com.google.common.collect.ImmutableListMultimap.of ( ) ; commentsForPS = com.google.common.collect.ImmutableListMultimap.of ( ) ; hashtags = com.google.common.collect.ImmutableSet.of ( ) ; }
Source:
protected void row ( final com.google.gwt.user.client.ui.Grid info , final int row , final java.lang.String name , final com.google.gwt.user.client.ui.Widget field ) { info.setText ( row , labelIdx , name ) ; info.setWidget ( row , fieldIdx , field ) ; info.getCellFormatter ( ) . addStyleName ( row , 0 , "header" ) ; }

Target:
protected void row ( final com.google.gwt.user.client.ui.Grid info , final int row , final java.lang.String name , final com.google.gwt.user.client.ui.Widget field ) { info.setText ( row , labelIdx , name ) ; info.setWidget ( row , fieldIdx , field ) ; info.getCellFormatter ( ) . addStyleName ( row , 0 , Gerrit.RESOURCES.css ( ) . header ( ) ) ; }
Source:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerializer.write ( out , oldId ) ; out.writeInt ( ( ( parentNum ) == null ? 0 : parentNum ) ) ; org.eclipse.jgit.lib.ObjectIdSerializer.write ( out , newId ) ; java.lang.Character c = com.google.gerrit.server.patch.PatchListKey.WHITESPACE_TYPES.get ( whitespace ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid whitespace type: " + ( whitespace ) ) ) ; } out.writeChar ( c ) ; out.writeChar ( com.google.gerrit.server.patch.PatchListKey.ALGORITHM_TYPES.get ( algorithm ) ) ; }

Target:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerialization.writeCanBeNull ( out , oldId ) ; out.writeInt ( ( ( parentNum ) == null ? 0 : parentNum ) ) ; org.eclipse.jgit.lib.ObjectIdSerialization.writeNotNull ( out , newId ) ; java.lang.Character c = com.google.gerrit.server.patch.PatchListKey.WHITESPACE_TYPES.get ( whitespace ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid whitespace type: " + ( whitespace ) ) ) ; } out.writeChar ( c ) ; out.writeChar ( com.google.gerrit.server.patch.PatchListKey.ALGORITHM_TYPES.get ( algorithm ) ) ; }
Source:
public void onMouseOver ( com.google.gwt.event.dom.client.MouseOverEvent event ) { if ( ! ( popup.isVisible ( ) ) ) { com.google.gwt.user.client.ui.Image img = new com.google.gwt.user.client.ui.Image ( url ) ; img.setStyleName ( "imagare-image-popup" ) ; popup.add ( img ) ; popup.center ( ) ; popup.setVisible ( true ) ; } }

Target:
public void onMouseOver ( com.google.gwt.event.dom.client.MouseOverEvent event ) { if ( ! ( popup.isVisible ( ) ) ) { com.google.gwt.user.client.ui.Image previewImg = new com.google.gwt.user.client.ui.Image ( url ) ; previewImg.setStyleName ( "imagare-image-popup" ) ; popup.add ( previewImg ) ; popup.center ( ) ; popup.setVisible ( true ) ; } }
Source:
void adjustPadding ( ) { if ( ( paddingDivs ) != null ) { double h = host.getLineHeightPx ( ) ; for ( com.google.gwt.dom.client.Element div : paddingDivs ) { int lines = div.getPropertyInt ( com.google.gerrit.client.diff.ChunkManager.DATA_LINES ) ; div.getStyle ( ) . setHeight ( ( lines * h ) , Unit.PX ) ; } for ( net.codemirror.lib.LineWidget w : padding ) { w.changed ( ) ; } paddingDivs = null ; com.google.gerrit.client.diff.ChunkManager.guessedLineHeightPx = h ; } }

Target:
void adjustPadding ( ) { if ( ( paddingDivs ) != null ) { double h = cmB.extras ( ) . lineHeightPx ( ) ; for ( com.google.gwt.dom.client.Element div : paddingDivs ) { int lines = div.getPropertyInt ( com.google.gerrit.client.diff.ChunkManager.DATA_LINES ) ; div.getStyle ( ) . setHeight ( ( lines * h ) , Unit.PX ) ; } for ( net.codemirror.lib.LineWidget w : padding ) { w.changed ( ) ; } paddingDivs = null ; com.google.gerrit.client.diff.ChunkManager.guessedLineHeightPx = h ; } }
Source:
public AccountGroup.Id call ( ) throws com.google.gerrit.common.errors.NameAlreadyUsedException , com.google.gwtorm.client.OrmException { final com.google.gerrit.server.account.PerformCreateGroup performCreateGroup = performCreateGroupFactory.create ( ) ; final com.google.gerrit.reviewdb.Account.Id me = user.getAccountId ( ) ; return performCreateGroup.createGroup ( groupName , null , false , null , java.util.Collections.singleton ( me ) , null ) ; }

Target:
public AccountGroup.Id call ( ) throws com.google.gerrit.common.errors.NameAlreadyUsedException , com.google.gerrit.common.errors.PermissionDeniedException , com.google.gwtorm.client.OrmException { if ( ! ( user.getCapabilities ( ) . canCreateGroup ( ) ) ) { throw new com.google.gerrit.common.errors.PermissionDeniedException ( java.lang.String.format ( "%s does not have \"Create Group\" capability." , user.getUserName ( ) ) ) ; } final com.google.gerrit.server.account.PerformCreateGroup performCreateGroup = performCreateGroupFactory.create ( ) ; final com.google.gerrit.reviewdb.Account.Id me = user.getAccountId ( ) ; return performCreateGroup.createGroup ( groupName , null , false , null , java.util.Collections.singleton ( me ) , null ) ; }
Source:
private com.google.gerrit.extensions.common.EditInfo toEditInfo ( boolean files ) throws java.lang.Exception { com.google.gerrit.acceptance.RestResponse r = adminSession.get ( ( files ? urlGetFiles ( ) : urlEdit ( ) ) ) ; r.assertOK ( ) ; return newGson ( ) . fromJson ( r.getReader ( ) , com.google.gerrit.extensions.common.EditInfo.class ) ; }

Target:
private < T > T readContentFromJson ( com.google.gerrit.acceptance.RestResponse r , com.google.gson.reflect.TypeToken < T > typeToken ) throws java.lang.Exception { r.assertOK ( ) ; com.google.gson.stream.JsonReader jsonReader = new com.google.gson.stream.JsonReader ( r.getReader ( ) ) ; jsonReader.setLenient ( true ) ; return newGson ( ) . fromJson ( jsonReader , typeToken.getType ( ) ) ; }
Source:
public static java.lang.String wikify ( java.lang.String in ) { in = com.google.gerrit.client.ui.DomUtil.INSTANCE.escape ( in ) ; in = com.google.gerrit.client.ui.DomUtil.INSTANCE.linkify ( in ) ; in = com.google.gerrit.client.ui.DomUtil.INSTANCE.wikify ( in ) ; return in ; }

Target:
public static java.lang.String wikify ( java.lang.String in ) { in = com.google.gerrit.client.ui.DomUtil.escape ( in ) ; in = com.google.gerrit.client.ui.DomUtil.linkify ( in ) ; in = in.replaceAll ( "(^|\n)([ \t][^\n]*)" , "$1<span class=\"gerrit-preformat\">$2</span><br />" ) ; in = in.replaceAll ( "\n\n" , "<p>\n" ) ; return in ; }
Source:
private void initTopicLink ( com.google.gerrit.client.changes.ChangeInfo info ) { if ( ( ( info.topic ( ) ) != null ) && ( ! ( info.topic ( ) . isEmpty ( ) ) ) ) { text.setText ( info.topic ( ) ) ; text.setTargetHistoryToken ( com.google.gerrit.common.PageLinks.toChangeQuery ( com.google.gerrit.common.PageLinks.op ( "topic" , info.topic ( ) ) ) ) ; } }

Target:
private void initTopicLink ( com.google.gerrit.client.info.ChangeInfo info ) { if ( ( ( info.topic ( ) ) != null ) && ( ! ( info.topic ( ) . isEmpty ( ) ) ) ) { text.setText ( info.topic ( ) ) ; text.setTargetHistoryToken ( com.google.gerrit.common.PageLinks.toChangeQuery ( com.google.gerrit.common.PageLinks.op ( "topic" , info.topic ( ) ) ) ) ; } }
Source:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.google.gerrit.server.account.AccountResource.ACCOUNT_KIND ) ; com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.google.gerrit.server.account.AccountResource.CAPABILITY_KIND ) ; child ( com.google.gerrit.server.account.AccountResource.ACCOUNT_KIND , "capabilities" ) . to ( com.google.gerrit.server.account.Capabilities.class ) ; get ( com.google.gerrit.server.account.AccountResource.CAPABILITY_KIND ) . to ( GetCapabilities.CheckOne.class ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.server.account.AccountsCollection.class ) ; bind ( com.google.gerrit.server.account.Capabilities.class ) ; com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.google.gerrit.server.account.AccountResource.ACCOUNT_KIND ) ; com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.google.gerrit.server.account.AccountResource.CAPABILITY_KIND ) ; child ( com.google.gerrit.server.account.AccountResource.ACCOUNT_KIND , "capabilities" ) . to ( com.google.gerrit.server.account.Capabilities.class ) ; get ( com.google.gerrit.server.account.AccountResource.CAPABILITY_KIND ) . to ( GetCapabilities.CheckOne.class ) ; }
Source:
public void rejectWhenFeatureIsDisabled ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.enabled ( ) ) . isTrue ( ) ; com.google.gerrit.server.git.ProjectConfig cfg = projectCache.checkedGet ( project ) . getConfig ( ) ; cfg.setEnableReviewerByEmail ( false ) ; saveProjectConfig ( project , cfg ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; exception.expect ( com.google.gerrit.extensions.restapi.UnprocessableEntityException.class ) ; exception.expectMessage ( ( "Foo Bar <foo.bar@gerritcodereview.com> " + "does not identify a registered user or group" ) ) ; gApi.changes ( ) . id ( r.getChangeId ( ) ) . addReviewer ( "Foo Bar <foo.bar@gerritcodereview.com>" ) ; }

Target:
public void rejectWhenFeatureIsDisabled ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.server.git.ProjectConfig cfg = projectCache.checkedGet ( project ) . getConfig ( ) ; cfg.setEnableReviewerByEmail ( false ) ; saveProjectConfig ( project , cfg ) ; com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; exception.expect ( com.google.gerrit.extensions.restapi.UnprocessableEntityException.class ) ; exception.expectMessage ( "Foo Bar <foo.bar@gerritcodereview.com> does not identify a registered user or group" ) ; gApi.changes ( ) . id ( r.getChangeId ( ) ) . addReviewer ( "Foo Bar <foo.bar@gerritcodereview.com>" ) ; }
Source:
public void testUSER_NoPreferredEmailUser ( ) { setFrom ( "USER" ) ; final java.lang.String name = "A U. Thor" ; final com.google.gerrit.reviewdb.client.Account.Id user = user ( name , null ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( user ) ; org.junit.Assert.assertNotNull ( r ) ; org.junit.Assert.assertEquals ( name , r.name ) ; org.junit.Assert.assertEquals ( ident.getEmailAddress ( ) , r.email ) ; org.easymock.EasyMock.verify ( accountCache ) ; }

Target:
public void testUSER_NoPreferredEmailUser ( ) { setFrom ( "USER" ) ; final java.lang.String name = "A U. Thor" ; final com.google.gerrit.reviewdb.client.Account.Id user = user ( name , null ) ; org.easymock.EasyMock.replay ( accountCache ) ; final com.google.gerrit.server.mail.Address r = create ( ) . from ( user ) ; com.google.common.truth.Truth.assertThat ( r ) . isNotNull ( ) ; com.google.common.truth.Truth.assertThat ( r.name ) . isEqualTo ( name ) ; com.google.common.truth.Truth.assertThat ( r.email ) . isEqualTo ( ident.getEmailAddress ( ) ) ; org.easymock.EasyMock.verify ( accountCache ) ; }
Source:
protected void configure ( ) { com.google.gerrit.sshd.CommandName gerrit = com.google.gerrit.sshd.Commands.named ( "gerrit" ) ; com.google.gerrit.sshd.CommandName index = com.google.gerrit.sshd.Commands.named ( gerrit , "index" ) ; command ( index ) . toProvider ( new com.google.gerrit.sshd.DispatchCommandProvider ( index ) ) ; command ( index , com.google.gerrit.sshd.commands.IndexActivateCommand.class ) ; command ( index , com.google.gerrit.sshd.commands.IndexStartCommand.class ) ; }

Target:
protected void configure ( ) { com.google.gerrit.sshd.CommandName gerrit = com.google.gerrit.sshd.Commands.named ( "gerrit" ) ; com.google.gerrit.sshd.CommandName index = com.google.gerrit.sshd.Commands.named ( gerrit , "index" ) ; command ( index ) . toProvider ( new com.google.gerrit.sshd.DispatchCommandProvider ( index ) ) ; command ( index , com.google.gerrit.sshd.commands.IndexActivateCommand.class ) ; command ( index , com.google.gerrit.sshd.commands.IndexStartCommand.class ) ; command ( index , com.google.gerrit.sshd.commands.IndexChangesCommand.class ) ; }
Source:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerialization.writeCanBeNull ( out , oldId ) ; out.writeInt ( ( ( parentNum ) == null ? 0 : parentNum ) ) ; org.eclipse.jgit.lib.ObjectIdSerialization.writeNotNull ( out , newId ) ; java.lang.Character c = com.google.gerrit.server.patch.PatchListKey.WHITESPACE_TYPES.get ( whitespace ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid whitespace type: " + ( whitespace ) ) ) ; } out.writeChar ( c ) ; out.writeChar ( com.google.gerrit.server.patch.PatchListKey.ALGORITHM_TYPES.get ( algorithm ) ) ; }

Target:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerializer.write ( out , oldId ) ; out.writeInt ( ( ( parentNum ) == null ? 0 : parentNum ) ) ; org.eclipse.jgit.lib.ObjectIdSerializer.write ( out , newId ) ; java.lang.Character c = com.google.gerrit.server.patch.PatchListKey.WHITESPACE_TYPES.get ( whitespace ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid whitespace type: " + ( whitespace ) ) ) ; } out.writeChar ( c ) ; out.writeChar ( com.google.gerrit.server.patch.PatchListKey.ALGORITHM_TYPES.get ( algorithm ) ) ; }
Source:
void setEnabled ( final boolean enabled ) { this . enabled = enabled ; for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; row ++ ) { final com.google.gerrit.reviewdb.client.AccountGroupIncludeByUuid k = getRowItem ( row ) ; if ( k != null ) { ( ( com.google.gwt.user.client.ui.CheckBox ) ( table.getWidget ( row , 1 ) ) ) . setEnabled ( enabled ) ; } } }

Target:
void setEnabled ( final boolean enabled ) { this . enabled = enabled ; for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; row ++ ) { final com.google.gerrit.client.groups.GroupInfo i = getRowItem ( row ) ; if ( i != null ) { ( ( com.google.gwt.user.client.ui.CheckBox ) ( table.getWidget ( row , 1 ) ) ) . setEnabled ( enabled ) ; } } }
Source:
protected void configure ( ) { final com.google.inject.TypeLiteral < com.google.gerrit.server.cache.Cache < java.lang.String , java.util.List > > type = new com.google.inject.TypeLiteral < com.google.gerrit.server.cache.Cache < java.lang.String , java.util.List > > ( ) { } ; core ( type , "openid" ) . maxAge ( 5 , java.util.concurrent.TimeUnit.MINUTES ) . memoryLimit ( 64 ) ; }

Target:
protected void configureServlets ( ) { serve ( ( "/" + ( OpenIdServiceImpl.RETURN_URL ) ) ) . with ( com.google.gerrit.httpd.auth.openid.OpenIdLoginServlet.class ) ; serve ( ( "/" + ( XrdsServlet.LOCATION ) ) ) . with ( com.google.gerrit.httpd.auth.openid.XrdsServlet.class ) ; filter ( "/" ) . through ( com.google.gerrit.httpd.auth.openid.XrdsFilter.class ) ; install ( new com.google.gerrit.httpd.rpc.RpcServletModule ( com.google.gerrit.httpd.rpc.RpcServletModule.PREFIX ) { @ java.lang.Override protected void configureServlets ( ) { rpc ( com.google.gerrit.httpd.auth.openid.OpenIdServiceImpl.class ) ; } } ) ; }
Source:
private static void deleteLocally ( org.eclipse.jgit.transport.URIish uri ) { try { com.googlesource.gerrit.plugins.replication.ReplicationQueue.recursivelyDelete ( new java.io.File ( uri.getPath ( ) ) ) ; } catch ( java.io.IOException e ) { com.googlesource.gerrit.plugins.replication.ReplicationQueue.log.error ( java.lang.String.format ( "Error deleting local repository %s:\n" , uri.getPath ( ) ) , e ) ; } }

Target:
private static void deleteLocally ( org.eclipse.jgit.transport.URIish uri ) { try { com.googlesource.gerrit.plugins.replication.ReplicationQueue.recursivelyDelete ( new java.io.File ( uri.getPath ( ) ) ) ; } catch ( java.io.IOException e ) { com.googlesource.gerrit.plugins.replication.ReplicationQueue.repLog.error ( java.lang.String.format ( "Error deleting local repository %s:\n" , uri.getPath ( ) ) , e ) ; } }
Source:
public com.google.gerrit.server.group.GroupJson.GroupInfo apply ( com.google.gerrit.server.group.GroupResource resource , com.google.gerrit.server.group.AddIncludedGroups.PutIncludedGroup.Input input ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.MethodNotAllowedException , com.google.gerrit.extensions.restapi.UnprocessableEntityException , com.google.gwtorm.server.OrmException { com.google.gerrit.server.group.AddIncludedGroups.Input in = new com.google.gerrit.server.group.AddIncludedGroups.Input ( ) ; in.groups = com.google.common.collect.ImmutableList.of ( id ) ; java.util.List < com.google.gerrit.server.group.GroupJson.GroupInfo > list = put.apply ( resource , in ) ; if ( ( list.size ( ) ) == 1 ) { return list.get ( 0 ) ; } throw new java.lang.IllegalStateException ( ) ; }

Target:
public com.google.gerrit.extensions.common.GroupInfo apply ( com.google.gerrit.server.group.GroupResource resource , com.google.gerrit.server.group.AddIncludedGroups.PutIncludedGroup.Input input ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.MethodNotAllowedException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException { com.google.gerrit.server.group.AddIncludedGroups.Input in = new com.google.gerrit.server.group.AddIncludedGroups.Input ( ) ; in.groups = com.google.common.collect.ImmutableList.of ( id ) ; try { java.util.List < com.google.gerrit.extensions.common.GroupInfo > list = put.apply ( resource , in ) ; if ( ( list.size ( ) ) == 1 ) { return list.get ( 0 ) ; } throw new java.lang.IllegalStateException ( ) ; } catch ( com.google.gerrit.extensions.restapi.UnprocessableEntityException e ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; } }
Source:
private void display ( final com.google.gerrit.client.admin.AccountGroupDetail result ) { setTitleText ( Util.M.group ( result.group.getName ( ) ) ) ; descTxt.setText ( result.group.getDescription ( ) ) ; accounts = result.accounts ; members.display ( result.members ) ; members.finishDisplay ( true ) ; }

Target:
private void display ( final com.google.gerrit.client.admin.AccountGroupDetail result ) { setTitleText ( Util.M.group ( result.group.getName ( ) ) ) ; groupNameTxt.setText ( result.group.getName ( ) ) ; descTxt.setText ( result.group.getDescription ( ) ) ; accounts = result.accounts ; members.display ( result.members ) ; members.finishDisplay ( true ) ; }
Source:
protected void doPost ( final javax.servlet.http.HttpServletRequest req , final javax.servlet.http.HttpServletResponse resp ) throws java.io.IOException { try { final com.google.gwtjsonrpc.server.ActiveCall c = createActiveCall ( req , resp ) ; com.google.gwtjsonrpc.server.JsonServlet.perThreadCall.set ( c ) ; doService ( c ) ; } finally { com.google.gwtjsonrpc.server.JsonServlet.perThreadCall.set ( null ) ; } }

Target:
protected void service ( final javax.servlet.http.HttpServletRequest req , final javax.servlet.http.HttpServletResponse resp ) throws java.io.IOException { try { final com.google.gwtjsonrpc.server.ActiveCall c = createActiveCall ( req , resp ) ; com.google.gwtjsonrpc.server.JsonServlet.perThreadCall.set ( c ) ; doService ( c ) ; } finally { com.google.gwtjsonrpc.server.JsonServlet.perThreadCall.set ( null ) ; } }
Source:
private void deleteOrUpdateDraftChange ( com.google.gerrit.server.git.BatchUpdate.ChangeContext ctx ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Change c = ctx.getChange ( ) ; if ( com.google.common.collect.Iterables.isEmpty ( psUtil.byChange ( ctx.getDb ( ) , ctx.getNotes ( ) ) ) ) { deleteChangeOp = deleteChangeOpProvider.get ( ) ; deleteChangeOp.updateChange ( ctx ) ; return ; } if ( c.currentPatchSetId ( ) . equals ( psId ) ) { c.setCurrentPatchSet ( previousPatchSetInfo ( ctx ) ) ; } ctx.saveChange ( ) ; }

Target:
private void deleteOrUpdateDraftChange ( com.google.gerrit.server.git.BatchUpdate.ChangeContext ctx ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Change c = ctx.getChange ( ) ; if ( deletedOnlyPatchSet ( ) ) { deleteChangeOp = deleteChangeOpProvider.get ( ) ; deleteChangeOp.updateChange ( ctx ) ; return ; } if ( c.currentPatchSetId ( ) . equals ( psId ) ) { c.setCurrentPatchSet ( previousPatchSetInfo ( ctx ) ) ; } ctx.saveChange ( ) ; }
Source:
protected void onLoad ( ) { super . onLoad ( ) ; Util.PROJECT_SVC.visibleProjects ( new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.common.data.ProjectList > ( this ) { @ java.lang.Override protected void preDisplay ( final com.google.gerrit.common.data.ProjectList result ) { createProjectLinkPanel.setVisible ( result.canCreateProject ( ) ) ; projects.display ( result.getProjects ( ) ) ; projects.finishDisplay ( ) ; } } ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.account.AccountCapabilities ac ) { createProjectLinkPanel.setVisible ( ac.canPerform ( com.google.gerrit.common.data.GlobalCapability.CREATE_PROJECT ) ) ; }
Source:
boolean wouldPushRef ( final java.lang.String ref ) { for ( final org.eclipse.jgit.transport.RefSpec s : remote.getPushRefSpecs ( ) ) { if ( s.matchSource ( ref ) ) { return true ; } } return false ; }

Target:
boolean wouldPushRef ( final java.lang.String ref ) { if ( ( ! ( replicatePermissions ) ) && ( GitRepositoryManager.REF_CONFIG.equals ( ref ) ) ) { return false ; } for ( final org.eclipse.jgit.transport.RefSpec s : remote.getPushRefSpecs ( ) ) { if ( s.matchSource ( ref ) ) { return true ; } } return false ; }
Source:
protected void assertNoSubmitter ( java.lang.String changeId , int psId ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Change c = com.google.common.collect.Iterables.getOnlyElement ( queryProvider.get ( ) . byKeyPrefix ( changeId ) ) . change ( ) ; com.google.gerrit.server.notedb.ChangeNotes cn = notesFactory.create ( db , c.getProject ( ) , c.getId ( ) ) ; com.google.gerrit.reviewdb.client.PatchSetApproval submitter = approvalsUtil.getSubmitter ( db , cn , new com.google.gerrit.reviewdb.client.PatchSet.Id ( cn.getChangeId ( ) , psId ) ) ; com.google.common.truth.Truth.assertThat ( submitter ) . isNull ( ) ; }

Target:
protected void assertNoSubmitter ( java.lang.String changeId , int psId ) throws com.google.gerrit.server.project.NoSuchChangeException , com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Change c = com.google.common.collect.Iterables.getOnlyElement ( queryProvider.get ( ) . byKeyPrefix ( changeId ) ) . change ( ) ; com.google.gerrit.server.notedb.ChangeNotes cn = notesFactory.createChecked ( db , c ) ; com.google.gerrit.reviewdb.client.PatchSetApproval submitter = approvalsUtil.getSubmitter ( db , cn , new com.google.gerrit.reviewdb.client.PatchSet.Id ( cn.getChangeId ( ) , psId ) ) ; com.google.common.truth.Truth.assertThat ( submitter ) . isNull ( ) ; }
Source:
public java.util.List < com.google.gerrit.reviewdb.AccountGroup > run ( final com.google.gerrit.reviewdb.ReviewDb db ) throws com.google.gwtorm.client.OrmException { final java.lang.String a = query ; final java.lang.String b = a + ( com.google.gerrit.httpd.rpc.SuggestServiceImpl.MAX_SUFFIX ) ; final int max = 10 ; final int n = ( limit <= 0 ) ? max : java.lang.Math.min ( limit , max ) ; return db.accountGroups ( ) . suggestByName ( a , b , n ) . toList ( ) ; }

Target:
public java.util.List < com.google.gerrit.reviewdb.AccountGroupName > run ( final com.google.gerrit.reviewdb.ReviewDb db ) throws com.google.gwtorm.client.OrmException { final java.lang.String a = query ; final java.lang.String b = a + ( com.google.gerrit.httpd.rpc.SuggestServiceImpl.MAX_SUFFIX ) ; final int max = 10 ; final int n = ( limit <= 0 ) ? max : java.lang.Math.min ( limit , max ) ; return db.accountGroupNames ( ) . suggestByName ( a , b , n ) . toList ( ) ; }
Source:
public void onSuccess ( final com.google.gerrit.common.data.HostPageData result ) { com.google.gerrit.client.Gerrit.myConfig = result.config ; if ( ( result.account ) != null ) { com.google.gerrit.client.Gerrit.myAccount = result.account ; } onModuleLoad2 ( ) ; }

Target:
public void onSuccess ( final com.google.gerrit.common.data.HostPageData result ) { com.google.gerrit.client.Gerrit.myConfig = result.config ; if ( ( result.account ) != null ) { com.google.gerrit.client.Gerrit.myAccount = result.account ; } if ( ( result.accountDiffPref ) != null ) { com.google.gerrit.client.Gerrit.myAccountDiffPref = result.accountDiffPref ; } onModuleLoad2 ( ) ; }
Source:
public void newPatchSetByOtherOnReviewableChangeOwnerSelfCcNotifyOwnerReviewersInNoteDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; pushTo ( sc , "refs/for/master%notify=OWNER_REVIEWERS" , other , EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "newpatchset" , sc ) . notTo ( sc.starrer , other ) . to ( sc.owner , sc.reviewer ) . cc ( sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . notTo ( com.google.gerrit.server.account.WatchConfig.NotifyType.NEW_PATCHSETS ) ; }

Target:
public void newPatchSetByOtherOnReviewableChangeOwnerSelfCcNotifyOwnerReviewersInNoteDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isTrue ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableChange ( ) ; pushTo ( sc , "refs/for/master%notify=OWNER_REVIEWERS" , other , EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "newpatchset" , sc ) . to ( sc.owner , sc.reviewer ) . cc ( sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . noOneElse ( ) ; }
Source:
protected void configure ( ) { listener ( ) . to ( com.google.gerrit.sshd.SshLog.class ) ; listener ( ) . to ( com.google.gerrit.sshd.SshDaemon.class ) ; }

Target:
protected void configure ( ) { bind ( com.google.gerrit.server.plugins.ModuleGenerator.class ) . to ( com.google.gerrit.sshd.SshAutoRegisterModuleGenerator.class ) ; bind ( com.google.gerrit.sshd.SshPluginStarterCallback.class ) ; bind ( com.google.gerrit.server.plugins.StartPluginListener.class ) . annotatedWith ( com.google.inject.internal.UniqueAnnotations.create ( ) ) . to ( com.google.gerrit.sshd.SshPluginStarterCallback.class ) ; bind ( com.google.gerrit.server.plugins.ReloadPluginListener.class ) . annotatedWith ( com.google.inject.internal.UniqueAnnotations.create ( ) ) . to ( com.google.gerrit.sshd.SshPluginStarterCallback.class ) ; listener ( ) . toInstance ( com.google.gerrit.extensions.registration.PrivateInternals_DynamicTypes.registerInParentInjectors ( ) ) ; listener ( ) . to ( com.google.gerrit.sshd.SshLog.class ) ; listener ( ) . to ( com.google.gerrit.sshd.SshDaemon.class ) ; }
Source:
public com.google.gerrit.reviewdb.client.Change abandon ( com.google.gerrit.server.update.BatchUpdate.Factory updateFactory , com.google.gerrit.server.project.ChangeControl control , java.lang.String msgTxt ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.update.UpdateException { return abandon ( updateFactory , control , msgTxt , defaultNotify ( control ) , com.google.common.collect.ImmutableListMultimap.of ( ) ) ; }

Target:
public com.google.gerrit.reviewdb.client.Change abandon ( com.google.gerrit.server.update.BatchUpdate.Factory updateFactory , com.google.gerrit.server.notedb.ChangeNotes notes , com.google.gerrit.server.CurrentUser user , java.lang.String msgTxt ) throws com.google.gerrit.extensions.restapi.RestApiException , com.google.gerrit.server.update.UpdateException { return abandon ( updateFactory , notes , user , msgTxt , defaultNotify ( notes.getChange ( ) ) , com.google.common.collect.ImmutableListMultimap.of ( ) ) ; }
Source:
public com.google.gerrit.server.account.AccountResource parse ( com.google.gerrit.extensions.restapi.TopLevelResource root , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException { return new com.google.gerrit.server.account.AccountResource ( parse ( id.get ( ) ) ) ; }

Target:
public com.google.gerrit.server.account.AccountResource parse ( com.google.gerrit.extensions.restapi.TopLevelResource root , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException { com.google.gerrit.server.IdentifiedUser user = _parse ( id.get ( ) ) ; if ( user == null ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; } return new com.google.gerrit.server.account.AccountResource ( user ) ; }
Source:
public void unblockOtherPermissionWithMoreSpecificRefAndExclusiveFlag_Fails ( ) { com.google.gerrit.server.project.Util.block ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/heads/*" ) ; com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/heads/master" ) ; com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.SUBMIT , com.google.gerrit.server.project.Util.DEVS , "refs/heads/master" , true ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.Util.DEVS ) ; assertCannotUpdate ( "refs/heads/master" , u ) ; }

Target:
public void unblockLargerScope_Fails ( ) { com.google.gerrit.server.project.testing.Util.block ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/heads/master" ) ; com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.testing.Util.DEVS , "refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl u = user ( local , com.google.gerrit.server.project.testing.Util.DEVS ) ; assertCannotUpdate ( "refs/heads/master" , u ) ; }
Source:
public com.google.gerrit.server.change.ChangeEditResource parse ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException , java.io.IOException { java.util.Optional < com.google.gerrit.server.edit.ChangeEdit > edit = editUtil.byChange ( rsrc.getChange ( ) ) ; if ( ! ( edit.isPresent ( ) ) ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; } return new com.google.gerrit.server.change.ChangeEditResource ( rsrc , edit.get ( ) , id.get ( ) ) ; }

Target:
public com.google.gerrit.server.change.ChangeEditResource parse ( com.google.gerrit.server.change.ChangeResource rsrc , com.google.gerrit.extensions.restapi.IdString id ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gerrit.extensions.restapi.ResourceNotFoundException , com.google.gwtorm.server.OrmException , java.io.IOException { java.util.Optional < com.google.gerrit.server.edit.ChangeEdit > edit = editUtil.byChange ( rsrc.getNotes ( ) , rsrc.getUser ( ) ) ; if ( ! ( edit.isPresent ( ) ) ) { throw new com.google.gerrit.extensions.restapi.ResourceNotFoundException ( id ) ; } return new com.google.gerrit.server.change.ChangeEditResource ( rsrc , edit.get ( ) , id.get ( ) ) ; }
Source:
private java.util.List < java.nio.file.Path > scanPathsInPluginsDirectory ( java.nio.file.Path pluginsDir ) { try { return com.google.gerrit.server.plugins.PluginLoader.listPlugins ( pluginsDir ) ; } catch ( java.io.IOException e ) { com.google.gerrit.server.plugins.PluginLoader.log.error ( ( "Cannot list " + ( pluginsDir.toAbsolutePath ( ) ) ) , e ) ; return com.google.common.collect.ImmutableList.of ( ) ; } }

Target:
private java.util.List < java.nio.file.Path > scanPathsInPluginsDirectory ( java.nio.file.Path pluginsDir ) { try { return com.google.gerrit.server.plugins.PluginUtil.listPlugins ( pluginsDir ) ; } catch ( java.io.IOException e ) { com.google.gerrit.server.plugins.PluginLoader.log.error ( ( "Cannot list " + ( pluginsDir.toAbsolutePath ( ) ) ) , e ) ; return com.google.common.collect.ImmutableList.of ( ) ; } }
Source:
public void changeAssigneeToSelfOnReviewableChangeInNoteDb ( ) 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.assignee ) ; sender.clear ( ) ; 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 setAssigneeOnReviewableWipChange ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageReviewableWipChange ( ) ; assign ( sc , sc.owner , sc.assignee ) ; assertThat ( sender ) . sent ( "setassignee" , sc ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . to ( sc.assignee ) . noOneElse ( ) ; }
Source:
private void writeBlobText ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , com.google.gitiles.PathServlet.WalkResult wr ) throws java.io.IOException { setModeHeader ( res , wr.type ) ; try ( java.io.Writer writer = startRenderText ( req , res ) ; java.io.OutputStream out = com.google.common.io.BaseEncoding.base64 ( ) . encodingStream ( writer ) ) { wr.getObjectReader ( ) . open ( wr.id ) . copyTo ( out ) ; } }

Target:
private void writeBlobText ( javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse res , com.google.gitiles.PathServlet.WalkResult wr ) throws java.io.IOException { com.google.gitiles.PathServlet.setTypeHeader ( res , wr.type.mode.getObjectType ( ) ) ; com.google.gitiles.PathServlet.setModeHeader ( res , wr.type ) ; try ( java.io.Writer writer = startRenderText ( req , res ) ; java.io.OutputStream out = com.google.common.io.BaseEncoding.base64 ( ) . encodingStream ( writer ) ) { wr.getObjectReader ( ) . open ( wr.id ) . copyTo ( out ) ; } }