auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void send ( ) throws javax.mail.MessagingException { if ( haveRcptTo ( ) ) { ccSender ( ) ; openFooter ( ) ; body.append ( "To unsubscribe, visit " ) ; body.append ( settingsUrl ( ) ) ; body.append ( "\n" ) ; msg.setText ( body.toString ( ) , "UTF-8" ) ; javax.mail.Transport.send ( msg ) ; } }

Target:
private void send ( ) throws javax.mail.MessagingException { if ( haveRcptTo ( ) ) { ccSender ( ) ; if ( ( settingsUrl ( ) ) != null ) { openFooter ( ) ; body.append ( "To unsubscribe, visit " ) ; body.append ( settingsUrl ( ) ) ; body.append ( "\n" ) ; } msg.setText ( body.toString ( ) , "UTF-8" ) ; javax.mail.Transport.send ( msg ) ; } }
Source:
java.lang.Runnable navigate ( com.google.gerrit.client.diff.Direction dir ) { switch ( dir ) { case PREV : return ( ) -> { ( hasPrev ? prev : up ) . go ( ) ; } ; case NEXT : return ( ) -> { ( hasNext ? next : up ) . go ( ) ; } ; default : return ( ) -> { } ; } }

Target:
java.lang.Runnable navigate ( com.google.gerrit.client.diff.Direction dir ) { switch ( dir ) { case PREV : return ( ) -> ( hasPrev ? prev : up ) . go ( ) ; case NEXT : return ( ) -> ( hasNext ? next : up ) . go ( ) ; default : return ( ) -> { } ; } }
Source:
private static void assertOutput ( final byte [ ] expect , final java.io.ByteArrayOutputStream out ) { final byte [ ] buf = out.toByteArray ( ) ; for ( int i = 0 ; i < ( expect.length ) ; i ++ ) assertEquals ( expect [ i ] , buf [ i ] ) ; }

Target:
private static void assertOutput ( final byte [ ] expect , final java.io.ByteArrayOutputStream out ) { final byte [ ] buf = out.toByteArray ( ) ; for ( int i = 0 ; i < ( expect.length ) ; i ++ ) org.junit.Assert.assertEquals ( expect [ i ] , buf [ i ] ) ; }
Source:
private com.google.gerrit.server.git.ProjectConfig loadAllProjects ( ) throws java.lang.Exception { org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( allProjects ) ; try { com.google.gerrit.server.git.ProjectConfig pc = new com.google.gerrit.server.git.ProjectConfig ( allProjects ) ; pc.load ( repo ) ; return pc ; } finally { repo.close ( ) ; } }

Target:
private com.google.gerrit.server.git.ProjectConfig loadAllProjects ( ) throws java.lang.Exception { try ( org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( allProjects ) ) { com.google.gerrit.server.git.ProjectConfig pc = new com.google.gerrit.server.git.ProjectConfig ( allProjects ) ; pc.load ( repo ) ; return pc ; } }
Source:
protected void doGet ( final javax.servlet.http.HttpServletRequest req , final javax.servlet.http.HttpServletResponse rsp ) throws java.io.IOException { rsp.setContentType ( "text/plain" ) ; java.io.InputStream in = openRobotsFile ( ) ; try { java.io.OutputStream out = rsp.getOutputStream ( ) ; try { com.google.common.io.ByteStreams.copy ( in , out ) ; } finally { out.close ( ) ; } } finally { in.close ( ) ; } }

Target:
protected void doGet ( final javax.servlet.http.HttpServletRequest req , final javax.servlet.http.HttpServletResponse rsp ) throws java.io.IOException { rsp.setContentType ( "text/plain" ) ; try ( java.io.InputStream in = openRobotsFile ( ) ; java.io.OutputStream out = rsp.getOutputStream ( ) ) { com.google.common.io.ByteStreams.copy ( in , out ) ; } }
Source:
public void onShowView ( ) { super . onShowView ( ) ; com.google.gwt.user.client.Window.enableScrolling ( false ) ; com.google.gerrit.client.JumpKeys.enable ( false ) ; if ( prefs.hideTopMenu ( ) ) { com.google.gerrit.client.Gerrit.setHeaderVisible ( false ) ; } resizeHandler = com.google.gwt.user.client.Window.addResizeHandler ( new com.google.gwt.event.logical.shared.ResizeHandler ( ) { @ java.lang.Override public void onResize ( com.google.gwt.event.logical.shared.ResizeEvent event ) { resizeCodeMirror ( ) ; } } ) ; }

Target:
public void onShowView ( ) { super . onShowView ( ) ; com.google.gwt.user.client.Window.enableScrolling ( false ) ; if ( prefs.hideTopMenu ( ) ) { com.google.gerrit.client.Gerrit.setHeaderVisible ( false ) ; } resizeHandler = com.google.gwt.user.client.Window.addResizeHandler ( new com.google.gwt.event.logical.shared.ResizeHandler ( ) { @ java.lang.Override public void onResize ( com.google.gwt.event.logical.shared.ResizeEvent event ) { resizeCodeMirror ( ) ; } } ) ; }
Source:
protected void configure ( ) { install ( new com.google.gerrit.server.config.FactoryModule ( ) { @ java.lang.Override protected void configure ( ) { factory ( ForwardingRemovalListener.Factory.class ) ; } } ) ; bind ( com.google.gerrit.server.cache.h2.DefaultCacheFactory.class ) ; bind ( com.google.gerrit.server.cache.MemoryCacheFactory.class ) . to ( com.google.gerrit.server.cache.h2.DefaultCacheFactory.class ) ; bind ( com.google.gerrit.server.cache.PersistentCacheFactory.class ) . to ( com.google.gerrit.server.cache.h2.H2CacheFactory.class ) ; listener ( ) . to ( com.google.gerrit.server.cache.h2.H2CacheFactory.class ) ; }

Target:
protected void configure ( ) { factory ( ForwardingRemovalListener.Factory.class ) ; bind ( com.google.gerrit.server.cache.h2.DefaultCacheFactory.class ) ; bind ( com.google.gerrit.server.cache.MemoryCacheFactory.class ) . to ( com.google.gerrit.server.cache.h2.DefaultCacheFactory.class ) ; bind ( com.google.gerrit.server.cache.PersistentCacheFactory.class ) . to ( com.google.gerrit.server.cache.h2.H2CacheFactory.class ) ; listener ( ) . to ( com.google.gerrit.server.cache.h2.H2CacheFactory.class ) ; }
Source:
public static com.google.gerrit.client.rpc.RestApi change ( int id ) { return new com.google.gerrit.client.rpc.RestApi ( "/changes/" ) . id ( java.lang.String.valueOf ( id ) ) ; }

