auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onFinished ( android.preference.Preference preference , boolean reading ) { if ( DBG ) dumpState ( ) ; if ( DBG ) android.util.Log.d ( com.android.phone.TimeConsumingPreferenceActivity.LOG_TAG , ( ( ( "onFinished, preference=" + ( preference.getKey ( ) ) ) + ", reading=" ) + reading ) ) ; mBusyList.remove ( preference.getKey ( ) ) ; if ( ( mBusyList.isEmpty ( ) ) && ( mIsForeground ) ) { if ( reading ) { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_READING_DIALOG ) ; } else { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_SAVING_DIALOG ) ; } } }

Target:
public void onFinished ( android.preference.Preference preference , boolean reading ) { if ( DBG ) dumpState ( ) ; if ( DBG ) android.util.Log.d ( com.android.phone.TimeConsumingPreferenceActivity.LOG_TAG , ( ( ( "onFinished, preference=" + ( preference.getKey ( ) ) ) + ", reading=" ) + reading ) ) ; mBusyList.remove ( preference.getKey ( ) ) ; if ( mBusyList.isEmpty ( ) ) { if ( reading ) { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_READING_DIALOG ) ; } else { dismissDialogSafely ( com.android.phone.TimeConsumingPreferenceActivity.BUSY_SAVING_DIALOG ) ; } } }
Source:
private static java.io.File getWrittenResources ( ) throws MergeConsumer.ConsumerException , com.android.ide.common.res2.DuplicateDataException , java.io.IOException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; com.android.ide.common.res2.MergedResourceWriter writer = new com.android.ide.common.res2.MergedResourceWriter ( folder , null ) ; resourceMerger.mergeData ( writer ) ; return folder ; }

Target:
private static java.io.File getWrittenResources ( ) throws MergeConsumer.ConsumerException , com.android.ide.common.res2.DuplicateDataException , java.io.IOException { com.android.ide.common.res2.ResourceMerger resourceMerger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; com.android.ide.common.res2.MergedResourceWriter writer = new com.android.ide.common.res2.MergedResourceWriter ( folder , null ) ; resourceMerger.mergeData ( writer , false ) ; return folder ; }
Source:
private android.telecom.PhoneAccountHandle getSoleSimAccount ( ) { android.telecom.TelecomManager telecomManager = getSystemService ( android.telecom.TelecomManager.class ) ; android.telecom.PhoneAccountHandle result = null ; for ( android.telecom.PhoneAccountHandle phoneAccountHandle : telecomManager.getCallCapablePhoneAccounts ( ) ) { android.telecom.PhoneAccount phoneAccount = telecomManager.getPhoneAccount ( phoneAccountHandle ) ; if ( phoneAccount.hasCapabilities ( PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION ) ) { com.android.dialer.common.LogUtil.i ( "DialerSettingsActivity.getSoleSimAccount" , ( phoneAccountHandle + " is a SIM account" ) ) ; if ( result != null ) { return null ; } result = phoneAccountHandle ; } } return result ; }

