auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void connectionForDeprecatedGetRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.DeprecatedGet request = new com.android.volley.mock.TestRequest.DeprecatedGet ( ) ; assertEquals ( request.getMethod ( ) , Method.DEPRECATED_GET_OR_POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "GET" , mMockConnection.getRequestMethod ( ) ) ; assertFalse ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void connectionForDeprecatedGetRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.DeprecatedGet request = new com.android.volley.mock.TestRequest.DeprecatedGet ( ) ; org.junit.Assert.assertEquals ( request.getMethod ( ) , Method.DEPRECATED_GET_OR_POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; org.mockito.Mockito.verify ( mMockConnection , org.mockito.Mockito.never ( ) ) . setRequestMethod ( org.mockito.ArgumentMatchers.anyString ( ) ) ; org.mockito.Mockito.verify ( mMockConnection , org.mockito.Mockito.never ( ) ) . setDoOutput ( true ) ; }
Source:
private boolean isPermissionEnforcedLocked ( java.lang.String permission ) { if ( android.Manifest.permission.READ_EXTERNAL_STORAGE.equals ( permission ) ) { if ( ( mSettings.mReadExternalStorageEnforced ) != null ) { return mSettings.mReadExternalStorageEnforced ; } else { return ( android.provider.Settings.Secure.getInt ( mContext.getContentResolver ( ) , Secure.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT , 0 ) ) != 0 ; } } else { return true ; } }

Target:
public boolean setInstallLocation ( int loc ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.WRITE_SECURE_SETTINGS , null ) ; if ( ( getInstallLocation ( ) ) == loc ) { return true ; } if ( ( ( loc == ( com.android.internal.content.PackageHelper.APP_INSTALL_AUTO ) ) || ( loc == ( com.android.internal.content.PackageHelper.APP_INSTALL_INTERNAL ) ) ) || ( loc == ( com.android.internal.content.PackageHelper.APP_INSTALL_EXTERNAL ) ) ) { android.provider.Settings.Global.putInt ( mContext.getContentResolver ( ) , android.provider.Settings.Global.DEFAULT_INSTALL_LOCATION , loc ) ; return true ; } return false ; }
Source:
public java.security.KeyPair generateKeyPair ( ) { if ( ( group ) == null ) { final java.lang.String curveName = org.conscrypt.OpenSSLECKeyPairGenerator.SIZE_TO_CURVE_NAME.get ( org.conscrypt.OpenSSLECKeyPairGenerator.DEFAULT_KEY_SIZE ) ; group = org.conscrypt.OpenSSLECGroupContext.getCurveByName ( curveName ) ; } final org.conscrypt.OpenSSLKey key = new org.conscrypt.OpenSSLKey ( org.conscrypt.NativeCrypto.EC_KEY_generate_key ( group.getContext ( ) ) ) ; return new java.security.KeyPair ( new org.conscrypt.OpenSSLECPublicKey ( group , key ) , new org.conscrypt.OpenSSLECPrivateKey ( group , key ) ) ; }

Target:
public java.security.KeyPair generateKeyPair ( ) { if ( ( group ) == null ) { final java.lang.String curveName = org.conscrypt.OpenSSLECKeyPairGenerator.SIZE_TO_CURVE_NAME.get ( org.conscrypt.OpenSSLECKeyPairGenerator.DEFAULT_KEY_SIZE ) ; group = org.conscrypt.OpenSSLECGroupContext.getCurveByName ( curveName ) ; } final org.conscrypt.OpenSSLKey key = new org.conscrypt.OpenSSLKey ( org.conscrypt.NativeCrypto.EC_KEY_generate_key ( group.getNativeRef ( ) ) ) ; return new java.security.KeyPair ( new org.conscrypt.OpenSSLECPublicKey ( group , key ) , new org.conscrypt.OpenSSLECPrivateKey ( group , key ) ) ; }
Source:
public static void assertDefaultCipherSuites ( java.lang.String [ ] cipherSuites ) { libcore.java.security.StandardNames.assertValidCipherSuites ( libcore.java.security.StandardNames.CIPHER_SUITES , cipherSuites ) ; assertEquals ( libcore.java.security.StandardNames.CIPHER_SUITES_DEFAULT , java.util.Arrays.asList ( cipherSuites ) ) ; }

Target:
public static void assertDefaultCipherSuites ( java.lang.String [ ] cipherSuites ) { libcore.java.security.StandardNames.assertValidCipherSuites ( libcore.java.security.StandardNames.CIPHER_SUITES , cipherSuites ) ; assertEquals ( libcore.java.security.StandardNames.CIPHER_SUITES_DEFAULT , java.util.Arrays.asList ( cipherSuites ) ) ; if ( ! ( libcore.java.security.StandardNames.IS_RI ) ) { java.util.List < java.lang.String > disallowedDefaultCipherSuites = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String cipherSuite : cipherSuites ) { if ( ! ( libcore.java.security.StandardNames.isPermittedDefaultCipherSuite ( cipherSuite ) ) ) { disallowedDefaultCipherSuites.add ( cipherSuite ) ; } } assertEquals ( java.util.Collections.EMPTY_LIST , disallowedDefaultCipherSuites ) ; } }
Source:
private boolean isRoamIndForHomeSystem ( java.lang.String roamInd ) { java.lang.String [ ] homeRoamIndicators = mPhone.getContext ( ) . getResources ( ) . getStringArray ( com.android.internal.R.array.config_cdma_home_system ) ; if ( homeRoamIndicators != null ) { for ( java.lang.String homeRoamInd : homeRoamIndicators ) { if ( homeRoamInd.equals ( roamInd ) ) { return true ; } } return false ; } return false ; }

