auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.server.validators.ProjectCreationValidationListener.class ) . to ( com.googlesource.gerrit.plugins.quota.MaxRepositoriesQuotaValidator.class ) ; com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.server.git.ReceivePackInitializer.class ) . to ( com.googlesource.gerrit.plugins.quota.MaxRepositorySizeQuota.class ) ; }

Target:
protected void configure ( ) { com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.server.validators.ProjectCreationValidationListener.class ) . to ( com.googlesource.gerrit.plugins.quota.MaxRepositoriesQuotaValidator.class ) ; com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , com.google.gerrit.server.git.ReceivePackInitializer.class ) . to ( com.googlesource.gerrit.plugins.quota.MaxRepositorySizeQuota.class ) ; com.google.gerrit.extensions.registration.DynamicSet.bind ( binder ( ) , org.eclipse.jgit.transport.PostReceiveHook.class ) . to ( com.googlesource.gerrit.plugins.quota.MaxRepositorySizeQuota.class ) ; install ( com.googlesource.gerrit.plugins.quota.MaxRepositorySizeQuota.module ( ) ) ; }
Source:
java.util.Set < com.google.gerrit.server.account.externalids.ExternalId > all ( org.eclipse.jgit.lib.ObjectId rev ) throws java.io.IOException { checkReadEnabled ( ) ; try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( allUsersName ) ) { return all ( repo , rev ) ; } }

Target:
java.util.Set < com.google.gerrit.server.account.externalids.ExternalId > all ( org.eclipse.jgit.lib.ObjectId rev ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { checkReadEnabled ( ) ; try ( com.google.gerrit.metrics.Timer0.Context ctx = readAllLatency.start ( ) ; org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( allUsersName ) ) { return com.google.gerrit.server.account.externalids.ExternalIdNotes.loadReadOnly ( repo , rev ) . all ( ) ; } }
Source:
public org.parboiled.Rule note ( ) { org.parboiled.support.StringBuilderVar body = new org.parboiled.support.StringBuilderVar ( ) ; return NodeSequence ( string ( "***" ) , whitespace ( ) , typeOfNote ( ) , Newline ( ) , oneOrMore ( testNot ( string ( "***" ) , Newline ( ) ) , BaseParser.ANY , body.append ( matchedChar ( ) ) ) , string ( "***" ) , Newline ( ) , push ( new com.google.gitiles.doc.DivNode ( ( ( com.google.gitiles.doc.DivNode.Style ) ( pop ( ) ) ) , parse ( body ) . getChildren ( ) ) ) ) ; }

Target:
public org.parboiled.Rule note ( ) { org.parboiled.support.StringBuilderVar body = new org.parboiled.support.StringBuilderVar ( ) ; return NodeSequence ( string ( "***" ) , Sp ( ) , typeOfNote ( ) , Newline ( ) , oneOrMore ( testNot ( string ( "***" ) , Newline ( ) ) , Line ( body ) ) , string ( "***" ) , Newline ( ) , push ( new com.google.gitiles.doc.DivNode ( popAsString ( ) , parse ( body ) ) ) ) ; }
Source:
private int limit ( com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > s ) { return queryBuilder.hasLimit ( s ) ? queryBuilder.getLimit ( s ) : maxLimit ; }

Target:
private int limit ( com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > s ) { int n = ( queryBuilder.hasLimit ( s ) ) ? queryBuilder.getLimit ( s ) : maxLimit ; return ( limit ) > 0 ? ( java.lang.Math.min ( n , limit ) ) + 1 : n ; }
Source:
public boolean isIdentityTrustable ( final java.util.Collection < com.google.gerrit.reviewdb.AccountExternalId > ids ) { switch ( getAuthType ( ) ) { case DEVELOPMENT_BECOME_ANY_ACCOUNT : case HTTP : case HTTP_LDAP : case LDAP : case LDAP_BIND : return true ; case OPENID : for ( final com.google.gerrit.reviewdb.AccountExternalId e : ids ) { if ( ! ( isTrusted ( e ) ) ) { return false ; } } return true ; default : return false ; } }

Target:
public boolean isIdentityTrustable ( final java.util.Collection < com.google.gerrit.reviewdb.AccountExternalId > ids ) { switch ( getAuthType ( ) ) { case DEVELOPMENT_BECOME_ANY_ACCOUNT : case HTTP : case HTTP_LDAP : case LDAP : case LDAP_BIND : case CLIENT_SSL_CERT_LDAP : return true ; case OPENID : for ( final com.google.gerrit.reviewdb.AccountExternalId e : ids ) { if ( ! ( isTrusted ( e ) ) ) { return false ; } } return true ; default : return false ; } }
Source:
public void assertCanDelete ( com.google.gerrit.reviewdb.client.Project project ) throws java.lang.Exception { final java.sql.Connection conn = ( ( com.google.gwtorm.jdbc.JdbcSchema ) ( db ) ) . getConnection ( ) ; final java.lang.String projectName = project.getName ( ) ; if ( conn.createStatement ( ) . executeQuery ( ( ( ( "SELECT * FROM submodule_subscriptions WHERE " + "super_project_project_name = '" ) + projectName ) + "'" ) ) . first ( ) ) { throw new java.lang.Exception ( ( ( "Cannot delete project " + projectName ) + ", it has subscribed submodules." ) ) ; } }

Target:
public void assertCanDelete ( com.google.gerrit.reviewdb.client.Project project ) throws java.lang.Exception { final java.sql.Connection conn = ( ( com.google.gwtorm.jdbc.JdbcSchema ) ( db ) ) . getConnection ( ) ; final java.lang.String projectName = project.getName ( ) ; if ( conn.createStatement ( ) . executeQuery ( ( ( ( "SELECT * FROM submodule_subscriptions WHERE " + "super_project_project_name = '" ) + projectName ) + "'" ) ) . first ( ) ) { throw new java.lang.Exception ( "Project has subscribed submodules." ) ; } }
Source:
private void populateTableHeader ( final com.google.gerrit.common.data.PatchScript script , final com.google.gerrit.common.data.PatchSetDetail detail ) { initHeaders ( script , detail ) ; table.setWidget ( com.google.gerrit.client.patches.R_HEAD , com.google.gerrit.client.patches.SideBySideTable.A , headerSideA ) ; table.setWidget ( com.google.gerrit.client.patches.R_HEAD , com.google.gerrit.client.patches.SideBySideTable.B , headerSideB ) ; if ( headerSideA.isFile ( ) ) { table.setWidget ( com.google.gerrit.client.patches.R_HEAD , ( ( com.google.gerrit.client.patches.SideBySideTable.A ) - 1 ) , iconA ) ; } if ( headerSideB.isFile ( ) ) { table.setWidget ( com.google.gerrit.client.patches.R_HEAD , ( ( com.google.gerrit.client.patches.SideBySideTable.B ) + 1 ) , iconB ) ; } }

Target:
private void populateTableHeader ( final com.google.gerrit.common.data.PatchScript script , final com.google.gerrit.common.data.PatchSetDetail detail ) { initHeaders ( script , detail ) ; table.setWidget ( com.google.gerrit.client.patches.R_HEAD , com.google.gerrit.client.patches.SideBySideTable.A , headerSideA ) ; table.setWidget ( com.google.gerrit.client.patches.R_HEAD , com.google.gerrit.client.patches.SideBySideTable.B , headerSideB ) ; if ( headerSideA.isFileOrCommitMessage ( ) ) { table.setWidget ( com.google.gerrit.client.patches.R_HEAD , ( ( com.google.gerrit.client.patches.SideBySideTable.A ) - 1 ) , iconA ) ; } if ( headerSideB.isFileOrCommitMessage ( ) ) { table.setWidget ( com.google.gerrit.client.patches.R_HEAD , ( ( com.google.gerrit.client.patches.SideBySideTable.B ) + 1 ) , iconB ) ; } }
Source:
public void listNonEmptyGroupIncludes ( ) throws java.lang.Exception { group ( "gx" , "Administrators" ) ; group ( "gy" , "Administrators" ) ; PUT ( "/groups/Administrators/groups/gx" ) ; PUT ( "/groups/Administrators/groups/gy" ) ; assertIncludes ( GET ( "/groups/Administrators/groups/" ) , "gx" , "gy" ) ; }

Target:
public void listEmptyGroupIncludes ( ) throws java.lang.Exception { java.lang.String gx = group ( "gx" , "Administrators" ) ; PUT ( ( ( ( "/groups/" + gx ) + "/groups/" ) + ( name ( "emptygroup" ) ) ) ) ; com.google.common.truth.Truth.assertThat ( GET ( "/groups/Administrators/groups/" ) ) . isEmpty ( ) ; }
Source:
static com.google.gerrit.server.update.Order getOrder ( java.util.Collection < ? extends com.google.gerrit.server.update.BatchUpdate > updates ) { com.google.gerrit.server.update.Order o = null ; for ( com.google.gerrit.server.update.BatchUpdate u : updates ) { if ( o == null ) { o = u.order ; } else if ( ( u.order ) != o ) { throw new java.lang.IllegalArgumentException ( "cannot mix execution orders" ) ; } } return o ; }

Target:
static com.google.gerrit.server.update.Order getOrder ( java.util.Collection < ? extends com.google.gerrit.server.update.BatchUpdate > updates , com.google.gerrit.server.update.BatchUpdateListener listener ) { com.google.gerrit.server.update.Order o = null ; for ( com.google.gerrit.server.update.BatchUpdate u : updates ) { if ( o == null ) { o = u.order ; } else if ( ( u.order ) != o ) { throw new java.lang.IllegalArgumentException ( "cannot mix execution orders" ) ; } } if ( o != ( Order.REPO_BEFORE_DB ) ) { com.google.common.base.Preconditions.checkArgument ( ( listener == ( BatchUpdateListener.NONE ) ) , "BatchUpdateListener not supported for order %s" , o ) ; } return o ; }
Source:
public java.lang.String fullFileRef ( ) { return branch.concat ( fileRef ) ; }

Target:
public java.lang.String fullFileRef ( ) { if ( ! ( branch.contains ( RefNames.REFS_HEADS ) ) ) { return ( com.google.gerrit.reviewdb.client.RefNames.REFS_HEADS ) + ( fileRef ) ; } if ( wildcardBranch ) { return ( branch ) + ( fileRef ) ; } else { return branch ; } }
Source:
void showTable ( ) { this . myBody.clear ( ) ; this . myBody.add ( table ) ; this . myTable = table ; table.finishDisplay ( ) ; if ( ( this . onLoadCommand ) != null ) { this . onLoadCommand.execute ( ) ; this . onLoadCommand = null ; } }

Target:
void showTable ( ) { setMyTable ( table ) ; if ( ( this . onLoadCommand ) != null ) { this . onLoadCommand.execute ( ) ; this . onLoadCommand = null ; } }
Source:
public void testMultipleSlashes ( ) throws java.lang.Exception { repo.branch ( "refs/heads/master" ) . commit ( ) . create ( ) ; assertEquals ( Type.HOST_INDEX , getView ( "//" ) . getType ( ) ) ; assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo" ) . getType ( ) ) ; assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo//" ) . getType ( ) ) ; assertNull ( getView ( "/repo/+//master" ) ) ; assertNull ( getView ( "/repo/+/refs//heads//master" ) ) ; assertNull ( getView ( "/repo/+//master//" ) ) ; assertNull ( getView ( "/repo/+//master/foo//bar" ) ) ; }

