auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testSetValues011_ClassAsObject ( ) { long classID = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value actualValue = getStaticFieldValue ( classID , "CLASS_PARAM_VALUE" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValue = getStaticFieldValue ( classID , "CLASS_PARAM_VALUE_TO_SET" ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointObject" , StackTrace002Debuggee.CLASS_AS_OBJECT_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointObject" ) ; methodInfo.addVariable ( "param" , actualValue , expectedValue ) ; runStackFrameTest ( tester ) ; }

Target:
public void testSetValues005_IntConstantWithExceptionInCaller ( ) { org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.INT_CONSTANT_METHOD_WITH_EXCEPTION_IN_CALLER_SIGNAL ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.INT_PARAM_VALUE ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value newValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.INT_PARAM_VALUE_TO_SET ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value expectedValueAfterSet = oldValue ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointIntConstantWithException" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue , newValue , expectedValueAfterSet ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointIntConstantWithExceptionInCallerImpl" ) ; methodInfo.addVariable ( "local" , oldValue , newValue , expectedValueAfterSet ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public static final java.text.DateFormat getTimeInstance ( int style , java.util.Locale locale ) { java.text.DateFormat.checkTimeStyle ( style ) ; return new java.text.SimpleDateFormat ( libcore.icu.LocaleData.get ( locale ) . getTimeFormat ( style ) , locale ) ; }

Target:
public static final java.text.DateFormat getTimeInstance ( int style , java.util.Locale locale ) { java.text.DateFormat.checkTimeStyle ( style ) ; if ( locale == null ) { throw new java.lang.NullPointerException ( "locale == null" ) ; } return new java.text.SimpleDateFormat ( libcore.icu.LocaleData.get ( locale ) . getTimeFormat ( style ) , locale ) ; }
Source:
public int getViewBaseline ( java.lang.Object viewObject ) { if ( ( mBridge ) != null ) { return mBridge.getViewBaseline ( viewObject ) ; } return - 1 ; }

Target:
private com.android.ide.common.rendering.api.Result getViewParentWithReflection ( java.lang.Object viewObject ) { try { if ( ( mViewGetParentMethod ) == null ) { java.lang.Class < ? > viewClass = java.lang.Class.forName ( "android.view.View" ) ; mViewGetParentMethod = viewClass.getMethod ( "getParent" ) ; } return Status.SUCCESS.createResult ( mViewGetParentMethod.invoke ( viewObject ) ) ; } catch ( java.lang.Exception e ) { return com.android.ide.common.rendering.api.Result.Status.ERROR_REFLECTION.createResult ( null , e ) ; } }
Source:
private void destroySurface ( ) { if ( ( mLayer ) != null ) { mSurface.detachFromGLContext ( ) ; mLayer.clearStorage ( ) ; boolean shouldRelease = true ; if ( ( mListener ) != null ) { shouldRelease = mListener.onSurfaceTextureDestroyed ( mSurface ) ; } synchronized ( mNativeWindowLock ) { nDestroyNativeWindow ( ) ; } mLayer.destroy ( ) ; if ( shouldRelease ) mSurface.release ( ) ; mSurface = null ; mLayer = null ; mHadSurface = true ; } }

Target:
public void setSurfaceTexture ( android.graphics.SurfaceTexture surfaceTexture ) { if ( surfaceTexture == null ) { throw new java.lang.NullPointerException ( "surfaceTexture must not be null" ) ; } if ( ( mSurface ) != null ) { mSurface.release ( ) ; } mSurface = surfaceTexture ; if ( ( ( mViewFlags ) & ( VISIBILITY_MASK ) ) == ( VISIBLE ) ) { mSurface.setOnFrameAvailableListener ( mUpdateListener , mAttachInfo.mHandler ) ; } mUpdateSurface = true ; invalidateParentIfNeeded ( ) ; }
Source:
private void setPhoto ( com.android.dialer.voicemail.model.VoicemailEntry voicemailEntry ) { com.android.dialer.contactphoto.ContactPhotoManager.getInstance ( context ) . loadDialerThumbnailOrPhoto ( quickContactBadge , com.android.dialer.voicemail.listui.NewVoicemailViewHolder.parseUri ( voicemailEntry.numberAttributes ( ) . getLookupUri ( ) ) , voicemailEntry.numberAttributes ( ) . getPhotoId ( ) , com.android.dialer.voicemail.listui.NewVoicemailViewHolder.parseUri ( voicemailEntry.numberAttributes ( ) . getPhotoUri ( ) ) , com.android.dialer.voicemail.listui.VoicemailEntryText.buildPrimaryVoicemailText ( context , voicemailEntry ) , LetterTileDrawable.TYPE_DEFAULT ) ; }

Target:
private void setPhoto ( com.android.dialer.voicemail.model.VoicemailEntry voicemailEntry ) { com.android.dialer.contactphoto.ContactPhotoManager.getInstance ( context ) . loadDialerThumbnailOrPhoto ( quickContactBadge , com.android.dialer.voicemail.listui.NewVoicemailViewHolder.parseUri ( voicemailEntry.numberAttributes ( ) . getLookupUri ( ) ) , voicemailEntry.numberAttributes ( ) . getPhotoId ( ) , com.android.dialer.contactphoto.NumberAttributeConverter.getPhotoUri ( context , voicemailEntry.numberAttributes ( ) ) , com.android.dialer.voicemail.listui.VoicemailEntryText.buildPrimaryVoicemailText ( context , voicemailEntry ) , LetterTileDrawable.TYPE_DEFAULT ) ; }
Source:
private void handleCameraChange ( java.lang.String cameraId ) { if ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_FRONT.equals ( cameraId ) ) { super . changeCameraCapabilities ( new android.telecom.VideoProfile.CameraCapabilities ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_FRONT_DIMENSIONS , com.android.server.telecom.tests.MockVideoProvider.CAMERA_FRONT_DIMENSIONS ) ) ; } else if ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_BACK.equals ( cameraId ) ) { super . changeCameraCapabilities ( new android.telecom.VideoProfile.CameraCapabilities ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_BACK_DIMENSIONS , com.android.server.telecom.tests.MockVideoProvider.CAMERA_BACK_DIMENSIONS ) ) ; } }

