auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
static final java.text.DateFormatSymbols getInstanceRef ( java.util.Locale locale ) { java.text.DateFormatSymbols dfs = java.text.DateFormatSymbols.getProviderInstance ( locale ) ; if ( dfs != null ) { return dfs ; } return java.text.DateFormatSymbols.getCachedInstance ( locale ) ; }

Target:
static final java.text.DateFormatSymbols getInstanceRef ( java.util.Locale locale ) { return java.text.DateFormatSymbols.getCachedInstance ( locale ) ; }
Source:
public void testConstructor_NullSerial_Failure ( ) throws java.lang.Exception { try { new android.security.AndroidKeyPairGeneratorSpec ( getContext ( ) , android.security.AndroidKeyPairGeneratorSpecTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorSpecTest.TEST_DN_1 , null , android.security.AndroidKeyPairGeneratorSpecTest.NOW , android.security.AndroidKeyPairGeneratorSpecTest.NOW_PLUS_10_YEARS ) ; fail ( "Should throw IllegalArgumentException when startDate is null" ) ; } catch ( java.lang.IllegalArgumentException success ) { } }

Target:
public void testConstructor_NullSerial_Failure ( ) throws java.lang.Exception { try { new android.security.AndroidKeyPairGeneratorSpec ( getContext ( ) , android.security.AndroidKeyPairGeneratorSpecTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorSpecTest.TEST_DN_1 , null , android.security.AndroidKeyPairGeneratorSpecTest.NOW , android.security.AndroidKeyPairGeneratorSpecTest.NOW_PLUS_10_YEARS , 0 ) ; fail ( "Should throw IllegalArgumentException when startDate is null" ) ; } catch ( java.lang.IllegalArgumentException success ) { } }
Source:
public void realRun ( ) { long startTime = java.lang.System.nanoTime ( ) ; java.util.concurrent.Future future = executor.submit ( sleeper ) ; assertFutureTimesOut ( future ) ; }

Target:
public void realRun ( ) { java.util.concurrent.Future future = executor.submit ( sleeper ) ; assertFutureTimesOut ( future ) ; }
Source:
public abstract boolean isFile ( @ com.android.annotations.NonNull java.io.File file ) ;

Target:
long length ( @ com.android.annotations.NonNull java.io.File file ) ;
Source:
public void noteVideoTurnedOffLocked ( ) { if ( mVideoTurnedOn ) { mVideoTurnedOn = false ; mVideoTurnedOnTimer.stopRunningLocked ( this ) ; } }

Target:
public void noteVideoTurnedOffLocked ( ) { if ( mVideoTurnedOn ) { mVideoTurnedOn = false ; if ( ( mVideoTurnedOnTimer ) != null ) { mVideoTurnedOnTimer.stopRunningLocked ( this ) ; } } }
Source:
public void visitDeprecatedAttribute ( proguard.classfile.attribute.visitor.Clazz clazz , proguard.classfile.attribute.visitor.Field field , proguard.classfile.attribute.visitor.DeprecatedAttribute deprecatedAttribute ) { deprecatedAttribute.accept ( clazz , field , attributeVisitor ) ; }

Target:
public void visitDeprecatedAttribute ( proguard.classfile.attribute.visitor.Clazz clazz , proguard.classfile.attribute.visitor.Field field , proguard.classfile.attribute.visitor.DeprecatedAttribute deprecatedAttribute ) { attributeVisitor.visitDeprecatedAttribute ( clazz , field , deprecatedAttribute ) ; }
Source:
public void uncaughtException ( java.lang.Thread t , java.lang.Throwable e ) { if ( e instanceof java.lang.ThreadDeath ) { passed [ TEST_KILLING ] = true ; } super . uncaughtException ( t , e ) ; }

Target:
public void uncaughtException ( java.lang.Thread t , java.lang.Throwable e ) { if ( e instanceof java.lang.ThreadDeath ) { passed [ 0 ] = true ; } super . uncaughtException ( t , e ) ; }
Source:
protected void updateSearchPanel ( ) { super . updateSearchPanel ( ) ; mSearchPanelView.setStatusBarView ( mNavigationBarView ) ; mNavigationBarView.setDelegateView ( mSearchPanelView ) ; }

