auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
com.google.gerrit.metrics.dropwizard.BucketedCallback < V > . ValueGauge getOrCreate ( java.lang.Object key ) { com.google.gerrit.metrics.dropwizard.BucketedCallback < V > . ValueGauge c = cells.get ( key ) ; if ( c != null ) { return c ; } synchronized ( cells ) { c = cells.get ( key ) ; if ( c == null ) { c = new ValueGauge ( ) ; registry.register ( submetric ( key ) , c ) ; cells.put ( key , c ) ; } return c ; } }

Target:
com.google.gerrit.metrics.dropwizard.BucketedCallback < V > . ValueGauge getOrCreate ( java.lang.Object key ) { com.google.gerrit.metrics.dropwizard.BucketedCallback < V > . ValueGauge c = cells.get ( key ) ; if ( c != null ) { return c ; } synchronized ( lock ) { c = cells.get ( key ) ; if ( c == null ) { c = new ValueGauge ( ) ; registry.register ( submetric ( key ) , c ) ; cells.put ( key , c ) ; } return c ; } }
Source:
public static java.lang.String mediumFormat ( final java.util.Date dt ) { return dt != null ? com.google.gerrit.client.FormatUtil.dtfmt.format ( dt ) : "" ; }

Target:
public static java.lang.String mediumFormat ( final java.util.Date dt ) { if ( dt == null ) { return "" ; } final long tzOffset = ( ( - ( com.google.gerrit.client.FormatUtil.guessTimeZone ( ) ) ) * 60 ) * 1000L ; return com.google.gerrit.client.FormatUtil.dtfmt.format ( new java.util.Date ( ( ( dt.getTime ( ) ) + tzOffset ) ) ) ; }
Source:
public void withDuplicateSystemGroupCaseInsensitiveName_Conflict ( ) throws java.lang.Exception { java.lang.String newGroupName = "Registered Users" ; sshSession.exec ( ( "gerrit create-group " + newGroupName ) ) ; com.google.common.truth.Truth.assert_ ( ) . withFailureMessage ( sshSession.getError ( ) ) . that ( sshSession.hasError ( ) ) . isTrue ( ) ; }

Target:
public void withDuplicateSystemGroupCaseInsensitiveName_Conflict ( ) throws java.lang.Exception { java.lang.String newGroupName = "Registered Users" ; adminSshSession.exec ( ( "gerrit create-group " + newGroupName ) ) ; com.google.common.truth.Truth.assert_ ( ) . withFailureMessage ( adminSshSession.getError ( ) ) . that ( adminSshSession.hasError ( ) ) . isTrue ( ) ; }
Source:
protected void onLoad ( ) { super . onLoad ( ) ; Util.PROJECT_SVC.projectAccess ( getProjectKey ( ) , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.common.data.ProjectAccess > ( this ) { @ java.lang.Override public void preDisplay ( com.google.gerrit.common.data.ProjectAccess access ) { displayReadOnly ( access ) ; } } ) ; }

Target:
protected void onLoad ( ) { super . onLoad ( ) ; Util.PROJECT_SVC.projectAccess ( getProjectKey ( ) , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.common.data.ProjectAccess > ( this ) { @ java.lang.Override public void preDisplay ( com.google.gerrit.common.data.ProjectAccess access ) { displayReadOnly ( access ) ; } } ) ; savedPanel = ACCESS ; }
Source:
protected void save ( java.lang.String serviceUser , final java.lang.String newValue ) { new com.google.gerrit.plugin.client.rpc.RestApi ( "config" ) . id ( "server" ) . view ( com.google.gerrit.plugin.client.Plugin.get ( ) . getPluginName ( ) , "serviceusers" ) . id ( serviceUser ) . view ( "name" ) . put ( newValue , new com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.rpc.NativeString > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.rpc.NativeString result ) { updateValue ( newValue ) ; } @ java.lang.Override public void onFailure ( java.lang.Throwable caught ) { } } ) ; }

Target:
protected void save ( java.lang.String serviceUser , final java.lang.String newValue ) { new com.google.gerrit.plugin.client.rpc.RestApi ( "config" ) . id ( "server" ) . view ( com.google.gerrit.plugin.client.Plugin.get ( ) . getPluginName ( ) , "serviceusers" ) . id ( serviceUser ) . view ( "email" ) . put ( newValue , new com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.rpc.NativeString > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.rpc.NativeString result ) { updateValue ( newValue ) ; } @ java.lang.Override public void onFailure ( java.lang.Throwable caught ) { } } ) ; }
Source:
public void abandonWipChangeInReviewDb ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( notesMigration.readChanges ( ) ) . isFalse ( ) ; com.google.gerrit.acceptance.server.mail.StagedChange sc = stageWipChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; abandon ( sc.changeId , sc.owner ) ; assertThat ( sender ) . sent ( "abandon" , sc ) . notTo ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) ; }

Target:
public void abandonWipChangeNotifyAll ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageWipChange ( ) ; abandon ( sc.changeId , sc.owner , com.google.gerrit.extensions.api.changes.NotifyHandling.ALL ) ; assertThat ( sender ) . sent ( "abandon" , sc ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ABANDONED_CHANGES ) . noOneElse ( ) ; }
Source:
protected void configureServlets ( ) { serveRegex ( com.google.gerrit.httpd.plugins.LfsPluginServlet.URL_REGEX ) . with ( com.googlesource.gerrit.plugins.lfs.LfsApiServlet.class ) ; populateRepository ( defaultBackend ) ; for ( com.googlesource.gerrit.plugins.lfs.LfsBackend backend : backends.values ( ) ) { populateRepository ( backend ) ; } com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.extensions.webui.WebUiPlugin.class ) . toInstance ( new com.google.gerrit.extensions.webui.JavaScriptPlugin ( "lfs-project-info.js" ) ) ; }