Target:
private void handleCameraChange ( java.lang.String cameraId ) { if ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_FRONT.equals ( cameraId ) ) { super . changeCameraCapabilities ( new android.telecom.VideoProfile.CameraCapabilities ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_FRONT_DIMENSIONS , com.android.server.telecom.tests.MockVideoProvider.CAMERA_FRONT_DIMENSIONS ) ) ; } else if ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_BACK.equals ( cameraId ) ) { super . changeCameraCapabilities ( new android.telecom.VideoProfile.CameraCapabilities ( com.android.server.telecom.tests.MockVideoProvider.CAMERA_BACK_DIMENSIONS , com.android.server.telecom.tests.MockVideoProvider.CAMERA_BACK_DIMENSIONS ) ) ; } else { super . handleCallSessionEvent ( VideoProvider.SESSION_EVENT_CAMERA_READY ) ; } }
Source:
native void rsnAllocationData1D ( long con , long id , int off , int mip , int count , float [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public void testEclipseFormatStyle2 ( ) throws java.lang.Exception { com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatPreferences prefs = new com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatPreferences ( ) { @ java.lang.Override public java.lang.String getOneIndentUnit ( ) { return " " ; } @ java.lang.Override public int getTabWidth ( ) { return 2 ; } } ; prefs.useEclipseIndent = true ; checkFormat ( prefs , "res/values/colors.xml" , ( "<resources>\n" + ( ( ( " <color name=\"enrollment_error\">#99e21f14</color>\n" + "\n" ) + " <color name=\"service_starting_up\">#99000000</color>\n" ) + "</resources>" ) ) , ( "<resources>\n" + ( ( ( ( "\n" + " <color name=\"enrollment_error\">#99e21f14</color>\n" ) + " <color name=\"service_starting_up\">#99000000</color>\n" ) + "\n" ) + "</resources>" ) ) ) ; }

Target:
public void testEclipseFormatStyle2 ( ) throws java.lang.Exception { com.android.ide.eclipse.adt.internal.editors.formatting.EclipseXmlFormatPreferences prefs = new com.android.ide.eclipse.adt.internal.editors.formatting.EclipseXmlFormatPreferences ( ) { @ java.lang.Override public java.lang.String getOneIndentUnit ( ) { return " " ; } @ java.lang.Override public int getTabWidth ( ) { return 2 ; } } ; prefs.useEclipseIndent = true ; checkFormat ( prefs , "res/values/colors.xml" , ( "<resources>\n" + ( ( ( " <color name=\"enrollment_error\">#99e21f14</color>\n" + "\n" ) + " <color name=\"service_starting_up\">#99000000</color>\n" ) + "</resources>" ) ) , ( "<resources>\n" + ( ( ( ( "\n" + " <color name=\"enrollment_error\">#99e21f14</color>\n" ) + " <color name=\"service_starting_up\">#99000000</color>\n" ) + "\n" ) + "</resources>" ) ) ) ; }
Source:
public static void setStatusBarColor ( android.view.Window window , int statusBarColor ) { if ( ( Build.VERSION.SDK_INT ) >= ( Build.VERSION_CODES.LOLLIPOP ) ) { window.addFlags ( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS ) ; window.setStatusBarColor ( statusBarColor ) ; } }

Target:
public static void setStatusBarColor ( android.view.Window window , int statusBarColor ) { if ( ( Build.VERSION.SDK_INT ) >= ( Build.VERSION_CODES.LOLLIPOP ) ) { if ( ( statusBarColor == ( android.graphics.Color.BLACK ) ) && ( ( window.getNavigationBarColor ( ) ) == ( android.graphics.Color.BLACK ) ) ) { window.clearFlags ( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS ) ; } else { window.addFlags ( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS ) ; } window.setStatusBarColor ( statusBarColor ) ; } }
Source:
private android.util.Pair < java.util.List < android.media.Image > , android.hardware.camera2.CaptureResult > captureSingleRawShot ( android.util.Size s , java.util.List < android.media.ImageReader > captureReaders , java.util.List < android.hardware.camera2.cts.CameraTestUtils.SimpleImageReaderListener > captureListeners ) throws java.lang.Exception { return captureRawShots ( s , captureReaders , captureListeners , 1 ) . get ( 0 ) ; }

Target:
private android.util.Pair < java.util.List < android.media.Image > , android.hardware.camera2.CaptureResult > captureSingleRawShot ( android.util.Size s , java.util.List < android.media.ImageReader > captureReaders , boolean waitForAe , java.util.List < android.hardware.camera2.cts.CameraTestUtils.SimpleImageReaderListener > captureListeners ) throws java.lang.Exception { return captureRawShots ( s , captureReaders , waitForAe , captureListeners , 1 ) . get ( 0 ) ; }
Source:
private com.android.dx.io.EncodedValueReader newEncodedValueReader ( com.android.dx.io.DexBuffer.Section section ) { return new com.android.dx.io.EncodedValueReader ( section ) { @ java.lang.Override protected void visitString ( int type , int index ) { encounterString ( index ) ; } } ; }

Target:
private void readArray ( com.android.dx.io.EncodedValueReader reader ) { for ( int i = 0 , size = reader.readArray ( ) ; i < size ; i ++ ) { switch ( reader.peek ( ) ) { case com.android.dx.io.EncodedValueReader.ENCODED_STRING : encounterString ( reader.readString ( ) ) ; break ; case com.android.dx.io.EncodedValueReader.ENCODED_ARRAY : readArray ( reader ) ; break ; } } }
Source:
public void notifyTestingDeviceDisconnected ( ) { com.android.cts.Log.d ( "busyDeviceDisconnected invoked" ) ; mTestStop = true ; synchronized ( this ) { notify ( ) ; } cleanUp ( ) ; try { com.android.cts.CUIOutputStream.println ( "Test stopped." ) ; mTestThread.join ( ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.e ( "" , e ) ; } }

Target:
public void notifyTestingDeviceDisconnected ( ) { com.android.cts.Log.d ( "busyDeviceDisconnected invoked" ) ; mTestStop = true ; synchronized ( this ) { notify ( ) ; } cleanUp ( ) ; try { com.android.cts.CUIOutputStream.println ( "Test stopped." ) ; mTestThread.join ( ) ; } catch ( java.lang.InterruptedException e ) { com.android.cts.Log.d ( "test thread interrupted" ) ; } }
Source:
public java.lang.String getMeidForSlot ( int slotIndex , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getMeidForSlot" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( slotIndex ) ; return phone == null ? null : phone.getMeid ( ) ; }

Target:
public java.lang.String getMeidForSlot ( int slotIndex , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( slotIndex ) ; if ( phone == null ) { return null ; } int subId = phone.getSubId ( ) ; if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getMeidForSlot" ) ) ) { return null ; } return phone.getMeid ( ) ; }
Source:
public void setMonetaryGroupingSeparator ( char sep ) { monetaryGroupingSeparator = sep ; }

Target:
public void setMonetaryDecimalSeparatorString ( java.lang.String sep ) { if ( sep == null ) { throw new java.lang.NullPointerException ( "The input monetary decimal separator is null" ) ; } this . monetarySeparatorString = sep ; if ( ( sep.length ( ) ) == 1 ) { this . monetarySeparator = sep.charAt ( 0 ) ; } else { this . monetarySeparator = android.icu.text.DecimalFormatSymbols.DEF_DECIMAL_SEPARATOR ; } }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.String os = java.lang.System.getProperty ( "os.name" ) ; if ( os.startsWith ( "Mac OS" ) ) { java.lang.management.RuntimeMXBean rt = java.lang.management.ManagementFactory.getRuntimeMXBean ( ) ; java.lang.System.setProperty ( ( "JAVA_STARTED_ON_FIRST_THREAD_" + ( rt.getName ( ) . split ( "@" ) [ 0 ] ) ) , "1" ) ; } java.lang.Thread.setDefaultUncaughtExceptionHandler ( new com.android.ddms.Main.UncaughtHandler ( ) ) ; com.android.ddms.PrefsDialog.init ( ) ; com.android.ddmlib.Log.d ( "ddms" , "Initializing" ) ; if ( ( ( args.length ) >= 3 ) && ( args [ 0 ] . equals ( "ping" ) ) ) { com.android.sdkstats.SdkStatsService.ping ( args [ 1 ] , args [ 2 ] , null ) ; return ; } else if ( ( args.length ) > 0 ) { com.android.ddmlib.Log.e ( "ddms" , ( "Unknown argument: " + ( args [ 0 ] ) ) ) ; java.lang.System.exit ( 1 ) ; } java.lang.String ddmsParentLocation = java.lang.System.getProperty ( "com.android.ddms.bindir" ) ; com.android.ddms.Main.ping ( ddmsParentLocation ) ; com.android.ddmlib.DebugPortManager.setProvider ( com.android.ddms.DebugPortProvider.getInstance ( ) ) ; com.android.ddms.UIThread ui = com.android.ddms.UIThread.getInstance ( ) ; try { ui.runUI ( ddmsParentLocation ) ; } finally { com.android.ddms.PrefsDialog.save ( ) ; com.android.ddmlib.AndroidDebugBridge.terminate ( ) ; } com.android.ddmlib.Log.d ( "ddms" , "Bye" ) ; java.lang.System.exit ( 0 ) ; }

Target:
static boolean isMac ( ) { return java.lang.System.getProperty ( "os.name" ) . startsWith ( "Mac OS" ) ; }
Source:
public void testDownloadRequestOpacity ( ) throws java.lang.Exception { android.content.Intent intent = new android.content.Intent ( "sample_intent_action" ) ; android.telephony.mbms.DownloadRequest request = android.telephony.embms.cts.DOWNLOAD_REQUEST_TEMPLATE.setAppIntent ( intent ) . build ( ) ; android.telephony.mbms.DownloadRequest newRequest = new android.telephony.mbms.DownloadRequest.Builder ( request.getSourceUri ( ) ) . setServiceId ( request.getFileServiceId ( ) ) . setSubscriptionId ( request.getSubscriptionId ( ) ) . setOpaqueData ( request.getOpaqueData ( ) ) . build ( ) ; assertEquals ( request , newRequest ) ; }

Target:
public void testDownloadRequestSerialization ( ) throws java.lang.Exception { android.content.Intent intent = new android.content.Intent ( "sample_intent_action" ) ; android.telephony.mbms.DownloadRequest request = downloadRequestTemplate.setAppIntent ( intent ) . build ( ) ; android.telephony.mbms.DownloadRequest newRequest = DownloadRequest.Builder.fromSerializedRequest ( request.toByteArray ( ) ) . build ( ) ; assertEquals ( request , newRequest ) ; }
Source:
public java.lang.String getSymbol ( java.util.Locale locale ) { libcore.icu.LocaleData localeData = libcore.icu.LocaleData.get ( locale ) ; if ( localeData.internationalCurrencySymbol.equals ( currencyCode ) ) { return localeData.currencySymbol ; } java.lang.String symbol = libcore.icu.ICU.getCurrencySymbol ( locale , currencyCode ) ; return symbol != null ? symbol : currencyCode ; }

Target:
public int getNumericCode ( ) { return icuCurrency.getNumericCode ( ) ; }
Source:
private void assertBadGateway ( java.net.HttpURLConnection connection ) throws java.io.IOException { try { connection.getInputStream ( ) ; fail ( ) ; } catch ( java.io.FileNotFoundException expected ) { } assertEquals ( java.net.HttpURLConnection.HTTP_BAD_GATEWAY , connection.getResponseCode ( ) ) ; assertEquals ( ( - 1 ) , connection.getErrorStream ( ) . read ( ) ) ; }

Target:
private void assertGatewayTimeout ( java.net.HttpURLConnection connection ) throws java.io.IOException { try { connection.getInputStream ( ) ; fail ( ) ; } catch ( java.io.FileNotFoundException expected ) { } assertEquals ( 504 , connection.getResponseCode ( ) ) ; assertEquals ( ( - 1 ) , connection.getErrorStream ( ) . read ( ) ) ; }
Source:
public void testDisplayTargetList ( ) { com.android.sdkmanager.Main main = new com.android.sdkmanager.Main ( ) ; main.setLogger ( getLog ( ) ) ; main.setSdkManager ( getSdkManager ( ) ) ; getLog ( ) . clear ( ) ; main.displayTargetList ( ) ; assertEquals ( ( "[P Available Android targets:\n" + ( ( ( ( ( ( ( ( ", P ----------\n" + ", P id: 1 or \"android-0\"\n" ) + ", P Name: Android 0.0\n" ) + ", P Type: Platform\n" ) + ", P API level: 0\n" ) + ", P Revision: 1\n" ) + ", P Skins: , P \n" ) + ", P Tag/ABIs : , P default/armeabi, P , , P tag-1/armeabi, P , , P tag-1/x86, P \n" ) + "]" ) ) , getLog ( ) . toString ( ) ) ; }

Target:
public void testDisplayTargetList ( ) { com.android.sdkmanager.Main main = new com.android.sdkmanager.Main ( ) ; main.setLogger ( getLog ( ) ) ; main.setSdkManager ( getSdkManager ( ) ) ; getLog ( ) . clear ( ) ; main.displayTargetList ( ) ; assertEquals ( ( "P Available Android targets:\n" + ( ( ( ( ( ( ( "P ----------\n" + "P id: 1 or \"android-0\"\n" ) + "P Name: Android 0.0\n" ) + "P Type: Platform\n" ) + "P API level: 0\n" ) + "P Revision: 1\n" ) + "P Skins: HVGA (default), Tag1ArmSkin, Tag1X86Skin\n" ) + "P Tag/ABIs : default/armeabi, tag-1/armeabi, tag-1/x86\n" ) ) , getLog ( ) . toString ( ) ) ; }
Source:
public static int [ ] getSubId ( int slotId ) { if ( ! ( android.telephony.SubscriptionManager.isValidSlotId ( slotId ) ) ) { android.telephony.SubscriptionManager.logd ( "[getSubId]- fail" ) ; return null ; } int [ ] subId = null ; try { com.android.internal.telephony.ISub iSub = ISub.Stub.asInterface ( android.os.ServiceManager.getService ( "isub" ) ) ; if ( iSub != null ) { subId = iSub.getSubId ( slotId ) ; } } catch ( android.os.RemoteException ex ) { } return subId ; }

Target:
public static int [ ] getSubId ( int slotIndex ) { if ( ! ( android.telephony.SubscriptionManager.isValidSlotIndex ( slotIndex ) ) ) { android.telephony.SubscriptionManager.logd ( "[getSubId]- fail" ) ; return null ; } int [ ] subId = null ; try { com.android.internal.telephony.ISub iSub = ISub.Stub.asInterface ( android.os.ServiceManager.getService ( "isub" ) ) ; if ( iSub != null ) { subId = iSub.getSubId ( slotIndex ) ; } } catch ( android.os.RemoteException ex ) { } return subId ; }
Source:
public void TestRTSentMonkey ( ) { int loopCount = 200 ; int seed = 1 ; if ( ( params.inclusion ) >= 9 ) { loopCount = 1000 ; } logln ( "Sentence Break Monkey Test" ) ; android.icu.dev.test.rbbi.RBBITestMonkey.RBBISentenceMonkey m = new android.icu.dev.test.rbbi.RBBITestMonkey.RBBISentenceMonkey ( ) ; android.icu.text.BreakIterator bi = android.icu.text.BreakIterator.getSentenceInstance ( java.util.Locale.US ) ; java.lang.String rules = bi.toString ( ) ; android.icu.text.BreakIterator rtbi = new android.icu.text.RuleBasedBreakIterator ( rules ) ; if ( ( params ) == null ) { loopCount = 30 ; } RunMonkey ( rtbi , m , "sent" , seed , loopCount ) ; }

Target:
public void TestRTSentMonkey ( ) { int loopCount = 200 ; int seed = 1 ; if ( ( android.icu.dev.test.TestFmwk.getExhaustiveness ( ) ) >= 9 ) { loopCount = 1000 ; } logln ( "Sentence Break Monkey Test" ) ; android.icu.dev.test.rbbi.RBBITestMonkey.RBBISentenceMonkey m = new android.icu.dev.test.rbbi.RBBITestMonkey.RBBISentenceMonkey ( ) ; android.icu.text.BreakIterator bi = android.icu.text.BreakIterator.getSentenceInstance ( java.util.Locale.US ) ; java.lang.String rules = bi.toString ( ) ; android.icu.text.BreakIterator rtbi = new android.icu.text.RuleBasedBreakIterator ( rules ) ; RunMonkey ( rtbi , m , "sent" , seed , loopCount ) ; }
Source:
public void transferAtrResponse ( int token , int resultCode , java.util.ArrayList < java.lang.Byte > atr ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( ( ( "transferAtrResponse: token " + token ) + " resultCode " ) + resultCode ) ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_TRANSFER_ATR_RESP ) ; sapMessage.setResultCode ( resultCode ) ; if ( resultCode == ( SapMessage.RESULT_OK ) ) { sapMessage.setAtr ( com.android.bluetooth.sap.SapRilReceiver.arrayListToPrimitiveArray ( atr ) ) ; } removeOngoingReqAndSendMessage ( token , sapMessage ) ; }

Target:
public void transferAtrResponse ( int token , int resultCode , java.util.ArrayList < java.lang.Byte > atr ) { android.util.Log.d ( com.android.bluetooth.sap.SapRilReceiver.TAG , ( ( ( "transferAtrResponse: token " + token ) + " resultCode " ) + resultCode ) ) ; com.android.bluetooth.sap.SapService.notifyUpdateWakeLock ( mSapServiceHandler ) ; com.android.bluetooth.sap.SapMessage sapMessage = new com.android.bluetooth.sap.SapMessage ( SapMessage.ID_TRANSFER_ATR_RESP ) ; sapMessage.setResultCode ( resultCode ) ; if ( resultCode == ( SapMessage.RESULT_OK ) ) { sapMessage.setAtr ( com.android.bluetooth.sap.SapRilReceiver.arrayListToPrimitiveArray ( atr ) ) ; } removeOngoingReqAndSendMessage ( token , sapMessage ) ; }
Source:
private void updateSendFailedNotification ( ) { final long threadId = mConversation.getThreadId ( ) ; if ( threadId <= 0 ) return ; new java.lang.Thread ( new java.lang.Runnable ( ) { public void run ( ) { com.android.mms.transaction.MessagingNotification.updateSendFailedNotificationForThread ( com.android.mms.ui.ComposeMessageActivity.this , threadId ) ; } } , "updateSendFailedNotification" ) . start ( ) ; }

Target:
private void updateSendFailedNotification ( ) { final long threadId = mConversation.getThreadId ( ) ; if ( threadId <= 0 ) return ; new java.lang.Thread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.mms.transaction.MessagingNotification.updateSendFailedNotificationForThread ( com.android.mms.ui.ComposeMessageActivity.this , threadId ) ; } } , "ComposeMessageActivity.updateSendFailedNotification" ) . start ( ) ; }
Source:
public void TestNorwegian ( ) { try { com.ibm.icu.util.UResourceBundle rb = com.ibm.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_REGION_BASE_NAME , "no_NO_NY" ) ; com.ibm.icu.util.UResourceBundle sub = rb.get ( "Countries" ) ; java.lang.String s1 = sub.getString ( "NO" ) ; if ( s1.equals ( "Noreg" ) ) { logln ( "got expected output " ) ; } else { errln ( "did not get the expected result" ) ; } } catch ( java.lang.IllegalArgumentException ex ) { errln ( "Caught an unexpected expected" ) ; } }