Target:
private boolean isRoamIndForHomeSystem ( java.lang.String roamInd ) { java.lang.String [ ] homeRoamIndicators = android.content.res.Resources.getSystem ( ) . getStringArray ( com.android.internal.R.array.config_cdma_home_system ) ; log ( ( "isRoamIndForHomeSystem: homeRoamIndicators=" + ( java.util.Arrays.toString ( homeRoamIndicators ) ) ) ) ; if ( homeRoamIndicators != null ) { for ( java.lang.String homeRoamInd : homeRoamIndicators ) { if ( homeRoamInd.equals ( roamInd ) ) { return true ; } } log ( ( "isRoamIndForHomeSystem: No match found against list for roamInd=" + roamInd ) ) ; return false ; } log ( "isRoamIndForHomeSystem: No list found" ) ; return false ; }
Source:
public void testSubList2_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.subList ( 1 , 100 ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testAddAll2_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.addAll ( ( ( list.size ( ) ) + 1 ) , new java.util.LinkedList ( ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 0 ] ) ; java.lang.System.out.println ( "thread test starting" ) ; Main.testThreadCapacity ( ) ; Main.testThreadDaemons ( ) ; Main.testSleepZero ( ) ; Main.testSetName ( ) ; Main.testThreadPriorities ( ) ; java.lang.System.out.println ( "thread test done" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 0 ] ) ; java.lang.System.out.println ( "thread test starting" ) ; Main.testThreadCapacity ( ) ; Main.testThreadDaemons ( ) ; Main.testSleepZero ( ) ; Main.testSetName ( ) ; Main.testThreadPriorities ( ) ; Main.testMainThreadGroup ( ) ; Main.testMainThreadAllStackTraces ( ) ; java.lang.System.out.println ( "thread test done" ) ; }
Source:
public android.net.Uri getAdnUriForPhoneAccount ( android.telecom.PhoneAccountHandle accountHandle , java.lang.String callingPackage ) { try { com.android.server.telecom.Log.startSession ( "TSI.aAUFPA" ) ; synchronized ( mLock ) { enforcePermissionOrPrivilegedDialer ( android.Manifest.permission.MODIFY_PHONE_STATE , callingPackage ) ; if ( ! ( isPhoneAccountHandleVisibleToCallingUser ( accountHandle , android.os.Binder.getCallingUserHandle ( ) ) ) ) { com.android.server.telecom.Log.d ( this , "%s is not visible for the calling user [gA4PA]" , accountHandle ) ; return null ; } long token = android.os.Binder.clearCallingIdentity ( ) ; java.lang.String retval = "content://icc/adn/" ; try { long subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount ( accountHandle ) ; retval = ( retval + "subId/" ) + subId ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } return android.net.Uri.parse ( retval ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public android.net.Uri getAdnUriForPhoneAccount ( android.telecom.PhoneAccountHandle accountHandle , java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.aAUFPA" ) ; synchronized ( mLock ) { enforcePermissionOrPrivilegedDialer ( android.Manifest.permission.MODIFY_PHONE_STATE , callingPackage ) ; if ( ! ( isPhoneAccountHandleVisibleToCallingUser ( accountHandle , android.os.Binder.getCallingUserHandle ( ) ) ) ) { android.telecom.Log.d ( this , "%s is not visible for the calling user [gA4PA]" , accountHandle ) ; return null ; } long token = android.os.Binder.clearCallingIdentity ( ) ; java.lang.String retval = "content://icc/adn/" ; try { long subId = mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount ( accountHandle ) ; retval = ( retval + "subId/" ) + subId ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } return android.net.Uri.parse ( retval ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void testHeadsetServiceDisconnect ( ) { receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device1 ) ) ; receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device2 ) ) ; serviceListenerUnderTest.onServiceDisconnected ( 0 ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device1.getAddress ( ) ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device2.getAddress ( ) ) ; assertNull ( mBluetoothDeviceManager.getHeadsetService ( ) ) ; assertEquals ( 0 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; }

Target:
public void testHeadsetServiceDisconnect ( ) { receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device1 ) ) ; receiverUnderTest.onReceive ( mContext , buildConnectionActionIntent ( BluetoothHeadset.STATE_CONNECTED , device2 ) ) ; serviceListenerUnderTest.onServiceDisconnected ( 0 ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device1.getAddress ( ) ) ; org.mockito.Mockito.verify ( mRouteManager ) . onDeviceLost ( device2.getAddress ( ) ) ; org.junit.Assert.assertNull ( mBluetoothDeviceManager.getHeadsetService ( ) ) ; org.junit.Assert.assertEquals ( 0 , mBluetoothDeviceManager.getNumConnectedDevices ( ) ) ; }
Source:
public void drawLine ( int x1 , int y1 , int x2 , int y2 ) { checkGC ( ) ; x1 = mHScale.translate ( x1 ) ; y1 = mVScale.translate ( y1 ) ; x2 = mHScale.translate ( x2 ) ; y2 = mVScale.translate ( y2 ) ; getGc ( ) . drawLine ( x1 , y1 , x2 , y2 ) ; }

Target:
public void drawLine ( int x1 , int y1 , int x2 , int y2 ) { checkGC ( ) ; useStrokeAlpha ( ) ; x1 = mHScale.translate ( x1 ) ; y1 = mVScale.translate ( y1 ) ; x2 = mHScale.translate ( x2 ) ; y2 = mVScale.translate ( y2 ) ; getGc ( ) . drawLine ( x1 , y1 , x2 , y2 ) ; }
Source:
void handleGsmAuthRequest ( com.android.server.wifi.util.TelephonyUtil.SimAuthRequestData requestData ) { if ( ( ( targetWificonfiguration ) == null ) || ( ( targetWificonfiguration.networkId ) == ( requestData.networkId ) ) ) { logd ( "id matches targetWifiConfiguration" ) ; } else { logd ( "id does not match targetWifiConfiguration" ) ; return ; } java.lang.String response = com.android.server.wifi.util.TelephonyUtil.getGsmSimAuthResponse ( requestData.data , getTelephonyManager ( ) ) ; if ( response == null ) { mWifiNative.simAuthFailedResponse ( requestData.networkId ) ; } else { logv ( ( "Supplicant Response -" + response ) ) ; mWifiNative.simAuthResponse ( requestData.networkId , "GSM-AUTH" , response ) ; } }

Target:
void handle3GAuthRequest ( com.android.server.wifi.util.TelephonyUtil.SimAuthRequestData requestData ) { if ( ( ( targetWificonfiguration ) == null ) || ( ( targetWificonfiguration.networkId ) == ( lookupFrameworkNetworkId ( requestData.networkId ) ) ) ) { logd ( "id matches targetWifiConfiguration" ) ; } else { logd ( "id does not match targetWifiConfiguration" ) ; return ; } com.android.server.wifi.util.TelephonyUtil.SimAuthResponseData response = com.android.server.wifi.util.TelephonyUtil.get3GAuthResponse ( requestData , getTelephonyManager ( ) ) ; if ( response != null ) { mWifiNative.simAuthResponse ( requestData.networkId , response.type , response.response ) ; } else { mWifiNative.umtsAuthFailedResponse ( requestData.networkId ) ; } }
Source:
public static boolean getEnhancedBlockSetting ( android.content.Context context , java.lang.String key ) { android.os.Bundle extras = new android.os.Bundle ( ) ; extras.putString ( android.provider.BlockedNumberContract.EXTRA_ENHANCED_SETTING_KEY , key ) ; final android.os.Bundle res = context.getContentResolver ( ) . call ( android.provider.BlockedNumberContract.AUTHORITY_URI , android.provider.BlockedNumberContract.SystemContract.METHOD_GET_ENHANCED_BLOCK_SETTING , null , extras ) ; return ( res != null ) && ( res.getBoolean ( android.provider.BlockedNumberContract.RES_ENHANCED_SETTING_IS_ENABLED , false ) ) ; }

Target:
public static boolean getEnhancedBlockSetting ( android.content.Context context , java.lang.String key ) { android.os.Bundle extras = new android.os.Bundle ( ) ; extras.putString ( android.provider.BlockedNumberContract.EXTRA_ENHANCED_SETTING_KEY , key ) ; try { final android.os.Bundle res = context.getContentResolver ( ) . call ( android.provider.BlockedNumberContract.AUTHORITY_URI , android.provider.BlockedNumberContract.SystemContract.METHOD_GET_ENHANCED_BLOCK_SETTING , null , extras ) ; return ( res != null ) && ( res.getBoolean ( android.provider.BlockedNumberContract.RES_ENHANCED_SETTING_IS_ENABLED , false ) ) ; } catch ( java.lang.NullPointerException | java.lang.IllegalArgumentException ex ) { android.telecom.Log.w ( null , "getEnhancedBlockSetting: provider not ready." ) ; return false ; } }
Source:
private void deleteTestFiles ( @ javax.annotation.Nonnegative com.android.ddmlib.IDevice device , @ javax.annotation.Nonnull java.io.File testDir ) throws com.android.jack.test.runner.RuntimeRunnerException { java.lang.String testDirName = testDir.getName ( ) ; try { executeShellCommand ( ( "rm -rf " + ( testDir.getAbsolutePath ( ) ) ) , device ) ; executeShellCommand ( ( ( "find dalvik-cache -name '*" + testDirName ) + "*' -exec rm -rf +" ) , device ) ; } catch ( com.android.ddmlib.TimeoutException | com.android.ddmlib.AdbCommandRejectedException | com.android.ddmlib.ShellCommandUnresponsiveException | java.io.IOException e ) { throw new com.android.jack.test.runner.RuntimeRunnerException ( e ) ; } }

Target:
private void deleteTestFiles ( @ javax.annotation.Nonnegative com.android.ddmlib.IDevice device , @ javax.annotation.Nonnull java.io.File testDir ) throws com.android.jack.test.runner.RuntimeRunnerException { java.lang.String testDirName = testDir.getName ( ) ; try { executeShellCommand ( ( "rm -rf " + ( convertToTargetPath ( testDir ) ) ) , device ) ; executeShellCommand ( ( ( "find /data/dalvik-cache -name '*" + testDirName ) + "*' -exec rm -rf +" ) , device ) ; } catch ( com.android.ddmlib.TimeoutException | com.android.ddmlib.AdbCommandRejectedException | com.android.ddmlib.ShellCommandUnresponsiveException | java.io.IOException e ) { throw new com.android.jack.test.runner.RuntimeRunnerException ( e ) ; } }
Source:
private static java.util.List < java.lang.Object > getTestsAndSuites ( junit.framework.TestSuite suite ) { try { return suite.getTestsAndSuites ( ) ; } catch ( java.lang.NoSuchMethodError e ) { if ( ! ( e.getMessage ( ) . contains ( "getTestsAndSuites()Ljava/util/List;" ) ) ) { throw e ; } java.util.Enumeration < ? > enumeration = suite.tests ( ) ; java.util.List < java.lang.Object > tests = new java.util.ArrayList < java.lang.Object > ( ) ; while ( enumeration.hasMoreElements ( ) ) { tests.add ( enumeration.nextElement ( ) ) ; } return tests ; } }

Target:
private static java.util.List < junit.framework.Test > getTestsAndSuites ( junit.framework.TestSuite suite ) { return java.util.Collections.list ( suite.tests ( ) ) ; }
Source:
public void testSet1_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.set ( ( - 1 ) , "qwerty" ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } }

Target:
public void testGet1_IndexOutOfBoundsException ( ) { java.util.concurrent.CopyOnWriteArrayList c = jsr166.CopyOnWriteArrayListTest.populatedArray ( 5 ) ; java.util.List [ ] lists = new java.util.List [ ] { c , c.subList ( 1 , ( ( c.size ( ) ) - 1 ) ) } ; for ( java.util.List list : lists ) { try { list.get ( ( - 1 ) ) ; shouldThrow ( ) ; } catch ( java.lang.IndexOutOfBoundsException success ) { } } }
Source:
private com.android.jack.optimizations.lambdas.LambdaTests.Class impl ( @ javax.annotation.Nonnull java.lang.String [ ] names , @ javax.annotation.Nonnull java.lang.String str ) { if ( ( names.length ) > 0 ) { builder.append ( str ) ; java.util.Arrays.sort ( names ) ; for ( java.lang.String n : names ) { builder.append ( " " ) . append ( n ) . append ( "\n" ) ; } } return this ; }

Target:
private com.android.jack.optimizations.lambdas.LambdaTests.Class printImpl ( @ javax.annotation.Nonnull java.lang.String [ ] names , @ javax.annotation.Nonnull java.lang.String str , boolean ordered ) { if ( ( names.length ) > 0 ) { builder.append ( str ) ; if ( ordered ) { java.util.Arrays.sort ( names ) ; } for ( java.lang.String n : names ) { builder.append ( " " ) . append ( n ) . append ( "\n" ) ; } } return this ; }
Source:
void regularScanTimeout ( ) { for ( com.android.bluetooth.gatt.ScanClient client : mRegularScanClients ) { if ( ! ( isExemptFromScanDowngrade ( client ) ) ) { android.util.Log.w ( com.android.bluetooth.gatt.ScanManager.TAG , ( ( "Moving scan client to opportunistic (scannerId " + ( client.scannerId ) ) + ")" ) ) ; setOpportunisticScanClient ( client ) ; client.stats.setScanTimeout ( ) ; } } configureRegularScanParams ( ) ; if ( ( numRegularScanClients ( ) ) == 0 ) { logd ( "stop scan" ) ; gattClientScanNative ( false ) ; } }

Target:
void regularScanTimeout ( com.android.bluetooth.gatt.ScanClient client ) { if ( ( ! ( isExemptFromScanDowngrade ( client ) ) ) && ( client.stats.isScanningTooLong ( ) ) ) { android.util.Log.w ( com.android.bluetooth.gatt.ScanManager.TAG , ( ( "Moving scan client to opportunistic (scannerId " + ( client.scannerId ) ) + ")" ) ) ; setOpportunisticScanClient ( client ) ; client.stats.setScanTimeout ( ) ; } configureRegularScanParams ( ) ; if ( ( numRegularScanClients ( ) ) == 0 ) { logd ( "stop scan" ) ; gattClientScanNative ( false ) ; } }
Source:
private boolean scanWithParams ( java.lang.String freqList , java.lang.String hiddenNetworkSSIDList ) { java.lang.StringBuilder scanCommand = new java.lang.StringBuilder ( ) ; scanCommand.append ( "SCAN TYPE=ONLY" ) ; if ( freqList != null ) { scanCommand.append ( ( " freq=" + freqList ) ) ; } if ( hiddenNetworkSSIDList != null ) { scanCommand.append ( ( " ssid " + hiddenNetworkSSIDList ) ) ; } return doBooleanCommand ( scanCommand.toString ( ) ) ; }

Target:
public boolean migrateNetworksFromSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configs , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.loadNetworks ( configs , networkExtras ) ; } else { mWifiSupplicantControl.loadNetworks ( configs , networkExtras ) ; return true ; } }
Source:
private void updateScreenState ( ) { final int oldState = mRadioScreenState ; mRadioScreenState = ( ( ( mDefaultDisplayState ) == ( android.view.Display.STATE_ON ) ) || ( mIsDevicePlugged ) ) ? com.android.internal.telephony.RIL.RADIO_SCREEN_ON : com.android.internal.telephony.RIL.RADIO_SCREEN_OFF ; if ( ( mRadioScreenState ) != oldState ) { if ( com.android.internal.telephony.RIL.RILJ_LOGV ) { riljLog ( ( ( ( "defaultDisplayState: " + ( mDefaultDisplayState ) ) + ", isDevicePlugged: " ) + ( mIsDevicePlugged ) ) ) ; } sendScreenState ( ( ( mRadioScreenState ) == ( com.android.internal.telephony.RIL.RADIO_SCREEN_ON ) ) ) ; } }