Target:
public static com.google.gerrit.client.rpc.RestApi change ( @ com.google.gerrit.common.Nullable java.lang.String project , int id ) { if ( project == null ) { return new com.google.gerrit.client.rpc.RestApi ( "/changes/" ) . id ( java.lang.String.valueOf ( id ) ) ; } return new com.google.gerrit.client.rpc.RestApi ( "/changes/" ) . id ( project , id ) ; }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { this . interfaces = com.google.common.collect.Iterables.transform ( com.google.common.collect.Sets.newHashSet ( interfaces ) , com.google.gerrit.server.plugins.JarScanner.TO_JAVA_QUALIFIED_CLASS_NAME ) ; this . className = org.objectweb.asm.Type.getObjectType ( name ) . getClassName ( ) ; this . access = access ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { this . className = org.objectweb.asm.Type.getObjectType ( name ) . getClassName ( ) ; this . access = access ; }
Source:
private boolean combineA ( final int i ) { final org.eclipse.jgit.diff.Edit s = edits.get ( i ) ; final org.eclipse.jgit.diff.Edit e = edits.get ( ( i - 1 ) ) ; return ( ( s.getBeginA ( ) ) - ( e.getEndA ( ) ) ) <= ( 2 * ( context ) ) ; }

Target:
private boolean combineA ( final int i ) { final org.eclipse.jgit.diff.Edit s = edits.get ( i ) ; final org.eclipse.jgit.diff.Edit e = edits.get ( ( i - 1 ) ) ; return ( ( s.getBeginA ( ) ) - ( e.getEndA ( ) ) ) <= ( ( 2 * ( context ) ) + 1 ) ; }
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 createNewChangeSignedOffByFooter ( ) throws java.lang.Exception { 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 ( ) ) ) ; }
Source:
private static java.util.List < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > predicates ( com.google.gerrit.server.index.Schema < com.google.gerrit.server.query.change.ChangeData > schema , java.util.Set < com.google.gerrit.reviewdb.client.Change.Id > ids ) { java.util.List < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > r = com.google.common.collect.Lists.newArrayListWithCapacity ( ids.size ( ) ) ; for ( com.google.gerrit.reviewdb.client.Change.Id id : ids ) { r.add ( new com.google.gerrit.server.query.change.LegacyChangeIdPredicate ( schema , id ) ) ; } return r ; }

Target:
private static java.util.List < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > predicates ( java.util.Set < com.google.gerrit.reviewdb.client.Change.Id > ids ) { java.util.List < com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > > r = com.google.common.collect.Lists.newArrayListWithCapacity ( ids.size ( ) ) ; for ( com.google.gerrit.reviewdb.client.Change.Id id : ids ) { r.add ( new com.google.gerrit.server.query.change.LegacyChangeIdPredicate ( id ) ) ; } return r ; }
Source:
private org.eclipse.jgit.lib.ObjectId createCommit ( com.google.gerrit.server.IdentifiedUser me , org.eclipse.jgit.lib.ObjectInserter inserter , org.eclipse.jgit.revwalk.RevCommit prevEdit , org.eclipse.jgit.revwalk.RevCommit base , org.eclipse.jgit.lib.ObjectId tree ) throws java.io.IOException { org.eclipse.jgit.lib.CommitBuilder builder = new org.eclipse.jgit.lib.CommitBuilder ( ) ; builder.setTreeId ( tree ) ; builder.setParentIds ( base ) ; builder.setAuthor ( prevEdit.getAuthorIdent ( ) ) ; builder.setCommitter ( getCommitterIdent ( me ) ) ; builder.setMessage ( prevEdit.getFullMessage ( ) ) ; return inserter.insert ( builder ) ; }

Target:
private org.eclipse.jgit.lib.ObjectId createCommit ( com.google.gerrit.server.IdentifiedUser me , org.eclipse.jgit.lib.ObjectInserter inserter , org.eclipse.jgit.revwalk.RevCommit prevEdit , org.eclipse.jgit.revwalk.RevCommit base , org.eclipse.jgit.lib.ObjectId tree , java.lang.String msg ) throws java.io.IOException { org.eclipse.jgit.lib.CommitBuilder builder = new org.eclipse.jgit.lib.CommitBuilder ( ) ; builder.setTreeId ( tree ) ; builder.setParentIds ( base ) ; builder.setAuthor ( prevEdit.getAuthorIdent ( ) ) ; builder.setCommitter ( getCommitterIdent ( me ) ) ; builder.setMessage ( msg ) ; return inserter.insert ( builder ) ; }
Source:
private void runImpl ( ) throws java.io.IOException { org.eclipse.jgit.transport.Transport tn = org.eclipse.jgit.transport.Transport.open ( git , uri ) ; org.eclipse.jgit.transport.PushResult res ; try { res = pushVia ( tn ) ; updateHead ( ) ; } finally { try { tn.close ( ) ; } catch ( java.lang.Throwable e2 ) { com.googlesource.gerrit.plugins.replication.PushOne.repLog.warn ( ( "Unexpected error while closing " + ( uri ) ) , e2 ) ; } } updateStates ( res.getRemoteUpdates ( ) ) ; }

Target:
private void runImpl ( ) throws java.io.IOException { org.eclipse.jgit.transport.Transport tn = org.eclipse.jgit.transport.Transport.open ( git , uri ) ; org.eclipse.jgit.transport.PushResult res ; try { res = pushVia ( tn ) ; } finally { try { tn.close ( ) ; } catch ( java.lang.Throwable e2 ) { com.googlesource.gerrit.plugins.replication.PushOne.repLog.warn ( ( "Unexpected error while closing " + ( uri ) ) , e2 ) ; } } updateStates ( res.getRemoteUpdates ( ) ) ; }
Source:
public boolean match ( com.google.gerrit.server.query.change.ChangeData cd ) throws com.google.gwtorm.server.OrmException { org.eclipse.jgit.lib.ObjectId id = org.eclipse.jgit.lib.ObjectId.fromString ( cd.currentPatchSet ( ) . getRevision ( ) . get ( ) ) ; try ( org.eclipse.jgit.lib.Repository repo = args.repoManager.openRepository ( cd.change ( ) . getProject ( ) ) ; org.eclipse.jgit.revwalk.RevWalk rw = com.google.gerrit.server.git.CodeReviewCommit.newRevWalk ( repo ) ) { org.eclipse.jgit.revwalk.RevCommit commit = rw.parseCommit ( id ) ; return ( commit.getParentCount ( ) ) > 1 ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalStateException ( e ) ; } }