Target:
private android.telecom.PhoneAccountHandle getSoleSimAccount ( ) { android.telecom.TelecomManager telecomManager = getSystemService ( android.telecom.TelecomManager.class ) ; android.telecom.PhoneAccountHandle result = null ; for ( android.telecom.PhoneAccountHandle phoneAccountHandle : telecomManager.getCallCapablePhoneAccounts ( ) ) { android.telecom.PhoneAccount phoneAccount = telecomManager.getPhoneAccount ( phoneAccountHandle ) ; if ( phoneAccount == null ) { continue ; } if ( phoneAccount.hasCapabilities ( PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION ) ) { com.android.dialer.common.LogUtil.i ( "DialerSettingsActivity.getSoleSimAccount" , ( phoneAccountHandle + " is a SIM account" ) ) ; if ( result != null ) { return null ; } result = phoneAccountHandle ; } } return result ; }
Source:
public void afterHandshake ( int session , int s , int c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { assertEquals ( hostname , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_servername ( s ) ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { assertEquals ( hostname , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_get_servername ( s ) ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
public void test_getChannel ( ) throws java.io.IOException { java.io.File tmpfile = java.io.File.createTempFile ( "FileOutputStream" , "tmp" ) ; tmpfile.deleteOnExit ( ) ; java.io.FileOutputStream fos = new java.io.FileOutputStream ( tmpfile ) ; fos.write ( bytes ) ; fos.flush ( ) ; fos.close ( ) ; java.io.FileOutputStream f = new java.io.FileOutputStream ( tmpfile , true ) ; assertEquals ( 10 , f.getChannel ( ) . position ( ) ) ; }

Target:
public void test_getChannel ( ) throws java.io.IOException { java.io.File tmpfile = java.io.File.createTempFile ( "FileOutputStream" , "tmp" ) ; tmpfile.deleteOnExit ( ) ; try ( java.io.FileOutputStream fos = new java.io.FileOutputStream ( tmpfile ) ) { fos.write ( bytes ) ; fos.flush ( ) ; } try ( java.io.FileOutputStream f = new java.io.FileOutputStream ( tmpfile , true ) ) { assertEquals ( 10 , f.getChannel ( ) . position ( ) ) ; } }
Source:
public void run ( ) { java.io.InputStreamReader is = new java.io.InputStreamReader ( process.getInputStream ( ) ) ; java.io.BufferedReader outReader = new java.io.BufferedReader ( is ) ; org.eclipse.core.resources.IProject project = getProject ( ) ; try { while ( true ) { java.lang.String line = outReader.readLine ( ) ; if ( line != null ) { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , line ) ; } else { break ; } } } catch ( java.io.IOException e ) { } }

Target:
public void run ( ) { java.io.InputStreamReader is = new java.io.InputStreamReader ( process.getInputStream ( ) ) ; java.io.BufferedReader outReader = new java.io.BufferedReader ( is ) ; try { while ( true ) { java.lang.String line = outReader.readLine ( ) ; if ( line != null ) { com.android.ide.eclipse.adt.AdtPlugin.printBuildToConsole ( BuildVerbosity.VERBOSE , project , line ) ; } else { break ; } } } catch ( java.io.IOException e ) { } }
Source:
public void run ( ) { boolean pipSupportDisabled = false ; try { mActivity.enterPictureInPictureMode ( ) ; } catch ( java.lang.IllegalStateException e ) { pipSupportDisabled = true ; } catch ( java.lang.IllegalArgumentException e ) { pipSupportDisabled = true ; } assertTrue ( pipSupportDisabled ) ; assertFalse ( mActivity.isInMultiWindowMode ( ) ) ; assertFalse ( mActivity.isInPictureInPictureMode ( ) ) ; }

Target:
public void run ( ) { boolean pipSupportDisabled = false ; try { mActivity.enterPictureInPictureMode ( ) ; } catch ( java.lang.IllegalStateException e ) { pipSupportDisabled = true ; } catch ( java.lang.IllegalArgumentException e ) { pipSupportDisabled = true ; } assertTrue ( pipSupportDisabled ) ; assertFalse ( mActivity.isInPictureInPictureMode ( ) ) ; }
Source:
public java.util.ArrayList < android.telephony.SmsMessage > getAllMessagesFromIcc ( ) { java.util.List < com.android.internal.telephony.SmsRawData > records = null ; try { com.android.internal.telephony.ISms iccISms = android.telephony.SmsManager.getISmsService ( ) ; if ( iccISms != null ) { records = iccISms.getAllMessagesFromIccEfForSubscriber ( getSubscriptionId ( ) , android.app.ActivityThread.currentPackageName ( ) ) ; } } catch ( android.os.RemoteException ex ) { } return android.telephony.SmsManager.createMessageListFromRawRecords ( records ) ; }

Target:
public java.util.ArrayList < android.telephony.SmsMessage > getAllMessagesFromIcc ( ) { java.util.List < com.android.internal.telephony.SmsRawData > records = null ; try { com.android.internal.telephony.ISms iccISms = android.telephony.SmsManager.getISmsService ( ) ; if ( iccISms != null ) { records = iccISms.getAllMessagesFromIccEfForSubscriber ( getSubscriptionId ( ) , android.app.ActivityThread.currentPackageName ( ) ) ; } } catch ( android.os.RemoteException ex ) { } return createMessageListFromRawRecords ( records ) ; }
Source:
public boolean testBit ( int i ) { if ( ( i < 0 ) || ( i > ( ( len ) - 1 ) ) ) { return false ; } return ( ( value [ ( i > > > 5 ) ] ) & ( org.bouncycastle.pqc.math.linearalgebra.GF2Polynomial.bitMask [ ( i & 31 ) ] ) ) != 0 ; }

Target:
public boolean testBit ( int i ) { if ( i < 0 ) { throw new java.lang.RuntimeException ( ) ; } if ( i > ( ( len ) - 1 ) ) { return false ; } return ( ( value [ ( i > > > 5 ) ] ) & ( org.bouncycastle.pqc.math.linearalgebra.GF2Polynomial.bitMask [ ( i & 31 ) ] ) ) != 0 ; }
Source:
public void testNormaliseOtherDigits ( ) { java.lang.String inputNumber = "２5٥" ; java.lang.String expectedOutput = "255" ; assertEquals ( "Conversion did not correctly replace non-latin digits" , expectedOutput , com.google.i18n.phonenumbers.PhoneNumberUtil.normalize ( inputNumber ) ) ; inputNumber = "۵2۰" ; expectedOutput = "520" ; assertEquals ( "Conversion did not correctly replace non-latin digits" , expectedOutput , com.google.i18n.phonenumbers.PhoneNumberUtil.normalize ( inputNumber ) ) ; }

Target:
public void testNormaliseOtherDigits ( ) { java.lang.StringBuilder inputNumber = new java.lang.StringBuilder ( "２5٥" ) ; java.lang.String expectedOutput = "255" ; assertEquals ( "Conversion did not correctly replace non-latin digits" , expectedOutput , com.google.i18n.phonenumbers.PhoneNumberUtil.normalize ( inputNumber ) . toString ( ) ) ; inputNumber = new java.lang.StringBuilder ( "۵2۰" ) ; expectedOutput = "520" ; assertEquals ( "Conversion did not correctly replace non-latin digits" , expectedOutput , com.google.i18n.phonenumbers.PhoneNumberUtil.normalize ( inputNumber ) . toString ( ) ) ; }
Source:
public void testBindDeviceAdminServiceAsUser_compPlusSecondaryUser ( ) throws java.lang.Exception { if ( ( ! ( mHasFeature ) ) || ( ! ( canCreateAdditionalUsers ( 1 ) ) ) ) { return ; } int secondaryUserId = setupManagedSecondaryUser ( ) ; int profileUserId = setupManagedProfile ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_APK , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_ADMIN ) ; setSameAffiliationId ( secondaryUserId ) ; verifyBindDeviceAdminServiceAsUser ( secondaryUserId ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.BIND_DEVICE_ADMIN_SERVICE_FAILS_TEST , profileUserId ) ; setSameAffiliationId ( profileUserId ) ; verifyBindDeviceAdminServiceAsUser ( profileUserId ) ; verifyBindDeviceAdminServiceAsUser ( secondaryUserId ) ; }

Target:
public void testBindDeviceAdminServiceAsUser_compPlusSecondaryUser ( ) throws java.lang.Exception { if ( ( ! ( mHasFeature ) ) || ( ! ( canCreateAdditionalUsers ( 2 ) ) ) ) { return ; } int secondaryUserId = setupManagedSecondaryUser ( ) ; int profileUserId = setupManagedProfile ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_APK , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_ADMIN ) ; setSameAffiliationId ( secondaryUserId ) ; verifyBindDeviceAdminServiceAsUser ( secondaryUserId ) ; runDeviceTestsAsUser ( com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.COMP_DPC_PKG , com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest.BIND_DEVICE_ADMIN_SERVICE_FAILS_TEST , profileUserId ) ; setSameAffiliationId ( profileUserId ) ; verifyBindDeviceAdminServiceAsUser ( profileUserId ) ; verifyBindDeviceAdminServiceAsUser ( secondaryUserId ) ; }
Source:
public void updateCallTime ( ) { final com.android.incallui.CallCardPresenter.CallCardUi ui = getUi ( ) ; if ( ui == null ) { mCallTimer.cancel ( ) ; } else if ( ! ( isPrimaryCallActive ( ) ) ) { ui.setPrimaryCallElapsedTime ( false , 0 ) ; mCallTimer.cancel ( ) ; } else { final long callStart = mPrimary.getConnectTimeMillis ( ) ; final long duration = ( java.lang.System.currentTimeMillis ( ) ) - callStart ; ui.setPrimaryCallElapsedTime ( true , duration ) ; } }

Target:
public void updateCallTime ( ) { final com.android.incallui.CallCardPresenter.CallCardUi ui = getUi ( ) ; if ( ui == null ) { mCallTimer.cancel ( ) ; } else if ( ! ( isPrimaryCallActive ( ) ) ) { ui.setPrimaryCallElapsedTime ( false , 0 ) ; mCallTimer.cancel ( ) ; } else { final long callStart = mPrimary.getConnectTimeMillis ( ) ; if ( callStart > 0 ) { final long duration = ( java.lang.System.currentTimeMillis ( ) ) - callStart ; ui.setPrimaryCallElapsedTime ( true , duration ) ; } } }
Source:
void close ( ) { android.util.Log.v ( android.bluetooth.BluetoothHidDevice.TAG , "close()" ) ; android.bluetooth.IBluetoothManager mgr = mAdapter.getBluetoothManager ( ) ; if ( mgr != null ) { try { mgr.unregisterStateChangeCallback ( mBluetoothStateChangeCallback ) ; } catch ( android.os.RemoteException e ) { e.printStackTrace ( ) ; } } synchronized ( mConnection ) { doUnbind ( ) ; } mServiceListener = null ; }

Target:
void close ( ) { android.bluetooth.IBluetoothManager mgr = mAdapter.getBluetoothManager ( ) ; if ( mgr != null ) { try { mgr.unregisterStateChangeCallback ( mBluetoothStateChangeCallback ) ; } catch ( android.os.RemoteException e ) { e.printStackTrace ( ) ; } } synchronized ( mConnection ) { doUnbind ( ) ; } mServiceListener = null ; }
Source:
private boolean isGoodVersion ( int magic , int minorVersion , int majorVersion ) { if ( ( magic == ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAGIC ) ) && ( minorVersion >= 0 ) ) { if ( majorVersion == ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MAJOR_VERSION ) ) { if ( minorVersion <= ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MINOR_VERSION ) ) { return true ; } } else if ( ( majorVersion < ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MAJOR_VERSION ) ) && ( majorVersion >= ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MIN_MAJOR_VERSION ) ) ) { return true ; } } return false ; }