Target:
protected void updateSearchPanel ( ) { super . updateSearchPanel ( ) ; if ( ( mNavigationBarView ) != null ) { mNavigationBarView.setDelegateView ( mSearchPanelView ) ; } }
Source:
protected java.net.URLConnection openConnection ( java.net.URL url ) throws java.io.IOException { return new libcore.io.ClassPathURLStreamHandler.ClassPathURLConnection ( url , jarFile ) ; }

Target:
protected java.net.URLConnection openConnection ( java.net.URL url ) throws java.io.IOException { return new libcore.io.ClassPathURLStreamHandler.ClassPathURLConnection ( url ) ; }
Source:
static com.android.dialer.app.calllog.MissedCallNotifier getIstance ( android.content.Context context ) { return new com.android.dialer.app.calllog.MissedCallNotifier ( context , com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.getInstance ( context ) ) ; }

Target:
public static com.android.dialer.app.calllog.MissedCallNotifier getInstance ( android.content.Context context ) { return new com.android.dialer.app.calllog.MissedCallNotifier ( context , com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.getInstance ( context ) ) ; }
Source:
public void onMiddlewareReady ( ) { try { listener.middlewareReady ( ) ; } catch ( android.os.RemoteException e ) { onAppCallbackDied ( uid , subscriptionId ) ; } }

Target:
public void middlewareReady ( ) throws android.os.RemoteException { listener.middlewareReady ( ) ; }
Source:
public static void startMethodTracing ( ) { dalvik.system.VMDebug.startMethodTracing ( android.os.Debug.DEFAULT_TRACE_FILE_PATH , 0 , 0 ) ; }

Target:
public static void startMethodTracing ( ) { dalvik.system.VMDebug.startMethodTracing ( android.os.Debug.DEFAULT_TRACE_FILE_PATH , 0 , 0 , false , 0 ) ; }
Source:
public void addMemberType ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface jDeclaredType ) { inners.add ( jDeclaredType ) ; }

Target:
public void addMemberType ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface jDeclaredType ) { synchronized ( inners ) { inners.add ( jDeclaredType ) ; } }
Source:
void setAvdName ( java.lang.String avdName ) { if ( ( isEmulator ( ) ) == false ) { throw new java.lang.IllegalArgumentException ( "Cannot set the AVD name of the device is not an emulator" ) ; } mAvdName = avdName ; }

Target:
void setAvdName ( java.lang.String avdName ) { if ( ! ( isEmulator ( ) ) ) { throw new java.lang.IllegalArgumentException ( "Cannot set the AVD name of the device is not an emulator" ) ; } mAvdName = avdName ; }
Source:
public org.eclipse.ltk.core.refactoring.RefactoringStatus checkInitialConditions ( org.eclipse.core.runtime.IProgressMonitor pm ) throws org.eclipse.core.runtime.CoreException , org.eclipse.core.runtime.OperationCanceledException { if ( ( this . mProject.findMaxProblemSeverity ( IMarker.PROBLEM , true , IResource.DEPTH_INFINITE ) ) == ( org.eclipse.core.resources.IMarker.SEVERITY_ERROR ) ) { return org.eclipse.ltk.core.refactoring.RefactoringStatus.createFatalErrorStatus ( "Fix the errors in your project, first." ) ; } return new org.eclipse.ltk.core.refactoring.RefactoringStatus ( ) ; }

Target:
public org.eclipse.ltk.core.refactoring.RefactoringStatus checkInitialConditions ( org.eclipse.core.runtime.IProgressMonitor pm ) throws org.eclipse.core.runtime.CoreException , org.eclipse.core.runtime.OperationCanceledException { if ( ( mProject.findMaxProblemSeverity ( IMarker.PROBLEM , true , IResource.DEPTH_INFINITE ) ) == ( org.eclipse.core.resources.IMarker.SEVERITY_ERROR ) ) { return org.eclipse.ltk.core.refactoring.RefactoringStatus.createFatalErrorStatus ( "Fix the errors in your project, first." ) ; } return new org.eclipse.ltk.core.refactoring.RefactoringStatus ( ) ; }
Source:
public void testManagedProvisioningPreInstalled ( ) throws java.lang.Exception { assertEquals ( mDeviceAdmin , isPackageInstalledOnSystemImage ( android.admin.cts.DevicePolicyManagerTest.MANAGED_PROVISIONING_PKG ) ) ; }