Target:
private void updateScreenState ( boolean forceUpdate ) { final int oldState = mRadioScreenState ; mRadioScreenState = ( ( ( mDefaultDisplayState ) == ( android.view.Display.STATE_ON ) ) || ( mIsDevicePlugged ) ) ? com.android.internal.telephony.RIL.RADIO_SCREEN_ON : com.android.internal.telephony.RIL.RADIO_SCREEN_OFF ; if ( ( ( mRadioScreenState ) != oldState ) || forceUpdate ) { if ( com.android.internal.telephony.RIL.RILJ_LOGV ) { riljLog ( ( ( ( "defaultDisplayState: " + ( mDefaultDisplayState ) ) + ", isDevicePlugged: " ) + ( mIsDevicePlugged ) ) ) ; } sendScreenState ( ( ( mRadioScreenState ) == ( com.android.internal.telephony.RIL.RADIO_SCREEN_ON ) ) ) ; } }
Source:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir getVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile getVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotFileException { com.android.sched.vfs.BaseVElement element = parent.getFromCache ( name ) ; if ( element != null ) { if ( ! ( element.isVDir ( ) ) ) { return ( ( com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile ) ( element ) ) ; } else { throw new com.android.sched.util.file.NotFileException ( getVFileLocation ( parent , name ) ) ; } } else { throw new com.android.sched.util.file.NoSuchFileException ( getVFileLocation ( parent , name ) ) ; } }
Source:
public static java.lang.String stringAddrFromLongAddr ( long addr ) { addr = ( java.lang.Long.reverseBytes ( addr ) ) > > 16 ; java.util.StringJoiner j = new java.util.StringJoiner ( ":" ) ; for ( int i = 0 ; i < ( android.net.MacAddress.ETHER_ADDR_LEN ) ; i ++ ) { j.add ( java.lang.Integer.toHexString ( ( ( byte ) ( addr ) ) ) ) ; addr = addr > > 8 ; } return j.toString ( ) ; }