Target:
public boolean match ( com.google.gerrit.server.query.change.ChangeData cd ) throws com.google.gwtorm.server.OrmException { org.eclipse.jgit.lib.ObjectId id = org.eclipse.jgit.lib.ObjectId.fromString ( cd.currentPatchSet ( ) . getRevision ( ) . get ( ) ) ; try ( org.eclipse.jgit.lib.Repository repo = args.repoManager.openRepository ( cd.change ( ) . getProject ( ) ) ; org.eclipse.jgit.revwalk.RevWalk rw = com.google.gerrit.server.git.CodeReviewCommit.newRevWalk ( repo ) ) { org.eclipse.jgit.revwalk.RevCommit commit = rw.parseCommit ( id ) ; return ( commit.getParentCount ( ) ) > 1 ; } catch ( java.io.IOException e ) { throw new com.google.gwtorm.server.OrmException ( e ) ; } }
Source:
void onWhitespaceErrors ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > e ) { prefs.showWhitespaceErrors ( e.getValue ( ) ) ; view.operation ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { boolean s = prefs.showWhitespaceErrors ( ) ; view.getCmFromSide ( DisplaySide.A ) . setOption ( "showTrailingSpace" , s ) ; view.getCmFromSide ( DisplaySide.B ) . setOption ( "showTrailingSpace" , s ) ; } } ) ; }

Target:
void onWhitespaceErrors ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Boolean > e ) { prefs.showWhitespaceErrors ( e.getValue ( ) ) ; if ( ( view ) != null ) { view.operation ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { boolean s = prefs.showWhitespaceErrors ( ) ; view.getCmFromSide ( DisplaySide.A ) . setOption ( "showTrailingSpace" , s ) ; view.getCmFromSide ( DisplaySide.B ) . setOption ( "showTrailingSpace" , s ) ; } } ) ; } }
Source:
public java.util.List < com.google.gerrit.server.git.VersionedMetaData.PathInfo > getPathInfos ( boolean recursive ) throws java.io.IOException { org.eclipse.jgit.treewalk.TreeWalk tw = new org.eclipse.jgit.treewalk.TreeWalk ( reader ) ; tw.addTree ( revision.getTree ( ) ) ; tw.setRecursive ( recursive ) ; java.util.List < com.google.gerrit.server.git.VersionedMetaData.PathInfo > paths = com.google.common.collect.Lists.newArrayList ( ) ; while ( tw.next ( ) ) { paths.add ( new com.google.gerrit.server.git.VersionedMetaData.PathInfo ( tw ) ) ; } return paths ; }

Target:
public java.util.List < com.google.gerrit.server.git.VersionedMetaData.PathInfo > getPathInfos ( boolean recursive ) throws java.io.IOException { org.eclipse.jgit.treewalk.TreeWalk tw = new org.eclipse.jgit.treewalk.TreeWalk ( reader ) ; tw.addTree ( revision.getTree ( ) ) ; tw.setRecursive ( recursive ) ; java.util.List < com.google.gerrit.server.git.VersionedMetaData.PathInfo > paths = new java.util.ArrayList < > ( ) ; while ( tw.next ( ) ) { paths.add ( new com.google.gerrit.server.git.VersionedMetaData.PathInfo ( tw ) ) ; } return paths ; }
Source:
public java.lang.Void call ( ) throws com.google.gerrit.extensions.restapi.ResourceConflictException , com.google.gwtorm.server.OrmException , java.io.IOException { if ( caller == ( java.lang.Thread.currentThread ( ) ) ) { insertChange ( db ) ; } else { com.google.gerrit.reviewdb.server.ReviewDb db = schemaFactory.open ( ) ; try { insertChange ( db ) ; } finally { db.close ( ) ; } } synchronized ( newProgress ) { newProgress.update ( 1 ) ; } return null ; }

Target:
public java.lang.Void call ( ) throws com.google.gerrit.extensions.restapi.ResourceConflictException , com.google.gwtorm.server.OrmException , java.io.IOException { if ( caller == ( java.lang.Thread.currentThread ( ) ) ) { insertChange ( db ) ; } else { try ( com.google.gerrit.reviewdb.server.ReviewDb db = schemaFactory.open ( ) ) { insertChange ( db ) ; } } synchronized ( newProgress ) { newProgress.update ( 1 ) ; } return null ; }
Source:
public void load ( org.eclipse.jgit.revwalk.RevWalk walk , org.eclipse.jgit.lib.ObjectId id ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { this . reader = walk.getObjectReader ( ) ; try { revision = ( id != null ) ? walk.parseCommit ( id ) : null ; onLoad ( ) ; } finally { reader = null ; } }

Target:
public void load ( org.eclipse.jgit.revwalk.RevWalk walk , org.eclipse.jgit.lib.ObjectId id ) throws java.io.IOException , org.eclipse.jgit.errors.ConfigInvalidException { this . rw = walk ; this . reader = walk.getObjectReader ( ) ; try { revision = ( id != null ) ? walk.parseCommit ( id ) : null ; onLoad ( ) ; } finally { walk = null ; reader = null ; } }
Source:
private void pruneOldIndexes ( final T oldObj , T newObj ) throws com.google.gwtorm.client.OrmException { if ( oldObj != null ) { for ( com.google.gwtorm.nosql.IndexFunction < T > f : com.google.gwtorm.nosql.generic.GenericAccess.getQueryIndexes ( ) ) { if ( f.includes ( oldObj ) ) { final byte [ ] k = indexRowKey ( f , oldObj ) ; if ( ! ( matches ( f , newObj , k ) ) ) { db.delete ( k ) ; } } } } }

Target:
protected void pruneOldIndexes ( final T oldObj , T newObj ) throws com.google.gwtorm.client.OrmException { if ( oldObj != null ) { for ( com.google.gwtorm.nosql.IndexFunction < T > f : com.google.gwtorm.nosql.generic.GenericAccess.getQueryIndexes ( ) ) { if ( f.includes ( oldObj ) ) { final byte [ ] k = indexRowKey ( f , oldObj ) ; if ( ! ( matches ( f , newObj , k ) ) ) { db.delete ( k ) ; } } } } }
Source:
public void onSuccess ( com.googlesource.gerrit.plugins.verifystatus.client.ConfigInfo info ) { if ( info.showJobsSummaryPanel ( ) ) { com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK , new com.googlesource.gerrit.plugins.verifystatus.client.JobsSummaryPanel.Factory ( ) , "VerifyStatusJobsSummaryPanel" ) ; } if ( info.showJobsPanel ( ) ) { com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK , new com.googlesource.gerrit.plugins.verifystatus.client.JobsPanel.Factory ( ) , "VerifyStatusJobsPanel" ) ; } if ( info.showJobsDropDownPanel ( ) ) { com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_HEADER_RIGHT_OF_POP_DOWNS , new com.googlesource.gerrit.plugins.verifystatus.client.JobsDropDownPanel.Factory ( ) , "VerifyStatusJobsDropDownPanel" ) ; } }

Target:
public void onSuccess ( com.googlesource.gerrit.plugins.verifystatus.client.ConfigInfo info ) { if ( info.showJobsSummaryPanel ( ) ) { com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK , new com.googlesource.gerrit.plugins.verifystatus.client.JobsSummaryPanel.Factory ( ) ) ; } if ( info.showJobsPanel ( ) ) { com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK , new com.googlesource.gerrit.plugins.verifystatus.client.JobsPanel.Factory ( ) ) ; } if ( info.showJobsDropDownPanel ( ) ) { com.google.gerrit.plugin.client.Plugin.get ( ) . panel ( GerritUiExtensionPoint.CHANGE_SCREEN_HEADER_RIGHT_OF_POP_DOWNS , new com.googlesource.gerrit.plugins.verifystatus.client.JobsDropDownPanel.Factory ( ) ) ; } }
Source:
public void operationComplete ( org.apache.mina.core.future.IoFuture future ) { final com.google.gerrit.sshd.SshScope.Context ctx = new com.google.gerrit.sshd.SshScope.Context ( sd ) ; final com.google.gerrit.sshd.SshScope.Context old = com.google.gerrit.sshd.SshScope.set ( ctx ) ; try { sshLog.onLogout ( ) ; } finally { com.google.gerrit.sshd.SshScope.set ( old ) ; } }

Target:
public void operationComplete ( org.apache.mina.core.future.IoFuture future ) { final com.google.gerrit.sshd.SshScope.Context ctx = new com.google.gerrit.sshd.SshScope.Context ( sd , null ) ; final com.google.gerrit.sshd.SshScope.Context old = com.google.gerrit.sshd.SshScope.set ( ctx ) ; try { sshLog.onLogout ( ) ; } finally { com.google.gerrit.sshd.SshScope.set ( old ) ; } }
Source:
public com.google.gerrit.server.permissions.PermissionBackend.ForChange change ( com.google.gerrit.server.notedb.ChangeNotes notes ) { com.google.gerrit.reviewdb.client.Change change = notes.getChange ( ) ; com.google.common.base.Preconditions.checkArgument ( getProjectControl ( ) . getProject ( ) . getNameKey ( ) . equals ( change.getProject ( ) ) , "mismatched project" ) ; return getProjectControl ( ) . controlFor ( notes ) . asForChange ( ) ; }

Target:
public com.google.gerrit.server.permissions.PermissionBackend.ForChange change ( com.google.gerrit.server.notedb.ChangeNotes notes ) { com.google.gerrit.reviewdb.client.Change change = notes.getChange ( ) ; com.google.common.base.Preconditions.checkArgument ( getProjectControl ( ) . getProject ( ) . getNameKey ( ) . equals ( change.getProject ( ) ) , "mismatched project" ) ; return getProjectControl ( ) . controlFor ( notes ) . asForChange ( null , db ) ; }
Source:
public void onLoad ( ) { if ( ( sbsTable ) == null ) { initUI ( ) ; } super . onLoad ( ) ; PatchUtil.DETAIL_SVC.sideBySidePatchDetail ( patchId , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.data.SideBySidePatchDetail > ( ) { public void onSuccess ( final com.google.gerrit.client.data.SideBySidePatchDetail r ) { if ( isAttached ( ) ) { display ( r ) ; } } } ) ; }

Target:
public void onLoad ( ) { if ( ( sbsTable ) == null ) { initUI ( ) ; } super . onLoad ( ) ; PatchUtil.DETAIL_SVC.sideBySidePatchDetail ( patchId , null , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.data.SideBySidePatchDetail > ( ) { public void onSuccess ( final com.google.gerrit.client.data.SideBySidePatchDetail r ) { if ( isAttached ( ) ) { display ( r ) ; } } } ) ; }
Source:
public com.google.common.collect.Multimap < com.google.gerrit.reviewdb.client.Project.NameKey , com.google.gerrit.reviewdb.client.Change.Id > changesByProject ( ) throws com.google.gwtorm.server.OrmException { com.google.common.collect.ListMultimap < com.google.gerrit.reviewdb.client.Project.NameKey , com.google.gerrit.reviewdb.client.Change.Id > ret = com.google.common.collect.ArrayListMultimap.create ( ) ; for ( com.google.gerrit.server.query.change.ChangeData cd : changeData.values ( ) ) { ret.put ( cd.change ( ) . getProject ( ) , cd.getId ( ) ) ; } return ret ; }

Target:
public com.google.common.collect.Multimap < com.google.gerrit.reviewdb.client.Project.NameKey , com.google.gerrit.server.query.change.ChangeData > changesByProject ( ) throws com.google.gwtorm.server.OrmException { com.google.common.collect.ListMultimap < com.google.gerrit.reviewdb.client.Project.NameKey , com.google.gerrit.server.query.change.ChangeData > ret = com.google.common.collect.ArrayListMultimap.create ( ) ; for ( com.google.gerrit.server.query.change.ChangeData cd : changeData.values ( ) ) { ret.put ( cd.change ( ) . getProject ( ) , cd ) ; } return ret ; }
Source:
public com.google.gerrit.extensions.client.ChangeKind getChangeKind ( com.google.gerrit.reviewdb.client.Project.NameKey project , @ com.google.gerrit.common.Nullable org.eclipse.jgit.lib.Repository repo , org.eclipse.jgit.lib.ObjectId prior , org.eclipse.jgit.lib.ObjectId next ) { try { com.google.gerrit.server.change.ChangeKindCacheImpl.Key key = new com.google.gerrit.server.change.ChangeKindCacheImpl.Key ( prior , next , useRecursiveMerge ) ; return new com.google.gerrit.server.change.ChangeKindCacheImpl.Loader ( key , repoManager , project , repo ) . call ( ) ; } catch ( java.io.IOException e ) { com.google.gerrit.server.change.ChangeKindCacheImpl.log.warn ( ( ( ( "Cannot check trivial rebase of new patch set " + ( next.name ( ) ) ) + " in " ) + project ) , e ) ; return com.google.gerrit.extensions.client.ChangeKind.REWORK ; } }

Target:
public com.google.gerrit.extensions.client.ChangeKind getChangeKind ( com.google.gerrit.reviewdb.client.Project.NameKey project , @ com.google.gerrit.common.Nullable org.eclipse.jgit.lib.Repository repo , @ com.google.gerrit.common.Nullable org.eclipse.jgit.revwalk.RevWalk rw , org.eclipse.jgit.lib.ObjectId prior , org.eclipse.jgit.lib.ObjectId next ) { try { com.google.gerrit.server.change.ChangeKindCacheImpl.Key key = new com.google.gerrit.server.change.ChangeKindCacheImpl.Key ( prior , next , useRecursiveMerge ) ; return new com.google.gerrit.server.change.ChangeKindCacheImpl.Loader ( key , repoManager , project , repo , rw ) . call ( ) ; } catch ( java.io.IOException e ) { com.google.gerrit.server.change.ChangeKindCacheImpl.log.warn ( ( ( ( "Cannot check trivial rebase of new patch set " + ( next.name ( ) ) ) + " in " ) + project ) , e ) ; return com.google.gerrit.extensions.client.ChangeKind.REWORK ; } }
Source:
protected void configure ( ) { final java.lang.Class < ? extends com.google.inject.Provider < java.lang.String > > provider = provider ( ) ; bind ( provider ) . in ( com.google.inject.Scopes.SINGLETON ) ; bind ( java.lang.String.class ) . annotatedWith ( com.google.gerrit.server.config.CanonicalWebUrl.class ) . toProvider ( provider ) ; }

Target:
protected void configure ( ) { final java.lang.Class < ? extends com.google.inject.Provider < java.lang.String > > provider = provider ( ) ; bind ( java.lang.String.class ) . annotatedWith ( com.google.gerrit.server.config.CanonicalWebUrl.class ) . toProvider ( provider ) ; }
Source:
public void run ( ) { if ( ( cm.hasActiveLine ( ) ) && ( ( toLeft && ( cm == ( cmB ) ) ) || ( ( ! toLeft ) && ( cm == ( cmA ) ) ) ) ) { net.codemirror.lib.CodeMirror other = otherCm ( cm ) ; other.setCursor ( net.codemirror.lib.LineCharacter.create ( mapper.lineOnOther ( getSideFromCm ( cm ) , cm.getLineNumber ( cm.getActiveLine ( ) ) ) . getLine ( ) ) ) ; other.focus ( ) ; } }

Target:
public void run ( ) { }
Source:
protected void configure ( ) { bind ( com.codahale.metrics.MetricRegistry.class ) . in ( Scopes.SINGLETON ) ; bind ( com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker.class ) . in ( Scopes.SINGLETON ) ; bind ( com.google.gerrit.metrics.MetricMaker.class ) . to ( com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker.class ) ; install ( new com.google.gerrit.metrics.proc.ProcMetricModule ( ) ) ; install ( new com.google.gerrit.metrics.proc.JGitMetricModule ( ) ) ; com.google.gerrit.extensions.registration.DynamicMap.mapOf ( binder ( ) , com.google.gerrit.metrics.dropwizard.MetricResource.METRIC_KIND ) ; child ( com.google.gerrit.server.config.ConfigResource.CONFIG_KIND , "metrics" ) . to ( com.google.gerrit.metrics.dropwizard.MetricsCollection.class ) ; get ( com.google.gerrit.metrics.dropwizard.MetricResource.METRIC_KIND ) . to ( com.google.gerrit.metrics.dropwizard.GetMetric.class ) ; }

Target:
protected void configure ( ) { bind ( com.codahale.metrics.MetricRegistry.class ) . in ( Scopes.SINGLETON ) ; bind ( com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker.class ) . in ( Scopes.SINGLETON ) ; bind ( com.google.gerrit.metrics.MetricMaker.class ) . to ( com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker.class ) ; install ( new com.google.gerrit.metrics.proc.ProcMetricModule ( ) ) ; install ( new com.google.gerrit.metrics.proc.JGitMetricModule ( ) ) ; }
Source:
public void dontSkipWhenUserBelongsToOtherGroupsUUID ( ) throws java.lang.Exception { java.lang.String config = "[plugin \"uploadvalidator\"]\n" + ( ( "skipValidation=testOp\n" + "skipGroup=testGroup\n" ) + "skipGroup=anotherGroup" ) ; com.googlesource.gerrit.plugins.uploadvalidator.ValidatorConfig validatorConfig = new com.googlesource.gerrit.plugins.uploadvalidator.ValidatorConfig ( new com.googlesource.gerrit.plugins.uploadvalidator.FakeConfigFactory ( projectName , config ) , new com.googlesource.gerrit.plugins.uploadvalidator.FakeUserProvider ( "yetAnotherGroup" ) , new com.googlesource.gerrit.plugins.uploadvalidator.FakeGroupCacheUUIDByName ( ) ) ; com.google.common.truth.Truth.assertThat ( validatorConfig.isEnabledForRef ( projectName , "anyRef" , "testOp" ) ) . isTrue ( ) ; }

Target:
public void dontSkipWhenUserBelongsToOtherGroupsUUID ( ) throws java.lang.Exception { java.lang.String config = "[plugin \"uploadvalidator\"]\n" + ( ( "skipValidation=testOp\n" + "skipGroup=testGroup\n" ) + "skipGroup=anotherGroup" ) ; com.googlesource.gerrit.plugins.uploadvalidator.ValidatorConfig validatorConfig = new com.googlesource.gerrit.plugins.uploadvalidator.ValidatorConfig ( new com.googlesource.gerrit.plugins.uploadvalidator.FakeConfigFactory ( projectName , config ) , new com.googlesource.gerrit.plugins.uploadvalidator.FakeGroupCacheUUIDByName ( ) ) ; com.google.common.truth.Truth.assertThat ( validatorConfig.isEnabledForRef ( new com.googlesource.gerrit.plugins.uploadvalidator.FakeUserProvider ( "yetAnotherGroup" ) . get ( ) , projectName , "anyRef" , "testOp" ) ) . isTrue ( ) ; }
Source:
public com.google.common.util.concurrent.ListenableFuture < java.lang.Void > delete ( com.google.gerrit.server.query.change.ChangeData cd ) throws java.io.IOException { java.lang.String id = cd.getId ( ) . toString ( ) ; try { if ( cd.getChange ( ) . getStatus ( ) . isOpen ( ) ) { openIndex.deleteById ( id ) ; commit ( openIndex ) ; } else { closedIndex.deleteById ( id ) ; commit ( closedIndex ) ; } return com.google.common.util.concurrent.Futures.immediateFuture ( null ) ; } catch ( org.apache.solr.client.solrj.SolrServerException e ) { throw new java.io.IOException ( e ) ; } }

Target:
public void delete ( com.google.gerrit.server.query.change.ChangeData cd ) throws java.io.IOException { java.lang.String id = cd.getId ( ) . toString ( ) ; try { if ( cd.getChange ( ) . getStatus ( ) . isOpen ( ) ) { openIndex.deleteById ( id ) ; commit ( openIndex ) ; } else { closedIndex.deleteById ( id ) ; commit ( closedIndex ) ; } } catch ( org.apache.solr.client.solrj.SolrServerException e ) { throw new java.io.IOException ( e ) ; } }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { this . className = org.objectweb.asm.Type.getObjectType ( name ) . getClassName ( ) ; this . access = access ; this . interfaces = interfaces ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { this . className = org.objectweb.asm.Type.getObjectType ( name ) . getClassName ( ) ; this . access = access ; this . superName = superName ; }
Source:
protected void configure ( ) { install ( new com.google.gerrit.server.config.FactoryModule ( ) { @ java.lang.Override public void configure ( ) { factory ( LuceneChangeIndex.Factory.class ) ; } } ) ; install ( new com.google.gerrit.server.index.IndexModule ( threads ) ) ; if ( ( ( singleVersion ) == null ) && ( ( base ) == null ) ) { install ( new com.google.gerrit.lucene.LuceneIndexModule.MultiVersionModule ( ) ) ; } else { install ( new com.google.gerrit.lucene.LuceneIndexModule.SingleVersionModule ( ) ) ; } }

Target:
protected void configure ( ) { factory ( LuceneChangeIndex.Factory.class ) ; install ( new com.google.gerrit.server.index.IndexModule ( threads ) ) ; if ( ( ( singleVersion ) == null ) && ( ( base ) == null ) ) { install ( new com.google.gerrit.lucene.LuceneIndexModule.MultiVersionModule ( ) ) ; } else { install ( new com.google.gerrit.lucene.LuceneIndexModule.SingleVersionModule ( ) ) ; } }
Source:
private void load ( ) throws java.io.IOException { close ( ) ; reader = repo.newObjectReader ( ) ; org.eclipse.jgit.lib.Ref ref = repo.getRefDatabase ( ) . exactRef ( RefNames.REFS_GPG_KEYS ) ; if ( ref == null ) { return ; } try ( org.eclipse.jgit.revwalk.RevWalk rw = new org.eclipse.jgit.revwalk.RevWalk ( reader ) ) { tip = rw.parseCommit ( ref.getObjectId ( ) . copy ( ) ) ; notes = org.eclipse.jgit.notes.NoteMap.read ( reader , tip ) ; } }

Target:
private void load ( ) throws java.io.IOException { close ( ) ; reader = repo.newObjectReader ( ) ; org.eclipse.jgit.lib.Ref ref = repo.getRefDatabase ( ) . exactRef ( RefNames.REFS_GPG_KEYS ) ; if ( ref == null ) { return ; } try ( org.eclipse.jgit.revwalk.RevWalk rw = new org.eclipse.jgit.revwalk.RevWalk ( reader ) ) { tip = rw.parseCommit ( ref.getObjectId ( ) ) ; notes = org.eclipse.jgit.notes.NoteMap.read ( reader , tip ) ; } }
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.getStatus ( ) ) == ( PatchLineComment.Status.PUBLISHED ) ) , ( "Cannot add a draft comment to a ChangeUpdate. Use a ChangeDraftUpdate" + " for draft comments" ) ) ; 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:
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 ) ; }
Source:
public boolean evict ( final java.lang.String cacheName , final java.lang.Object key ) { return new com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarder.Request ( ( ( ( ( "invalidate cache " + cacheName ) + "[" ) + key ) + "]" ) ) { @ java.lang.Override com.ericsson.gerrit.plugins.highavailability.forwarder.rest.HttpResponseHandler.HttpResult send ( ) throws java.io.IOException { java.lang.String json = com.ericsson.gerrit.plugins.highavailability.forwarder.rest.GsonParser.toJson ( cacheName , key ) ; return httpSession.post ( com.google.common.base.Joiner.on ( "/" ) . join ( pluginRelativePath , "cache" , cacheName ) , json ) ; } } . execute ( ) ; }

Target:
public boolean evict ( final java.lang.String cacheName , final java.lang.Object key ) { return new com.ericsson.gerrit.plugins.highavailability.forwarder.rest.RestForwarder.Request ( ( "invalidate cache " + cacheName ) , key ) { @ java.lang.Override com.ericsson.gerrit.plugins.highavailability.forwarder.rest.HttpResponseHandler.HttpResult send ( ) throws java.io.IOException { java.lang.String json = com.ericsson.gerrit.plugins.highavailability.forwarder.rest.GsonParser.toJson ( cacheName , key ) ; return httpSession.post ( com.google.common.base.Joiner.on ( "/" ) . join ( pluginRelativePath , "cache" , cacheName ) , json ) ; } } . execute ( ) ; }
Source:
public void requestReceived ( com.github.tomakehurst.wiremock.http.Request request , com.github.tomakehurst.wiremock.http.Response response ) { if ( request.getAbsoluteUrl ( ) . contains ( flushRequest ) ) { try { checkPoint.await ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.BrokenBarrierException e ) { org.junit.Assert.fail ( ) ; } } }