Target:
public void TestNorwegian ( ) { try { com.ibm.icu.util.UResourceBundle rb = com.ibm.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_REGION_BASE_NAME , "no_NO_NY" ) ; com.ibm.icu.util.UResourceBundle sub = rb.get ( "Countries" ) ; java.lang.String s1 = sub.getString ( "NO" ) ; if ( s1.equals ( "Noreg" ) ) { logln ( "got expected output " ) ; } else { errln ( "did not get the expected result" ) ; } } catch ( java.lang.IllegalArgumentException ex ) { errln ( "Caught an unexpected expected" ) ; } }
Source:
public void test5_anyInRange ( ) { int [ ] bits = new int [ 100 ] ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 1 ; i < 100 ; i += 11 ) { assertTrue ( com.android.dx.util._tests.BitsTest.label ( i ) , com.android.dx.util.Bits.anyInRange ( bits , i , 100 ) ) ; } }

Target:
public void test5_anyInRange ( ) { int [ ] bits = new int [ 100 ] ; for ( int i = 0 ; i < ( bits.length ) ; i ++ ) { bits [ i ] = - 1 ; } for ( int i = 1 ; i < 100 ; i += 11 ) { assertTrue ( com.android.dx.util.BitsTest.label ( i ) , com.android.dx.util.Bits.anyInRange ( bits , i , 100 ) ) ; } }
Source:
boolean okToConnect ( android.bluetooth.BluetoothDevice device ) { com.android.bluetooth.btservice.AdapterService adapterService = com.android.bluetooth.btservice.AdapterService.getAdapterService ( ) ; boolean ret = true ; if ( ( adapterService == null ) || ( ( ( adapterService.isQuietModeEnabled ( ) ) == true ) && ( ( mTargetDevice ) == null ) ) ) { ret = false ; } return ret ; }