Target:
private boolean isGoodVersion ( int minorVersion , int majorVersion ) { if ( minorVersion >= 0 ) { if ( majorVersion == ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MAJOR_VERSION ) ) { if ( minorVersion <= ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MINOR_VERSION ) ) { return true ; } } else if ( ( majorVersion < ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MAJOR_VERSION ) ) && ( majorVersion >= ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MIN_MAJOR_VERSION ) ) ) { return true ; } } return false ; }
Source:
protected static java.lang.String literalBitsString ( com.android.dx.rop.cst.CstLiteralBits value ) { java.lang.StringBuffer sb = new java.lang.StringBuffer ( 100 ) ; sb.append ( '#' ) ; if ( value instanceof com.android.dx.rop.cst.CstKnownNull ) { sb.append ( "null" ) ; } else { sb.append ( value.typeName ( ) ) ; sb.append ( ' ' ) ; sb.append ( value.toHuman ( ) ) ; } return sb.toString ( ) ; }

Target:
protected static java.lang.String literalBitsString ( com.android.dx.rop.cst.CstLiteralBits value ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( 100 ) ; sb.append ( '#' ) ; if ( value instanceof com.android.dx.rop.cst.CstKnownNull ) { sb.append ( "null" ) ; } else { sb.append ( value.typeName ( ) ) ; sb.append ( ' ' ) ; sb.append ( value.toHuman ( ) ) ; } return sb.toString ( ) ; }
Source:
public boolean setScanMode ( int mode , int duration ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setScanMode() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.setScanMode ( mode , duration ) ; }