Target:
private static java.lang.String stringAddrFromLongAddr ( long addr ) { return java.lang.String.format ( "%02x:%02x:%02x:%02x:%02x:%02x" , ( ( addr > > 40 ) & 255 ) , ( ( addr > > 32 ) & 255 ) , ( ( addr > > 24 ) & 255 ) , ( ( addr > > 16 ) & 255 ) , ( ( addr > > 8 ) & 255 ) , ( addr & 255 ) ) ; }
Source:
public void onCapabilities ( com.android.bips.jni.LocalPrinterCapabilities capabilities ) { if ( ( mSession.isDestroyed ( ) ) || ( ! ( mSession.isKnown ( mPrinterId ) ) ) ) return ; if ( capabilities == null ) { if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( "No capabilities so removing printer " + ( this ) ) ) ; mSession.removePrinters ( java.util.Collections.singletonList ( mPrinterId ) ) ; } else { mCapabilities = capabilities ; mSession.handlePrinter ( this ) ; } }

Target:
public void onCapabilities ( com.android.bips.discovery.DiscoveredPrinter printer , com.android.bips.jni.LocalPrinterCapabilities capabilities ) { if ( ( mSession.isDestroyed ( ) ) || ( ! ( mSession.isKnown ( mPrinterId ) ) ) ) return ; if ( capabilities == null ) { if ( com.android.bips.LocalPrinter.DEBUG ) android.util.Log.d ( com.android.bips.LocalPrinter.TAG , ( "No capabilities so removing printer " + ( this ) ) ) ; mSession.removePrinters ( java.util.Collections.singletonList ( mPrinterId ) ) ; } else { mCapabilities = capabilities ; mSession.handlePrinter ( this ) ; } }
Source:
public void onReliableWriteCompleted ( android.bluetooth.BluetoothGatt gatt , int status ) { if ( com.android.cts.verifier.bluetooth.BleClientService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleClientService.TAG , ( "onReliableWriteComplete: " + status ) ) ; if ( status == ( android.bluetooth.BluetoothGatt.GATT_SUCCESS ) ) { notifyReliableWriteCompleted ( ) ; } else { notifyError ( ( "Failed to complete reliable write: " + status ) ) ; } sleep ( 1000 ) ; mBluetoothGatt.disconnect ( ) ; }