Target:
boolean okToConnect ( android.bluetooth.BluetoothDevice device ) { com.android.bluetooth.btservice.AdapterService adapterService = com.android.bluetooth.btservice.AdapterService.getAdapterService ( ) ; int priority = mService.getPriority ( device ) ; if ( ( ( android.bluetooth.BluetoothProfile.PRIORITY_OFF ) < priority ) || ( ( ( android.bluetooth.BluetoothProfile.PRIORITY_UNDEFINED ) == priority ) && ( ( device.getBondState ( ) ) != ( android.bluetooth.BluetoothDevice.BOND_NONE ) ) ) ) { return true ; } logw ( ( "okToConnect not OK to connect " + device ) ) ; return false ; }
Source:
private com.android.jill.frontend.java.Variable getLocalVariable ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , @ javax.annotation.Nonnegative int localIdx ) { org.objectweb.asm.tree.analysis.BasicValue bv = frame.getLocal ( localIdx ) ; assert bv != ( org.objectweb.asm.tree.analysis.BasicValue.UNINITIALIZED_VALUE ) ; com.android.jill.frontend.java.Variable v ; java.lang.String id = getUnnamedLocalId ( localIdx , bv.getType ( ) ) ; java.lang.String localName = id ; org.objectweb.asm.Type localType = typeToUntyped ( bv.getType ( ) ) ; v = getVariableWithLocalIndex ( localIdx , id , localName , localType , null ) ; return v ; }