Target:
public boolean setScanMode ( int mode , int duration ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "setScanMode() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.setScanMode ( mode , duration ) ; }
Source:
public void switchToSubscription ( int subscriptionId , android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { getIEuiccController ( ) . switchToSubscription ( subscriptionId , mContext.getOpPackageName ( ) , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void switchToSubscription ( int subscriptionId , android.app.PendingIntent callbackIntent ) { if ( ! ( isEnabled ( ) ) ) { android.telephony.euicc.EuiccManager.sendUnavailableError ( callbackIntent ) ; return ; } try { android.telephony.euicc.EuiccManager.getIEuiccController ( ) . switchToSubscription ( subscriptionId , mContext.getOpPackageName ( ) , callbackIntent ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" , "fr_CH" , "fr_SA" , "fr_CH@rg=sazzzz" , "fr_CH@calendar=japanese;rg=sazzzz" , "fr_TH@rg=SA" , "th@rg=SA" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "islamic-umalqura" , "islamic-umalqura" , "japanese" , "gregorian" , "gregorian" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }

Target:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" , "fr_CH" , "fr_SA" , "fr_CH@rg=sazzzz" , "fr_CH@calendar=japanese;rg=sazzzz" , "fr_TH@rg=SA" , "th@rg=SA" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "japanese" , "gregorian" , "gregorian" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }
Source:
public void onVisibilityChanged ( boolean visible ) { if ( com.android.systemui.ImageWallpaper.DEBUG ) { android.util.Log.d ( com.android.systemui.ImageWallpaper.TAG , ( ( ( "onVisibilityChanged: mVisible, visible=" + ( mVisible ) ) + ", " ) + visible ) ) ; } if ( ( mVisible ) != visible ) { if ( com.android.systemui.ImageWallpaper.DEBUG ) { android.util.Log.d ( com.android.systemui.ImageWallpaper.TAG , ( "Visibility changed to visible=" + visible ) ) ; } mVisible = visible ; drawFrame ( ) ; } }

Target:
public void onVisibilityChanged ( boolean visible ) { if ( com.android.systemui.ImageWallpaper.DEBUG ) { android.util.Log.d ( com.android.systemui.ImageWallpaper.TAG , ( ( ( "onVisibilityChanged: mVisible, visible=" + ( mVisible ) ) + ", " ) + visible ) ) ; } if ( ( mVisible ) != visible ) { if ( com.android.systemui.ImageWallpaper.DEBUG ) { android.util.Log.d ( com.android.systemui.ImageWallpaper.TAG , ( "Visibility changed to visible=" + visible ) ) ; } mVisible = visible ; if ( visible ) { drawFrame ( ) ; } } }
Source:
public void testKernelDomain ( ) throws java.io.FileNotFoundException { java.lang.String domain = "u:r:kernel:s0" ; java.util.List < android.security.cts.SELinuxDomainTest.ProcessDetails > procs = android.security.cts.SELinuxDomainTest.ProcessDetails.getProcessMap ( ) . get ( domain ) ; assertNotNull ( procs ) ; for ( android.security.cts.SELinuxDomainTest.ProcessDetails p : procs ) { assertTrue ( ( ( "Non Kernel thread \"" + ( p.procTitle ) ) + "\" found!" ) , p.isKernel ( ) ) ; } }

Target:
public void testKernelDomain ( ) throws java.io.FileNotFoundException { java.lang.String domain = "u:r:kernel:s0" ; java.util.List < android.security.cts.SELinuxDomainTest.ProcessDetails > procs = android.security.cts.SELinuxDomainTest.ProcessDetails.getProcessMap ( ) . get ( domain ) ; assertNotNull ( procs ) ; for ( android.security.cts.SELinuxDomainTest.ProcessDetails p : procs ) { assertTrue ( ( ( "Non Kernel thread \"" + p ) + "\" found!" ) , p.isKernel ( ) ) ; } }
Source:
public void setBody ( com.android.voicemail.impl.mail.Body body ) throws com.android.voicemail.impl.mail.MessagingException { this . mBody = body ; if ( body instanceof com.android.voicemail.impl.mail.Multipart ) { final com.android.voicemail.impl.mail.Multipart multipart = ( ( com.android.voicemail.impl.mail.Multipart ) ( body ) ) ; multipart.setParent ( this ) ; setHeader ( MimeHeader.HEADER_CONTENT_TYPE , multipart.getContentType ( ) ) ; setHeader ( "MIME-Version" , "1.0" ) ; } else if ( body instanceof com.android.voicemail.impl.mail.internet.TextBody ) { setHeader ( MimeHeader.HEADER_CONTENT_TYPE , java.lang.String.format ( "%s;\n charset=utf-8" , getMimeType ( ) ) ) ; setHeader ( MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING , "base64" ) ; } }

Target:
public void setBody ( com.android.voicemail.impl.mail.Body body ) throws com.android.voicemail.impl.mail.MessagingException { this . body = body ; if ( body instanceof com.android.voicemail.impl.mail.Multipart ) { final com.android.voicemail.impl.mail.Multipart multipart = ( ( com.android.voicemail.impl.mail.Multipart ) ( body ) ) ; multipart.setParent ( this ) ; setHeader ( MimeHeader.HEADER_CONTENT_TYPE , multipart.getContentType ( ) ) ; setHeader ( "MIME-Version" , "1.0" ) ; } else if ( body instanceof com.android.voicemail.impl.mail.internet.TextBody ) { setHeader ( MimeHeader.HEADER_CONTENT_TYPE , java.lang.String.format ( "%s;\n charset=utf-8" , getMimeType ( ) ) ) ; setHeader ( MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING , "base64" ) ; } }
Source:
public android.net.wifi.WifiLinkLayerStats getWifiLinkLayerStats ( java.lang.String iface ) { try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.getWifiLinkLayerStats ( iface ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } if ( iface == null ) return null ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { legacyHalWarning ( ) ; return com.android.server.wifi.WifiNative.getWifiLinkLayerStatsNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } }

Target:
public android.net.wifi.WifiLinkLayerStats getWifiLinkLayerStats ( java.lang.String iface ) { if ( iface == null ) return null ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getWifiLinkLayerStatsNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } }
Source:
public static void sort ( double [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) ) ; }

Target:
public static void sort ( float [ ] a , int fromIndex , int toIndex ) { java.util.Arrays.rangeCheck ( a.length , fromIndex , toIndex ) ; java.util.DualPivotQuicksort.sort ( a , fromIndex , ( toIndex - 1 ) , null , 0 , 0 ) ; }
Source:
private java.lang.String makeUriString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; if ( ( scheme ) != null ) { builder.append ( scheme ) . append ( ':' ) ; } appendSspTo ( builder ) ; if ( ( ( fragment ) != null ) && ( ! ( fragment.isEmpty ( ) ) ) ) { builder.append ( '#' ) . append ( fragment.getEncoded ( ) ) ; } return builder.toString ( ) ; }

Target:
private java.lang.String makeUriString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; if ( ( scheme ) != null ) { builder.append ( scheme ) . append ( ':' ) ; } appendSspTo ( builder ) ; if ( ! ( fragment.isEmpty ( ) ) ) { builder.append ( '#' ) . append ( fragment.getEncoded ( ) ) ; } return builder.toString ( ) ; }
Source:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByName ( java.lang.String curveName ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.crypto.ec.CustomNamedCurves.getByName ( curveName ) ; if ( params == null ) { params = org.bouncycastle.asn1.x9.X962NamedCurves.getByName ( curveName ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByName ( curveName ) ; } if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByName ( curveName ) ; } if ( params == null ) { params = org.bouncycastle.jcajce.provider.asymmetric.util.TeleTrusTNamedCurves.getByName ( curveName ) ; } } return params ; }

Target:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByName ( java.lang.String curveName ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.crypto.ec.CustomNamedCurves.getByName ( curveName ) ; if ( params == null ) { params = org.bouncycastle.asn1.x9.X962NamedCurves.getByName ( curveName ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByName ( curveName ) ; } if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByName ( curveName ) ; } } return params ; }
Source:
public void testMultiFilterWithNoMatch ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "zzz" ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 160 , "bar" ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "foo" ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertNull ( result ) ; }