Target:
public void onReliableWriteCompleted ( android.bluetooth.BluetoothGatt gatt , int status ) { if ( com.android.cts.verifier.bluetooth.BleClientService.DEBUG ) { android.util.Log.d ( com.android.cts.verifier.bluetooth.BleClientService.TAG , ( "onReliableWriteComplete: " + status ) ) ; } if ( ( mExecReliableWrite ) != ( com.android.cts.verifier.bluetooth.BleClientService.ReliableWriteState.RELIABLE_WRITE_NONE ) ) { if ( status == ( android.bluetooth.BluetoothGatt.GATT_SUCCESS ) ) { notifyReliableWriteCompleted ( ) ; } else { notifyError ( ( "Failed to complete reliable write: " + status ) ) ; } mExecReliableWrite = com.android.cts.verifier.bluetooth.BleClientService.ReliableWriteState.RELIABLE_WRITE_NONE ; } }
Source:
public void runCmdLine ( java.lang.String [ ] command ) throws java.io.IOException , java.lang.InterruptedException { java.lang.Process process = java.lang.Runtime.getRuntime ( ) . exec ( command ) ; if ( ( grabProcessOutput ( process ) ) != 0 ) { throw new java.lang.RuntimeException ( ) ; } }

Target:
public void runCmdLine ( java.lang.String [ ] command ) throws java.io.IOException , java.lang.InterruptedException { java.lang.Process process = java.lang.Runtime.getRuntime ( ) . exec ( command ) ; if ( ( grabProcessOutput ( process ) ) != 0 ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "running %s failed. see output" , command [ 0 ] ) ) ; } }
Source:
public com.android.jack.api.v01.Api01Compiler build ( ) throws com.android.jack.api.v01.ConfigurationException { com.android.sched.util.RunnableHooks configHooks = new com.android.sched.util.RunnableHooks ( ) ; try { com.android.jack.Jack.check ( options , configHooks ) ; } catch ( com.android.jack.api.v01.impl.com.android.sched e ) { throw new com.android.jack.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } catch ( com.android.jack.IllegalOptionsException e ) { throw new com.android.jack.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } return new com.android.jack.api.v01.impl.Api01ConfigImpl.Api01CompilerImpl ( options ) ; }

Target:
public com.android.jack.api.v01.Api01CompilationTask getTask ( ) throws com.android.jack.api.v01.ConfigurationException { com.android.sched.util.RunnableHooks configHooks = new com.android.sched.util.RunnableHooks ( ) ; try { com.android.jack.Jack.check ( options , configHooks ) ; } catch ( com.android.jack.api.v01.impl.com.android.sched e ) { throw new com.android.jack.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } catch ( com.android.jack.IllegalOptionsException e ) { throw new com.android.jack.api.v01.ConfigurationException ( e.getMessage ( ) , e ) ; } return new com.android.jack.api.v01.impl.Api01ConfigImpl.Api01CompilationTaskImpl ( options ) ; }
Source:
public java.lang.String getOriginalMimeType ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _getOriginalMimeType ( mUniqueId , path ) ; }

Target:
public java.lang.String getOriginalMimeType ( android.net.Uri uri ) { if ( ( null == uri ) || ( ( android.net.Uri.EMPTY ) == uri ) ) { throw new java.lang.IllegalArgumentException ( "Given uri is not valid" ) ; } return getOriginalMimeType ( convertUriToPath ( uri ) ) ; }
Source:
private void assertDeleted ( java.security.cert.X509Certificate x , java.lang.String alias ) { assertNull ( store.getCertificate ( alias ) ) ; assertFalse ( store.containsAlias ( alias ) ) ; assertNull ( store.getCertificateAlias ( x ) ) ; assertFalse ( store.isTrustAnchor ( x ) ) ; assertEquals ( store.allSystemAliases ( ) . contains ( alias ) , ( ( store.getCertificate ( alias , true ) ) != null ) ) ; }