Target:
public void multipleSlashes ( ) throws java.lang.Exception { repo.branch ( "refs/heads/master" ) . commit ( ) . create ( ) ; org.junit.Assert.assertEquals ( Type.HOST_INDEX , getView ( "//" ) . getType ( ) ) ; org.junit.Assert.assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo" ) . getType ( ) ) ; org.junit.Assert.assertEquals ( Type.REPOSITORY_INDEX , getView ( "//repo//" ) . getType ( ) ) ; org.junit.Assert.assertNull ( getView ( "/repo/+//master" ) ) ; org.junit.Assert.assertNull ( getView ( "/repo/+/refs//heads//master" ) ) ; org.junit.Assert.assertNull ( getView ( "/repo/+//master//" ) ) ; org.junit.Assert.assertNull ( getView ( "/repo/+//master/foo//bar" ) ) ; }
Source:
public void testDummyChangeEvent ( ) { com.googlesource.gerrit.plugins.hooks.util.PropertyExtractor propertyExtractor = injector.getInstance ( com.googlesource.gerrit.plugins.hooks.util.PropertyExtractor.class ) ; com.googlesource.gerrit.plugins.hooks.workflow.Property property1 = createMock ( com.googlesource.gerrit.plugins.hooks.workflow.Property.class ) ; org.easymock.EasyMock.expect ( propertyFactory.create ( "event" , ( "com.googlesource.gerrit.plugins." + "hooks.util.PropertyExtractorTest$DummyEvent" ) ) ) . andReturn ( property1 ) ; replayMocks ( ) ; java.util.Set < java.util.Set < com.googlesource.gerrit.plugins.hooks.workflow.Property > > actual = propertyExtractor.extractFrom ( new com.googlesource.gerrit.plugins.hooks.util.DummyEvent ( ) ) ; java.util.Set < java.util.Set < com.googlesource.gerrit.plugins.hooks.workflow.Property > > expected = com.google.common.collect.Sets.newHashSet ( ) ; assertEquals ( "Properties do not match" , expected , actual ) ; }

Target:
public void testDummyChangeEvent ( ) { com.googlesource.gerrit.plugins.hooks.util.PropertyExtractor propertyExtractor = injector.getInstance ( com.googlesource.gerrit.plugins.hooks.util.PropertyExtractor.class ) ; com.googlesource.gerrit.plugins.hooks.workflow.Property property1 = createMock ( com.googlesource.gerrit.plugins.hooks.workflow.Property.class ) ; org.easymock.EasyMock.expect ( propertyFactory.create ( "event" , ( "com.googlesource.gerrit.plugins." + "hooks.util.PropertyExtractorTest$DummyEvent" ) ) ) . andReturn ( property1 ) ; replayMocks ( ) ; java.util.Set < java.util.Set < com.googlesource.gerrit.plugins.hooks.workflow.Property > > actual = propertyExtractor.extractFrom ( new com.googlesource.gerrit.plugins.hooks.util.PropertyExtractorTest.DummyEvent ( ) ) ; java.util.Set < java.util.Set < com.googlesource.gerrit.plugins.hooks.workflow.Property > > expected = com.google.common.collect.Sets.newHashSet ( ) ; assertEquals ( "Properties do not match" , expected , actual ) ; }
Source:
private boolean isNewRef ( com.googlesource.gerrit.plugins.refprotection.Event event ) { return event.getOldObjectId ( ) . equals ( org.eclipse.jgit.lib.ObjectId.zeroId ( ) . getName ( ) ) ; }

Target:
private boolean isRefDeleted ( com.google.gerrit.server.events.RefUpdatedEvent event ) { if ( event.refUpdate.newRev.equals ( org.eclipse.jgit.lib.ObjectId.zeroId ( ) . getName ( ) ) ) { com.googlesource.gerrit.plugins.refprotection.RefUpdateListener.log.info ( java.lang.String.format ( "Ref Deleted: project [%s] refname [%s] old object id [%s]" , event.getProjectNameKey ( ) . toString ( ) , event.getRefName ( ) , event.refUpdate.oldRev ) ) ; return true ; } return false ; }
Source:
public static void terminate ( ) { final java.util.concurrent.ScheduledThreadPoolExecutor p = com.google.gerrit.git.WorkQueue.shutdown ( ) ; if ( p != null ) { boolean isTerminated ; do { try { isTerminated = p.awaitTermination ( 10 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException ie ) { isTerminated = false ; } } while ( ! isTerminated ) ; } }

Target:
public static void terminate ( ) { for ( final com.google.gerrit.git.WorkQueue.Executor p : com.google.gerrit.git.WorkQueue.queues ) { p.shutdown ( ) ; boolean isTerminated ; do { try { isTerminated = p.awaitTermination ( 10 , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException ie ) { isTerminated = false ; } } while ( ! isTerminated ) ; } com.google.gerrit.git.WorkQueue.queues.clear ( ) ; }
Source:
private boolean authPlain ( java.lang.String smtpUser , java.lang.String smtpPass ) throws java.io.IOException , java.io.UnsupportedEncodingException { java.lang.String token = ( ( '' + smtpUser ) + '' ) + smtpPass ; java.lang.String cmd = "PLAIN " + ( org.apache.commons.net.smtp.AuthSMTPClient.encodeBase64 ( token.getBytes ( org.apache.commons.net.smtp.AuthSMTPClient.UTF_8 ) ) ) ; return org.apache.commons.net.smtp.SMTPReply.isPositiveCompletion ( sendCommand ( "AUTH" , cmd ) ) ; }

Target:
private boolean authPlain ( java.lang.String smtpUser , java.lang.String smtpPass ) throws java.io.IOException , java.io.UnsupportedEncodingException { java.lang.String token = ( ( '' + smtpUser ) + '' ) + smtpPass ; java.lang.String cmd = "PLAIN " + ( org.apache.commons.net.smtp.AuthSMTPClient.encodeBase64 ( token.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ) ; return org.apache.commons.net.smtp.SMTPReply.isPositiveCompletion ( sendCommand ( "AUTH" , cmd ) ) ; }
Source:
protected com.google.common.base.Optional < com.googlesource.gerrit.plugins.lfs.LfsSshRequestAuthorizer.LfsSshAuthToken > createToken ( java.util.List < java.lang.String > values ) { if ( ( values.size ( ) ) != 4 ) { return com.google.common.base.Optional.absent ( ) ; } return com.google.common.base.Optional.of ( new com.googlesource.gerrit.plugins.lfs.LfsSshRequestAuthorizer.LfsSshAuthToken ( values.get ( 0 ) , values.get ( 1 ) , values.get ( 2 ) , values.get ( 3 ) ) ) ; }

Target:
protected java.util.Optional < com.googlesource.gerrit.plugins.lfs.LfsSshRequestAuthorizer.LfsSshAuthToken > createToken ( java.util.List < java.lang.String > values ) { if ( ( values.size ( ) ) != 4 ) { return java.util.Optional.empty ( ) ; } return java.util.Optional.of ( new com.googlesource.gerrit.plugins.lfs.LfsSshRequestAuthorizer.LfsSshAuthToken ( values.get ( 0 ) , values.get ( 1 ) , values.get ( 2 ) , values.get ( 3 ) ) ) ; }
Source:
public java.net.SocketAddress get ( ) { return peer ; }

Target:
private com.google.gerrit.sshd.SshSession newSession ( ) { final java.net.SocketAddress peer ; if ( ( peerAddress ) == null ) { peer = session.get ( ) . getRemoteAddress ( ) ; } else { peer = peerAddress ; } return new com.google.gerrit.sshd.SshSession ( session.get ( ) , peer , userFactory.create ( peer , accountId ) ) ; }
Source:
public void visit ( org.pegdown.ast.DefinitionNode node ) { wrapChildren ( "dd" , node ) ; }

Target:
public void visit ( org.commonmark.node.OrderedList node ) { html.open ( "ol" ) ; if ( ( node.getStartNumber ( ) ) != 1 ) { html.attribute ( "start" , java.lang.Integer.toString ( node.getStartNumber ( ) ) ) ; } visitChildren ( node ) ; html.close ( "ol" ) ; }
Source:
public java.lang.String toString ( ) { java.nio.ByteBuffer buf = java.nio.ByteBuffer.wrap ( fp ) ; return java.lang.String.format ( "(%04X %04X %04X %04X %04X %04X %04X %04X %04X %04X)" , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) , buf.getShort ( ) ) ; }

Target:
public long getId ( ) { return org.eclipse.jgit.util.NB.decodeInt64 ( fp , 12 ) ; }
Source:
private static java.lang.String extractTitleFromMarkdown ( com.google.gerrit.server.plugins.PluginContentScanner scanner , com.google.gerrit.server.plugins.PluginEntry entry ) throws java.io.IOException { java.lang.String charEnc = null ; java.util.Map < java.lang.Object , java.lang.String > atts = entry.getAttrs ( ) ; if ( atts != null ) { charEnc = com.google.common.base.Strings.emptyToNull ( atts.get ( com.google.gerrit.server.plugins.PluginEntry.ATTR_CHARACTER_ENCODING ) ) ; } if ( charEnc == null ) { charEnc = "UTF-8" ; } return new com.google.gerrit.server.documentation.MarkdownFormatter ( ) . extractTitleFromMarkdown ( com.google.gerrit.httpd.plugins.HttpPluginServlet.readWholeEntry ( scanner , entry ) , charEnc ) ; }

Target:
private static java.lang.String extractTitleFromMarkdown ( com.google.gerrit.server.plugins.PluginContentScanner scanner , com.google.gerrit.server.plugins.PluginEntry entry ) throws java.io.IOException { java.lang.String charEnc = null ; java.util.Map < java.lang.Object , java.lang.String > atts = entry.getAttrs ( ) ; if ( atts != null ) { charEnc = com.google.common.base.Strings.emptyToNull ( atts.get ( com.google.gerrit.server.plugins.PluginEntry.ATTR_CHARACTER_ENCODING ) ) ; } if ( charEnc == null ) { charEnc = java.nio.charset.StandardCharsets.UTF_8.name ( ) ; } return new com.google.gerrit.server.documentation.MarkdownFormatter ( ) . extractTitleFromMarkdown ( com.google.gerrit.httpd.plugins.HttpPluginServlet.readWholeEntry ( scanner , entry ) , charEnc ) ; }
Source:
public com.google.gerrit.client.reviewdb.Account run ( com.google.gerrit.client.reviewdb.ReviewDb db ) throws com.google.gerrit.server.rpc.account.Failure { final com.google.gerrit.client.reviewdb.Account a = com.google.gerrit.client.rpc.Common.getAccountCache ( ) . get ( com.google.gerrit.client.rpc.Common.getAccountId ( ) , db ) ; if ( a == null ) { throw new com.google.gerrit.server.rpc.account.Failure ( new com.google.gerrit.client.rpc.NoSuchEntityException ( ) ) ; } return a ; }

Target:
public void myAccount ( final com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.reviewdb.Account > callback ) { callback.onSuccess ( currentUser.get ( ) . getAccount ( ) ) ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { inEmail.setEnabled ( true ) ; register.setEnabled ( true ) ; super . onFailure ( caught ) ; }

Target:
public void onFailure ( final java.lang.Throwable caught ) { inEmail.setEnabled ( true ) ; register.setEnabled ( true ) ; if ( caught.getMessage ( ) . startsWith ( EmailException.MESSAGE ) ) { final com.google.gerrit.client.ErrorDialog d = new com.google.gerrit.client.ErrorDialog ( caught.getMessage ( ) . substring ( EmailException.MESSAGE.length ( ) ) ) ; d.setText ( Util.C.errorDialogTitleRegisterNewEmail ( ) ) ; d.center ( ) ; } else { super . onFailure ( caught ) ; } }
Source:
private void verifyComment ( com.google.gerrit.reviewdb.client.PatchLineComment c ) { com.google.common.base.Preconditions.checkArgument ( ( ( c.getRevId ( ) ) != null ) ) ; com.google.common.base.Preconditions.checkArgument ( c.getAuthor ( ) . equals ( getUser ( ) . getAccountId ( ) ) , ( "The author for the following comment does not match the author of" + " this ChangeDraftUpdate (%s): %s" ) , getUser ( ) . getAccountId ( ) , c ) ; }

Target:
com.google.gerrit.server.notedb.ChangeDraftUpdate createDraftUpdateIfNull ( ) { if ( ( draftUpdate ) == null ) { draftUpdate = draftUpdateFactory.create ( getNotes ( ) , accountId , authorIdent , when ) ; } return draftUpdate ; }
Source:
public void branchDelegation1 ( ) { com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.Util.ADMIN , "refs/*" ) ; com.google.gerrit.server.project.Util.allow ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.Util.DEVS , "refs/heads/x/*" ) ; com.google.gerrit.server.project.ProjectControl uDev = user ( local , com.google.gerrit.server.project.Util.DEVS ) ; assertNotOwner ( uDev ) ; assertOwnerAnyRef ( uDev ) ; assertOwner ( "refs/heads/x/*" , uDev ) ; assertOwner ( "refs/heads/x/y" , uDev ) ; assertOwner ( "refs/heads/x/y/*" , uDev ) ; assertNotOwner ( "refs/*" , uDev ) ; assertNotOwner ( "refs/heads/master" , uDev ) ; }

Target:
public void branchDelegation1 ( ) { com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.testing.Util.ADMIN , "refs/*" ) ; com.google.gerrit.server.project.testing.Util.allow ( local , com.google.gerrit.common.data.Permission.OWNER , com.google.gerrit.server.project.testing.Util.DEVS , "refs/heads/x/*" ) ; com.google.gerrit.server.project.ProjectControl uDev = user ( local , com.google.gerrit.server.project.testing.Util.DEVS ) ; assertNotOwner ( uDev ) ; assertOwner ( "refs/heads/x/*" , uDev ) ; assertOwner ( "refs/heads/x/y" , uDev ) ; assertOwner ( "refs/heads/x/y/*" , uDev ) ; assertNotOwner ( "refs/*" , uDev ) ; assertNotOwner ( "refs/heads/master" , uDev ) ; }
Source:
protected void setupSoyContext ( ) { super . setupSoyContext ( ) ; soyContext.put ( "projectName" , branch.getParentKey ( ) . get ( ) ) ; soyContextEmailData.put ( "sshHost" , getSshHost ( ) ) ; java.util.Map < java.lang.String , java.lang.String > branchData = new java.util.HashMap < > ( ) ; branchData.put ( "shortName" , branch.getShortName ( ) ) ; soyContext.put ( "branch" , branchData ) ; }

Target:
protected void setupSoyContext ( ) { super . setupSoyContext ( ) ; java.lang.String projectName = branch.getParentKey ( ) . get ( ) ; soyContext.put ( "projectName" , projectName ) ; soyContext.put ( "shortProjectName" , projectName.replaceAll ( "/.*/" , "..." ) ) ; soyContextEmailData.put ( "sshHost" , getSshHost ( ) ) ; java.util.Map < java.lang.String , java.lang.String > branchData = new java.util.HashMap < > ( ) ; branchData.put ( "shortName" , branch.getShortName ( ) ) ; soyContext.put ( "branch" , branchData ) ; }
Source:
public static void generateHttpPassword ( java.lang.String account , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.rpc.NativeString > cb ) { com.google.gerrit.client.account.AccountApi.HttpPasswordInput in = com.google.gerrit.client.account.AccountApi.HttpPasswordInput.create ( ) ; in.generate ( true ) ; new com.google.gerrit.client.rpc.RestApi ( "/accounts/" ) . id ( account ) . view ( "password.http" ) . put ( in , cb ) ; }

Target:
public static void generateHttpPassword ( java.lang.String account , com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.rpc.NativeString > cb ) { com.google.gerrit.client.account.AccountApi.HttpPasswordInput in = com.google.gerrit.client.account.AccountApi.HttpPasswordInput.create ( ) ; in.generate ( true ) ; com.google.gerrit.client.account.AccountApi.accounts ( ) . id ( account ) . view ( "password.http" ) . put ( in , cb ) ; }
Source:
private void applyReview ( final com.google.gerrit.server.project.ChangeControl ctl , final com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId , final com.google.gerrit.server.change.PostReview.Input review ) throws java.lang.Exception { reviewProvider.get ( ) . apply ( new com.google.gerrit.server.change.RevisionResource ( new com.google.gerrit.server.change.ChangeResource ( ctl ) , db.patchSets ( ) . get ( patchSetId ) ) , review ) ; }

Target:
private void applyReview ( final com.google.gerrit.server.project.ChangeControl ctl , final com.google.gerrit.reviewdb.client.PatchSet.Id patchSetId , final com.google.gerrit.server.change.PostReview.Input review ) throws java.lang.Exception { if ( ! ( review.labels.isEmpty ( ) ) ) { reviewProvider.get ( ) . apply ( new com.google.gerrit.server.change.RevisionResource ( new com.google.gerrit.server.change.ChangeResource ( ctl ) , db.patchSets ( ) . get ( patchSetId ) ) , review ) ; } }
Source:
private static java.lang.String getURLEncoded ( java.lang.String url ) { try { return java.net.URLEncoder.encode ( url , "UTF-8" ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.IllegalStateException ( "Cannot find UTF-8 encoding" , e ) ; } }

Target:
private static java.lang.String getURLEncodedParameter ( java.lang.String prefix , java.lang.String url ) { try { return com.google.common.base.Strings.isNullOrEmpty ( url ) ? "" : prefix + ( java.net.URLEncoder.encode ( url , "UTF-8" ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new java.lang.IllegalStateException ( "Cannot find UTF-8 encoding" , e ) ; } }
Source:
public void configure ( ) { listener ( ) . to ( com.google.gerrit.server.index.SingleVersionModule.SingleVersionListener.class ) ; bind ( new com.google.inject.TypeLiteral < java.util.Map < java.lang.String , java.lang.Integer > > ( ) { } ) . annotatedWith ( com.google.inject.name.Names.named ( com.google.gerrit.server.index.SingleVersionModule.SINGLE_VERSIONS ) ) . toInstance ( singleVersions ) ; }

Target:
public void configure ( ) { listener ( ) . to ( com.google.gerrit.server.index.SingleVersionModule.SingleVersionListener.class ) ; bind ( new com.google.inject.TypeLiteral < java.util.Map < java.lang.String , java.lang.Integer > > ( ) { } ) . annotatedWith ( com.google.inject.name.Names.named ( com.google.gerrit.server.index.SingleVersionModule.SINGLE_VERSIONS ) ) . toProvider ( com.google.inject.util.Providers.of ( singleVersions ) ) ; }
Source:
public void testUpdateNoPerson ( ) throws java.lang.Exception { final com.google.gwtorm.data.PhoneBookDb schema = open ( ) ; final com.google.gwtorm.data.TestPerson bob = new com.google.gwtorm.data.TestPerson ( new com.google.gwtorm.data.TestPerson.Key ( "Bob" ) , 18 ) ; try { schema.people ( ) . update ( java.util.Collections.singleton ( bob ) ) ; fail ( "Update of missing person succeeded" ) ; } catch ( com.google.gwtorm.client.OrmConcurrencyException e ) { assertEquals ( "Concurrent modification detected" , e.getMessage ( ) ) ; } }

Target:
public void testUpdateOnePerson ( ) throws java.lang.Exception { final com.google.gwtorm.data.PhoneBookDb schema = open ( ) ; final com.google.gwtorm.data.Person bob = new com.google.gwtorm.data.Person ( new com.google.gwtorm.data.Person.Key ( "Bob" ) , 18 ) ; schema.people ( ) . insert ( java.util.Collections.singleton ( bob ) ) ; bob.growOlder ( ) ; schema.people ( ) . update ( java.util.Collections.singleton ( bob ) ) ; }
Source:
private void configureCmdLineParser ( ) { factory ( CmdLineParser.Factory.class ) ; registerOptionHandler ( Account.Id.class , com.google.gerrit.sshd.args4j.AccountIdHandler.class ) ; registerOptionHandler ( AccountGroup.Id.class , com.google.gerrit.sshd.args4j.AccountGroupIdHandler.class ) ; registerOptionHandler ( AccountGroup.UUID.class , com.google.gerrit.sshd.args4j.AccountGroupUUIDHandler.class ) ; registerOptionHandler ( PatchSet.Id.class , com.google.gerrit.sshd.args4j.PatchSetIdHandler.class ) ; registerOptionHandler ( com.google.gerrit.server.project.ProjectControl.class , com.google.gerrit.sshd.args4j.ProjectControlHandler.class ) ; registerOptionHandler ( java.net.SocketAddress.class , com.google.gerrit.sshd.args4j.SocketAddressHandler.class ) ; }

Target:
private void configureCmdLineParser ( ) { factory ( CmdLineParser.Factory.class ) ; registerOptionHandler ( Account.Id.class , com.google.gerrit.sshd.args4j.AccountIdHandler.class ) ; registerOptionHandler ( AccountGroup.Id.class , com.google.gerrit.sshd.args4j.AccountGroupIdHandler.class ) ; registerOptionHandler ( AccountGroup.UUID.class , com.google.gerrit.sshd.args4j.AccountGroupUUIDHandler.class ) ; registerOptionHandler ( org.eclipse.jgit.lib.ObjectId.class , com.google.gerrit.sshd.args4j.ObjectIdHandler.class ) ; registerOptionHandler ( PatchSet.Id.class , com.google.gerrit.sshd.args4j.PatchSetIdHandler.class ) ; registerOptionHandler ( com.google.gerrit.server.project.ProjectControl.class , com.google.gerrit.sshd.args4j.ProjectControlHandler.class ) ; registerOptionHandler ( java.net.SocketAddress.class , com.google.gerrit.sshd.args4j.SocketAddressHandler.class ) ; }
Source:
public com.google.gerrit.server.account.AccountState getByUsername ( java.lang.String username ) { try { com.google.gerrit.server.account.externalids.ExternalId extId = externalIds.get ( ExternalId.Key.create ( com.google.gerrit.server.account.externalids.ExternalId.SCHEME_USERNAME , username ) ) ; if ( extId == null ) { return null ; } return getOrNull ( extId.accountId ( ) ) ; } catch ( java.io.IOException | org.eclipse.jgit.errors.ConfigInvalidException e ) { com.google.gerrit.server.account.AccountCacheImpl.log.warn ( ( "Cannot load AccountState for username " + username ) , e ) ; return null ; } }

Target:
public java.util.Optional < com.google.gerrit.server.account.AccountState > getByUsername ( java.lang.String username ) { try { com.google.gerrit.server.account.externalids.ExternalId extId = externalIds.get ( ExternalId.Key.create ( com.google.gerrit.server.account.externalids.ExternalId.SCHEME_USERNAME , username ) ) ; if ( extId == null ) { return java.util.Optional.empty ( ) ; } return java.util.Optional.ofNullable ( getOrNull ( extId.accountId ( ) ) ) ; } catch ( java.io.IOException | org.eclipse.jgit.errors.ConfigInvalidException e ) { com.google.gerrit.server.account.AccountCacheImpl.log.warn ( ( "Cannot load AccountState for username " + username ) , e ) ; return null ; } }
Source:
public void writeNoChanges ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( modifier.createEdit ( change , ps ) ) . isEqualTo ( RefUpdate.Result.NEW ) ; exception.expect ( com.google.gerrit.server.project.InvalidChangeOperationException.class ) ; exception.expectMessage ( "no changes were made" ) ; modifier.modifyFile ( editUtil.byChange ( change ) . get ( ) , com.google.gerrit.acceptance.edit.ChangeEditIT.FILE_NAME , com.google.gerrit.acceptance.RestSession.newRawInput ( com.google.gerrit.acceptance.edit.ChangeEditIT.CONTENT_OLD ) ) ; }

Target:
public void writeNoChanges ( ) throws java.lang.Exception { com.google.common.truth.Truth.assertThat ( modifier.createEdit ( change , ps ) ) . isEqualTo ( RefUpdate.Result.NEW ) ; exception.expect ( com.google.gerrit.server.project.InvalidChangeOperationException.class ) ; exception.expectMessage ( "no changes were made" ) ; modifier.modifyFile ( editUtil.byChange ( change ) . get ( ) , com.google.gerrit.acceptance.edit.ChangeEditIT.FILE_NAME , com.google.gerrit.common.RawInputUtil.create ( com.google.gerrit.acceptance.edit.ChangeEditIT.CONTENT_OLD ) ) ; }
Source:
public void onKeyUp ( com.google.gwt.event.dom.client.KeyUpEvent event ) { boolean enterPressed = ( event.getNativeEvent ( ) . getKeyCode ( ) ) == ( com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER ) ; if ( enterPressed || ( ! ( filterTxt.getValue ( ) . equals ( subname ) ) ) ) { subname = filterTxt.getValue ( ) ; refresh ( enterPressed ) ; } }

Target:
public void onKeyUp ( com.google.gwt.event.dom.client.KeyUpEvent event ) { boolean enterPressed = ( event.getNativeEvent ( ) . getKeyCode ( ) ) == ( com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER ) ; boolean filterModified = ! ( filterTxt.getValue ( ) . equals ( subname ) ) ; if ( enterPressed || filterModified ) { subname = filterTxt.getValue ( ) ; refresh ( enterPressed , filterModified ) ; } }
Source:
void addRef ( java.lang.String ref ) { if ( com.googlesource.gerrit.plugins.replication.PushOne.ALL_REFS.equals ( ref ) ) { delta.clear ( ) ; pushAllRefs = true ; com.googlesource.gerrit.plugins.replication.PushOne.log.trace ( ( "Added all refs for replication to " + ( uri ) ) ) ; } else if ( ! ( pushAllRefs ) ) { delta.add ( ref ) ; com.googlesource.gerrit.plugins.replication.PushOne.log.trace ( ( ( ( "Added ref " + ref ) + " for replication to " ) + ( uri ) ) ) ; } }

Target:
void addRef ( java.lang.String ref ) { if ( com.googlesource.gerrit.plugins.replication.PushOne.ALL_REFS.equals ( ref ) ) { delta.clear ( ) ; pushAllRefs = true ; com.googlesource.gerrit.plugins.replication.PushOne.repLog.trace ( ( "Added all refs for replication to " + ( uri ) ) ) ; } else if ( ! ( pushAllRefs ) ) { delta.add ( ref ) ; com.googlesource.gerrit.plugins.replication.PushOne.repLog.trace ( ( ( ( "Added ref " + ref ) + " for replication to " ) + ( uri ) ) ) ; } }
Source:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerialization.writeNotNull ( out , commit ) ; org.eclipse.jgit.lib.ObjectIdSerialization.writeNotNull ( out , into ) ; java.lang.Character c = com.google.gerrit.server.change.MergeabilityCacheImpl.SUBMIT_TYPES.get ( submitType ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid submit type: " + ( submitType ) ) ) ; } out.writeChar ( c ) ; com.google.gerrit.server.ioutil.BasicSerialization.writeString ( out , mergeStrategy ) ; }

Target:
private void writeObject ( java.io.ObjectOutputStream out ) throws java.io.IOException { org.eclipse.jgit.lib.ObjectIdSerializer.write ( out , commit ) ; org.eclipse.jgit.lib.ObjectIdSerializer.write ( out , into ) ; java.lang.Character c = com.google.gerrit.server.change.MergeabilityCacheImpl.SUBMIT_TYPES.get ( submitType ) ; if ( c == null ) { throw new java.io.IOException ( ( "Invalid submit type: " + ( submitType ) ) ) ; } out.writeChar ( c ) ; com.google.gerrit.server.ioutil.BasicSerialization.writeString ( out , mergeStrategy ) ; }
Source:
public void testAddMultipleHashtags ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; addHashtags ( r , "tag3" , "tag1" ) ; assertThatGet ( r ) . containsExactly ( "tag1" , "tag3" ) . inOrder ( ) ; addHashtags ( r , "tag2" , "tag4" ) ; assertThatGet ( r ) . containsExactly ( "tag1" , "tag2" , "tag3" , "tag4" ) . inOrder ( ) ; }

Target:
public void testAddMultipleHashtags ( ) throws java.lang.Exception { com.google.gerrit.acceptance.PushOneCommit.Result r = createChange ( ) ; addHashtags ( r , "tag3" , "tag1" ) ; assertThatGet ( r ) . containsExactly ( "tag1" , "tag3" ) . inOrder ( ) ; assertMessage ( r , "Hashtags added: tag1, tag3" ) ; addHashtags ( r , "tag2" , "tag4" ) ; assertThatGet ( r ) . containsExactly ( "tag1" , "tag2" , "tag3" , "tag4" ) . inOrder ( ) ; assertMessage ( r , "Hashtags added: tag2, tag4" ) ; }
Source:
private void assertChange ( java.lang.String changeId , com.google.gerrit.reviewdb.client.Change.Status expectedStatus , java.lang.String expectedSubject , java.lang.String expectedTopic , com.google.gerrit.acceptance.TestAccount ... expectedReviewers ) throws com.google.gwtorm.server.OrmException { com.google.gerrit.reviewdb.client.Change c = com.google.common.collect.Iterables.getOnlyElement ( db.changes ( ) . byKey ( new com.google.gerrit.reviewdb.client.Change.Key ( changeId ) ) . toList ( ) ) ; org.junit.Assert.assertEquals ( expectedSubject , c.getSubject ( ) ) ; org.junit.Assert.assertEquals ( expectedStatus , c.getStatus ( ) ) ; org.junit.Assert.assertEquals ( expectedTopic , com.google.common.base.Strings.emptyToNull ( c.getTopic ( ) ) ) ; assertReviewers ( c , expectedReviewers ) ; }

Target:
private PushOneCommit.Result pushTo ( java.lang.String ref ) throws java.io.IOException , org.eclipse.jgit.api.errors.GitAPIException { com.google.gerrit.acceptance.git.PushOneCommit push = new com.google.gerrit.acceptance.git.PushOneCommit ( db , admin.getIdent ( ) ) ; return push.to ( git , ref ) ; }
Source:
void setLineLength ( int columns ) { columnMarginA.getStyle ( ) . setMarginLeft ( ( ( columns * ( cmA.defaultCharWidth ( ) ) ) + ( cmA.getGutterElement ( ) . getOffsetWidth ( ) ) ) , Unit.PX ) ; columnMarginB.getStyle ( ) . setMarginLeft ( ( ( columns * ( cmB.defaultCharWidth ( ) ) ) + ( cmB.getGutterElement ( ) . getOffsetWidth ( ) ) ) , Unit.PX ) ; }

Target:
public void onSuccess ( com.google.gerrit.client.changes.ChangeInfo info ) { info.revisions ( ) . copyKeysIntoChildren ( "name" ) ; com.google.gwt.core.client.JsArray < com.google.gerrit.client.changes.ChangeInfo.RevisionInfo > list = info.revisions ( ) . values ( ) ; com.google.gerrit.client.changes.ChangeInfo.RevisionInfo.sortRevisionInfoByNumber ( list ) ; diffTable.set ( prefs , list , diff ) ; header.setChangeInfo ( info ) ; }
Source:
public java.util.List < com.google.gerrit.extensions.common.AccountInfo > apply ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupId ) throws com.google.gwtorm.server.OrmException { final java.util.Map < com.google.gerrit.reviewdb.client.Account.Id , com.google.gerrit.extensions.common.AccountInfo > members = getMembers ( groupId , new java.util.HashSet < com.google.gerrit.reviewdb.client.AccountGroup.UUID > ( ) ) ; final java.util.List < com.google.gerrit.extensions.common.AccountInfo > memberInfos = com.google.common.collect.Lists.newArrayList ( members.values ( ) ) ; java.util.Collections.sort ( memberInfos , AccountInfoComparator.ORDER_NULLS_FIRST ) ; return memberInfos ; }

Target:
public java.util.List < com.google.gerrit.extensions.common.AccountInfo > apply ( com.google.gerrit.reviewdb.client.AccountGroup.UUID groupId ) throws com.google.gwtorm.server.OrmException { java.util.Set < com.google.gerrit.reviewdb.client.Account.Id > members = getMembers ( groupId , new java.util.HashSet < > ( ) ) ; java.util.List < com.google.gerrit.extensions.common.AccountInfo > memberInfos = new java.util.ArrayList ( members.size ( ) ) ; for ( com.google.gerrit.reviewdb.client.Account.Id member : members ) { memberInfos.add ( accountLoader.get ( member ) ) ; } accountLoader.fill ( ) ; memberInfos.sort ( AccountInfoComparator.ORDER_NULLS_FIRST ) ; return memberInfos ; }
Source:
private static void mergeTestConfig ( org.eclipse.jgit.lib.Config cfg ) { java.lang.String forceEphemeralPort = java.lang.String.format ( "%s:0" , com.google.gerrit.acceptance.GerritServer.getLocalHost ( ) . getHostName ( ) ) ; java.lang.String url = ( "http://" + forceEphemeralPort ) + "/" ; cfg.setString ( "gerrit" , null , "canonicalWebUrl" , url ) ; cfg.setString ( "httpd" , null , "listenUrl" , url ) ; cfg.setString ( "sshd" , null , "listenAddress" , forceEphemeralPort ) ; cfg.setBoolean ( "sshd" , null , "testUseInsecureRandom" , true ) ; cfg.setString ( "cache" , null , "directory" , null ) ; cfg.setString ( "gerrit" , null , "basePath" , "git" ) ; cfg.setBoolean ( "sendemail" , null , "enable" , true ) ; cfg.setInt ( "sendemail" , null , "threadPoolSize" , 0 ) ; cfg.setInt ( "cache" , "projects" , "checkFrequency" , 0 ) ; cfg.setInt ( "plugins" , null , "checkFrequency" , 0 ) ; cfg.setInt ( "sshd" , null , "threads" , 1 ) ; cfg.setInt ( "sshd" , null , "commandStartThreads" , 1 ) ; cfg.setInt ( "receive" , null , "threadPoolSize" , 1 ) ; cfg.setInt ( "index" , null , "threads" , 1 ) ; }

Target:
private static void mergeTestConfig ( org.eclipse.jgit.lib.Config cfg ) { java.lang.String forceEphemeralPort = java.lang.String.format ( "%s:0" , com.google.gerrit.acceptance.GerritServer.getLocalHost ( ) . getHostName ( ) ) ; java.lang.String url = ( "http://" + forceEphemeralPort ) + "/" ; cfg.setString ( "gerrit" , null , "canonicalWebUrl" , url ) ; cfg.setString ( "httpd" , null , "listenUrl" , url ) ; cfg.setString ( "sshd" , null , "listenAddress" , forceEphemeralPort ) ; cfg.setBoolean ( "sshd" , null , "testUseInsecureRandom" , true ) ; cfg.unset ( "cache" , null , "directory" ) ; cfg.setString ( "gerrit" , null , "basePath" , "git" ) ; cfg.setBoolean ( "sendemail" , null , "enable" , true ) ; cfg.setInt ( "sendemail" , null , "threadPoolSize" , 0 ) ; cfg.setInt ( "cache" , "projects" , "checkFrequency" , 0 ) ; cfg.setInt ( "plugins" , null , "checkFrequency" , 0 ) ; cfg.setInt ( "sshd" , null , "threads" , 1 ) ; cfg.setInt ( "sshd" , null , "commandStartThreads" , 1 ) ; cfg.setInt ( "receive" , null , "threadPoolSize" , 1 ) ; cfg.setInt ( "index" , null , "threads" , 1 ) ; }
Source:
private void move ( java.lang.String changeId , java.lang.String destination , java.lang.String message ) throws com.google.gerrit.extensions.restapi.RestApiException { com.google.gerrit.extensions.api.changes.MoveInput in = new com.google.gerrit.extensions.api.changes.MoveInput ( ) ; in.destination_branch = destination ; in.message = message ; gApi.changes ( ) . id ( changeId ) . move ( in ) ; }

Target:
private void move ( java.lang.String changeId , java.lang.String destination , java.lang.String message ) throws com.google.gerrit.extensions.restapi.RestApiException { com.google.gerrit.extensions.api.changes.MoveInput in = new com.google.gerrit.extensions.api.changes.MoveInput ( ) ; in.destinationBranch = destination ; in.message = message ; gApi.changes ( ) . id ( changeId ) . move ( in ) ; }
Source:
private static java.lang.String time ( final long now , final long delay ) { final java.util.Date when = new java.util.Date ( ( now + delay ) ) ; if ( delay < ( ( ( 24 * 60 ) * 60 ) * 1000L ) ) { return new java.text.SimpleDateFormat ( "HH:mm:ss.SSS" ) . format ( when ) ; } return new java.text.SimpleDateFormat ( "MMM-dd HH:mm" ) . format ( when ) ; }

Target:
private static java.lang.String format ( final java.util.Date when , final long timeFromNow ) { if ( timeFromNow < ( ( ( 24 * 60 ) * 60 ) * 1000L ) ) { return new java.text.SimpleDateFormat ( "HH:mm:ss.SSS" ) . format ( when ) ; } return new java.text.SimpleDateFormat ( "MMM-dd HH:mm" ) . format ( when ) ; }
Source:
protected void ccAllApprovals ( ) { if ( ( ! ( NotifyHandling.ALL.equals ( notify ) ) ) && ( ! ( NotifyHandling.OWNER_REVIEWERS.equals ( notify ) ) ) ) { return ; } try { for ( com.google.gerrit.reviewdb.client.Account.Id id : changeData.reviewers ( ) . values ( ) ) { add ( RecipientType.CC , id ) ; } } catch ( com.google.gwtorm.server.OrmException err ) { com.google.gerrit.server.mail.ChangeEmail.log.warn ( "Cannot CC users that reviewed updated change" , err ) ; } }

Target:
protected void ccAllApprovals ( ) { if ( ( ! ( NotifyHandling.ALL.equals ( notify ) ) ) && ( ! ( NotifyHandling.OWNER_REVIEWERS.equals ( notify ) ) ) ) { return ; } try { for ( com.google.gerrit.reviewdb.client.Account.Id id : changeData.reviewers ( ) . all ( ) ) { add ( RecipientType.CC , id ) ; } } catch ( com.google.gwtorm.server.OrmException err ) { com.google.gerrit.server.mail.ChangeEmail.log.warn ( "Cannot CC users that reviewed updated change" , err ) ; } }
Source:
public void preformat1 ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.html ( "A\n\n This is pre\n formatted" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.wikify ( ) ; com.google.common.truth.Truth.assertThat ( o ) . isNotSameAs ( n ) ; com.google.common.truth.Truth.assertThat ( n.asString ( ) ) . isEqualTo ( ( ( ( ( "<p>A</p>" + "<p>" ) + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " This is pre" ) ) ) + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " formatted" ) ) ) + "</p>" ) ) ; }