Target:
protected void configureServlets ( ) { serveRegex ( com.googlesource.gerrit.plugins.lfs.LfsApiServlet.LFS_OBJECTS_REGEX_REST ) . with ( com.googlesource.gerrit.plugins.lfs.LfsApiServlet.class ) ; populateRepository ( defaultBackend ) ; for ( com.googlesource.gerrit.plugins.lfs.LfsBackend backend : backends.values ( ) ) { populateRepository ( backend ) ; } com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.extensions.webui.WebUiPlugin.class ) . toInstance ( new com.google.gerrit.extensions.webui.JavaScriptPlugin ( "lfs-project-info.js" ) ) ; }
Source:
public void testCannotUploadToAnyRef ( ) { com.google.gerrit.server.project.Util.grant ( util.getParentConfig ( ) , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.project.Util.REGISTERED , "refs/*" ) ; com.google.gerrit.server.project.Util.grant ( local , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.project.Util.DEVS , "refs/heads/*" ) ; com.google.gerrit.server.project.Util.grant ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/for/refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl u = util.user ( local ) ; org.junit.Assert.assertFalse ( "cannot upload" , ( ( u.canPushToAtLeastOneRef ( ) ) == ( com.google.gerrit.common.data.Capable.OK ) ) ) ; org.junit.Assert.assertFalse ( "cannot upload refs/heads/master" , u.controlForRef ( "refs/heads/master" ) . canUpload ( ) ) ; }

Target:
public void testCannotUploadToAnyRef ( ) { com.google.gerrit.server.project.Util.grant ( util.getParentConfig ( ) , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS , "refs/*" ) ; com.google.gerrit.server.project.Util.grant ( local , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.project.Util.DEVS , "refs/heads/*" ) ; com.google.gerrit.server.project.Util.grant ( local , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.DEVS , "refs/for/refs/heads/*" ) ; com.google.gerrit.server.project.ProjectControl u = util.user ( local ) ; org.junit.Assert.assertFalse ( "cannot upload" , ( ( u.canPushToAtLeastOneRef ( ) ) == ( com.google.gerrit.common.data.Capable.OK ) ) ) ; org.junit.Assert.assertFalse ( "cannot upload refs/heads/master" , u.controlForRef ( "refs/heads/master" ) . canUpload ( ) ) ; }
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 ) ; }

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:
com.googlesource.gerrit.plugins.findowners.OwnersDb get ( org.eclipse.jgit.lib.Repository repository , com.google.gerrit.server.query.change.ChangeData changeData , int patchset ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Project.NameKey project = changeData.change ( ) . getProject ( ) ; java.lang.String branch = changeData.change ( ) . getDest ( ) . get ( ) ; java.lang.String dbKey = com.googlesource.gerrit.plugins.findowners.Cache.makeKey ( changeData.getId ( ) . get ( ) , patchset , branch ) ; return get ( dbKey , repository , project , branch , changeData.currentFilePaths ( ) ) ; }

Target:
com.googlesource.gerrit.plugins.findowners.OwnersDb get ( com.google.gerrit.server.account.AccountCache accountCache , com.google.gerrit.server.account.Accounts accounts , org.eclipse.jgit.lib.Repository repository , com.google.gerrit.server.query.change.ChangeData changeData , int patchset ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Project.NameKey project = changeData.change ( ) . getProject ( ) ; java.lang.String branch = changeData.change ( ) . getDest ( ) . get ( ) ; java.lang.String dbKey = com.googlesource.gerrit.plugins.findowners.Cache.makeKey ( changeData.getId ( ) . get ( ) , patchset , branch ) ; return get ( accountCache , accounts , dbKey , repository , project , branch , changeData.currentFilePaths ( ) ) ; }
Source:
public void onPreReceive ( final org.spearce.jgit.transport.ReceivePack arg0 , final java.util.Collection < org.spearce.jgit.transport.ReceiveCommand > commands ) { parseCommands ( commands ) ; if ( ( ( newChange ) != null ) && ( ( newChange.getResult ( ) ) == ( org.spearce.jgit.transport.ReceiveCommand.Result.NOT_ATTEMPTED ) ) ) { createNewChanges ( ) ; } appendPatchSets ( ) ; }

Target:
public void onPreReceive ( final org.spearce.jgit.transport.ReceivePack arg0 , final java.util.Collection < org.spearce.jgit.transport.ReceiveCommand > commands ) { parseCommands ( commands ) ; if ( ( ( newChange ) != null ) && ( ( newChange.getResult ( ) ) == ( org.spearce.jgit.transport.ReceiveCommand.Result.NOT_ATTEMPTED ) ) ) { createNewChanges ( ) ; } doReplaces ( ) ; }
Source:
public void parsePatchSetId ( ) throws java.lang.Exception { assertParseSucceeds ( ( "Update change\n" + ( ( ( "\n" + "Branch: refs/heads/master\n" ) + "Patch-Set: 1\n" ) + "Subject: This is a test change\n" ) ) ) ; assertParseFails ( ( "Update change\n" + "\n" ) ) ; assertParseFails ( ( "Update change\n" + ( ( "\n" + "Patch-Set: 1\n" ) + "Patch-Set: 1\n" ) ) ) ; assertParseSucceeds ( ( "Update change\n" + ( ( ( "\n" + "Branch: refs/heads/master\n" ) + "Patch-Set: 1\n" ) + "Subject: This is a test change\n" ) ) ) ; assertParseFails ( ( "Update change\n" + ( "\n" + "Patch-Set: x\n" ) ) ) ; }

Target:
public void parsePatchSetId ( ) throws java.lang.Exception { assertParseSucceeds ( ( "Update change\n" + ( ( ( ( "\n" + "Branch: refs/heads/master\n" ) + "Change-id: I577fb248e474018276351785930358ec0450e9f7\n" ) + "Patch-Set: 1\n" ) + "Subject: This is a test change\n" ) ) ) ; assertParseFails ( ( "Update change\n" + "\n" ) ) ; assertParseFails ( ( "Update change\n" + ( ( "\n" + "Patch-Set: 1\n" ) + "Patch-Set: 1\n" ) ) ) ; assertParseSucceeds ( ( "Update change\n" + ( ( ( ( "\n" + "Branch: refs/heads/master\n" ) + "Change-id: I577fb248e474018276351785930358ec0450e9f7\n" ) + "Patch-Set: 1\n" ) + "Subject: This is a test change\n" ) ) ) ; assertParseFails ( ( "Update change\n" + ( "\n" + "Patch-Set: x\n" ) ) ) ; }
Source:
private void initPath ( ) { filePath.setInnerText ( path ) ; }

Target:
private void renderLinks ( com.google.gerrit.client.editor.EditFileInfo editInfo , com.google.gwt.core.client.JsArray < com.google.gerrit.client.DiffWebLinkInfo > diffLinks ) { renderLinksToDiff ( ) ; if ( editInfo != null ) { renderLinks ( com.google.gerrit.client.rpc.Natives.asList ( editInfo.webLinks ( ) ) ) ; } else if ( diffLinks != null ) { renderLinks ( com.google.gerrit.client.rpc.Natives.asList ( diffLinks ) ) ; } }
Source:
public com.google.gerrit.server.change.Description getDescription ( com.google.gerrit.server.change.ChangeResource rsrc ) { return new com.google.gerrit.extensions.webui.UiAction.Description ( ) . setLabel ( "Ignore" ) . setTitle ( "Ignore the change" ) . setVisible ( ( ( ! ( rsrc.isUserOwner ( ) ) ) && ( ! ( isIgnored ( rsrc ) ) ) ) ) ; }