Target:
private com.android.jill.frontend.java.Variable getLocalVariable ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , @ javax.annotation.Nonnegative int localIdx ) { org.objectweb.asm.tree.analysis.BasicValue bv = frame.getLocal ( localIdx ) ; assert bv != ( org.objectweb.asm.tree.analysis.BasicValue.UNINITIALIZED_VALUE ) ; com.android.jill.frontend.java.Variable v ; java.lang.String id = getUnnamedLocalId ( localIdx , bv.getType ( ) ) ; java.lang.String localName = id ; org.objectweb.asm.Type localType = typeToUntyped ( bv.getType ( ) ) ; v = getVariableWithLocalIndex ( localIdx , id , localName , localType , null , com.android.jill.frontend.java.MethodBodyWriter.NO_MODIFIER ) ; return v ; }
Source:
public void testNewSmsFromBlockedNumber_noBroadcastsSent ( ) { java.lang.String blockedNumber = "1234567890" ; doReturn ( blockedNumber ) . when ( mInboundSmsTracker ) . getDisplayAddress ( ) ; mFakeBlockedNumberContentProvider.mBlockedNumbers.add ( blockedNumber ) ; transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_NEW_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verify ( mContext , never ( ) ) . sendBroadcast ( any ( android.content.Intent.class ) ) ; assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }

Target:
public void testNewSms ( ) { transitionFromStartupToIdle ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_NEW_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifySmsIntentBroadcasts ( 0 ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_NEW_SMS , new android.os.AsyncResult ( null , mSmsMessage , null ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; org.mockito.Mockito.verify ( mContext , org.mockito.Mockito.times ( 2 ) ) . sendBroadcast ( org.mockito.Matchers.any ( android.content.Intent.class ) ) ; org.junit.Assert.assertEquals ( "IdleState" , getCurrentState ( ) . getName ( ) ) ; }
Source:
public com.android.builder.model.AndroidProject getSingleModel ( boolean emulateStudio_1_0 ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , emulateStudio_1_0 ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; return modelMap.get ( ":" ) ; } finally { connection.close ( ) ; } }

Target:
public com.android.builder.model.AndroidProject getSingleModel ( boolean emulateStudio_1_0 , boolean assertNoSyncIssues ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > modelMap = com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , emulateStudio_1_0 ) ; org.junit.Assert.assertEquals ( "Quering GradleTestProject.getModel() with multi-project settings" , 1 , modelMap.size ( ) ) ; com.android.builder.model.AndroidProject androidProject = modelMap.get ( ":" ) ; if ( assertNoSyncIssues ) { com.android.build.gradle.integration.common.fixture.GradleTestProject.assertNoSyncIssues ( androidProject ) ; } return androidProject ; } finally { connection.close ( ) ; } }
Source:
public boolean equals ( java.lang.Object thatObject ) { if ( thatObject == ( this ) ) { return true ; } else if ( ( thatObject == null ) || ( ( thatObject.getClass ( ) ) != ( com.android.server.wifi.hotspot2.anqp.eap.VendorSpecificAuth.class ) ) ) { return false ; } else { return java.util.Arrays.equals ( ( ( com.android.server.wifi.hotspot2.anqp.eap.VendorSpecificAuth ) ( thatObject ) ) . getData ( ) , getData ( ) ) ; } }

Target:
public boolean equals ( java.lang.Object thatObject ) { if ( thatObject == ( this ) ) { return true ; } if ( ! ( thatObject instanceof com.android.server.wifi.hotspot2.anqp.eap.VendorSpecificAuth ) ) { return false ; } com.android.server.wifi.hotspot2.anqp.eap.VendorSpecificAuth that = ( ( com.android.server.wifi.hotspot2.anqp.eap.VendorSpecificAuth ) ( thatObject ) ) ; return java.util.Arrays.equals ( mData , that.mData ) ; }
Source:
public void onSurfaceChanged ( javax.microedition.khronos.opengles.GL10 unused , int width , int height ) { android.opengl.GLES20.glViewport ( 0 , 0 , width , height ) ; }

Target:
public void onSurfaceChanged ( javax.microedition.khronos.opengles.GL10 unused , int width , int height ) { android.opengl.GLES20.glViewport ( 0 , 0 , width , height ) ; float ratio = ( ( float ) ( width ) ) / height ; mHeight = 1 ; mWidth = ratio ; mPosition [ 0 ] = ( mWidth ) / 2.0F ; mPosition [ 1 ] = ( mHeight ) / 2.0F ; android.opengl.Matrix.orthoM ( mProjectionMatrix , 0 , 0 , ratio , 0 , 1 , 3 , 20 ) ; }
Source:
public java.lang.String p2pServDiscReq ( java.lang.String addr , java.lang.String query ) { java.lang.String command = "P2P_SERV_DISC_REQ" ; command += " " + addr ; command += " " + query ; return doStringCommand ( command ) ; }

Target:
public java.lang.String p2pServDiscReq ( java.lang.String addr , java.lang.String query ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.requestServiceDiscovery ( addr , query ) ; } else { java.lang.String command = "P2P_SERV_DISC_REQ" ; command += " " + addr ; command += " " + query ; return doStringCommand ( command ) ; } }
Source:
public static void unzip ( @ javax.annotation.Nonnull java.io.File jarfile , @ javax.annotation.Nonnull java.io.File outputFolder ) { java.lang.String [ ] args = new java.lang.String [ ] { "unzip" , "-qo" , jarfile.getAbsolutePath ( ) , "-d" , outputFolder.getAbsolutePath ( ) } ; com.android.jack.test.util.ExecuteFile execFile = new com.android.jack.test.util.ExecuteFile ( args ) ; try { if ( ( execFile.run ( ) ) != 0 ) { throw new java.lang.RuntimeException ( "Unzip exited with an error" ) ; } } catch ( com.android.jack.test.util.ExecFileException e ) { throw new java.lang.RuntimeException ( "An error occured while running unzip" , e ) ; } }

Target:
public static void unzip ( @ javax.annotation.Nonnull java.io.File jarfile , @ javax.annotation.Nonnull java.io.File outputFolder ) { java.lang.String [ ] args = new java.lang.String [ ] { "unzip" , "-qo" , jarfile.getAbsolutePath ( ) , "-d" , outputFolder.getAbsolutePath ( ) } ; com.android.jack.test.util.ExecuteFile execFile = new com.android.jack.test.util.ExecuteFile ( args ) ; try { if ( ( execFile.run ( ) ) != 0 ) { throw new java.lang.RuntimeException ( "Unzip exited with an error" ) ; } } catch ( com.android.jack.test.util.ExecFileException e ) { throw new java.lang.RuntimeException ( "An error occurred while running unzip" , e ) ; } }
Source:
public java.lang.String getIccSerialNumberForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getIccSerialNumber" ) ) ) { return null ; } return phone.getIccSerialNumber ( ) ; } else { loge ( ( "getIccSerialNumber phone is null for Subscription:" + subId ) ) ; return null ; } }

