auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private int convertPlayStateToPlayStatus ( android.media.session.PlaybackState state ) { int playStatus = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_ERROR ; switch ( state.getState ( ) ) { case android.media.session.PlaybackState.STATE_PLAYING : case android.media.session.PlaybackState.STATE_BUFFERING : playStatus = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_PLAYING ; break ; case android.media.session.PlaybackState.STATE_STOPPED : case android.media.session.PlaybackState.STATE_NONE : playStatus = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_STOPPED ; break ; case android.media.session.PlaybackState.STATE_PAUSED : playStatus = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_PAUSED ; break ; case android.media.session.PlaybackState.STATE_FAST_FORWARDING : case android.media.session.PlaybackState.STATE_SKIPPING_TO_NEXT : case android.media.session.PlaybackState.STATE_SKIPPING_TO_QUEUE_ITEM : playStatus = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_FWD_SEEK ; break ; case android.media.session.PlaybackState.STATE_REWINDING : case android.media.session.PlaybackState.STATE_SKIPPING_TO_PREVIOUS : playStatus = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_REV_SEEK ; break ; case android.media.session.PlaybackState.STATE_ERROR : playStatus = com.android.bluetooth.avrcp.Avrcp.PLAYSTATUS_ERROR ; break ; } return playStatus ; }

Target:
private void sendPlaybackStatus ( int playStatusChangedNT , byte playbackState ) { registerNotificationRspPlayStatusNative ( playStatusChangedNT , playbackState ) ; mPlayStatusChangedNT = playStatusChangedNT ; mReportedPlayStatus = playbackState ; }
Source:
public void sendResult ( android.os.Bundle data ) { android.util.Slog.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "Lock screen displayed!" ) ; finishScreenTurningOn ( screenOnListener ) ; }

Target:
public void screenTurningOn ( final com.android.internal.policy.impl.ScreenOnListener screenOnListener ) { if ( com.android.internal.policy.impl.PhoneWindowManager.DEBUG_WAKEUP ) android.util.Slog.i ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "Screen turning on..." ) ; synchronized ( mLock ) { mScreenOnEarly = true ; mScreenOnFully = false ; mWindowManagerDrawComplete = false ; mScreenOnListener = screenOnListener ; updateOrientationListenerLp ( ) ; } mWindowManagerInternal.waitForAllWindowsDrawn ( mWindowManagerDrawCallback , com.android.internal.policy.impl.PhoneWindowManager.WAITING_FOR_DRAWN_TIMEOUT ) ; }
Source:
public void TestBeginEnd ( ) { for ( int i = 0 ; i < ( com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES.length ) ; i += 3 ) { expect ( com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES [ i ] , com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES [ ( i + 1 ) ] , com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES [ ( i + 2 ) ] ) ; } com.ibm.icu.text.Transliterator reversed = com.ibm.icu.text.Transliterator.createFromRules ( "Reversed" , com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_RULES [ 17 ] , Transliterator.REVERSE ) ; expect ( reversed , "xy XY XYZ yz YZ" , "xy abc xaba yz aba" ) ; }

Target:
public void TestBeginEnd ( ) { for ( int i = 0 ; i < ( com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES.length ) ; i += 3 ) { com.ibm.icu.dev.test.translit.TransliteratorTest.expect ( com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES [ i ] , com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES [ ( i + 1 ) ] , com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_TEST_CASES [ ( i + 2 ) ] ) ; } com.ibm.icu.text.Transliterator reversed = com.ibm.icu.text.Transliterator.createFromRules ( "Reversed" , com.ibm.icu.dev.test.translit.TransliteratorTest.BEGIN_END_RULES [ 17 ] , Transliterator.REVERSE ) ; com.ibm.icu.dev.test.translit.TransliteratorTest.expect ( reversed , "xy XY XYZ yz YZ" , "xy abc xaba yz aba" ) ; }
Source:
private int getMessageId ( ) { android.widget.EditText messageIdField = ( ( android.widget.EditText ) ( findViewById ( R.id.message_id ) ) ) ; int messageId = 0 ; try { messageId = java.lang.Integer.parseInt ( messageIdField.getText ( ) . toString ( ) ) ; } catch ( java.lang.NumberFormatException ignored ) { android.util.Log.e ( com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.TAG , "Invalid message ID" ) ; } int newMessageId = ( messageId + 1 ) % 65536 ; if ( newMessageId == 0 ) { newMessageId = 1 ; } messageIdField.setText ( java.lang.String.valueOf ( newMessageId ) ) ; return messageId ; }

Target:
private int getSerialNumber ( ) { android.widget.EditText messageIdField = ( ( android.widget.EditText ) ( findViewById ( R.id.message_id ) ) ) ; int messageId = 0 ; try { messageId = java.lang.Integer.parseInt ( messageIdField.getText ( ) . toString ( ) ) ; } catch ( java.lang.NumberFormatException ignored ) { android.util.Log.e ( com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.TAG , "Invalid message ID" ) ; } int newMessageId = ( messageId + 1 ) % 65536 ; if ( newMessageId == 0 ) { newMessageId = 1 ; } messageIdField.setText ( java.lang.String.valueOf ( newMessageId ) ) ; return messageId ; }
Source:
public void onClick ( android.view.View view ) { com.android.dialer.blocking.BlockNumberDialogFragment.show ( id , number , countryIso , android.telephony.PhoneNumberUtils.formatNumber ( number , countryIso ) , R.id.blocked_numbers_activity_container , getFragmentManager ( ) , new com.android.dialer.blocking.BlockNumberDialogFragment.Callback ( ) { @ java.lang.Override public void onFilterNumberSuccess ( ) { } @ java.lang.Override public void onUnfilterNumberSuccess ( ) { com.android.dialer.logging.Logger.get ( context ) . logInteraction ( InteractionEvent.Type.UNBLOCK_NUMBER_MANAGEMENT_SCREEN ) ; } @ java.lang.Override public void onChangeFilteredNumberUndo ( ) { } } ) ; }