Target:
public void testMultiFilterWithNoMatch ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "zzz" , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 160 , "bar" , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getOutput ( 320 , "foo" , 3 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertNull ( result ) ; }
Source:
private void updateRouteForForegroundCall ( ) { mAvailableRoutes = ( mDeviceSupportedRoutes ) & ( getCurrentCallSupportedRoutes ( ) ) ; android.telecom.CallAudioState currentState = getCurrentCallAudioState ( ) ; if ( ( ( mAvailableRoutes ) & ( currentState.getRoute ( ) ) ) == 0 ) { sendInternalMessage ( calculateBaselineRouteMessage ( false ) ) ; } }

Target:
private void updateRouteForForegroundCall ( ) { mAvailableRoutes = ( mDeviceSupportedRoutes ) & ( getCurrentCallSupportedRoutes ( ) ) ; android.telecom.CallAudioState currentState = getCurrentCallAudioState ( ) ; if ( ( ( mAvailableRoutes ) & ( currentState.getRoute ( ) ) ) == 0 ) { sendInternalMessage ( calculateBaselineRouteMessage ( false , true ) ) ; } }
Source:
static boolean native_preRotate ( int native_object , float degrees ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } double rad = java.lang.Math.toRadians ( degrees ) ; float sin = ( ( float ) ( java.lang.Math.sin ( rad ) ) ) ; float cos = ( ( float ) ( java.lang.Math.cos ( rad ) ) ) ; d.preTransform ( android.graphics.Matrix_Delegate.getRotate ( sin , cos ) ) ; return true ; }

Target:
static boolean native_preRotate ( long native_object , float degrees ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } double rad = java.lang.Math.toRadians ( degrees ) ; float sin = ( ( float ) ( java.lang.Math.sin ( rad ) ) ) ; float cos = ( ( float ) ( java.lang.Math.cos ( rad ) ) ) ; d.preTransform ( android.graphics.Matrix_Delegate.getRotate ( sin , cos ) ) ; return true ; }
Source:
private static java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > getPositiveCurrencyVectorTR ( ) { java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > v = new java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > ( ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 0 , 3 , java.text.NumberFormat.Field.INTEGER ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 3 , 4 , java.text.NumberFormat.Field.DECIMAL_SEPARATOR ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 4 , 6 , java.text.NumberFormat.Field.FRACTION ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 7 , 9 , java.text.NumberFormat.Field.CURRENCY ) ) ; return v ; }