Target:
private void assertDeleted ( java.security.cert.X509Certificate x , java.lang.String alias ) { assertNull ( store.getCertificate ( alias ) ) ; assertFalse ( store.containsAlias ( alias ) ) ; assertNull ( store.getCertificateAlias ( x ) ) ; assertNull ( store.getTrustAnchor ( x ) ) ; assertEquals ( store.allSystemAliases ( ) . contains ( alias ) , ( ( store.getCertificate ( alias , true ) ) != null ) ) ; }
Source:
public void TestQuotingLikeMessageFormat ( ) { java.lang.String pattern = "{0} don't can''t '{5}''}{a' again '}'{1} to the '{end" ; com.ibm.icu.impl.SimplePatternFormatter spf = com.ibm.icu.impl.SimplePatternFormatter.compile ( pattern ) ; com.ibm.icu.text.MessageFormat mf = new com.ibm.icu.text.MessageFormat ( pattern , com.ibm.icu.util.ULocale.ROOT ) ; java.lang.String expected = "X don't can't {5}'}{a again }Y to the {end" ; assertEquals ( "MessageFormat" , expected , mf.format ( new java.lang.Object [ ] { "X" , "Y" } ) ) ; assertEquals ( "SimplePatternFormatter" , expected , spf.format ( "X" , "Y" ) ) ; }

Target:
public void TestQuotingLikeMessageFormat ( ) { java.lang.String pattern = "{0} don't can''t '{5}''}{a' again '}'{1} to the '{end" ; com.ibm.icu.text.SimpleFormatter spf = com.ibm.icu.text.SimpleFormatter.compile ( pattern ) ; com.ibm.icu.text.MessageFormat mf = new com.ibm.icu.text.MessageFormat ( pattern , com.ibm.icu.util.ULocale.ROOT ) ; java.lang.String expected = "X don't can't {5}'}{a again }Y to the {end" ; assertEquals ( "MessageFormat" , expected , mf.format ( new java.lang.Object [ ] { "X" , "Y" } ) ) ; assertEquals ( "SimpleFormatter" , expected , spf.format ( "X" , "Y" ) ) ; }
Source:
private void onGetReport ( byte [ ] address , byte [ ] report , int rptSize ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , "onGetReport()" ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_ON_GET_REPORT ) ; msg.obj = address ; android.os.Bundle data = new android.os.Bundle ( ) ; data.putByteArray ( BluetoothInputDevice.EXTRA_REPORT , report ) ; data.putInt ( BluetoothInputDevice.EXTRA_REPORT_BUFFER_SIZE , rptSize ) ; msg.setData ( data ) ; mHandler.sendMessage ( msg ) ; }

Target:
private void onGetReport ( byte [ ] address , byte [ ] report , int rptSize ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , "onGetReport()" ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_ON_GET_REPORT ) ; msg.obj = address ; android.os.Bundle data = new android.os.Bundle ( ) ; data.putByteArray ( BluetoothHidHost.EXTRA_REPORT , report ) ; data.putInt ( BluetoothHidHost.EXTRA_REPORT_BUFFER_SIZE , rptSize ) ; msg.setData ( data ) ; mHandler.sendMessage ( msg ) ; }
Source:
public static java.util.List < org.jetbrains.plugins.github.api.GithubRepo > getAvailableRepos ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.api.GithubAuthData auth ) throws java.io.IOException { return org.jetbrains.plugins.github.api.GithubApiUtil.doGetAvailableRepos ( auth , null ) ; }

Target:
public static java.util.List < org.jetbrains.plugins.github.api.GithubRepo > getUserRepos ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.util.GithubAuthData auth ) throws java.io.IOException { java.lang.String path = "/user/repos?" + ( org.jetbrains.plugins.github.api.GithubApiUtil.PER_PAGE ) ; org.jetbrains.plugins.github.api.GithubApiUtil.PagedRequest < org.jetbrains.plugins.github.api.GithubRepo > request = new org.jetbrains.plugins.github.api.GithubApiUtil.PagedRequest < org.jetbrains.plugins.github.api.GithubRepo > ( path , org.jetbrains.plugins.github.api.GithubRepo.class , org.jetbrains.plugins.github.api.GithubRepoRaw [ ] . class ) ; return request.getAll ( auth ) ; }
Source:
private static java.lang.String computeVersionLessCoordinateKey ( @ com.android.annotations.NonNull com.android.builder.model.MavenCoordinates coord ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( coord.getGroupId ( ) ) ; sb.append ( ':' ) . append ( coord.getArtifactId ( ) ) ; if ( ( coord.getClassifier ( ) ) != null ) { sb.append ( ':' ) . append ( coord.getClassifier ( ) ) ; } return sb.toString ( ) ; }

Target:
private static java.lang.String computeVersionLessCoordinateKey ( @ com.android.annotations.NonNull com.android.builder.model.MavenCoordinates coordinates ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( coordinates.getGroupId ( ) ) ; sb.append ( ':' ) . append ( coordinates.getArtifactId ( ) ) ; if ( ( coordinates.getClassifier ( ) ) != null ) { sb.append ( ':' ) . append ( coordinates.getClassifier ( ) ) ; } return sb.toString ( ) ; }
Source:
public void out ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.verbose ( line ) ; if ( line.equalsIgnoreCase ( "Done" ) ) { mOwner.reset ( ) ; mJob.finished ( ) ; } else if ( line.equalsIgnoreCase ( "Error" ) ) { mOwner.reset ( ) ; mJob.error ( ) ; } } }

Target:
public void out ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.verbose ( "AAPT notify(%1$s): %2$s" , mJob , line ) ; if ( line.equalsIgnoreCase ( "Done" ) ) { mOwner.reset ( ) ; mJob.finished ( ) ; } else if ( line.equalsIgnoreCase ( "Error" ) ) { mOwner.reset ( ) ; mJob.error ( ) ; } else { mLogger.verbose ( "AAPT(%1$s) discarded: %2$s" , mJob , line ) ; } } }
Source:
public static void expectDivisionByZero ( long value ) { try { Main.$opt$Div ( value , 0L ) ; throw new java.lang.Error ( "Expected RuntimeException when dividing by 0" ) ; } catch ( java.lang.RuntimeException e ) { } try { Main.$opt$DivZero ( value ) ; throw new java.lang.Error ( "Expected RuntimeException when dividing by 0" ) ; } catch ( java.lang.RuntimeException e ) { } }