Target:
public void onClick ( android.view.View view ) { com.android.dialer.blocking.BlockNumberDialogFragment.show ( id , number , countryIso , com.android.dialer.phonenumberutil.PhoneNumberHelper.formatNumber ( getContext ( ) , number , countryIso ) , R.id.blocked_numbers_activity_container , getFragmentManager ( ) , new com.android.dialer.blocking.BlockNumberDialogFragment.Callback ( ) { @ java.lang.Override public void onFilterNumberSuccess ( ) { } @ java.lang.Override public void onUnfilterNumberSuccess ( ) { com.android.dialer.logging.Logger.get ( context ) . logInteraction ( InteractionEvent.Type.UNBLOCK_NUMBER_MANAGEMENT_SCREEN ) ; } @ java.lang.Override public void onChangeFilteredNumberUndo ( ) { } } ) ; }
Source:
public java.lang.String getPhotoThumbnailUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }

Target:
public java.lang.String getPhotoThumbnailUri ( ) { switch ( nameSource ) { case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_DEFAULT_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstDefaultCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CP2_EXTENDED_DIRECTORY : return com.android.dialer.common.Assert.isNotNull ( firstExtendedCp2Contact ) . getPhotoThumbnailUri ( ) ; case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.PEOPLE_API : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CEQUINT : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.CNAP : case com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator.NameSource.NONE : return "" ; default : throw com.android.dialer.common.Assert.createUnsupportedOperationFailException ( java.lang.String.format ( "Unsupported name source: %s" , nameSource ) ) ; } }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.unittest.ScriptC_array_init s = new com.android.rs.unittest.ScriptC_array_init ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; checkInit ( s ) ; s.invoke_array_init_test ( ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; passTest ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = createRenderScript ( true ) ; com.android.rs.unittest.ScriptC_array_init s = new com.android.rs.unittest.ScriptC_array_init ( pRS ) ; checkInit ( s ) ; s.invoke_array_init_test ( ) ; pRS.finish ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; passTest ( ) ; }
Source:
private boolean wipeAllThreads ( final java.lang.ThreadGroup aGroup ) { boolean ok = true ; java.lang.Thread [ ] threads = threads ( aGroup ) ; for ( java.lang.Thread t : threads ) { ok = ok && ( wipeThread ( t ) ) ; } java.lang.ThreadGroup [ ] children = groups ( aGroup ) ; for ( java.lang.ThreadGroup element : children ) { ok = ok && ( wipeAllThreads ( element ) ) ; } return ok ; }

Target:
private static java.util.Vector < java.lang.ThreadGroup > asyncBuildRandomTreeUnder ( final java.lang.ThreadGroup aGroup , final int depth ) { java.util.Vector < java.lang.ThreadGroup > result = new java.util.Vector < java.lang.ThreadGroup > ( ) ; org.apache.harmony.tests.java.lang.ThreadGroupTest.asyncBuildRandomTreeUnder ( aGroup , depth , result ) ; return result ; }
Source:
public void xmlParsing_unknownTimeZoneIdIgnored ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones ianaversion=\"2017b\">\n" + ( ( ( ( ( ( " <countryzones>\n" + " <country code=\"gb\" default=\"Europe/London\">\n" ) + " <id>Unknown_Id</id>\n" ) + " <id>Europe/London</id>\n" ) + " </country>\n" ) + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; libcore.util.TimeZoneFinderTest.assertZonesEqual ( libcore.util.TimeZoneFinderTest.zones ( "Europe/London" ) , finder.lookupTimeZonesByCountry ( "gb" ) ) ; }

Target:
public void xmlParsing_unknownTimeZoneIdIgnored ( ) throws java.lang.Exception { libcore.util.TimeZoneFinder finder = libcore.util.TimeZoneFinderTest.validate ( ( "<timezones ianaversion=\"2017b\">\n" + ( ( ( ( ( ( " <countryzones>\n" + " <country code=\"gb\" default=\"Europe/London\">\n" ) + " <id>Unknown_Id</id>\n" ) + " <id>Europe/London</id>\n" ) + " </country>\n" ) + " </countryzones>\n" ) + "</timezones>\n" ) ) ) ; org.junit.Assert.assertEquals ( libcore.util.TimeZoneFinderTest.list ( "Europe/London" ) , finder.lookupTimeZoneIdsByCountry ( "gb" ) ) ; libcore.util.TimeZoneFinderTest.assertZonesEqual ( libcore.util.TimeZoneFinderTest.zones ( "Europe/London" ) , finder.lookupTimeZonesByCountry ( "gb" ) ) ; }
Source:
public void reportSmsMemoryStatus ( boolean available , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_REPORT_SMS_MEMORY_STATUS , result ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( available ? 1 : 0 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ": " ) + available ) ) ; send ( rr ) ; }

Target:
public void explicitCallTransfer ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_EXPLICIT_CALL_TRANSFER , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; try { radioProxy.explicitCallTransfer ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "explicitCallTransfer" , e ) ; } } }
Source:
public static boolean nameContainsQuery ( java.lang.String query , java.lang.String name ) { return java.util.regex.Pattern.compile ( ( "(^|\\s)" + ( java.util.regex.Pattern.quote ( query.toLowerCase ( ) ) ) ) ) . matcher ( name.toLowerCase ( ) ) . find ( ) ; }

Target:
public static boolean nameContainsQuery ( java.lang.String query , java.lang.String name ) { if ( android.text.TextUtils.isEmpty ( name ) ) { return false ; } return java.util.regex.Pattern.compile ( ( "(^|\\s)" + ( java.util.regex.Pattern.quote ( query.toLowerCase ( ) ) ) ) ) . matcher ( name.toLowerCase ( ) ) . find ( ) ; }
Source:
protected void dispatchBroadcastMessage ( android.telephony.SmsCbMessage message ) { if ( message.isEmergencyMessage ( ) ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , message ) ; android.util.Log.d ( com.android.internal.telephony.SMSDispatcher.TAG , "Dispatching emergency SMS CB" ) ; dispatch ( intent , com.android.internal.telephony.SMSDispatcher.RECEIVE_EMERGENCY_BROADCAST_PERMISSION ) ; } else { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , message ) ; android.util.Log.d ( com.android.internal.telephony.SMSDispatcher.TAG , "Dispatching SMS CB" ) ; dispatch ( intent , com.android.internal.telephony.SMSDispatcher.RECEIVE_SMS_PERMISSION ) ; } }