Target:
public java.lang.String getSubscriberIdForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , subId , callingPackage , "getSubscriberId" ) ) ) { return null ; } return phone.getSubscriberId ( ) ; } else { loge ( ( "getSubscriberId phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
private static void enforceCarrierPrivilege ( int subId , int uid , java.lang.String message ) { if ( ( com.android.internal.telephony.TelephonyPermissions.getCarrierPrivilegeStatus ( subId , uid ) ) != ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ) { if ( com.android.internal.telephony.TelephonyPermissions.DBG ) android.telephony.Rlog.e ( com.android.internal.telephony.TelephonyPermissions.LOG_TAG , "No Carrier Privilege." ) ; throw new java.lang.SecurityException ( message ) ; } }

Target:
private static void enforceCarrierPrivilege ( java.util.function.Supplier < com.android.internal.telephony.ITelephony > telephonySupplier , int subId , int uid , java.lang.String message ) { if ( ( com.android.internal.telephony.TelephonyPermissions.getCarrierPrivilegeStatus ( telephonySupplier , subId , uid ) ) != ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS ) ) { if ( com.android.internal.telephony.TelephonyPermissions.DBG ) android.telephony.Rlog.e ( com.android.internal.telephony.TelephonyPermissions.LOG_TAG , "No Carrier Privilege." ) ; throw new java.lang.SecurityException ( message ) ; } }
Source:
private boolean isPermissionEnforcedLocked ( java.lang.String permission ) { if ( android.Manifest.permission.READ_EXTERNAL_STORAGE.equals ( permission ) ) { if ( ( mSettings.mReadExternalStorageEnforced ) != null ) { return mSettings.mReadExternalStorageEnforced ; } else { return ( android.provider.Settings.Secure.getInt ( mContext.getContentResolver ( ) , Secure.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT , 0 ) ) != 0 ; } } else { return true ; } }

Target:
private boolean isPackageDeviceAdmin ( java.lang.String packageName , int userId ) { android.app.admin.IDevicePolicyManager dpm = IDevicePolicyManager.Stub.asInterface ( android.os.ServiceManager.getService ( Context.DEVICE_POLICY_SERVICE ) ) ; try { if ( ( dpm != null ) && ( ( dpm.packageHasActiveAdmins ( packageName , userId ) ) || ( dpm.isDeviceOwner ( packageName ) ) ) ) { return true ; } } catch ( android.os.RemoteException e ) { } return false ; }
Source:
public void testLintWarningOnFlagsInStaticField ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/GetSignaturesStaticFieldTest.java:9: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + ( ( " getPackageManager().getPackageInfo(\"some.pkg\", FLAGS);\n" + " ~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( ( "src/test/pkg/GetSignaturesStaticFieldTest.java.txt" + "=>src/test/pkg/GetSignaturesStaticFieldTest.java" ) ) ) ; }

Target:
public void testNoLintWarningOnFlagsInLocalVariable ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( "src/test/pkg/GetSignaturesLocalVariableTest.java:9: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + " getPackageManager().getPackageInfo(\"some.pkg\", flags);\n" ) + " ~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( java ( "src/test/pkg/GetSignaturesLocalVariableTest.java" , ( "" + ( ( ( ( ( ( ( ( ( ( "package test.pkg;\n" + "\n" ) + "import android.app.Activity;\n" ) + "import android.content.pm.PackageManager;\n" ) + "\n" ) + "public class GetSignaturesLocalVariableTest extends Activity {\n" ) + " public void passLintCheck() throws Exception {\n" ) + " int flags = PackageManager.GET_SIGNATURES;\n" ) + " getPackageManager().getPackageInfo(\"some.pkg\", flags);\n" ) + " }\n" ) + "}" ) ) ) ) ) ; }
Source:
public void setTTYMode ( int ttyMode , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_SET_TTY_MODE , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ttyMode ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + ttyMode ) ) ; send ( rr ) ; }

Target:
void riljLog ( java.lang.String msg ) { android.telephony.Rlog.d ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , ( msg + ( ( mPhoneId ) != null ? ( " [SUB" + ( mPhoneId ) ) + "]" : "" ) ) ) ; }
Source:
protected void onLayout ( boolean changed , int l , int t , int r , int b ) { if ( ( mPager ) != null ) { final float offset = ( ( mLastKnownPositionOffset ) >= 0 ) ? mLastKnownPositionOffset : 0 ; updateTextPositions ( mPager.getCurrentItem ( ) , offset , true ) ; } }

Target:
protected void onLayout ( boolean changed , int l , int t , int r , int b ) { if ( ( mPager ) != null ) { final float offset = ( ( mLastKnownPositionOffset ) >= 0 ) ? mLastKnownPositionOffset : 0 ; int position = mPager.getCurrentItem ( ) ; if ( offset > 0.5F ) { position ++ ; } updateTextPositions ( position , offset , true ) ; } }
Source:
public java.lang.StringBuffer format ( java.math.BigDecimal number , java.lang.StringBuffer result , java.text.FieldPosition fieldPosition ) { return format ( number , result , fieldPosition , false ) ; }

Target:
public java.lang.Number parse ( java.lang.String text , java.text.ParsePosition parsePosition ) { android.icu.impl.number.Properties pprops = android.icu.text.DecimalFormat.threadLocalProperties.get ( ) ; synchronized ( this ) { pprops.copyFrom ( properties ) ; } java.lang.Number result = android.icu.impl.number.Parse.parse ( text , parsePosition , pprops , symbols ) ; if ( result instanceof java.math.BigDecimal ) { result = safeConvertBigDecimal ( ( ( java.math.BigDecimal ) ( result ) ) ) ; } return result ; }
Source:
public void testHashCode ( ) throws java.text.ParseException { java.lang.String rule = "&9 < a < b < c < d" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; java.text.RuleBasedCollator same = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( coll.hashCode ( ) , same.hashCode ( ) ) ; }

Target:
public void testHashCode ( ) throws java.text.ParseException { { java.lang.String rule = "&9 < a < b < c < d" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } { java.lang.String rule = "&9 < a < b < c < d < e" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } }
Source:
public void dispose ( ) { }