Target:
public static void expectDivisionByZero ( long value ) { try { DivTest.$opt$Div ( value , 0L ) ; throw new java.lang.Error ( "Expected RuntimeException when dividing by 0" ) ; } catch ( java.lang.RuntimeException e ) { } try { DivTest.$opt$DivZero ( value ) ; throw new java.lang.Error ( "Expected RuntimeException when dividing by 0" ) ; } catch ( java.lang.RuntimeException e ) { } }
Source:
private static boolean isIdent ( java.lang.String token ) { return com.android.tools.metalava.doclava1.ApiFile.isident ( token.charAt ( 0 ) ) ; }

Target:
private static void assertIdent ( com.android.tools.metalava.doclava1.ApiFile.Tokenizer tokenizer , java.lang.String token ) throws com.android.tools.metalava.doclava1.ApiParseException { if ( ! ( com.android.tools.metalava.doclava1.ApiFile.isIdent ( token.charAt ( 0 ) ) ) ) { throw new com.android.tools.metalava.doclava1.ApiParseException ( ( "Expected identifier: " + token ) , tokenizer.getLine ( ) ) ; } }
Source:
public int compareTo ( com.android.sdklib.ISystemImage other ) { return this . getAbiType ( ) . compareToIgnoreCase ( other.getAbiType ( ) ) ; }

Target:
public int compareTo ( com.android.sdklib.ISystemImage other ) { int t = this . getTag ( ) . compareTo ( other.getTag ( ) ) ; if ( t != 0 ) { return t ; } return this . getAbiType ( ) . compareToIgnoreCase ( other.getAbiType ( ) ) ; }
Source:
final void constructorPutAll ( java.util.Map < ? extends K , ? extends V > map ) { for ( java.util.Map.Entry < ? extends K , ? extends V > e : map.entrySet ( ) ) { constructorPut ( e.getKey ( ) , e.getValue ( ) ) ; } }

Target:
final void constructorPutAll ( java.util.Map < ? extends K , ? extends V > map ) { if ( ( table ) == ( java.util.HashMap.EMPTY_TABLE ) ) { doubleCapacity ( ) ; } for ( java.util.Map.Entry < ? extends K , ? extends V > e : map.entrySet ( ) ) { constructorPut ( e.getKey ( ) , e.getValue ( ) ) ; } }
Source:
public void socketpair ( int domain , int type , int protocol , java.io.FileDescriptor fd1 , java.io.FileDescriptor fd2 ) throws android.system.ErrnoException { os.socketpair ( domain , type , protocol , fd1 , fd2 ) ; tagSocket ( fd1 ) ; tagSocket ( fd2 ) ; }

Target:
public void socketpair ( int domain , int type , int protocol , java.io.FileDescriptor fd1 , java.io.FileDescriptor fd2 ) throws android.system.ErrnoException { os.socketpair ( domain , type , protocol , fd1 , fd2 ) ; if ( ( domain != ( AF_UNIX ) ) && ( domain != ( AF_NETLINK ) ) ) { tagSocket ( fd1 ) ; tagSocket ( fd2 ) ; } }
Source:
private static < T > com.android.build.gradle.tasks.Set < T > removeAllNullEntries ( com.android.build.gradle.tasks.Set < T > input ) { com.android.build.gradle.tasks.HashSet < T > output = new com.android.build.gradle.tasks.HashSet < T > ( ) ; for ( T element : input ) { if ( element != null ) { output.add ( element ) ; } } return output ; }

Target:
public java.lang.String call ( ) throws java.lang.Exception { return variantOutputData.getMainOutputFile ( ) . getFilter ( com.android.build.OutputFile.DENSITY ) ; }
Source:
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 ) ; }

Target:
private static android.telephony.data.DataCallResponse createDataCallResponse ( ) throws java.lang.Exception { return new android.telephony.data.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , java.util.Arrays.asList ( new android.telephony.data.InterfaceAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_ADDRESS , 0 ) ) , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS ) ) , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY ) ) , java.util.Arrays.asList ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS ) , 1440 ) ; }
Source:
protected void verifyResources ( com.android.builder.resources.ResourceSet resourceSet , java.lang.String ... resourceKeys ) { java.util.Map < java.lang.String , com.android.builder.resources.Resource > map = resourceSet.getResourceMap ( ) ; for ( java.lang.String res : resourceKeys ) { assertNotNull ( ( ( "resource '" + res ) + "' is missing!" ) , map.get ( res ) ) ; } }

Target:
protected void verifyResourceExists ( com.android.builder.resources.ResourceMap resourceMap , java.lang.String ... resourceKeys ) { com.google.common.collect.ListMultimap < java.lang.String , com.android.builder.resources.Resource > map = resourceMap.getResourceMap ( ) ; for ( java.lang.String resKey : resourceKeys ) { java.util.List < com.android.builder.resources.Resource > resources = map.get ( resKey ) ; assertTrue ( ( ( "resource '" + resKey ) + "' is missing!" ) , ( ( resources.size ( ) ) > 0 ) ) ; } }
Source:
private void updateDialAndDeleteButtonStateEnabledAttr ( ) { final boolean notEmpty = ( mDigits.length ( ) ) != 0 ; mDelete.setEnabled ( notEmpty ) ; }

Target:
private void updateTtsSpans ( ) { for ( java.lang.Object o : mDigits.getText ( ) . getSpans ( 0 , mDigits.getText ( ) . length ( ) , android.text.style.TtsSpan.class ) ) { mDigits.getText ( ) . removeSpan ( o ) ; } android.telephony.PhoneNumberUtils.ttsSpanAsPhoneNumber ( mDigits.getText ( ) , 0 , mDigits.getText ( ) . length ( ) ) ; }
Source:
public boolean remove ( java.lang.Object o ) { java.lang.Object [ ] snapshot = getArray ( ) ; int index = java.util.concurrent.CopyOnWriteArrayList.indexOf ( o , snapshot , 0 , snapshot.length ) ; return index < 0 ? false : remove ( o , snapshot , index ) ; }