Target:
private static java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > getPositiveCurrencyVectorTR ( ) { java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > v = new java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > ( ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 0 , 1 , java.text.NumberFormat.Field.CURRENCY ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 1 , 4 , java.text.NumberFormat.Field.INTEGER ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 4 , 5 , java.text.NumberFormat.Field.DECIMAL_SEPARATOR ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 5 , 7 , java.text.NumberFormat.Field.FRACTION ) ) ; return v ; }
Source:
public void test_wrap_ByteBuffer_ByteBuffer_02 ( ) { java.lang.String host = "new host" ; int port = 8080 ; java.nio.ByteBuffer bbs = java.nio.ByteBuffer.allocate ( 10 ) ; java.nio.ByteBuffer bbd = java.nio.ByteBuffer.allocate ( 100 ) . asReadOnlyBuffer ( ) ; javax.net.ssl.SSLEngine sse = getEngine ( host , port ) ; sse.setUseClientMode ( true ) ; try { sse.wrap ( bbs , bbd ) ; fail ( "ReadOnlyBufferException wasn't thrown" ) ; } catch ( java.nio.ReadOnlyBufferException iobe ) { } catch ( java.lang.Exception e ) { fail ( ( e + " was thrown instead of ReadOnlyBufferException" ) ) ; } }

Target:
public void test_wrap_ByteBuffer_ByteBuffer_02 ( ) throws java.lang.Exception { java.lang.String host = "new host" ; int port = 8080 ; java.nio.ByteBuffer bbs = java.nio.ByteBuffer.allocate ( 10 ) ; java.nio.ByteBuffer bbd = java.nio.ByteBuffer.allocate ( 100 ) . asReadOnlyBuffer ( ) ; javax.net.ssl.SSLEngine sse = getEngine ( host , port ) ; sse.setUseClientMode ( true ) ; try { sse.wrap ( bbs , bbd ) ; fail ( "ReadOnlyBufferException wasn't thrown" ) ; } catch ( java.nio.ReadOnlyBufferException expected ) { } }
Source:
protected void fillRtTestInfos ( ) { rtTestInfos.add ( TEST001 ) ; rtTestInfos.add ( TEST002 ) ; rtTestInfos.add ( TEST003 ) ; rtTestInfos.add ( TEST004 ) ; rtTestInfos.add ( TEST005 ) ; rtTestInfos.add ( TEST006 ) ; rtTestInfos.add ( TEST007 ) ; rtTestInfos.add ( TEST009 ) ; }

Target:
protected void fillRtTestInfos ( ) { rtTestInfos.add ( TEST001 ) ; rtTestInfos.add ( TEST002 ) ; rtTestInfos.add ( TEST003 ) ; rtTestInfos.add ( TEST004 ) ; rtTestInfos.add ( TEST005 ) ; rtTestInfos.add ( TEST006 ) ; rtTestInfos.add ( TEST007 ) ; }
Source:
public void test_UTF_16LE ( ) throws java.lang.Exception { java.nio.charset.Charset cs = java.nio.charset.Charset.forName ( "UTF-16LE" ) ; assertEncodes ( cs , "a٦" , 'a' , 0 , 102 , 6 ) ; assertDecodes ( cs , "﻿a٦" , 255 , 254 , 'a' , 0 , 102 , 6 ) ; assertDecodes ( cs , "�a٦" , 254 , 255 , 'a' , 0 , 102 , 6 ) ; assertDecodes ( cs , "a٦" , 'a' , 0 , 102 , 6 ) ; }