Target:
public void requestReceived ( com.github.tomakehurst.wiremock.http.Request request , com.github.tomakehurst.wiremock.http.Response response ) { if ( request.getAbsoluteUrl ( ) . contains ( flushRequest ) ) { try { checkPoint.await ( ) ; } catch ( java.lang.InterruptedException | java.util.concurrent.BrokenBarrierException e ) { fail ( ) ; } } }
Source:
public void createProject ( ) throws java.lang.Exception { java.lang.String name = name ( "foo" ) ; com.google.common.truth.Truth.assertThat ( name ) . isEqualTo ( gApi.projects ( ) . create ( name ) . get ( ) . name ) ; org.eclipse.jgit.revwalk.RevCommit head = getRemoteHead ( name , RefNames.REFS_CONFIG ) ; eventRecorder.assertRefUpdatedEvents ( name , RefNames.REFS_CONFIG , null , head ) ; eventRecorder.assertRefUpdatedEvents ( name , "refs/heads/master" , new java.lang.String [ ] { } ) ; }

Target:
public void createProject ( ) throws java.lang.Exception { java.lang.String name = name ( "foo" ) ; com.google.common.truth.Truth.assertThat ( gApi.projects ( ) . create ( name ) . get ( ) . name ) . isEqualTo ( name ) ; org.eclipse.jgit.revwalk.RevCommit head = getRemoteHead ( name , RefNames.REFS_CONFIG ) ; eventRecorder.assertRefUpdatedEvents ( name , RefNames.REFS_CONFIG , null , head ) ; eventRecorder.assertRefUpdatedEvents ( name , "refs/heads/master" , new java.lang.String [ ] { } ) ; }
Source:
public com.google.gerrit.client.data.ChangeDetail run ( final com.google.gerrit.client.reviewdb.ReviewDb db ) throws com.google.gerrit.client.changes.Failure , com.google.gwtorm.client.OrmException { final com.google.gerrit.client.reviewdb.Change change = db.changes ( ) . get ( id ) ; if ( change == null ) { throw new com.google.gerrit.client.changes.Failure ( new com.google.gerrit.client.rpc.NoSuchEntityException ( ) ) ; } final com.google.gerrit.client.workflow.RightRule rules = new com.google.gerrit.client.workflow.RightRule ( db ) ; final com.google.gerrit.client.data.ChangeDetail d = new com.google.gerrit.client.data.ChangeDetail ( ) ; d.load ( db , new com.google.gerrit.client.data.AccountInfoCacheFactory ( db ) , rules , change ) ; return d ; }

Target:
public com.google.gerrit.client.data.ChangeDetail run ( final com.google.gerrit.client.reviewdb.ReviewDb db ) throws com.google.gerrit.client.changes.Failure , com.google.gwtorm.client.OrmException { final com.google.gerrit.client.reviewdb.Change change = db.changes ( ) . get ( id ) ; if ( change == null ) { throw new com.google.gerrit.client.changes.Failure ( new com.google.gerrit.client.rpc.NoSuchEntityException ( ) ) ; } final com.google.gerrit.client.workflow.RightRule rules = new com.google.gerrit.client.workflow.RightRule ( ) ; final com.google.gerrit.client.data.ChangeDetail d = new com.google.gerrit.client.data.ChangeDetail ( ) ; d.load ( db , new com.google.gerrit.client.data.AccountInfoCacheFactory ( db ) , rules , change ) ; return d ; }
Source:
protected void onCellSingleClick ( int row , int column ) { if ( ( column == 1 ) || ( column == 2 ) ) { if ( ! ( "" . equals ( table.getText ( row , column ) ) ) ) { onCellDoubleClick ( row , column ) ; } } }

Target:
protected void onCellSingleClick ( int row , int column ) { super . onCellSingleClick ( row , column ) ; if ( ( column == 1 ) || ( column == 2 ) ) { if ( ! ( "" . equals ( table.getText ( row , column ) ) ) ) { onCellDoubleClick ( row , column ) ; } } }
Source:
public final java.util.List < java.lang.String > archives ( ) { java.util.List < java.lang.String > archives = new java.util.ArrayList < > ( ) ; for ( com.google.gerrit.client.config.DownloadInfo.ArchiveFormatInfo f : com.google.gerrit.client.rpc.Natives.asList ( _archives ( ) ) ) { archives.add ( f.get ( ) ) ; } return archives ; }

Target:
public final java.util.List < java.lang.String > archives ( ) { java.util.List < java.lang.String > archives = new java.util.ArrayList < > ( ) ; for ( java.lang.String f : com.google.gerrit.client.rpc.Natives.asList ( _archives ( ) ) ) { archives.add ( f ) ; } return archives ; }
Source:
public com.google.gerrit.server.project.ProjectState load ( java.lang.String projectName ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey key = new com.google.gerrit.reviewdb.client.Project.NameKey ( projectName ) ; org.eclipse.jgit.lib.Repository git = mgr.openRepository ( key ) ; try { com.google.gerrit.server.git.ProjectConfig cfg = new com.google.gerrit.server.git.ProjectConfig ( key ) ; cfg.load ( git ) ; return projectStateFactory.create ( cfg ) ; } finally { git.close ( ) ; } }

Target:
public com.google.gerrit.server.project.ProjectState load ( java.lang.String projectName ) throws java.lang.Exception { com.google.gerrit.reviewdb.client.Project.NameKey key = new com.google.gerrit.reviewdb.client.Project.NameKey ( projectName ) ; try ( org.eclipse.jgit.lib.Repository git = mgr.openRepository ( key ) ) { com.google.gerrit.server.git.ProjectConfig cfg = new com.google.gerrit.server.git.ProjectConfig ( key ) ; cfg.load ( git ) ; return projectStateFactory.create ( cfg ) ; } }
Source:
public com.google.gerrit.common.data.LabelValue getMax ( ) { if ( values.isEmpty ( ) ) { return null ; } final com.google.gerrit.common.data.LabelValue v = values.get ( ( ( values.size ( ) ) - 1 ) ) ; return ( v.getValue ( ) ) > 0 ? v : null ; }