Target:
public java.util.ListIterator < E > listIterator ( int index ) { java.lang.Object [ ] snapshot = elements ; if ( ( index < 0 ) || ( index > ( snapshot.length ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "index=" + index ) + ", length=" ) + ( snapshot.length ) ) ) ; } java.util.concurrent.CopyOnWriteArrayList.CowIterator < E > result = new java.util.concurrent.CopyOnWriteArrayList.CowIterator < E > ( snapshot , 0 , snapshot.length ) ; result.index = index ; return result ; }
Source:
public void testNoMerging ( ) throws java.lang.Exception { java.io.File master = getProjectDir ( "MasterProject" , "multiproject/main-manifest.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "/TESTROOT/UnusedResourceDetectorTest_testNoMerging/LibraryProject/res/values/strings.xml:7: Warning: The resource R.string.string3 appears to be unused [UnusedResources]\n" + ( ( " <string name=\"string3\">String 3</string>\n" + " ~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }

Target:
public void testNoMerging ( ) throws java.lang.Exception { java.io.File master = getProjectDir ( "MasterProject" , "multiproject/main-manifest.xml=>AndroidManifest.xml" , "multiproject/main.properties=>project.properties" , "multiproject/MainCode.java.txt=>src/foo/main/MainCode.java" ) ; java.io.File library = getProjectDir ( "LibraryProject" , "multiproject/library-manifest.xml=>AndroidManifest.xml" , "multiproject/library.properties=>project.properties" , "multiproject/LibraryCode.java.txt=>src/foo/library/LibraryCode.java" , "multiproject/strings.xml=>res/values/strings.xml" ) ; assertEquals ( ( "/TESTROOT/LibraryProject/res/values/strings.xml:7: Warning: The resource R.string.string3 appears to be unused [UnusedResources]\n" + ( ( " <string name=\"string3\">String 3</string>\n" + " ~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , checkLint ( java.util.Arrays.asList ( master , library ) ) ) ; }
Source:
public boolean requestIcon ( java.lang.String bssid , java.lang.String fileName ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.initiateHs20IconQuery ( bssid , fileName ) ; } else { java.lang.String result = doStringCommand ( ( ( ( "REQ_HS20_ICON " + bssid ) + " " ) + fileName ) ) ; return ( result != null ) && ( result.startsWith ( "OK" ) ) ; } }

Target:
public boolean requestIcon ( java.lang.String bssid , java.lang.String fileName ) { if ( ( bssid == null ) || ( fileName == null ) ) { android.util.Log.e ( mTAG , "Invalid arguments for Icon request." ) ; return false ; } return mSupplicantStaIfaceHal.initiateHs20IconQuery ( bssid , fileName ) ; }
Source:
private android.database.Cursor getSingleMessageFromSim ( java.lang.String messageIndexString ) { try { int messageIndex = java.lang.Integer.parseInt ( messageIndexString ) ; android.telephony.gsm.SmsManager smsManager = android.telephony.gsm.SmsManager.getDefault ( ) ; java.util.ArrayList < android.telephony.gsm.SmsMessage > messages = smsManager.getAllMessagesFromSim ( ) ; java.util.ArrayList < java.util.ArrayList > singleRow = new java.util.ArrayList < java.util.ArrayList > ( ) ; singleRow.add ( convertSimToSms ( messages.get ( messageIndex ) ) ) ; return withSimNotificationUri ( new com.android.internal.database.ArrayListCursor ( com.android.providers.telephony.SmsProvider.SIM_COLUMNS , singleRow ) ) ; } catch ( java.lang.NumberFormatException exception ) { throw new java.lang.IllegalArgumentException ( ( "Bad SMS SIM ID: " + messageIndexString ) ) ; } }

Target:
private android.database.Cursor getSingleMessageFromIcc ( java.lang.String messageIndexString ) { try { int messageIndex = java.lang.Integer.parseInt ( messageIndexString ) ; android.telephony.SmsManager smsManager = android.telephony.SmsManager.getDefault ( ) ; java.util.ArrayList < android.telephony.SmsMessage > messages = smsManager.getAllMessagesFromIcc ( ) ; java.util.ArrayList < java.util.ArrayList > singleRow = new java.util.ArrayList < java.util.ArrayList > ( ) ; singleRow.add ( convertIccToSms ( messages.get ( messageIndex ) ) ) ; return withIccNotificationUri ( new com.android.internal.database.ArrayListCursor ( com.android.providers.telephony.SmsProvider.ICC_COLUMNS , singleRow ) ) ; } catch ( java.lang.NumberFormatException exception ) { throw new java.lang.IllegalArgumentException ( ( "Bad SMS ICC ID: " + messageIndexString ) ) ; } }
Source:
public boolean isVideoTelephonyAvailable ( ) { try { return getITelephony ( ) . isVideoTelephonyAvailable ( ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
public void setRadioIndicationUpdateMode ( @ android.telephony.TelephonyManager.IndicationFilters int filters , @ android.telephony.TelephonyManager.IndicationUpdateMode int updateMode ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { telephony.setRadioIndicationUpdateMode ( getSubId ( ) , filters , updateMode ) ; } } catch ( android.os.RemoteException ex ) { if ( ! ( isSystemProcess ( ) ) ) { ex.rethrowAsRuntimeException ( ) ; } } }
Source:
public static int EqualFalseLhs ( boolean arg ) { return false != arg ? 3 : 5 ; }

Target:
public static java.lang.String shortToCharToBytePrint ( short value ) { char c = ( ( char ) ( value ) ) ; byte b = ( ( byte ) ( c ) ) ; return ( ( "c=" + ( ( int ) ( c ) ) ) + ", b=" ) + ( ( int ) ( b ) ) ; }
Source:
public void pcoData ( int indicationType , android.hardware.radio.V1_0.PcoDataInfo var2 ) { }

Target:
public void pcoData ( int indicationType , android.hardware.radio.V1_0.PcoDataInfo pco ) { mRil.processIndication ( indicationType ) ; android.telephony.PcoData response = new android.telephony.PcoData ( pco.cid , pco.bearerProto , pco.pcoId , com.android.internal.telephony.RIL.arrayListToPrimitiveArray ( pco.contents ) ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_PCO_DATA , response ) ; mRil.mPcoDataRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }