auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private com.google.gerrit.reviewdb.client.AccountSshKey createSshKey ( com.google.gerrit.reviewdb.client.Account.Id id , java.lang.String keyFile ) throws java.io.IOException { java.nio.file.Path p = java.nio.file.Paths.get ( keyFile ) ; if ( ! ( java.nio.file.Files.exists ( p ) ) ) { throw new java.io.IOException ( java.lang.String.format ( "Cannot add public SSH key: %s is not a file" , keyFile ) ) ; } java.lang.String content = new java.lang.String ( java.nio.file.Files.readAllBytes ( p ) , java.nio.charset.StandardCharsets.UTF_8 ) ; return new com.google.gerrit.reviewdb.client.AccountSshKey ( new com.google.gerrit.reviewdb.client.AccountSshKey.Id ( id , 0 ) , content ) ; }

Target:
private com.google.gerrit.reviewdb.client.AccountSshKey createSshKey ( com.google.gerrit.reviewdb.client.Account.Id id , java.lang.String keyFile ) throws java.io.IOException { java.nio.file.Path p = java.nio.file.Paths.get ( keyFile ) ; if ( ! ( java.nio.file.Files.exists ( p ) ) ) { throw new java.io.IOException ( java.lang.String.format ( "Cannot add public SSH key: %s is not a file" , keyFile ) ) ; } java.lang.String content = new java.lang.String ( java.nio.file.Files.readAllBytes ( p ) , java.nio.charset.StandardCharsets.UTF_8 ) ; return new com.google.gerrit.reviewdb.client.AccountSshKey ( new com.google.gerrit.reviewdb.client.AccountSshKey.Id ( id , 1 ) , content ) ; }
Source:
private static com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > onePredicate ( com.google.gerrit.server.query.change.LabelPredicate.Args args , java.lang.String label , int expVal ) { if ( expVal != 0 ) { return com.google.gerrit.server.query.change.LabelPredicate.equalsLabelPredicate ( args , label , expVal ) ; } else { return com.google.gerrit.server.query.change.LabelPredicate.noLabelQuery ( args , label ) ; } }

Target:
private static com.google.gerrit.server.query.Predicate < com.google.gerrit.server.query.change.ChangeData > onePredicate ( com.google.gerrit.server.query.change.LabelPredicate.Args args , java.lang.String label , int expVal ) { if ( expVal != 0 ) { return com.google.gerrit.server.query.change.LabelPredicate.equalsLabelPredicate ( args , label , expVal ) ; } return com.google.gerrit.server.query.change.LabelPredicate.noLabelQuery ( args , label ) ; }
Source:
private void delete ( java.lang.String path ) { hide ( ) ; com.google.gerrit.client.changes.ChangeEditApi.delete ( changeId.get ( ) , path , new com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.VoidResult > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.VoidResult result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChangeInEditMode ( changeId ) ) ; } @ java.lang.Override public void onFailure ( java.lang.Throwable caught ) { } } ) ; }

Target:
private void delete ( java.lang.String path ) { hide ( ) ; com.google.gerrit.client.changes.ChangeEditApi.delete ( project.get ( ) , changeId.get ( ) , path , new com.google.gwt.user.client.rpc.AsyncCallback < com.google.gerrit.client.VoidResult > ( ) { @ java.lang.Override public void onSuccess ( com.google.gerrit.client.VoidResult result ) { com.google.gerrit.client.Gerrit.display ( com.google.gerrit.common.PageLinks.toChangeInEditMode ( project , changeId ) ) ; } @ java.lang.Override public void onFailure ( java.lang.Throwable caught ) { } } ) ; }
Source:
public static com.google.gerrit.server.patch.DiffSummaryKey fromPatchListKey ( com.google.gerrit.server.patch.PatchListKey plk ) { com.google.common.base.Preconditions.checkArgument ( ( ( plk.getAlgorithm ( ) ) == ( PatchListKey.Algorithm.OPTIMIZED_DIFF ) ) ) ; return new com.google.gerrit.server.patch.DiffSummaryKey ( plk.getOldId ( ) , plk.getParentNum ( ) , plk.getNewId ( ) , plk.getWhitespace ( ) ) ; }

Target:
public static com.google.gerrit.server.patch.DiffSummaryKey fromPatchListKey ( com.google.gerrit.server.patch.PatchListKey plk ) { return new com.google.gerrit.server.patch.DiffSummaryKey ( plk.getOldId ( ) , plk.getParentNum ( ) , plk.getNewId ( ) , plk.getWhitespace ( ) ) ; }