Target:
public void dispose ( ) { try { if ( ( mService ) != null ) { mService.dispose ( mDownloadAppName , mSubId ) ; } else { android.util.Log.i ( android.telephony.MbmsDownloadManager.LOG_TAG , "Service already dead" ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.i ( android.telephony.MbmsDownloadManager.LOG_TAG , "Remote exception while disposing of service" ) ; } }
Source:
java.lang.String getSCAddress ( ) { int len ; java.lang.String ret ; len = getByte ( ) ; if ( len == 0 ) { ret = null ; } else { try { ret = android.telephony.PhoneNumberUtils.calledPartyBCDToString ( mPdu , mCur , len ) ; } catch ( java.lang.RuntimeException tr ) { android.telephony.Rlog.d ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "invalid SC address: " , tr ) ; ret = null ; } } mCur += len ; return ret ; }

Target:
java.lang.String getSCAddress ( ) { int len ; java.lang.String ret ; len = getByte ( ) ; if ( len == 0 ) { ret = null ; } else { try { ret = android.telephony.PhoneNumberUtils.calledPartyBCDToString ( mPdu , mCur , len , PhoneNumberUtils.BCD_EXTENDED_TYPE_CALLED_PARTY ) ; } catch ( java.lang.RuntimeException tr ) { android.telephony.Rlog.d ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "invalid SC address: " , tr ) ; ret = null ; } } mCur += len ; return ret ; }
Source:
private void adjustTreeButtons ( org.eclipse.jface.viewers.ISelection selection ) { mRemoveButton.setEnabled ( ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) ) ; mUpButton.setEnabled ( ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) ) ; mDownButton.setEnabled ( ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) ) ; }

Target:
protected boolean canDoTreeUp ( org.eclipse.jface.viewers.ISelection selection ) { if ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > selected = filterSelection ( ( ( org.eclipse.jface.viewers.ITreeSelection ) ( selection ) ) ) ; return mUiTreeActions.canDoUp ( selected ) ; } return false ; }
Source:
protected < DST extends com.android.sched.item.Component > java.util.Iterator < DST > adaptWithLog ( @ javax.annotation.Nonnull com.android.sched.schedulable.AdapterSchedulable < T , DST > adapter , @ javax.annotation.Nonnull T data ) throws java.lang.Exception { com.android.sched.scheduler.ManagedSchedulable managedSchedulable = schedulableManager.getManagedSchedulable ( adapter.getClass ( ) ) ; com.android.sched.util.log.Event event = logAndTrace ( adapter , managedSchedulable ) ; try { return adapter.adapt ( data ) ; } finally { event.end ( ) ; } }

Target:
protected < DST extends com.android.sched.item.Component > java.util.Iterator < DST > adaptWithLog ( @ javax.annotation.Nonnull com.android.sched.schedulable.AdapterSchedulable < T , DST > adapter , @ javax.annotation.Nonnull T data ) throws com.android.sched.scheduler.AdapterProcessException { com.android.sched.scheduler.ManagedSchedulable managedSchedulable = schedulableManager.getManagedSchedulable ( adapter.getClass ( ) ) ; com.android.sched.util.log.Event event = logAndTrace ( adapter , managedSchedulable , data ) ; try { return adapter.adapt ( data ) ; } catch ( java.lang.Throwable e ) { throw new com.android.sched.scheduler.AdapterProcessException ( adapter , managedSchedulable , data , e ) ; } finally { event.end ( ) ; } }
Source:
public void test_getAllByName_ip6_localhost ( ) throws java.lang.Exception { java.net.InetAddress [ ] inetAddresses = java.net.InetAddress.getAllByName ( "ip6-localhost" ) ; libcore.java.net.InetAddressTest.assertEquals ( 1 , inetAddresses.length ) ; java.net.InetAddress inetAddress = inetAddresses [ 0 ] ; libcore.java.net.InetAddressTest.assertEquals ( libcore.java.net.InetAddressTest.LOOPBACK6_BYTES , "ip6-localhost" , inetAddress ) ; assertTrue ( inetAddress.isLoopbackAddress ( ) ) ; }

Target:
public void test_getAllByName_localhost ( ) throws java.lang.Exception { java.net.InetAddress [ ] inetAddresses = java.net.InetAddress.getAllByName ( "localhost" ) ; org.junit.Assert.assertEquals ( 1 , inetAddresses.length ) ; java.net.InetAddress inetAddress = inetAddresses [ 0 ] ; libcore.java.net.InetAddressTest.checkInetAddress ( libcore.java.net.InetAddressTest.LOOPBACK4_BYTES , "localhost" , inetAddress ) ; org.junit.Assert.assertTrue ( inetAddress.isLoopbackAddress ( ) ) ; }
Source:
public void setField ( java.lang.String fieldName , java.lang.String valueString ) throws java.lang.NoSuchMethodException { java.lang.reflect.Method m = getClass ( ) . getMethod ( com.ibm.icu.dev.test.format.NumberFormatTestData.fieldToSetter ( fieldName ) , java.lang.String.class ) ; try { m.invoke ( this , valueString ) ; } catch ( java.lang.IllegalAccessException e ) { throw new java.lang.RuntimeException ( e ) ; } catch ( java.lang.reflect.InvocationTargetException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void setField ( java.lang.String fieldName , java.lang.String valueString ) throws java.lang.NoSuchMethodException { java.lang.reflect.Method m = getClass ( ) . getMethod ( com.ibm.icu.dev.test.format.DataDrivenNumberFormatTestData.fieldToSetter ( fieldName ) , java.lang.String.class ) ; try { m.invoke ( this , valueString ) ; } catch ( java.lang.IllegalAccessException e ) { throw new java.lang.RuntimeException ( e ) ; } catch ( java.lang.reflect.InvocationTargetException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , byte [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , data.length ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , short [ ] data ) { validateIsInt16 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_16 , data.length ) ; }
Source:
public void onFlushCompleted ( android.hardware.Sensor sensor ) { flushReceived.countDown ( ) ; }

Target:
private void assertOnErrors ( java.util.List < java.lang.Throwable > errorsFound ) { if ( ! ( errorsFound.isEmpty ( ) ) ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( java.lang.Throwable error : errorsFound ) { builder.append ( error.getMessage ( ) ) . append ( "\n" ) ; } junit.framework.Assert.fail ( builder.toString ( ) ) ; } }