Target:
public void test_UTF_16LE ( ) throws java.lang.Exception { java.nio.charset.Charset cs = java.nio.charset.Charset.forName ( "UTF-16LE" ) ; assertEncodes ( cs , "a٦" , 'a' , 0 , 102 , 6 ) ; assertDecodes ( cs , "﻿a٦" , 255 , 254 , 'a' , 0 , 102 , 6 ) ; assertDecodes ( cs , "a٦" , 'a' , 0 , 102 , 6 ) ; }
Source:
private java.lang.String format ( double number , com.ibm.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; if ( ( getRoundingMode ( ) ) != ( com.ibm.icu.math.BigDecimal.ROUND_UNNECESSARY ) ) { number = new com.ibm.icu.math.BigDecimal ( java.lang.Double.toString ( number ) ) . setScale ( getMaximumFractionDigits ( ) , roundingMode ) . doubleValue ( ) ; } ruleSet.format ( number , result , 0 , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }

Target:
private java.lang.String format ( double number , com.ibm.icu.text.NFRuleSet ruleSet ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; if ( ( getRoundingMode ( ) ) != ( com.ibm.icu.math.BigDecimal.ROUND_UNNECESSARY ) ) { number = new com.ibm.icu.math.BigDecimal ( java.lang.Double.toString ( number ) ) . setScale ( getMaximumFractionDigits ( ) , roundingMode ) . doubleValue ( ) ; } ruleSet.format ( number , result , 0 , 0 ) ; postProcess ( result , ruleSet ) ; return result.toString ( ) ; }
Source:
private void loadInternalDataFromSharedStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from shared store " + ( configuration.configKey ( ) ) ) ) ; } addMissingPskPassphraseQuotes ( configuration ) ; mConfiguredNetworks.put ( configuration ) ; } }

Target:
private void loadInternalDataFromSharedStore ( java.util.List < android.net.wifi.WifiConfiguration > configurations ) { for ( android.net.wifi.WifiConfiguration configuration : configurations ) { configuration.networkId = ( mNextNetworkId ) ++ ; if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Adding network from shared store " + ( configuration.configKey ( ) ) ) ) ; } mConfiguredNetworks.put ( configuration ) ; } }
Source:
protected android.icu.util.UResourceBundle findTopLevel ( java.lang.String aKey ) { for ( android.icu.util.UResourceBundle res = this ; res != null ; res = res.getParent ( ) ) { android.icu.util.UResourceBundle obj = res.handleGet ( aKey , null , this ) ; if ( obj != null ) { ( ( android.icu.impl.ICUResourceBundle ) ( obj ) ) . setLoadingStatus ( getLocaleID ( ) ) ; return obj ; } } return null ; }

Target:
protected android.icu.util.UResourceBundle findTopLevel ( int index ) { for ( android.icu.util.UResourceBundle res = this ; res != null ; res = res.getParent ( ) ) { android.icu.util.UResourceBundle obj = res.handleGet ( index , null , this ) ; if ( obj != null ) { return obj ; } } return null ; }
Source:
static < K , V > java.util.Map.Entry < K , V > unmodifiableEntry ( final java.util.Map.Entry < K , V > entry ) { com.google.common.base.Preconditions.checkNotNull ( entry ) ; return new com.google.common.collect.AbstractMapEntry < K , V > ( ) { @ java.lang.Override public K getKey ( ) { return entry.getKey ( ) ; } @ java.lang.Override public V getValue ( ) { return entry.getValue ( ) ; } } ; }

Target:
static < K , V > java.util.Map.Entry < K , V > unmodifiableEntry ( final java.util.Map.Entry < ? extends K , ? extends V > entry ) { com.google.common.base.Preconditions.checkNotNull ( entry ) ; return new com.google.common.collect.AbstractMapEntry < K , V > ( ) { @ java.lang.Override public K getKey ( ) { return entry.getKey ( ) ; } @ java.lang.Override public V getValue ( ) { return entry.getValue ( ) ; } } ; }
Source:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { if ( element.hasAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_TITLE ) ) { return ; } if ( ( context.getMainProject ( ) . getTargetSdk ( ) ) < 11 ) { return ; } if ( com.android.SdkConstants.VALUE_FALSE.equals ( element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_VISIBLE ) ) ) { return ; } java.lang.String message = "Menu items should specify a `title`" ; context.report ( com.android.tools.lint.checks.TitleDetector.ISSUE , element , context.getLocation ( element ) , message , null ) ; }

Target:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { if ( element.hasAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_TITLE ) ) { return ; } if ( ( context.getMainProject ( ) . getTargetSdk ( ) ) < 11 ) { return ; } if ( com.android.SdkConstants.VALUE_FALSE.equals ( element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_VISIBLE ) ) ) { return ; } java.lang.String message = "Menu items should specify a `title`" ; context.report ( com.android.tools.lint.checks.TitleDetector.ISSUE , element , context.getLocation ( element ) , message ) ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
public void checkValidity ( ) { super . checkValidity ( ) ; if ( ( getElementCount ( ) ) != 1 ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Block must always have one single element" ) ; } if ( ! ( ( getLastElement ( ) ) instanceof com.android.jack.ir.ast.cfg.JCaseBlockElement ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "The only element of the block must be case element" ) ; } }

Target:
public void checkValidity ( ) { super . checkValidity ( ) ; if ( ! ( ( getLastElement ( ) ) instanceof com.android.jack.ir.ast.cfg.JCaseBlockElement ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "The only element of the block must be case element" ) ; } }
Source:
public void test_ConstructorLjava_net_DatagramSocketImpl ( ) { class SimpleTestDatagramSocket extends java.net.DatagramSocket { public SimpleTestDatagramSocket ( java.net.DatagramSocketImpl impl ) { super ( impl ) ; } } try { new SimpleTestDatagramSocket ( ( ( java.net.DatagramSocketImpl ) ( null ) ) ) ; fail ( "exception expected" ) ; } catch ( java.lang.NullPointerException ex ) { } }

Target:
public void test_ConstructorLjava_net_DatagramSocketImpl ( ) { class SimpleTestDatagramSocket extends java.net.DatagramSocket { public SimpleTestDatagramSocket ( java.net.DatagramSocketImpl impl ) { super ( impl ) ; } } try { new SimpleTestDatagramSocket ( null ) ; fail ( "exception expected" ) ; } catch ( java.lang.NullPointerException ex ) { } }
Source:
public java.lang.Package getPackage ( ) { java.lang.Package pkg = super . getPackage ( ) ; if ( pkg == null ) { try { pkg = com.android.sdklib.internal.repository.packages.DocPackage.create ( null , getSourceProperties ( ) , 0 , null , 0 , null , null , null , com.android.sdklib.internal.repository.archives.Archive.Os.getCurrentOs ( ) , com.android.sdklib.internal.repository.archives.Archive.Arch.getCurrentArch ( ) , getLocalDir ( ) . getPath ( ) ) ; setPackage ( pkg ) ; } catch ( java.lang.Exception e ) { appendLoadError ( "Failed to parse package: %1$s" , e.toString ( ) ) ; } } return pkg ; }

Target:
public java.lang.Package getPackage ( ) { java.lang.Package pkg = super . getPackage ( ) ; if ( pkg == null ) { try { pkg = com.android.sdklib.internal.repository.packages.DocPackage.create ( null , getSourceProperties ( ) , 0 , null , 0 , null , null , null , getLocalDir ( ) . getPath ( ) ) ; setPackage ( pkg ) ; } catch ( java.lang.Exception e ) { appendLoadError ( "Failed to parse package: %1$s" , e.toString ( ) ) ; } } return pkg ; }
Source:
public void stopHal ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.stopHalNative ( ) ; try { com.android.server.wifi.WifiNative.sThread.join ( com.android.server.wifi.WifiNative.STOP_HAL_TIMEOUT_MS ) ; android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "HAL event thread stopped successfully" ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "Could not stop HAL cleanly" ) ; } com.android.server.wifi.WifiNative.sThread = null ; com.android.server.wifi.WifiNative.sWifiHalHandle = 0 ; com.android.server.wifi.WifiNative.sWifiIfaceHandles = null ; com.android.server.wifi.WifiNative.sWlan0Index = - 1 ; } } if ( ( mWifiVendorHal ) != null ) { mWifiVendorHal.stopVendorHal ( ) ; mWifiVendorHal = null ; } }