Target:
public void testManagedProvisioningPreInstalled ( ) throws java.lang.Exception { if ( mDeviceAdmin ) { assertTrue ( isPackageInstalledOnSystemImage ( android.admin.cts.DevicePolicyManagerTest.MANAGED_PROVISIONING_PKG ) ) ; } }
Source:
public boolean hasResources ( com.android.resources.ResourceType type ) { update ( ) ; java.util.HashMap < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > list = mResourceItems.get ( type ) ; return ( list != null ) && ( ( list.size ( ) ) > 0 ) ; }

Target:
public boolean hasResources ( com.android.resources.ResourceType type ) { java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > list = mResourceItems.get ( type ) ; return ( list != null ) && ( ( list.size ( ) ) > 0 ) ; }
Source:
public void run ( ) { while ( scanner.hasNextLine ( ) ) { result.add ( scanner.nextLine ( ) ) ; } }

Target:
public void run ( ) { while ( scanner.hasNextLine ( ) ) { java.lang.String line = scanner.nextLine ( ) ; result.add ( line ) ; } }
Source:
public static long $noinline$NegNeg1 ( long arg ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } return - ( - arg ) ; }

Target:
public static long $noinline$NegNeg1 ( long arg ) { return - ( - arg ) ; }
Source:
private java.io.File unpackBundle ( byte [ ] content , java.io.File targetDir ) throws java.io.IOException { android.util.Slog.i ( logTag , ( "Unpacking update content to: " + targetDir ) ) ; libcore.tzdata.update2.ConfigBundle bundle = new libcore.tzdata.update2.ConfigBundle ( content ) ; bundle.extractTo ( targetDir ) ; return targetDir ; }

Target:
private void unpackBundle ( byte [ ] content , java.io.File targetDir ) throws java.io.IOException { android.util.Slog.i ( logTag , ( "Unpacking update content to: " + targetDir ) ) ; libcore.tzdata.update2.ConfigBundle bundle = new libcore.tzdata.update2.ConfigBundle ( content ) ; bundle.extractTo ( targetDir ) ; }
Source:
void assertNoCallback ( ) { mService.waitForIdle ( ) ; com.android.server.ConnectivityServiceTest.CallbackInfo c = mCallbacks.peek ( ) ; assertNull ( ( "Unexpected callback: " + c ) , c ) ; }

Target:
void assertNoCallback ( ) { waitForIdle ( ) ; com.android.server.ConnectivityServiceTest.CallbackInfo c = mCallbacks.peek ( ) ; assertNull ( ( "Unexpected callback: " + c ) , c ) ; }
Source:
protected synchronized android.webkit.WebHistoryItem clone ( ) { throw new android.webkit.MustOverrideException ( ) ; }

Target:
protected abstract android.webkit.WebHistoryItem clone ( ) ;
Source:
public static void computeFdim ( android.renderscript.cts.TestFdim.ArgumentsFloatFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( java.lang.Math.max ( 0.0F , ( ( args.inA ) - ( args.inB ) ) ) , 0 , 0 ) ; }

Target:
public static void computeFdim ( android.renderscript.cts.TestFdim.ArgumentsFloatFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( java.lang.Math.max ( 0.0F , ( ( args.inA ) - ( args.inB ) ) ) , 0 , 1 ) ; }
Source:
private void checkGraphic ( java.lang.String baseName ) throws java.io.IOException { com.android.assetstudiolib.MenuIconGenerator generator = new com.android.assetstudiolib.MenuIconGenerator ( ) ; checkGraphic ( 3 , "menus" , baseName , generator , new com.android.assetstudiolib.GraphicGenerator.Options ( ) ) ; }

Target:
private void checkGraphic ( java.lang.String baseName ) throws java.io.IOException { com.android.assetstudiolib.MenuIconGenerator generator = new com.android.assetstudiolib.MenuIconGenerator ( ) ; checkGraphic ( 4 , "menus" , baseName , generator , new com.android.assetstudiolib.GraphicGenerator.Options ( ) ) ; }
Source:
public static native int max ( int i1 , int i2 ) ;

Target:
public static int max ( int i1 , int i2 ) { return i1 > i2 ? i1 : i2 ; }
Source:
public void testOpenSocketAddress_Null ( ) throws java.io.IOException { java.nio.channels.SocketChannel channel1IP = null ; try { channel1IP = java.nio.channels.SocketChannel.open ( null ) ; fail ( "Should throw an IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException e ) { } assertNull ( channel1IP ) ; }

Target:
public void testOpenSocketAddress_Null ( ) throws java.io.IOException { try { java.nio.channels.SocketChannel.open ( null ) ; fail ( "Should throw an IllegalArgumentException" ) ; } catch ( java.lang.IllegalArgumentException e ) { } }
Source:
final long getLong ( int offset ) { return sun.nio.ch.NativeObject.unsafe.getLong$ ( ( offset + ( address ) ) ) ; }

Target:
final long getLong ( int offset ) { return sun.nio.ch.NativeObject.unsafe.getLong ( ( offset + ( address ) ) ) ; }
Source:
public void setAudioRoute ( int route ) { try { mAdapter.setAudioRoute ( route ) ; } catch ( android.os.RemoteException e ) { } }

Target:
public void setAudioRoute ( int route ) { try { mAdapter.setAudioRoute ( route , null ) ; } catch ( android.os.RemoteException e ) { } }
Source:
public static android.support.v8.renderscript.ScriptIntrinsicConvolve5x5 create ( android.support.v8.renderscript.RenderScript rs , android.support.v8.renderscript.Element e ) { int id = rs.nScriptIntrinsicCreate ( 4 , e.getID ( rs ) ) ; return new android.support.v8.renderscript.ScriptIntrinsicConvolve5x5 ( id , rs ) ; }

Target:
public static android.support.v8.renderscript.ScriptIntrinsicConvolve5x5 create ( android.support.v8.renderscript.RenderScript rs , android.support.v8.renderscript.Element e ) { long id = rs.nScriptIntrinsicCreate ( 4 , e.getID ( rs ) ) ; return new android.support.v8.renderscript.ScriptIntrinsicConvolve5x5 ( id , rs ) ; }
Source:
public static int $noinline$intReverseConditionNaN ( int i ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } return 42 != ( java.lang.Math.sqrt ( i ) ) ? 13 : 54 ; }

Target:
public static int $noinline$intReverseConditionNaN ( int i ) { return 42 != ( java.lang.Math.sqrt ( i ) ) ? 13 : 54 ; }
Source:
public void run ( ) { android.os.Looper.prepare ( ) ; mLooper = android.os.Looper.myLooper ( ) ; mInitErrors = android.hardware.camera2.legacy.CameraDeviceUserShim.translateErrorsFromCamera1 ( mCamera.cameraInitUnspecified ( mCameraId ) ) ; mStartDone.open ( ) ; android.os.Looper.loop ( ) ; }

Target:
public void run ( ) { android.os.Looper.prepare ( ) ; mLooper = android.os.Looper.myLooper ( ) ; mInitErrors = mCamera.cameraInitUnspecified ( mCameraId ) ; mStartDone.open ( ) ; android.os.Looper.loop ( ) ; }
Source:
public static boolean equalMethodParameters ( java.lang.reflect.ArtMethod artMethod , java.lang.Class < ? > [ ] params ) { return java.lang.reflect.ArtMethod.equalConstructorParameters ( artMethod.findOverriddenMethodIfProxy ( ) , params ) ; }

Target:
public static boolean equalMethodParameters ( java.lang.reflect.ArtMethod artMethod , java.lang.Class < ? > [ ] params ) { return java.lang.reflect.ArtMethod.equalConstructorParameters ( artMethod , params ) ; }
Source:
public java.lang.String [ ] getSkins ( ) { return mSkins ; }

Target:
public java.io.File [ ] getSkins ( ) { return mSkins ; }
Source:
public void lockNow ( ) { if ( ( mService ) != null ) { try { mService.lockNow ( mParentInstance ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }

Target:
public void lockNow ( @ android.app.admin.DevicePolicyManager.LockNowFlag int flags ) { if ( ( mService ) != null ) { try { mService.lockNow ( flags , mParentInstance ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
void onActionModeStarted ( android.view.ActionMode mode ) { mUi.onActionModeStarted ( mode ) ; mActionMode = mode ; }

Target:
public void onActionModeStarted ( android.view.ActionMode mode ) { mUi.onActionModeStarted ( mode ) ; mActionMode = mode ; }