Target:
protected void dispatchBroadcastMessage ( android.telephony.SmsCbMessage message ) { if ( message.isEmergencyMessage ( ) ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , message ) ; android.telephony.Rlog.d ( com.android.internal.telephony.SMSDispatcher.TAG , "Dispatching emergency SMS CB" ) ; dispatch ( intent , com.android.internal.telephony.SMSDispatcher.RECEIVE_EMERGENCY_BROADCAST_PERMISSION ) ; } else { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , message ) ; android.telephony.Rlog.d ( com.android.internal.telephony.SMSDispatcher.TAG , "Dispatching SMS CB" ) ; dispatch ( intent , com.android.internal.telephony.SMSDispatcher.RECEIVE_SMS_PERMISSION ) ; } }
Source:
public void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; mDevice.removeWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleNowWelcomeViewWatcher.class . getName ( ) ) ; }

Target:
public void testGoogleNowWelcomeViewWatcher ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; android.support.test.uiautomator.UiDevice device = testFramework.getDevice ( ) ; device.registerWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleNowWelcomeViewWatcher.class . getName ( ) , new com.android.devtools.systemimage.uitest.watchers.GoogleNowWelcomeViewWatcher ( device ) ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "Google" ) ; device.removeWatcher ( com.android.devtools.systemimage.uitest.watchers.GoogleNowWelcomeViewWatcher.class . getName ( ) ) ; }
Source:
private void ensureReadParams ( ) { synchronized ( mParamsLock ) { if ( readParams ) { return ; } byte [ ] [ ] params = org.conscrypt.NativeCrypto.get_DH_params ( key.getPkeyContext ( ) ) ; p = params [ 0 ] ; g = params [ 1 ] ; y = params [ 2 ] ; readParams = true ; } }

Target:
private void ensureReadParams ( ) { synchronized ( mParamsLock ) { if ( readParams ) { return ; } byte [ ] [ ] params = org.conscrypt.NativeCrypto.get_DH_params ( key.getNativeRef ( ) ) ; p = params [ 0 ] ; g = params [ 1 ] ; y = params [ 2 ] ; readParams = true ; } }
Source:
public void sendSms ( com.android.internal.telephony.cdma.SmsTracker tracker ) { android.telephony.Rlog.d ( com.android.internal.telephony.cdma.CdmaSMSDispatcher.TAG , ( ( ( ( ( ( ( ( ( ( "sendSms: " + " isIms()=" ) + ( isIms ( ) ) ) + " mRetryCount=" ) + ( tracker.mRetryCount ) ) + " mImsRetry=" ) + ( tracker.mImsRetry ) ) + " mMessageRef=" ) + ( tracker.mMessageRef ) ) + " SS=" ) + ( mPhone.getServiceState ( ) . getState ( ) ) ) ) ; sendSmsByPstn ( tracker ) ; }

Target:
protected com.android.internal.telephony.GsmAlphabet.TextEncodingDetails calculateLength ( java.lang.CharSequence messageBody , boolean use7bitOnly ) { return com.android.internal.telephony.util.SMSDispatcherUtil.calculateLengthCdma ( messageBody , use7bitOnly ) ; }
Source:
private void clearInternalUserData ( int userId ) { for ( android.net.wifi.WifiConfiguration config : getInternalConfiguredNetworks ( ) ) { if ( ( ! ( config.shared ) ) && ( com.android.server.wifi.WifiConfigurationUtil.doesUidBelongToAnyProfile ( config.creatorUid , mUserManager.getProfiles ( userId ) ) ) ) { mConfiguredNetworks.remove ( config.networkId ) ; } } mDeletedEphemeralSSIDs.clear ( ) ; mScanDetailCaches.clear ( ) ; clearLastSelectedNetwork ( ) ; }

Target:
private java.util.Set < java.lang.Integer > clearInternalUserData ( int userId ) { java.util.Set < java.lang.Integer > removedNetworkIds = new java.util.HashSet < > ( ) ; for ( android.net.wifi.WifiConfiguration config : getInternalConfiguredNetworks ( ) ) { if ( ( ! ( config.shared ) ) && ( com.android.server.wifi.WifiConfigurationUtil.doesUidBelongToAnyProfile ( config.creatorUid , mUserManager.getProfiles ( userId ) ) ) ) { removedNetworkIds.add ( config.networkId ) ; mConfiguredNetworks.remove ( config.networkId ) ; } } mDeletedEphemeralSSIDs.clear ( ) ; mScanDetailCaches.clear ( ) ; clearLastSelectedNetwork ( ) ; return removedNetworkIds ; }
Source:
public int getBasicConstraints ( ) { if ( ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.X509_check_ca ( mContext ) ) != 1 ) { return - 1 ; } final int pathLen = org.apache.harmony.xnet.provider.jsse.NativeCrypto.get_X509_ex_pathlen ( mContext ) ; if ( pathLen == ( - 1 ) ) { return java.lang.Integer.MAX_VALUE ; } return pathLen ; }