Target:
public com.google.gerrit.common.data.LabelValue getMax ( ) { if ( values.isEmpty ( ) ) { return null ; } return values.get ( ( ( values.size ( ) ) - 1 ) ) ; }
Source:
public java.util.List < com.google.gerrit.extensions.common.ChangeInfo > submittedTogether ( ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return ( ( java.util.List < com.google.gerrit.extensions.common.ChangeInfo > ) ( submittedTogether.apply ( change ) ) ) ; } catch ( java.lang.Exception e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot query submittedTogether" , e ) ; } }

Target:
public java.util.List < com.google.gerrit.extensions.common.ChangeInfo > submittedTogether ( ) throws com.google.gerrit.extensions.restapi.RestApiException { try { return submittedTogether.apply ( change ) ; } catch ( java.io.IOException | com.google.gwtorm.server.OrmException e ) { throw new com.google.gerrit.extensions.restapi.RestApiException ( "Cannot query submittedTogether" , e ) ; } }
Source:
public static boolean canRead ( final com.google.gerrit.client.reviewdb.Account.Id who , final com.google.gerrit.client.reviewdb.Project.NameKey projectKey ) { final com.google.gerrit.client.data.ProjectCache.Entry e = com.google.gerrit.client.rpc.Common.getProjectCache ( ) . get ( projectKey ) ; if ( e == null ) { return false ; } final java.util.Set < com.google.gerrit.client.reviewdb.AccountGroup.Id > myGroups = com.google.gerrit.client.rpc.Common.getGroupCache ( ) . getEffectiveGroups ( who ) ; return com.google.gerrit.client.rpc.BaseServiceImplementation.canPerform ( myGroups , e , ApprovalCategory.READ , ( ( short ) ( 1 ) ) , true ) ; }

Target:
public static boolean canRead ( final com.google.gerrit.client.reviewdb.Account.Id who , final com.google.gerrit.client.data.ProjectCache.Entry e ) { if ( e == null ) { return false ; } final java.util.Set < com.google.gerrit.client.reviewdb.AccountGroup.Id > myGroups = com.google.gerrit.client.rpc.Common.getGroupCache ( ) . getEffectiveGroups ( who ) ; return com.google.gerrit.client.rpc.BaseServiceImplementation.canPerform ( myGroups , e , ApprovalCategory.READ , ( ( short ) ( 1 ) ) , true ) ; }
Source:
private org.eclipse.jgit.lib.Repository openRepository ( java.lang.String name ) throws java.io.IOException { if ( repos.containsKey ( name ) ) { return repos.get ( name ) ; } name = com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.urlToRepoKey ( canonicalWebUrl , name ) ; org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( new com.google.gerrit.reviewdb.client.Project.NameKey ( name ) ) ; repos.put ( name , repo ) ; return repo ; }

Target:
private org.eclipse.jgit.lib.Repository openRepository ( java.lang.String name ) throws java.io.IOException { name = com.googlesource.gerrit.plugins.supermanifest.SuperManifestRefUpdatedListener.urlToRepoKey ( canonicalWebUrl , name ) ; if ( repos.containsKey ( name ) ) { return repos.get ( name ) ; } org.eclipse.jgit.lib.Repository repo = repoManager.openRepository ( new com.google.gerrit.reviewdb.client.Project.NameKey ( name ) ) ; repos.put ( name , repo ) ; return repo ; }
Source:
public void testCreateSchema_LabelTypes ( ) throws java.lang.Exception { java.util.List < java.lang.String > labels = com.google.common.collect.Lists.newArrayList ( ) ; for ( com.google.gerrit.common.data.LabelType label : getLabelTypes ( ) . getLabelTypes ( ) ) { labels.add ( label.getName ( ) ) ; } assertEquals ( com.google.common.collect.ImmutableList.of ( "Code-Review" ) , labels ) ; }

Target:
public void testCreateSchema_LabelTypes ( ) throws java.lang.Exception { java.util.List < java.lang.String > labels = com.google.common.collect.Lists.newArrayList ( ) ; for ( com.google.gerrit.common.data.LabelType label : getLabelTypes ( ) . getLabelTypes ( ) ) { labels.add ( label.getName ( ) ) ; } org.junit.Assert.assertEquals ( com.google.common.collect.ImmutableList.of ( "Code-Review" ) , labels ) ; }
Source:
static void extract ( final java.io.File dst , final java.lang.Class < ? > sibling , final java.lang.String name ) throws java.io.IOException { final java.io.InputStream in = com.google.gerrit.pgm.init.InitUtil.open ( sibling , name ) ; if ( in != null ) { java.nio.ByteBuffer buf = org.eclipse.jgit.util.IO.readWholeStream ( in , 8192 ) ; com.google.gerrit.pgm.init.InitUtil.copy ( dst , buf ) ; } }

Target:
static void extract ( final java.io.File dst , final java.lang.Class < ? > sibling , final java.lang.String name ) throws java.io.IOException { try ( java.io.InputStream in = com.google.gerrit.pgm.init.InitUtil.open ( sibling , name ) ) { if ( in != null ) { java.nio.ByteBuffer buf = org.eclipse.jgit.util.IO.readWholeStream ( in , 8192 ) ; com.google.gerrit.pgm.init.InitUtil.copy ( dst , buf ) ; } } }
Source:
private void addWebLink ( java.lang.String href , java.lang.String name ) { com.google.gwt.user.client.ui.Anchor a = new com.google.gwt.user.client.ui.Anchor ( ) ; a.setHref ( href ) ; a.setText ( com.google.gerrit.client.change.CommitBox.parenthesize ( name ) ) ; com.google.gwt.dom.client.Element el = a.getElement ( ) ; webLinkCell.appendChild ( el ) ; }

Target:
private void addWebLink ( java.lang.String href , java.lang.String name ) { com.google.gwt.user.client.ui.Anchor a = new com.google.gwt.user.client.ui.Anchor ( ) ; a.setHref ( href ) ; a.setText ( name ) ; com.google.gwt.dom.client.Element el = a.getElement ( ) ; webLinkCell.appendChild ( el ) ; }
Source:
public void onLoad ( ) { if ( ( tabs ) == null ) { initUI ( ) ; } super . onLoad ( ) ; tabs.selectTab ( tabTokens.indexOf ( initialTabToken ) ) ; Util.PROJECT_SVC.projectDetail ( projectId , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.admin.ProjectDetail > ( this ) { @ java.lang.Override protected void preDisplay ( final com.google.gerrit.client.admin.ProjectDetail result ) { display ( result ) ; } } ) ; }

Target:
public void onLoad ( ) { super . onLoad ( ) ; Util.PROJECT_SVC.projectDetail ( projectId , new com.google.gerrit.client.rpc.ScreenLoadCallback < com.google.gerrit.client.admin.ProjectDetail > ( this ) { @ java.lang.Override protected void preDisplay ( final com.google.gerrit.client.admin.ProjectDetail result ) { display ( result ) ; tabs.selectTab ( tabTokens.indexOf ( initialTabToken ) ) ; } } ) ; }