Target:
public com.google.gerrit.server.change.Description getDescription ( com.google.gerrit.server.change.ChangeResource rsrc ) { return new com.google.gerrit.extensions.webui.UiAction.Description ( ) . setLabel ( "Ignore" ) . setTitle ( "Ignore the change" ) . setVisible ( canIgnore ( rsrc ) ) ; }
Source:
protected void configure ( ) { projectCache = createMock ( com.google.gerrit.server.project.ProjectCache.class ) ; bind ( com.google.gerrit.server.project.ProjectCache.class ) . toInstance ( projectCache ) ; pluginConfigFactory = createMock ( com.google.gerrit.server.config.PluginConfigFactory.class ) ; bind ( com.google.gerrit.server.config.PluginConfigFactory.class ) . toInstance ( pluginConfigFactory ) ; bind ( java.lang.String.class ) . annotatedWith ( com.google.gerrit.extensions.annotations.PluginName.class ) . toInstance ( "ItsTestName" ) ; }

Target:
protected void configure ( ) { projectCache = createMock ( com.google.gerrit.server.project.ProjectCache.class ) ; bind ( com.google.gerrit.server.project.ProjectCache.class ) . toInstance ( projectCache ) ; pluginConfigFactory = createMock ( com.google.gerrit.server.config.PluginConfigFactory.class ) ; bind ( com.google.gerrit.server.config.PluginConfigFactory.class ) . toInstance ( pluginConfigFactory ) ; bind ( java.lang.String.class ) . annotatedWith ( com.google.gerrit.extensions.annotations.PluginName.class ) . toInstance ( "ItsTestName" ) ; serverConfig = createMock ( org.eclipse.jgit.lib.Config.class ) ; bind ( org.eclipse.jgit.lib.Config.class ) . annotatedWith ( com.google.gerrit.server.config.GerritServerConfig.class ) . toInstance ( serverConfig ) ; }
Source:
public javax.servlet.ServletOutputStream getOutputStream ( ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public synchronized javax.servlet.ServletOutputStream getOutputStream ( ) { com.google.common.base.Preconditions.checkState ( ( ( writer ) == null ) , "getWriter() already called" ) ; if ( ( outputStream ) == null ) { final java.io.PrintWriter osWriter = new java.io.PrintWriter ( actualBody ) ; outputStream = new javax.servlet.ServletOutputStream ( ) { @ java.lang.Override public void write ( int c ) throws java.io.IOException { osWriter.write ( c ) ; osWriter.flush ( ) ; } } ; } return outputStream ; }
Source:
private void assertMembers ( java.util.List < com.google.gerrit.acceptance.rest.account.AccountInfo > ai , com.google.gerrit.acceptance.TestAccount ... members ) { java.util.Map < java.lang.Integer , com.google.gerrit.acceptance.rest.account.AccountInfo > infoById = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.google.gerrit.acceptance.rest.account.AccountInfo i : ai ) { infoById.put ( i._account_id , i ) ; } for ( com.google.gerrit.acceptance.TestAccount a : members ) { com.google.gerrit.acceptance.rest.account.AccountInfo i = infoById.get ( a.id.get ( ) ) ; org.junit.Assert.assertNotNull ( i ) ; com.google.gerrit.acceptance.rest.account.AccountAssert.assertAccountInfo ( a , i ) ; } org.junit.Assert.assertEquals ( ai.size ( ) , members.length ) ; }

Target:
private void assertMembers ( java.util.List < com.google.gerrit.server.account.AccountInfo > ai , com.google.gerrit.acceptance.TestAccount ... members ) { java.util.Map < java.lang.Integer , com.google.gerrit.server.account.AccountInfo > infoById = com.google.common.collect.Maps.newHashMap ( ) ; for ( com.google.gerrit.server.account.AccountInfo i : ai ) { infoById.put ( i._account_id , i ) ; } for ( com.google.gerrit.acceptance.TestAccount a : members ) { com.google.gerrit.server.account.AccountInfo i = infoById.get ( a.id.get ( ) ) ; org.junit.Assert.assertNotNull ( i ) ; com.google.gerrit.acceptance.rest.account.AccountAssert.assertAccountInfo ( a , i ) ; } org.junit.Assert.assertEquals ( ai.size ( ) , members.length ) ; }
Source:
public static void suggest ( java.lang.String query , int limit , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwt.core.client.JsArray < com.google.gerrit.client.info.AccountInfo > > cb ) { new com.google.gerrit.client.rpc.RestApi ( "/accounts/" ) . addParameter ( "q" , query ) . addParameter ( "n" , limit ) . background ( ) . get ( cb ) ; }

Target:
public static void suggest ( java.lang.String query , int limit , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gwt.core.client.JsArray < com.google.gerrit.client.info.AccountInfo > > cb ) { new com.google.gerrit.client.rpc.RestApi ( "/accounts/" ) . addParameterTrue ( "suggest" ) . addParameter ( "q" , query ) . addParameter ( "n" , limit ) . background ( ) . get ( cb ) ; }
Source:
private void appendHunkHeader ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m , final com.google.gerrit.prettify.common.EditList.Hunk hunk ) { openLine ( m ) ; padLineNumber ( m ) ; padLineNumber ( m ) ; m.openTd ( ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . diffText ( ) ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . diffTextHunkHeader ( ) ) ; m.append ( "@@ -" ) ; appendRange ( m , ( ( hunk.getCurA ( ) ) + 1 ) , ( ( hunk.getEndA ( ) ) - ( hunk.getCurA ( ) ) ) ) ; m.append ( " +" ) ; appendRange ( m , ( ( hunk.getCurB ( ) ) + 1 ) , ( ( hunk.getEndB ( ) ) - ( hunk.getCurB ( ) ) ) ) ; m.append ( " @@" ) ; m.closeTd ( ) ; closeLine ( m ) ; }

Target:
private void appendHunkHeader ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m , final com.google.gerrit.prettify.common.EditList.Hunk hunk ) { openLine ( m ) ; padLineNumberForSideA ( m ) ; padLineNumberForSideB ( m ) ; m.openTd ( ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . diffText ( ) ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . diffTextHunkHeader ( ) ) ; m.append ( "@@ -" ) ; appendRange ( m , ( ( hunk.getCurA ( ) ) + 1 ) , ( ( hunk.getEndA ( ) ) - ( hunk.getCurA ( ) ) ) ) ; m.append ( " +" ) ; appendRange ( m , ( ( hunk.getCurB ( ) ) + 1 ) , ( ( hunk.getEndB ( ) ) - ( hunk.getCurB ( ) ) ) ) ; m.append ( " @@" ) ; m.closeTd ( ) ; closeLine ( m ) ; }
Source:
void select ( ) { com.google.gerrit.client.download.DownloadUrlPanel parent = ( ( com.google.gerrit.client.download.DownloadUrlPanel ) ( getParent ( ) ) ) ; for ( com.google.gwt.user.client.ui.Widget w : parent ) { if ( ( w != ( this ) ) && ( w instanceof com.google.gerrit.client.download.DownloadUrlLink ) ) { w.removeStyleName ( Gerrit.RESOURCES.css ( ) . downloadLink_Active ( ) ) ; } } parent.setCurrentUrl ( this ) ; addStyleName ( Gerrit.RESOURCES.css ( ) . downloadLink_Active ( ) ) ; }

Target:
void select ( ) { downloadPanel.populateDownloadCommandLinks ( schemeInfo ) ; com.google.gerrit.client.download.DownloadUrlPanel parent = ( ( com.google.gerrit.client.download.DownloadUrlPanel ) ( getParent ( ) ) ) ; for ( com.google.gwt.user.client.ui.Widget w : parent ) { if ( ( w != ( this ) ) && ( w instanceof com.google.gerrit.client.download.DownloadUrlLink ) ) { w.removeStyleName ( Gerrit.RESOURCES.css ( ) . downloadLink_Active ( ) ) ; } } addStyleName ( Gerrit.RESOURCES.css ( ) . downloadLink_Active ( ) ) ; }
Source:
private java.lang.String getDisplayName ( final com.google.gerrit.reviewdb.client.Account account ) { if ( account != null ) { java.lang.String result = ( ( account.getFullName ( ) ) == null ) ? anonymousCowardName : account.getFullName ( ) ; if ( ( account.getPreferredEmail ( ) ) != null ) { result += ( " (" + ( account.getPreferredEmail ( ) ) ) + ")" ; } return result ; } return anonymousCowardName ; }

Target:
private com.google.common.base.Supplier < com.google.gerrit.server.data.AccountAttribute > accountAttributeSupplier ( final com.google.gerrit.reviewdb.client.Account account ) { return com.google.common.base.Suppliers.memoize ( new com.google.common.base.Supplier < com.google.gerrit.server.data.AccountAttribute > ( ) { @ java.lang.Override public com.google.gerrit.server.data.AccountAttribute get ( ) { return eventFactory.asAccountAttribute ( account ) ; } } ) ; }
Source:
int getEnd ( ) { return end ; }

Target:
public int compareTo ( com.google.gerrit.client.diff.DiffChunkInfo o ) { if ( ( side ) == ( o.side ) ) { return ( start ) - ( o.start ) ; } else if ( ( side ) == ( DisplaySide.A ) ) { int comp = ( startOnOther ) - ( o.start ) ; return comp == 0 ? - 1 : comp ; } else { int comp = ( start ) - ( o.startOnOther ) ; return comp == 0 ? 1 : comp ; } }
Source:
private void enableForm ( final boolean on ) { delBranch.setEnabled ( on ) ; addBranch.setEnabled ( on ) ; nameTxtBox.setEnabled ( on ) ; irevTxtBox.setEnabled ( on ) ; }

Target:
void updateDeleteButton ( ) { boolean on = false ; for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; row ++ ) { com.google.gwt.user.client.ui.Widget w = table.getWidget ( row , 1 ) ; if ( ( w != null ) && ( w instanceof com.google.gwt.user.client.ui.CheckBox ) ) { com.google.gwt.user.client.ui.CheckBox sel = ( ( com.google.gwt.user.client.ui.CheckBox ) ( w ) ) ; if ( sel.getValue ( ) ) { on = true ; break ; } } } delBranch.setEnabled ( on ) ; }
Source:
public int hashCode ( ) { int h = 0 ; if ( ( oldId ) != null ) { h = ( h * 31 ) + ( oldId.hashCode ( ) ) ; } h = ( h * 31 ) + ( newId.hashCode ( ) ) ; h = ( h * 31 ) + ( whitespace.name ( ) . hashCode ( ) ) ; return h ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( oldId , parentNum , newId , whitespace ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { onCellDoubleClick ( 0 , 2 ) ; }

Target:
private void padLineNumberForSideA ( final com.google.gwtexpui.safehtml.client.SafeHtmlBuilder m ) { m.openTd ( ) ; m.setStyleName ( Gerrit.RESOURCES.css ( ) . lineNumber ( ) ) ; m.addStyleName ( Gerrit.RESOURCES.css ( ) . rightBorder ( ) ) ; m.closeTd ( ) ; }
Source:
public void setPrivate ( boolean value , @ com.google.gerrit.common.Nullable java.lang.String message ) throws com.google.gerrit.extensions.restapi.RestApiException { try { com.google.gerrit.server.change.SetPrivateOp.Input input = new com.google.gerrit.server.change.SetPrivateOp.Input ( message ) ; if ( value ) { postPrivate.apply ( change , input ) ; } else { deletePrivate.apply ( change , input ) ; } } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.api.ApiUtil.asRestApiException ( "Cannot change private status" , e ) ; } }

Target:
public void setPrivate ( boolean value , @ com.google.gerrit.common.Nullable java.lang.String message ) throws com.google.gerrit.extensions.restapi.RestApiException { try { com.google.gerrit.server.restapi.change.SetPrivateOp.Input input = new com.google.gerrit.server.restapi.change.SetPrivateOp.Input ( message ) ; if ( value ) { postPrivate.apply ( change , input ) ; } else { deletePrivate.apply ( change , input ) ; } } catch ( java.lang.Exception e ) { throw com.google.gerrit.server.api.ApiUtil.asRestApiException ( "Cannot change private status" , e ) ; } }
Source:
public void handle ( net.codemirror.lib.CodeMirror instance , int line , java.lang.String gutter , com.google.gwt.dom.client.NativeEvent clickEvent ) { instance.setCursor ( net.codemirror.lib.LineCharacter.create ( line ) ) ; instance.setActiveLine ( instance.getLineHandle ( line ) ) ; insertNewDraft ( instance ) . run ( ) ; }

Target:
public void handle ( net.codemirror.lib.CodeMirror instance , int line , java.lang.String gutter , com.google.gwt.dom.client.NativeEvent clickEvent ) { if ( ! ( ( cm.hasActiveLine ( ) ) && ( ( instance.getLineNumber ( cm.getActiveLine ( ) ) ) == line ) ) ) { instance.setCursor ( net.codemirror.lib.LineCharacter.create ( line ) ) ; instance.setActiveLine ( cm.getLineHandle ( line ) ) ; } insertNewDraft ( cm ) . run ( ) ; }
Source:
protected void setUseContentMerge ( ) throws java.io.IOException { com.google.gerrit.server.project.PutConfig.Input in = new com.google.gerrit.server.project.PutConfig.Input ( ) ; in.useContentMerge = com.google.gerrit.extensions.common.InheritableBoolean.TRUE ; com.google.gerrit.acceptance.RestResponse r = adminSession.put ( ( ( "/projects/" + ( project.get ( ) ) ) + "/config" ) , in ) ; com.google.common.truth.Truth.assertThat ( r.getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_OK ) ; r.consume ( ) ; }

Target:
private void setSubmitType ( com.google.gerrit.extensions.client.SubmitType submitType ) throws java.io.IOException { com.google.gerrit.server.project.PutConfig.Input in = new com.google.gerrit.server.project.PutConfig.Input ( ) ; in.submitType = submitType ; in.useContentMerge = com.google.gerrit.extensions.client.InheritableBoolean.FALSE ; com.google.gerrit.acceptance.RestResponse r = adminSession.put ( ( ( "/projects/" + ( project.get ( ) ) ) + "/config" ) , in ) ; com.google.common.truth.Truth.assertThat ( r.getStatusCode ( ) ) . isEqualTo ( HttpStatus.SC_OK ) ; r.consume ( ) ; }
Source:
public void mergeByOwnerCcingSelf ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageChange ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS , com.google.gerrit.server.account.WatchConfig.NotifyType.SUBMITTED_CHANGES ) ; merge ( sc.changeId , sc.owner , EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "merged" , sc ) . to ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS , com.google.gerrit.server.account.WatchConfig.NotifyType.SUBMITTED_CHANGES ) ; }

Target:
public void mergeByOwnerCcingSelf ( ) throws java.lang.Exception { com.google.gerrit.acceptance.server.mail.StagedChange sc = stageChange ( ) ; merge ( sc.changeId , sc.owner , EmailStrategy.CC_ON_OWN_COMMENTS ) ; assertThat ( sender ) . sent ( "merged" , sc ) . to ( sc.owner ) . cc ( sc.reviewer , sc.ccer ) . cc ( sc.reviewerByEmail , sc.ccerByEmail ) . bcc ( sc.starrer ) . bcc ( com.google.gerrit.server.account.WatchConfig.NotifyType.ALL_COMMENTS , com.google.gerrit.server.account.WatchConfig.NotifyType.SUBMITTED_CHANGES ) . noOneElse ( ) ; }
Source:
public void createNewChangeSignedOffByFooter ( ) throws java.lang.Exception { com.google.common.truth.TruthJUnit.assume ( ) . that ( isAllowDrafts ( ) ) . isTrue ( ) ; setSignedOffByFooter ( ) ; com.google.gerrit.extensions.common.ChangeInfo info = assertCreateSucceeds ( newChangeInput ( ChangeStatus.NEW ) ) ; java.lang.String message = info.revisions.get ( info.currentRevision ) . commit.message ; com.google.common.truth.Truth.assertThat ( message ) . contains ( java.lang.String.format ( "%sAdministrator <%s>" , org.eclipse.jgit.lib.Constants.SIGNED_OFF_BY_TAG , admin.getIdent ( ) . getEmailAddress ( ) ) ) ; }

Target:
public void createChangeOnInvisibleBranchFails ( ) throws java.lang.Exception { changeInTwoBranches ( "invisible-branch" , "a.txt" , "branchB" , "b.txt" ) ; block ( project , "refs/heads/invisible-branch" , com.google.gerrit.common.data.Permission.READ , com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS ) ; com.google.gerrit.extensions.common.ChangeInput in = newChangeInput ( ChangeStatus.NEW ) ; in.branch = "invisible-branch" ; assertCreateFails ( in , com.google.gerrit.extensions.restapi.ResourceNotFoundException.class , "" ) ; }
Source:
public void doAction ( com.google.gerrit.server.IdentifiedUser user , com.googlesource.gerrit.plugins.github.oauth.GitHubLogin hubLogin , javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse resp , com.googlesource.gerrit.plugins.github.wizard.ControllerErrors errors ) throws java.io.IOException , javax.servlet.ServletException { com.googlesrouce.gerrit.plugins.github.git.GitCloner cloner = clonerProvider.get ( ) ; com.google.gson.JsonArray reposStatus = new com.google.gson.JsonArray ( ) ; for ( com.googlesrouce.gerrit.plugins.github.git.CloneJob job : cloner.getCloneJobs ( ) ) { reposStatus.add ( getJsonStatus ( job ) ) ; } resp.getWriter ( ) . println ( reposStatus.toString ( ) ) ; }

Target:
public void doAction ( com.google.gerrit.server.IdentifiedUser user , com.googlesource.gerrit.plugins.github.oauth.GitHubLogin hubLogin , javax.servlet.http.HttpServletRequest req , javax.servlet.http.HttpServletResponse resp , com.googlesource.gerrit.plugins.github.wizard.ControllerErrors errors ) throws java.io.IOException , javax.servlet.ServletException { com.googlesrouce.gerrit.plugins.github.git.GitImporter cloner = clonerProvider.get ( ) ; com.google.gson.JsonArray reposStatus = new com.google.gson.JsonArray ( ) ; for ( com.googlesrouce.gerrit.plugins.github.git.GitJob job : cloner.getCloneJobs ( ) ) { reposStatus.add ( getJsonStatus ( job ) ) ; } resp.getWriter ( ) . println ( reposStatus.toString ( ) ) ; }
Source:
public java.util.Set < com.googlesource.gerrit.plugins.its.base.workflow.Property > extractFrom ( com.google.gerrit.server.data.ApprovalAttribute approvalAttribute ) { java.util.Set < com.googlesource.gerrit.plugins.its.base.workflow.Property > properties = com.google.common.collect.Sets.newHashSet ( ) ; properties.add ( propertyFactory.create ( ( "approval-" + ( approvalAttribute.type ) ) , approvalAttribute.value ) ) ; return properties ; }

Target:
public java.util.Set < com.googlesource.gerrit.plugins.its.base.workflow.Property > extractFrom ( com.google.gerrit.server.data.ApprovalAttribute approvalAttribute ) { java.util.Set < com.googlesource.gerrit.plugins.its.base.workflow.Property > properties = com.google.common.collect.Sets.newHashSet ( ) ; properties.add ( propertyFactory.create ( ( "approval-" + ( approvalAttribute.type ) ) , approvalAttribute.value ) ) ; properties.add ( propertyFactory.create ( ( "approval" + ( approvalAttribute.type.replace ( "-" , "" ) ) ) , approvalAttribute.value ) ) ; return properties ; }
Source:
public com.google.gerrit.extensions.restapi.Response < ? > apply ( com.google.gerrit.server.account.AccountResource.StarredChange rsrc , com.google.gerrit.server.account.StarredChanges.EmptyInput in ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gwtorm.server.OrmException , java.io.IOException { if ( ( self.get ( ) ) != ( rsrc.getUser ( ) ) ) { throw new com.google.gerrit.extensions.restapi.AuthException ( "not allowed remove starred change" ) ; } starredChangesUtil.unstar ( self.get ( ) . getAccountId ( ) , rsrc.getChange ( ) . getProject ( ) , rsrc.getChange ( ) . getId ( ) ) ; return com.google.gerrit.extensions.restapi.Response.none ( ) ; }

Target:
public com.google.gerrit.extensions.restapi.Response < ? > apply ( com.google.gerrit.server.account.AccountResource.StarredChange rsrc , com.google.gerrit.server.account.StarredChanges.EmptyInput in ) throws com.google.gerrit.extensions.restapi.AuthException , com.google.gwtorm.server.OrmException , java.io.IOException { if ( ( self.get ( ) ) != ( rsrc.getUser ( ) ) ) { throw new com.google.gerrit.extensions.restapi.AuthException ( "not allowed remove starred change" ) ; } starredChangesUtil.star ( self.get ( ) . getAccountId ( ) , rsrc.getChange ( ) . getProject ( ) , rsrc.getChange ( ) . getId ( ) , null , StarredChangesUtil.DEFAULT_LABELS ) ; return com.google.gerrit.extensions.restapi.Response.none ( ) ; }
Source:
public org.eclipse.jgit.lib.ObjectId commit ( final org.eclipse.jgit.lib.ObjectInserter inserter , final org.eclipse.jgit.lib.CommitBuilder mergeCommit ) throws java.io.IOException , java.io.UnsupportedEncodingException { org.eclipse.jgit.lib.ObjectId id = inserter.insert ( mergeCommit ) ; inserter.flush ( ) ; return id ; }

Target:
public static org.eclipse.jgit.merge.ThreeWayMerger newThreeWayMerger ( org.eclipse.jgit.lib.Repository repo , final org.eclipse.jgit.lib.ObjectInserter inserter , java.lang.String strategyName ) { org.eclipse.jgit.merge.MergeStrategy strategy = org.eclipse.jgit.merge.MergeStrategy.get ( strategyName ) ; com.google.common.base.Preconditions.checkArgument ( ( strategy != null ) , "invalid merge strategy: %s" , strategyName ) ; org.eclipse.jgit.merge.Merger m = strategy.newMerger ( repo , true ) ; com.google.common.base.Preconditions.checkArgument ( ( m instanceof org.eclipse.jgit.merge.ThreeWayMerger ) , "merge strategy %s does not support three-way merging" , strategyName ) ; m.setObjectInserter ( inserter ) ; return ( ( org.eclipse.jgit.merge.ThreeWayMerger ) ( m ) ) ; }
Source:
com.google.gerrit.httpd.WebSessionManager.Val get ( final com.google.gerrit.httpd.WebSessionManager.Key key ) { return self.getIfPresent ( key.token ) ; }

Target:
com.google.gerrit.httpd.WebSessionManager.Val get ( final com.google.gerrit.httpd.WebSessionManager.Key key ) { com.google.gerrit.httpd.WebSessionManager.Val val = self.get ( key ) ; if ( ( val != null ) && ( ( val.expiresAt ) <= ( com.google.gerrit.httpd.WebSessionManager.now ( ) ) ) ) { self.remove ( key ) ; return null ; } return val ; }
Source:
public void testBlockPushDraftsUnblockAdmin ( ) { com.google.gerrit.server.project.Util.grant ( util.getParentConfig ( ) , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.ANONYMOUS , "refs/drafts/*" ) . setBlock ( ) ; com.google.gerrit.server.project.Util.grant ( util.getParentConfig ( ) , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.ADMIN , "refs/drafts/*" ) ; org.junit.Assert.assertTrue ( "push is blocked for anonymous to refs/drafts/master" , util.user ( local ) . controlForRef ( "refs/drafts/refs/heads/master" ) . isBlocked ( com.google.gerrit.common.data.Permission.PUSH ) ) ; org.junit.Assert.assertFalse ( "push is blocked for admin refs/drafts/master" , util.user ( local , "a" , com.google.gerrit.server.project.Util.ADMIN ) . controlForRef ( "refs/drafts/refs/heads/master" ) . isBlocked ( com.google.gerrit.common.data.Permission.PUSH ) ) ; }

Target:
public void testBlockPushDraftsUnblockAdmin ( ) { com.google.gerrit.server.project.Util.grant ( util.getParentConfig ( ) , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS , "refs/drafts/*" ) . setBlock ( ) ; com.google.gerrit.server.project.Util.grant ( util.getParentConfig ( ) , com.google.gerrit.common.data.Permission.PUSH , com.google.gerrit.server.project.Util.ADMIN , "refs/drafts/*" ) ; org.junit.Assert.assertTrue ( "push is blocked for anonymous to refs/drafts/master" , util.user ( local ) . controlForRef ( "refs/drafts/refs/heads/master" ) . isBlocked ( com.google.gerrit.common.data.Permission.PUSH ) ) ; org.junit.Assert.assertFalse ( "push is blocked for admin refs/drafts/master" , util.user ( local , "a" , com.google.gerrit.server.project.Util.ADMIN ) . controlForRef ( "refs/drafts/refs/heads/master" ) . isBlocked ( com.google.gerrit.common.data.Permission.PUSH ) ) ; }
Source:
public com.google.gerrit.prettify.common.SparseHtmlFile getSparseHtmlFileA ( ) { com.google.gerrit.prettify.common.PrettySettings s = new com.google.gerrit.prettify.common.PrettySettings ( settings.getPrettySettings ( ) ) ; s.setFileName ( a.getPath ( ) ) ; s.setShowWhiteSpaceErrors ( false ) ; com.google.gerrit.prettify.common.PrettyFormatter f = ClientSideFormatter.FACTORY.get ( ) ; f.setPrettySettings ( s ) ; f.setEditFilter ( PrettyFormatter.A ) ; f.setEditList ( getEditList ( ) ) ; f.format ( a ) ; return f ; }

Target:
public com.google.gerrit.prettify.common.SparseHtmlFile getSparseHtmlFileA ( ) { com.google.gerrit.prettify.common.PrettySettings s = new com.google.gerrit.prettify.common.PrettySettings ( settings.getPrettySettings ( ) ) ; s.setFileName ( a.getPath ( ) ) ; s.setShowWhiteSpaceErrors ( false ) ; com.google.gerrit.prettify.common.PrettyFormatter f = ClientSideFormatter.FACTORY.get ( ) ; f.setPrettySettings ( s ) ; f.setEditFilter ( PrettyFormatter.A ) ; f.setEditList ( edits ) ; f.format ( a ) ; return f ; }
Source:
public void onSuccess ( com.google.gerrit.client.VoidResult result ) { for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; ) { com.google.gerrit.client.projects.BranchInfo k = getRowItem ( row ) ; if ( ( k != null ) && ( branches.contains ( k.ref ( ) ) ) ) { table.removeRow ( row ) ; } else { row ++ ; } } updateDeleteButton ( ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.VoidResult result ) { for ( int row = 1 ; row < ( table.getRowCount ( ) ) ; ) { com.google.gerrit.client.projects.BranchInfo k = getRowItem ( row ) ; if ( ( k != null ) && ( branches.contains ( k.ref ( ) ) ) ) { table.removeRow ( row ) ; } else { row ++ ; } } updateDeleteButton ( ) ; delBranch.setVisible ( branchTable.hasBranchCanDelete ( ) ) ; }
Source:
public void createNewChange ( ) throws java.lang.Exception { assertCreateSucceeds ( newChangeInput ( ChangeStatus.NEW ) ) ; }

Target:
public void createNewChangeWithChangeId ( ) throws java.lang.Exception { com.google.gerrit.extensions.common.ChangeInput ci = newChangeInput ( ChangeStatus.NEW ) ; java.lang.String changeId = "I1234000000000000000000000000000000000000" ; java.lang.String changeIdLine = "Change-Id: " + changeId ; ci.subject = "Subject\n\n" + changeIdLine ; com.google.gerrit.extensions.common.ChangeInfo info = assertCreateSucceeds ( ci ) ; com.google.common.truth.Truth.assertThat ( info.changeId ) . isEqualTo ( changeId ) ; com.google.common.truth.Truth.assertThat ( info.revisions.get ( info.currentRevision ) . commit.message ) . contains ( changeIdLine ) ; }
Source:
public void onSuccess ( final com.google.gerrit.common.data.HostPageData result ) { com.google.gerrit.client.Gerrit.myConfig = result.config ; com.google.gerrit.client.Gerrit.myTheme = result.theme ; 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 ( ) ; }

Target:
public void onSuccess ( final com.google.gerrit.common.data.HostPageData result ) { com.google.gerrit.client.Gerrit.myConfig = result.config ; com.google.gerrit.client.Gerrit.myTheme = result.theme ; if ( ( result.account ) != null ) { com.google.gerrit.client.Gerrit.myAccount = result.account ; } if ( ( result.accountDiffPref ) != null ) { com.google.gerrit.client.Gerrit.myAccountDiffPref = result.accountDiffPref ; com.google.gerrit.client.Gerrit.applyUserPreferences ( ) ; } onModuleLoad2 ( ) ; }
Source:
public static void display ( final java.lang.String token , final com.google.gerrit.client.ui.Screen view ) { if ( ( view.isRequiresSignIn ( ) ) && ( ! ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ) ) { com.google.gerrit.client.Gerrit.doSignIn ( token ) ; } else { view.setToken ( token ) ; if ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) { com.google.gerrit.client.change.LocalComments.saveInlineComments ( ) ; } com.google.gerrit.client.Gerrit.body.setView ( view ) ; } }

Target:
public static void display ( final java.lang.String token , final com.google.gerrit.client.ui.Screen view ) { if ( ( view.isRequiresSignIn ( ) ) && ( ! ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) ) ) { com.google.gerrit.client.Gerrit.doSignIn ( token ) ; } else { view.setToken ( token ) ; if ( com.google.gerrit.client.Gerrit.isSignedIn ( ) ) { com.google.gerrit.client.change.LocalComments.saveInlineComments ( ) ; } com.google.gerrit.client.Gerrit.body.setView ( view ) ; com.google.gerrit.client.Gerrit.updateUiLink ( token ) ; } }
Source:
public java.lang.String getVersion ( ) { java.lang.String fileName = getSrcFile ( ) . getFileName ( ) . toString ( ) ; int firstDash = fileName.indexOf ( "-" ) ; if ( firstDash > 0 ) { return fileName.substring ( ( firstDash + 1 ) , fileName.lastIndexOf ( ".js" ) ) ; } return "" ; }

Target:
public java.lang.String getVersion ( ) { java.lang.String fileName = getSrcFile ( ) . getFileName ( ) . toString ( ) ; int firstDash = fileName.indexOf ( "-" ) ; if ( firstDash > 0 ) { int extension = ( fileName.endsWith ( ".js" ) ) ? fileName.lastIndexOf ( ".js" ) : fileName.lastIndexOf ( ".html" ) ; if ( extension > 0 ) { return fileName.substring ( ( firstDash + 1 ) , extension ) ; } } return "" ; }
Source:
public void onRequestSuggestions ( final com.google.gerrit.client.ui.Request req , final com.google.gerrit.client.ui.Callback callback ) { com.google.gerrit.client.RpcStatus.hide ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.google.gerrit.client.projects.ProjectMap.suggest ( req.getQuery ( ) , req.getLimit ( ) , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.projects.ProjectMap > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.projects.ProjectMap map ) { callback.onSuggestionsReady ( req , new com.google.gerrit.client.ui.Response ( map.values ( ) . asList ( ) ) ) ; } } ) ; } } ) ; }