Target:
public void preformat1 ( ) { final com.google.gwtexpui.safehtml.client.SafeHtml o = com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.html ( "A\n\n This is pre\n formatted" ) ; final com.google.gwtexpui.safehtml.client.SafeHtml n = o.wikify ( ) ; com.google.common.truth.Truth.assertThat ( o ) . isNotSameAs ( n ) ; com.google.common.truth.Truth.assertThat ( n.asString ( ) ) . isEqualTo ( ( ( ( "<p>A</p><p>" + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " This is pre" ) ) ) + ( com.google.gwtexpui.safehtml.client.SafeHtml_WikifyPreformatTest.pre ( " formatted" ) ) ) + "</p>" ) ) ; }
Source:
protected void preDisplay ( final com.google.gerrit.client.projects.ProjectMap result ) { if ( ( ( mySubname == null ) && ( ( subname ) == null ) ) || ( ( mySubname != null ) && ( mySubname.equals ( subname ) ) ) ) { projects.display ( result ) ; } }

Target:
public java.lang.String getCurrentFilter ( ) { return subname ; }
Source:
void setRevisions ( com.google.gerrit.reviewdb.client.PatchSet.Id base , com.google.gerrit.reviewdb.client.PatchSet.Id curr ) { this . base = base ; this . curr = curr ; }