Target:
public int getBasicConstraints ( ) { if ( ( ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.get_X509_ex_flags ( mContext ) ) & ( NativeCrypto.EXFLAG_CA ) ) == 0 ) { return - 1 ; } final int pathLen = org.apache.harmony.xnet.provider.jsse.NativeCrypto.get_X509_ex_pathlen ( mContext ) ; if ( pathLen == ( - 1 ) ) { return java.lang.Integer.MAX_VALUE ; } return pathLen ; }
Source:
public void testBroadcastSms ( ) { transitionFromStartupToIdle ( ) ; doReturn ( 0 ) . when ( mInboundSmsTracker ) . getDestPort ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_BROADCAST_SMS , mInboundSmsTracker ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifyDataSmsIntentBroadcasts ( 0 ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_BROADCAST_SMS , mInboundSmsTracker ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifyDataSmsIntentBroadcasts ( 1 ) ; }

Target:
public void testBroadcastSms ( ) { transitionFromStartupToIdle ( ) ; org.mockito.Mockito.doReturn ( 0 ) . when ( mInboundSmsTracker ) . getDestPort ( ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_BROADCAST_SMS , mInboundSmsTracker ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifyDataSmsIntentBroadcasts ( 0 ) ; mGsmInboundSmsHandler.sendMessage ( InboundSmsHandler.EVENT_BROADCAST_SMS , mInboundSmsTracker ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( 100 ) ; verifyDataSmsIntentBroadcasts ( 1 ) ; }
Source:
public boolean isApplicationHidden ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "isApplicationHidden" ) ; if ( ( mService ) != null ) { try { return mService.isApplicationHidden ( admin , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }

Target:
public boolean isApplicationHidden ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName ) { throwIfParentInstance ( "isApplicationHidden" ) ; if ( ( mService ) != null ) { try { return mService.isApplicationHidden ( admin , mContext.getPackageName ( ) , packageName ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
private void disconnectProfiles ( android.bluetooth.BluetoothDevice device , java.lang.String deviceID ) { com.googlecode.android_scripting.Log.d ( ( "Disconnecting device " + device ) ) ; mA2dpProfile.a2dpDisconnect ( device ) ; mA2dpSinkProfile.a2dpSinkDisconnect ( device ) ; mHidProfile.hidDisconnect ( device ) ; mHspProfile.hspDisconnect ( device ) ; mHfpClientProfile.hfpClientDisconnect ( device ) ; }

Target:
private void disconnectProfiles ( android.bluetooth.BluetoothDevice device , java.lang.String deviceID ) { com.googlecode.android_scripting.Log.d ( ( "Disconnecting device " + device ) ) ; mA2dpProfile.a2dpDisconnect ( device ) ; mA2dpSinkProfile.a2dpSinkDisconnect ( device ) ; mHidProfile.hidDisconnect ( device ) ; mHspProfile.hspDisconnect ( device ) ; mHfpClientProfile.hfpClientDisconnect ( device ) ; mPanProfile.panDisconnect ( device ) ; }
Source:
private boolean allSuspended ( java.util.Vector < org.apache.harmony.tests.java.lang.ThreadGroupTest.MyThread > threads ) { for ( int i = 0 ; i < ( threads.size ( ) ) ; i ++ ) { org.apache.harmony.tests.java.lang.ThreadGroupTest.MyThread t = threads.elementAt ( i ) ; if ( t.isActivelyRunning ( ) ) { return false ; } } return true ; }

Target:
private static void waitForThreadToDieUninterrupted ( java.lang.Thread thread ) { try { thread.join ( ) ; } catch ( java.lang.InterruptedException ie ) { fail ( "Should not have been interrupted" ) ; } }
Source:
public boolean processMessage ( android.os.Message message ) { switch ( message.what ) { case com.android.bluetooth.mapclient.MceStateMachine.MSG_CONNECT : synchronized ( this ) { mDevice = ( ( android.bluetooth.BluetoothDevice ) ( message.obj ) ) ; } transitionTo ( mConnecting ) ; break ; default : android.util.Log.w ( com.android.bluetooth.mapclient.MceStateMachine.TAG , ( ( ( "Unexpected message: " + ( message.what ) ) + " from state:" ) + ( this . getName ( ) ) ) ) ; return NOT_HANDLED ; } return HANDLED ; }

Target:
public void enter ( ) { if ( com.android.bluetooth.mapclient.MceStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.mapclient.MceStateMachine.TAG , ( "Enter Disconnected: " + ( getCurrentMessage ( ) . what ) ) ) ; } onConnectionStateChanged ( mPreviousState , BluetoothProfile.STATE_DISCONNECTED ) ; mPreviousState = android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ; quit ( ) ; }
Source:
private static java.net.InetAddress [ ] getAllByName ( java.lang.String host , java.net.InetAddress reqAddr ) throws java.net.UnknownHostException { if ( ( host == null ) || ( ( host.length ( ) ) == 0 ) ) { return java.net.InetAddress.loopbackAddresses ( ) ; } try { return new java.net.InetAddress [ ] { java.net.InetAddress.parseNumericAddress ( host ) } ; } catch ( java.lang.IllegalArgumentException e ) { } return java.net.InetAddress.getAllByName0 ( host , reqAddr , true ) ; }

Target:
public static java.net.InetAddress getByNameOnNet ( java.lang.String host , int netId ) throws java.net.UnknownHostException { return java.net.InetAddress.impl.lookupAllHostAddr ( host , netId ) [ 0 ] ; }
Source:
private void disconnect ( com.android.internal.net.VpnProfile profile ) { try { com.android.internal.net.LegacyVpnInfo connected = mService.getLegacyVpnInfo ( android.os.UserHandle.myUserId ( ) ) ; if ( ( connected != null ) && ( profile.key.equals ( connected.key ) ) ) { com.android.settings.vpn2.VpnUtils.clearLockdownVpn ( getContext ( ) ) ; mService.prepareVpn ( VpnConfig.LEGACY_VPN , VpnConfig.LEGACY_VPN , android.os.UserHandle.myUserId ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.settings.vpn2.ConfigDialogFragment.TAG , "Failed to disconnect" , e ) ; } }

Target:
private void disconnect ( com.android.internal.net.VpnProfile profile ) { try { com.android.internal.net.LegacyVpnInfo connected = mService.getLegacyVpnInfo ( android.os.UserHandle.myUserId ( ) ) ; if ( ( connected != null ) && ( profile.key.equals ( connected.key ) ) ) { com.android.settings.vpn2.VpnUtils.disconnectLegacyVpn ( getContext ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.settings.vpn2.ConfigDialogFragment.TAG , "Failed to disconnect" , e ) ; } }
Source:
private java.lang.String normalizeFirstWord ( java.lang.String word ) { switch ( this ) { case LOWER_CAMEL : return com.google.common.base.Ascii.toLowerCase ( word ) ; default : return normalizeWord ( word ) ; } }

Target:
public boolean equals ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object instanceof com.google.common.base.CaseFormat.StringConverter ) { com.google.common.base.CaseFormat.StringConverter that = ( ( com.google.common.base.CaseFormat.StringConverter ) ( object ) ) ; return ( sourceFormat.equals ( that.sourceFormat ) ) && ( targetFormat.equals ( that.targetFormat ) ) ; } return false ; }
Source:
com.google.common.cache.LocalCache.ReferenceEntry < K , V > getLiveEntry ( @ javax.annotation.Nullable java.lang.Object key ) { if ( key == null ) { return null ; } int hash = hash ( key ) ; return segmentFor ( hash ) . getLiveEntry ( key , hash , ticker.read ( ) ) ; }

Target:
public void clear ( ) { map.clear ( ) ; }
Source:
private void onEdit ( ) { com.android.sdklib.internal.avd.AvdInfo avdInfo = getTableSelection ( ) ; com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog dlg = new com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog ( mTable.getShell ( ) , mAvdManager , mImageFactory , mSdkLog , avdInfo ) ; if ( ( dlg.open ( ) ) == ( org.eclipse.jface.window.Window.OK ) ) { refresh ( false ) ; } }

Target:
private void onEdit ( ) { com.android.sdklib.internal.avd.AvdInfo avdInfo = getTableSelection ( ) ; com.android.sdkuilib.ui.GridDialog dlg ; if ( ! ( avdInfo.getDeviceName ( ) . isEmpty ( ) ) ) { dlg = new com.android.sdkuilib.internal.widgets.AvdCreationDialog ( mTable.getShell ( ) , mAvdManager , mImageFactory , mSdkLog , avdInfo ) ; } else { dlg = new com.android.sdkuilib.internal.widgets.LegacyAvdEditDialog ( mTable.getShell ( ) , mAvdManager , mImageFactory , mSdkLog , avdInfo ) ; } if ( ( dlg.open ( ) ) == ( org.eclipse.jface.window.Window.OK ) ) { refresh ( false ) ; } }
Source:
private static void cleanUpDir ( java.io.File dir ) { if ( ! ( dir.isDirectory ( ) ) ) { return ; } java.io.File [ ] files = dir.listFiles ( ) ; for ( java.io.File file : files ) { assertTrue ( file.delete ( ) ) ; } }

Target:
private static void cleanUpDir ( java.io.File dir ) { if ( ! ( dir.isDirectory ( ) ) ) { return ; } java.io.File [ ] files = dir.listFiles ( ) ; for ( java.io.File file : files ) { if ( file.isDirectory ( ) ) { dalvik.system.DexClassLoaderTest.cleanUpDir ( file ) ; } else { assertTrue ( file.delete ( ) ) ; } } }
Source:
public static long copy ( java.nio.channels.ReadableByteChannel from , java.nio.channels.WritableByteChannel to ) throws java.io.IOException { java.nio.ByteBuffer buf = java.nio.ByteBuffer.allocate ( com.google.common.io.ByteStreams.BUF_SIZE ) ; long total = 0 ; while ( ( from.read ( buf ) ) != ( - 1 ) ) { buf.flip ( ) ; while ( buf.hasRemaining ( ) ) { total += to.write ( buf ) ; } buf.clear ( ) ; } return total ; }

Target:
public static long copy ( java.nio.channels.ReadableByteChannel from , java.nio.channels.WritableByteChannel to ) throws java.io.IOException { com.google.common.base.Preconditions.checkNotNull ( from ) ; com.google.common.base.Preconditions.checkNotNull ( to ) ; java.nio.ByteBuffer buf = java.nio.ByteBuffer.allocate ( com.google.common.io.ByteStreams.BUF_SIZE ) ; long total = 0 ; while ( ( from.read ( buf ) ) != ( - 1 ) ) { buf.flip ( ) ; while ( buf.hasRemaining ( ) ) { total += to.write ( buf ) ; } buf.clear ( ) ; } return total ; }
Source:
public void setAddress ( java.lang.String callId , android.net.Uri address , int presentation ) { android.telecom.Log.startSession ( "CSW.sA" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setAddress %s %s %d" , callId , address , presentation ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setHandle ( address , presentation ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }

Target:
public void setAddress ( java.lang.String callId , android.net.Uri address , int presentation , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , "CSW.sA" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setAddress %s %s %d" , callId , address , presentation ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setHandle ( address , presentation ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
private static java.util.Set < java.lang.String > getAddedFiles ( @ javax.annotation.Nonnull java.util.Map < java.lang.String , java.util.Set < java.lang.String > > fileDependencies , @ javax.annotation.Nonnull java.util.List < java.lang.String > javaFileNames ) { java.util.Set < java.lang.String > addedFiles = new java.util.HashSet < java.lang.String > ( ) ; java.util.Set < java.lang.String > previousFiles = fileDependencies.keySet ( ) ; for ( java.lang.String javaFileName : javaFileNames ) { if ( ! ( previousFiles.contains ( javaFileName ) ) ) { com.android.jack.experimental.incremental.JackIncremental.logger.log ( java.util.logging.Level.INFO , "{0} was added" , javaFileName ) ; addedFiles.add ( javaFileName ) ; } } return addedFiles ; }

Target:
private static java.util.Set < java.lang.String > getAddedFiles ( @ javax.annotation.Nonnull java.util.Map < java.lang.String , java.util.Set < java.lang.String > > fileDependencies , @ javax.annotation.Nonnull java.util.List < java.lang.String > javaFileNames ) { java.util.Set < java.lang.String > addedFiles = new java.util.HashSet < java.lang.String > ( ) ; java.util.Set < java.lang.String > previousFiles = fileDependencies.keySet ( ) ; for ( java.lang.String javaFileName : javaFileNames ) { if ( ! ( previousFiles.contains ( javaFileName ) ) ) { com.android.jack.experimental.incremental.JackIncremental.logger.log ( java.util.logging.Level.FINE , "{0} was added" , javaFileName ) ; addedFiles.add ( javaFileName ) ; } } return addedFiles ; }
Source:
public static java.util.concurrent.ExecutorService getExitingExecutorService ( java.util.concurrent.ThreadPoolExecutor executor , long terminationTimeout , java.util.concurrent.TimeUnit timeUnit ) { executor.setThreadFactory ( new com.google.common.util.concurrent.ThreadFactoryBuilder ( ) . setDaemon ( true ) . setThreadFactory ( executor.getThreadFactory ( ) ) . build ( ) ) ; java.util.concurrent.ExecutorService service = java.util.concurrent.Executors.unconfigurableExecutorService ( executor ) ; com.google.common.util.concurrent.MoreExecutors.addDelayedShutdownHook ( service , terminationTimeout , timeUnit ) ; return service ; }

Target:
final java.util.concurrent.ExecutorService getExitingExecutorService ( java.util.concurrent.ThreadPoolExecutor executor , long terminationTimeout , java.util.concurrent.TimeUnit timeUnit ) { com.google.common.util.concurrent.MoreExecutors.useDaemonThreadFactory ( executor ) ; java.util.concurrent.ExecutorService service = java.util.concurrent.Executors.unconfigurableExecutorService ( executor ) ; addDelayedShutdownHook ( service , terminationTimeout , timeUnit ) ; return service ; }
Source:
public void onSdkChange ( boolean init ) { com.android.sdkuilib.internal.repository.RepoSourcesAdapter sources = mUpdaterData.getSourcesAdapter ( ) ; mTreeViewerSources.setContentProvider ( sources.getContentProvider ( ) ) ; mTreeViewerSources.setLabelProvider ( sources.getLabelProvider ( ) ) ; mTreeViewerSources.setInput ( sources ) ; onTreeSelected ( ) ; }

Target:
public void onSdkReload ( ) { com.android.sdkuilib.internal.repository.RepoSourcesAdapter sources = mUpdaterData.getSourcesAdapter ( ) ; mTreeViewerSources.setContentProvider ( sources.getContentProvider ( ) ) ; mTreeViewerSources.setLabelProvider ( sources.getLabelProvider ( ) ) ; mTreeViewerSources.setInput ( sources ) ; onTreeSelected ( ) ; }
Source:
private void add ( java.lang.String code , java.lang.String format , java.lang.Object ... args ) { mMessages.add ( new java.util.Formatter ( ) . format ( ( code + format ) , args ) . toString ( ) ) ; }

Target:
private void add ( java.lang.String code , java.lang.String format , java.lang.Object ... args ) { java.util.Formatter formatter = new java.util.Formatter ( ) ; mMessages.add ( formatter.format ( ( code + format ) , args ) . toString ( ) ) ; formatter.close ( ) ; }
Source:
public void setApplicationEnabledSetting ( java.lang.String appPackageName , int newState , int flags , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; setEnabledSetting ( appPackageName , null , newState , flags , userId ) ; }

Target:
public void setApplicationEnabledSetting ( java.lang.String appPackageName , int newState , int flags , int userId , java.lang.String callingPackage ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return ; if ( callingPackage == null ) { callingPackage = java.lang.Integer.toString ( android.os.Binder.getCallingUid ( ) ) ; } setEnabledSetting ( appPackageName , null , newState , flags , userId , callingPackage ) ; }
Source:
public void testGetTxPacketCounters ( ) throws java.lang.Exception { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; org.mockito.Mockito.when ( wificondControl.getTxPacketCounters ( ) ) . thenReturn ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT ) ; mWifiNative.setWificondControl ( wificondControl ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT , mWifiNative.getTxPacketCounters ( ) ) ; org.mockito.Mockito.verify ( wificondControl ) . getTxPacketCounters ( ) ; }

Target:
public void testDisableSupplicant ( ) { org.mockito.Mockito.when ( mWificondControl.disableSupplicant ( ) ) . thenReturn ( true ) ; mWifiNative.disableSupplicant ( ) ; org.mockito.Mockito.verify ( mWificondControl ) . disableSupplicant ( ) ; }
Source:
private java.net.URL addFileEntry ( java.lang.String filePath , byte [ ] fileContents ) { org.mockftpserver.fake.filesystem.FileEntry fileEntry = new org.mockftpserver.fake.filesystem.FileEntry ( ( ( ( libcore.java.net.FtpURLConnectionTest.USER_HOME_DIR ) + "/" ) + filePath ) ) ; fileEntry.setContents ( fileContents ) ; fileSystem.add ( fileEntry ) ; java.lang.String urlString = getFileUrlString ( filePath ) ; try { return new java.net.URL ( urlString ) ; } catch ( java.net.MalformedURLException e ) { fail ( ( "Malformed URL: " + urlString ) ) ; throw new java.lang.AssertionError ( "Can never happen" ) ; } }

Target:
private java.net.URL addFileEntry ( java.lang.String filePath , byte [ ] fileContents ) { org.mockftpserver.fake.filesystem.FileEntry fileEntry = new org.mockftpserver.fake.filesystem.FileEntry ( ( ( ( libcore.java.net.FtpURLConnectionTest.VALID_USER_HOME_DIR ) + "/" ) + filePath ) ) ; fileEntry.setContents ( fileContents ) ; fileSystem.add ( fileEntry ) ; return getFileUrlWithCredentials ( libcore.java.net.FtpURLConnectionTest.VALID_USER , libcore.java.net.FtpURLConnectionTest.VALID_PASSWORD , filePath ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( ! ( BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED.equals ( intent.getAction ( ) ) ) ) { return ; } try { mConnectionStateChangedQueue.put ( intent ) ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( "Cannot add Intent to the queue" ) ; } }

Target:
private android.content.Intent waitForIntent ( int timeoutMs , java.util.concurrent.BlockingQueue < android.content.Intent > queue ) { try { android.content.Intent intent = queue.poll ( timeoutMs , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.junit.Assert.assertNotNull ( intent ) ; return intent ; } catch ( java.lang.InterruptedException e ) { org.junit.Assert.fail ( ( "Cannot obtain an Intent from the queue: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
void setServiceState ( int state ) { mSS.setVoiceRegState ( state ) ; updateDataServiceState ( ) ; }

Target:
public void setServiceState ( int state ) { boolean isVoiceRegStateChanged = false ; synchronized ( this ) { isVoiceRegStateChanged = ( mSS.getVoiceRegState ( ) ) != state ; mSS.setVoiceRegState ( state ) ; } updateDataServiceState ( ) ; if ( isVoiceRegStateChanged ) { if ( ( mDefaultPhone.getServiceStateTracker ( ) ) != null ) { mDefaultPhone.getServiceStateTracker ( ) . onImsServiceStateChanged ( ) ; } } }
Source:
public void testTearDownInterfaces ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; org.mockito.Mockito.when ( wificondControl.tearDownInterfaces ( ) ) . thenReturn ( true ) ; mWifiNative.setWificondControl ( wificondControl ) ; org.junit.Assert.assertTrue ( mWifiNative.tearDownInterfaces ( ) ) ; org.mockito.Mockito.verify ( wificondControl ) . tearDownInterfaces ( ) ; }

Target:
public void testTearDown ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; org.mockito.Mockito.when ( wificondControl.tearDownInterfaces ( ) ) . thenReturn ( true ) ; mWifiNative.setWificondControl ( wificondControl ) ; org.junit.Assert.assertTrue ( mWifiNative.tearDown ( ) ) ; org.mockito.Mockito.verify ( wificondControl ) . tearDownInterfaces ( ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . stopVendorHal ( ) ; }
Source:
public com.google.mockwebserver.MockResponse setBody ( byte [ ] body ) { if ( ( this . body ) == ( com.google.mockwebserver.MockResponse.EMPTY_BODY ) ) { headers.remove ( com.google.mockwebserver.MockResponse.EMPTY_BODY_HEADER ) ; } this . headers.add ( ( "Content-Length: " + ( body.length ) ) ) ; this . body = body ; return this ; }

Target:
public com.google.mockwebserver.MockResponse setBody ( byte [ ] body ) { return setBody ( new java.io.ByteArrayInputStream ( body ) , body.length ) ; }
Source:
public boolean removeFooterView ( android.view.View v ) { if ( ( mFooterViewInfos.size ( ) ) > 0 ) { boolean result = false ; if ( ( ( android.widget.HeaderViewListAdapter ) ( mAdapter ) ) . removeFooter ( v ) ) { mDataSetObserver.onChanged ( ) ; result = true ; } removeFixedViewInfo ( v , mFooterViewInfos ) ; return result ; } return false ; }

Target:
public void addFooterView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mFooterViewInfos.add ( info ) ; if ( ( ( mAdapter ) != null ) && ( ( mDataSetObserver ) != null ) ) { mDataSetObserver.onChanged ( ) ; } }
Source:
private boolean record ( com.android.server.pm.dex.PackageDexUsage packageDexUsage , com.android.server.pm.dex.PackageDexUsageTests.TestData testData , java.util.Set < java.lang.String > users ) { boolean result = true ; for ( java.lang.String user : users ) { result = result && ( packageDexUsage.record ( testData.mPackageName , testData.mDexFile , testData.mOwnerUserId , testData.mLoaderIsa , testData.mUsedByOtherApps , testData.mPrimaryOrSplit , user ) ) ; } return result ; }

Target:
private boolean record ( com.android.server.pm.dex.PackageDexUsage packageDexUsage , com.android.server.pm.dex.PackageDexUsageTests.TestData testData , java.util.Set < java.lang.String > users ) { boolean result = true ; for ( java.lang.String user : users ) { result = result && ( packageDexUsage.record ( testData.mPackageName , testData.mDexFile , testData.mOwnerUserId , testData.mLoaderIsa , testData.mUsedByOtherApps , testData.mPrimaryOrSplit , user , testData.mClassLoaderContext ) ) ; } return result ; }
Source:
public void testSuccessfulFollowOnUpdate ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle tzData1 = createValidTzDataBundle ( "2030a" ) ; assertTrue ( install ( tzData1 ) ) ; assertTzDataInstalled ( tzData1 ) ; libcore.tzdata.update2.ConfigBundle tzData2 = createValidTzDataBundle ( "2030b" ) ; assertTrue ( install ( tzData2 ) ) ; assertTzDataInstalled ( tzData2 ) ; }

Target:
public void testUnsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle tzData1 = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertTrue ( installer.install ( tzData1.getBundleBytes ( ) ) ) ; assertTzDataInstalled ( tzData1 ) ; libcore.tzdata.update2.ConfigBundle tzData2 = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.OLDER_RULES_VERSION ) ; assertFalse ( installer.install ( tzData2.getBundleBytes ( ) ) ) ; assertTzDataInstalled ( tzData1 ) ; }
Source:
private boolean inListOfThreads ( java.lang.Thread [ ] threads ) { for ( int i = 0 ; i < ( threads.length ) ; i ++ ) { if ( ( java.lang.Thread.currentThread ( ) ) == ( threads [ i ] ) ) { return true ; } } return false ; }

Target:
public void test_getParent ( ) { assertEquals ( java.lang.Thread.currentThread ( ) . getThreadGroup ( ) , new java.lang.ThreadGroup ( "test" ) . getParent ( ) ) ; assertEquals ( initialThreadGroup , new java.lang.ThreadGroup ( initialThreadGroup , "test" ) . getParent ( ) ) ; }
Source:
public static org.apache.harmony.xnet.provider.jsse.OpenSSLEngine getInstance ( java.lang.String engine ) throws java.lang.IllegalArgumentException { if ( engine == null ) { throw new java.lang.NullPointerException ( "engine == null" ) ; } final int engineCtx = org.apache.harmony.xnet.provider.jsse.NativeCrypto.ENGINE_by_id ( engine ) ; if ( engineCtx == 0 ) { throw new java.lang.IllegalArgumentException ( ( "Unknown ENGINE id: " + engine ) ) ; } return new org.apache.harmony.xnet.provider.jsse.OpenSSLEngine ( engineCtx ) ; }

Target:
public static org.apache.harmony.xnet.provider.jsse.OpenSSLEngine getInstance ( java.lang.String engine ) throws java.lang.IllegalArgumentException { if ( engine == null ) { throw new java.lang.NullPointerException ( "engine == null" ) ; } final int engineCtx ; synchronized ( org.apache.harmony.xnet.provider.jsse.OpenSSLEngine.mLoadingLock ) { engineCtx = org.apache.harmony.xnet.provider.jsse.NativeCrypto.ENGINE_by_id ( engine ) ; if ( engineCtx == 0 ) { throw new java.lang.IllegalArgumentException ( ( "Unknown ENGINE id: " + engine ) ) ; } org.apache.harmony.xnet.provider.jsse.NativeCrypto.ENGINE_add ( engineCtx ) ; } return new org.apache.harmony.xnet.provider.jsse.OpenSSLEngine ( engineCtx ) ; }
Source:
public void cdmaOtaProvisionStatus ( int indicationType , int var2 ) { }

Target:
public void cdmaOtaProvisionStatus ( int indicationType , int status ) { mRil.processIndication ( indicationType ) ; int [ ] response = new int [ 1 ] ; response [ 0 ] = status ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_OTA_PROVISION_STATUS , response ) ; mRil.mOtaProvisionRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public void test_removeLast ( ) { ll.removeLast ( ) ; assertTrue ( "Failed to remove last element" , ( ( ll.getLast ( ) ) != ( objArray [ ( ( objArray.length ) - 1 ) ] ) ) ) ; ll.clear ( ) ; try { ll.removeLast ( ) ; fail ( "NoSuchElementException expected" ) ; } catch ( java.util.NoSuchElementException e ) { } }

Target:
public void test_removeLast ( ) { ll.removeLast ( ) ; assertTrue ( "Failed to remove last element" , ( ( ll.getLast ( ) ) != ( objArray [ ( ( objArray.length ) - 1 ) ] ) ) ) ; java.util.LinkedList list = new java.util.LinkedList ( ) ; try { list.removeLast ( ) ; fail ( "Should throw NoSuchElementException" ) ; } catch ( java.util.NoSuchElementException e ) { } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final int uid = intent.getIntExtra ( android.content.Intent.EXTRA_UID , 0 ) ; synchronized ( mStatsLock ) { mWakeLock.acquire ( ) ; try { removeUidLocked ( uid ) ; } finally { mWakeLock.release ( ) ; } } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final int uid = intent.getIntExtra ( android.content.Intent.EXTRA_UID , ( - 1 ) ) ; if ( uid == ( - 1 ) ) return ; synchronized ( mStatsLock ) { mWakeLock.acquire ( ) ; try { removeUidsLocked ( uid ) ; } finally { mWakeLock.release ( ) ; } } }
Source:
private int ifaceNameToType ( java.lang.String iface ) { final com.android.server.connectivity.Tethering.TetheringConfiguration cfg = mConfig ; if ( cfg.isWifi ( iface ) ) { return android.net.ConnectivityManager.TETHERING_WIFI ; } else if ( cfg.isUsb ( iface ) ) { return android.net.ConnectivityManager.TETHERING_USB ; } else if ( cfg.isBluetooth ( iface ) ) { return android.net.ConnectivityManager.TETHERING_BLUETOOTH ; } return android.net.ConnectivityManager.TETHERING_INVALID ; }

Target:
private int ifaceNameToType ( java.lang.String iface ) { final com.android.server.connectivity.tethering.TetheringConfiguration cfg = mConfig ; if ( cfg.isWifi ( iface ) ) { return android.net.ConnectivityManager.TETHERING_WIFI ; } else if ( cfg.isUsb ( iface ) ) { return android.net.ConnectivityManager.TETHERING_USB ; } else if ( cfg.isBluetooth ( iface ) ) { return android.net.ConnectivityManager.TETHERING_BLUETOOTH ; } return android.net.ConnectivityManager.TETHERING_INVALID ; }
Source:
public void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; server.close ( ) ; ( ( java.net.HttpURLConnection ) ( uc ) ) . disconnect ( ) ; ( ( java.net.HttpURLConnection ) ( uc2 ) ) . disconnect ( ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; server.close ( ) ; ( ( java.net.HttpURLConnection ) ( uc ) ) . disconnect ( ) ; ( ( java.net.HttpURLConnection ) ( uc2 ) ) . disconnect ( ) ; ( ( java.net.HttpURLConnection ) ( uc3 ) ) . disconnect ( ) ; }
Source:
public java.lang.String format ( double quantity , com.ibm.icu.text.NumberFormat numberFormat , com.ibm.icu.text.PluralRules pluralRules ) { java.lang.String formatStr = numberFormat.format ( quantity ) ; java.lang.String variant = pluralRules.select ( quantity , numberFormat ) ; return getByVariant ( variant ) . format ( formatStr ) ; }

Target:
public java.lang.String format ( double number , com.ibm.icu.text.NumberFormat numberFormat , com.ibm.icu.text.PluralRules pluralRules ) { java.lang.String formatStr = numberFormat.format ( number ) ; com.ibm.icu.impl.StandardPlural p = com.ibm.icu.text.QuantityFormatter.selectPlural ( number , numberFormat , pluralRules ) ; com.ibm.icu.impl.SimplePatternFormatter formatter = templates [ p.ordinal ( ) ] ; if ( formatter == null ) { formatter = templates [ com.ibm.icu.impl.StandardPlural.OTHER_INDEX ] ; assert formatter != null ; } return formatter.format ( formatStr ) ; }