Target:
public void _onRequestSuggestions ( final com.google.gerrit.client.ui.Request req , final com.google.gerrit.client.ui.Callback callback ) { com.google.gerrit.client.RpcStatus.hide ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.google.gerrit.client.projects.ProjectMap.suggest ( req.getQuery ( ) , req.getLimit ( ) , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.client.projects.ProjectMap > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.projects.ProjectMap map ) { callback.onSuggestionsReady ( req , new com.google.gerrit.client.ui.Response ( map.values ( ) . asList ( ) ) ) ; } } ) ; } } ) ; }
Source:
public void stop ( ) { handle.remove ( ) ; }

Target:
public void add ( com.google.gerrit.extensions.registration.RegistrationHandle handle ) { if ( handle instanceof com.google.gerrit.extensions.registration.ReloadableRegistrationHandle ) { if ( ( reloadableHandles ) == null ) { reloadableHandles = com.google.common.collect.Lists.newArrayList ( ) ; } reloadableHandles.add ( ( ( com.google.gerrit.extensions.registration.ReloadableRegistrationHandle < ? > ) ( handle ) ) ) ; } manager.add ( handle ) ; }
Source:
protected void configure ( ) { install ( new com.google.gerrit.server.index.IndexModule ( 1 ) ) ; bind ( com.google.gerrit.server.index.IndexConfig.class ) . toInstance ( com.google.gerrit.server.index.IndexConfig.createDefault ( ) ) ; bind ( com.google.gerrit.server.index.Index.class ) . toInstance ( new com.google.gerrit.server.index.change.DummyChangeIndex ( ) ) ; }

Target:
protected void configure ( ) { install ( new com.google.gerrit.server.index.IndexModule ( 1 ) ) ; bind ( com.google.gerrit.server.index.IndexConfig.class ) . toInstance ( com.google.gerrit.server.index.IndexConfig.createDefault ( ) ) ; bind ( com.google.gerrit.server.index.Index.class ) . toInstance ( new com.google.gerrit.server.index.change.DummyChangeIndex ( ) ) ; bind ( ChangeIndex.Factory.class ) . toInstance ( new com.google.gerrit.server.index.DummyIndexModule.DummyChangeIndexFactory ( ) ) ; }
Source:
public void allQueryNext ( final java.lang.String query , final java.lang.String pos , final int pageSize , final com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.common.data.SingleListChangeInfo > callback ) { run ( callback , new com.google.gerrit.httpd.rpc.ChangeListServiceImpl.QueryNext ( pageSize , pos ) { @ java.lang.Override 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.gwtorm.client.OrmException { return searchQuery ( db , query , lim , key , com.google.gerrit.httpd.rpc.ChangeListServiceImpl.QUERY_NEXT ) ; } } ) ; }

Target:
public void allQueryNext ( final java.lang.String query , final java.lang.String pos , final int pageSize , final com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.common.data.SingleListChangeInfo > callback ) { run ( callback , new com.google.gerrit.httpd.rpc.ChangeListServiceImpl.QueryNext ( pageSize , pos ) { @ java.lang.Override 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_NEXT ) ; } } ) ; }
Source:
private void doCreateGroup ( ) { final java.lang.String newName = addTxt.getText ( ) ; if ( ( newName == null ) || ( ( newName.length ( ) ) == 0 ) ) { return ; } Util.GROUP_SVC.createGroup ( newName , new com.google.gerrit.client.rpc.GerritCallback < com.google.gerrit.reviewdb.AccountGroup.Id > ( ) { public void onSuccess ( final com.google.gerrit.reviewdb.AccountGroup.Id result ) { com.google.gwt.user.client.History.newItem ( com.google.gerrit.client.Dispatcher.toAccountGroup ( result ) ) ; } } ) ; }

Target:
public void onFailure ( java.lang.Throwable caught ) { super . onFailure ( caught ) ; addNew.setEnabled ( true ) ; }
Source:
public static GroupDescription.Internal forAccountGroup ( com.google.gerrit.reviewdb.client.AccountGroup group ) { return new com.google.gerrit.common.data.GroupDescription.Internal ( ) { @ java.lang.Override public AccountGroup.UUID getGroupUUID ( ) { return group.getGroupUUID ( ) ; } @ java.lang.Override public java.lang.String getName ( ) { return group.getName ( ) ; } @ java.lang.Override public com.google.gerrit.reviewdb.client.AccountGroup getAccountGroup ( ) { return group ; } @ java.lang.Override @ com.google.gerrit.common.Nullable public java.lang.String getEmailAddress ( ) { return null ; } @ java.lang.Override @ com.google.gerrit.common.Nullable public java.lang.String getUrl ( ) { return "#" + ( com.google.gerrit.common.PageLinks.toGroup ( getGroupUUID ( ) ) ) ; } } ; }

Target:
public java.lang.String getDescription ( ) { return group.getDescription ( ) ; }
Source:
private void initSequences ( org.eclipse.jgit.lib.Repository git , org.eclipse.jgit.lib.BatchRefUpdate bru ) throws java.io.IOException { if ( ( notesMigration.readChangeSequence ( ) ) && ( ( git.exactRef ( ( ( com.google.gerrit.reviewdb.client.RefNames.REFS_SEQUENCES ) + ( com.google.gerrit.server.Sequences.CHANGES ) ) ) ) == null ) ) { try ( org.eclipse.jgit.lib.ObjectInserter ins = git.newObjectInserter ( ) ) { bru.addCommand ( com.google.gerrit.server.notedb.RepoSequence.storeNew ( ins , Sequences.CHANGES , firstChangeId ) ) ; ins.flush ( ) ; } } }

Target:
private void initSequences ( org.eclipse.jgit.lib.Repository git , org.eclipse.jgit.lib.BatchRefUpdate bru ) throws java.io.IOException { if ( ( notesMigration.readChangeSequence ( ) ) && ( ( git.exactRef ( ( ( com.google.gerrit.reviewdb.client.RefNames.REFS_SEQUENCES ) + ( com.google.gerrit.server.Sequences.NAME_CHANGES ) ) ) ) == null ) ) { try ( org.eclipse.jgit.lib.ObjectInserter ins = git.newObjectInserter ( ) ) { bru.addCommand ( com.google.gerrit.server.notedb.RepoSequence.storeNew ( ins , Sequences.NAME_CHANGES , firstChangeId ) ) ; ins.flush ( ) ; } } }