Target:
public void set ( com.google.gerrit.reviewdb.client.PatchSet.Id base , com.google.gerrit.reviewdb.client.PatchSet.Id curr , com.google.gerrit.client.change.ChangeScreen2.Style style , com.google.gwt.user.client.ui.Widget editButton , com.google.gwt.user.client.ui.Widget replyButton ) { this . base = base ; this . curr = curr ; this . style = style ; this . editButton = editButton ; this . replyButton = replyButton ; }
Source:
public void postUpdate ( com.google.gerrit.server.git.BatchUpdate.Context ctx ) { if ( ( changeMessage ) == null ) { return ; } emailReviewers ( ctx.getProject ( ) , currChange , del , changeMessage ) ; reviewerDeleted.fire ( currChange , currPs , reviewer , changeMessage.getMessage ( ) , newApprovals , oldApprovals , ctx.getWhen ( ) ) ; }

Target:
public void postUpdate ( com.google.gerrit.server.git.BatchUpdate.Context ctx ) { if ( ( changeMessage ) == null ) { return ; } emailReviewers ( ctx.getProject ( ) , currChange , del , changeMessage ) ; reviewerDeleted.fire ( currChange , currPs , reviewer , ctx.getUser ( ) . asIdentifiedUser ( ) . getAccount ( ) , changeMessage.getMessage ( ) , newApprovals , oldApprovals , ctx.getWhen ( ) ) ; }
Source:
private com.google.inject.Injector createSysInjector ( final com.google.gerrit.pgm.Init.SiteInit init ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( new com.google.inject.AbstractModule ( ) { @ java.lang.Override protected void configure ( ) { bind ( com.google.gerrit.pgm.util.ConsoleUI.class ) . toInstance ( init.ui ) ; bind ( com.google.gerrit.pgm.init.InitFlags.class ) . toInstance ( init.flags ) ; bind ( com.google.gerrit.server.git.GitRepositoryManager.class ) . to ( com.google.gerrit.server.git.LocalDiskRepositoryManager.class ) ; bind ( com.google.gerrit.server.git.GitProjectImporter.class ) ; } } ) ; return createDbInjector ( com.google.gerrit.pgm.util.DataSourceProvider.Context.SINGLE_USER ) . createChildInjector ( modules ) ; }

Target:
private com.google.inject.Injector createSysInjector ( final com.google.gerrit.pgm.Init.SiteInit init ) { final java.util.List < com.google.inject.Module > modules = new java.util.ArrayList < com.google.inject.Module > ( ) ; modules.add ( new com.google.inject.AbstractModule ( ) { @ java.lang.Override protected void configure ( ) { bind ( com.google.gerrit.pgm.util.ConsoleUI.class ) . toInstance ( init.ui ) ; bind ( com.google.gerrit.pgm.init.InitFlags.class ) . toInstance ( init.flags ) ; bind ( com.google.gerrit.server.git.GitRepositoryManager.class ) . to ( com.google.gerrit.server.git.LocalDiskRepositoryManager.class ) ; bind ( com.google.gerrit.server.git.GitProjectImporter.class ) ; } } ) ; return createDbInjector ( com.google.gerrit.server.schema.DataSourceProvider.Context.SINGLE_USER ) . createChildInjector ( modules ) ; }