Target:
public void stopHal ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.stopHalNative ( ) ; try { com.android.server.wifi.WifiNative.sThread.join ( com.android.server.wifi.WifiNative.STOP_HAL_TIMEOUT_MS ) ; android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , "HAL event thread stopped successfully" ) ; } catch ( java.lang.InterruptedException e ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "Could not stop HAL cleanly" ) ; } com.android.server.wifi.WifiNative.sThread = null ; com.android.server.wifi.WifiNative.sWifiHalHandle = 0 ; com.android.server.wifi.WifiNative.sWifiIfaceHandles = null ; com.android.server.wifi.WifiNative.sWlan0Index = - 1 ; } } }
Source:
public void setVisualVoicemailEnabled ( android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { telephony.setVisualVoicemailEnabled ( mContext.getOpPackageName ( ) , phoneAccountHandle , enabled ) ; } } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }

Target:
public void setVisualVoicemailEnabled ( android.telecom.PhoneAccountHandle phoneAccountHandle , boolean enabled ) { }
Source:
public java.util.List < android.telephony.ClientRequestStats > getClientRequestStats ( java.lang.String callingPackage , int subId ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getClientRequestStats" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getClientRequestStats ( ) ; } return null ; }

Target:
public java.util.List < android.telephony.ClientRequestStats > getClientRequestStats ( java.lang.String callingPackage , int subId ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , subId , callingPackage , "getClientRequestStats" ) ) ) { return null ; } com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { return phone.getClientRequestStats ( ) ; } return null ; }
Source:
void saveProperties ( java.util.Properties props ) { super . saveProperties ( props ) ; mVersion.saveProperties ( props ) ; if ( ( mVersionName ) != null ) { props.setProperty ( com.android.sdklib.internal.repository.PlatformPackage.PROP_VERSION , mVersionName ) ; } if ( ( mLayoutlibVersion.getFirst ( ) . intValue ( ) ) != ( com.android.sdklib.internal.repository.PlatformPackage.LAYOUTLIB_API_NOT_SPECIFIED ) ) { props.setProperty ( com.android.sdklib.internal.repository.PlatformPackage.PROP_LAYOUTLIB_API , mLayoutlibVersion.getFirst ( ) . toString ( ) ) ; props.setProperty ( com.android.sdklib.internal.repository.PlatformPackage.PROP_LAYOUTLIB_REV , mLayoutlibVersion.getSecond ( ) . toString ( ) ) ; } }

Target:
void saveProperties ( java.util.Properties props ) { super . saveProperties ( props ) ; mVersion.saveProperties ( props ) ; mLayoutlibVersion.saveProperties ( props ) ; if ( ( mVersionName ) != null ) { props.setProperty ( com.android.sdklib.internal.repository.PlatformPackage.PROP_VERSION , mVersionName ) ; } }
Source:
public boolean isOpened ( int slotId , int featureType , int sessionId ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isOpened ( sessionId ) ; } } return false ; }

Target:
public boolean isOpened ( int slotId , int featureType ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isOpened ( ) ; } } return false ; }
Source:
public static com.android.internal.telephony.dataconnection.DataCallResponse createDataCallResponse ( ) { com.android.internal.telephony.dataconnection.DataCallResponse dcResponse = new com.android.internal.telephony.dataconnection.DataCallResponse ( ) ; dcResponse.version = 11 ; dcResponse.status = 0 ; dcResponse.suggestedRetryTime = - 1 ; dcResponse.cid = 1 ; dcResponse.active = 2 ; dcResponse.type = "IP" ; dcResponse.ifname = com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME ; dcResponse.mtu = 1440 ; dcResponse.addresses = new java.lang.String [ ] { com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_ADDRESS } ; dcResponse.dnses = new java.lang.String [ ] { com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS } ; dcResponse.gateways = new java.lang.String [ ] { com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY } ; dcResponse.pcscf = new java.lang.String [ ] { com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS } ; return dcResponse ; }

Target:
public static com.android.internal.telephony.dataconnection.DataCallResponse createDataCallResponse ( ) { return new com.android.internal.telephony.dataconnection.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_ADDRESS , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS , 1440 ) ; }