auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext testSSLContext = createDefaultTestSSLContext ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; com.google.mockwebserver.MockResponse badProxyResponse = new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ; server.enqueue ( badProxyResponse ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "response" ) ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; connection.setHostnameVerifier ( new libcore.java.net.URLConnectionTest.RecordingHostnameVerifier ( ) ) ; assertContent ( "response" , connection ) ; com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; assertEquals ( "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com:443" ) ; }

Target:
public void testConnectViaHttpProxyToHttpsUsingBadProxyAndHttpResponseCache ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLContext testSSLContext = createDefaultTestSSLContext ( ) ; initResponseCache ( ) ; server.useHttps ( testSSLContext.serverContext.getSocketFactory ( ) , true ) ; com.google.mockwebserver.MockResponse badProxyResponse = new com.google.mockwebserver.MockResponse ( ) . setSocketPolicy ( SocketPolicy.UPGRADE_TO_SSL_AT_END ) . clearHeaders ( ) . setBody ( "bogus proxy connect response content" ) ; server.enqueue ( badProxyResponse ) ; server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "response" ) ) ; server.play ( ) ; java.net.URL url = new java.net.URL ( "https://android.com/foo" ) ; libcore.java.net.URLConnectionTest.ProxyConfig proxyConfig = libcore.java.net.URLConnectionTest.ProxyConfig.PROXY_SYSTEM_PROPERTY ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( proxyConfig.connect ( server , url ) ) ) ; connection.setSSLSocketFactory ( testSSLContext.clientContext.getSocketFactory ( ) ) ; connection.setHostnameVerifier ( new libcore.java.net.URLConnectionTest.RecordingHostnameVerifier ( ) ) ; assertContent ( "response" , connection ) ; com.google.mockwebserver.RecordedRequest connect = server.takeRequest ( ) ; org.junit.Assert.assertEquals ( "CONNECT android.com:443 HTTP/1.1" , connect.getRequestLine ( ) ) ; assertContains ( connect.getHeaders ( ) , "Host: android.com:443" ) ; }
Source:
public void addObj ( android.renderscript.BaseObj obj ) { if ( obj != null ) { addI32 ( ( ( int ) ( obj.getID ( null ) ) ) ) ; } else { addI32 ( 0 ) ; } }

Target:
public void addObj ( android.renderscript.BaseObj obj ) { if ( obj != null ) { if ( ( RenderScript.sPointerSize ) == 8 ) { addI64 ( obj.getID ( null ) ) ; } else { addI32 ( ( ( int ) ( obj.getID ( null ) ) ) ) ; } } else { if ( ( RenderScript.sPointerSize ) == 8 ) { addI64 ( 0 ) ; } else { addI32 ( 0 ) ; } } }
Source:
public int setProvisionedValue ( int item , int value ) throws android.os.RemoteException { return ImsConfig.OperationStatusConstants.FAILED ; }

Target:
public synchronized java.lang.String getProvisionedStringValue ( int item ) throws android.os.RemoteException { if ( mProvisionedIntValue.containsKey ( item ) ) { return mProvisionedStringValue.get ( item ) ; } else { java.lang.String retVal = getImsConfigImpl ( ) . getProvisionedStringValue ( item ) ; if ( retVal != null ) { updateCachedValue ( item , retVal , false ) ; } return retVal ; } }
Source:
public void test_SSLContext_init ( ) throws java.lang.Exception { for ( java.lang.String protocol : libcore.java.security.StandardNames.SSL_CONTEXT_PROTOCOLS ) { javax.net.ssl.SSLContext sslContext = javax.net.ssl.SSLContext.getInstance ( protocol ) ; if ( protocol.equals ( StandardNames.SSL_CONTEXT_PROTOCOLS_DEFAULT ) ) { try { sslContext.init ( null , null , null ) ; } catch ( java.security.KeyManagementException expected ) { } } else { sslContext.init ( null , null , null ) ; } } }

Target:
public void test_SSLContext_init_withNullManagerArrays ( ) throws java.lang.Exception { for ( java.lang.String protocol : libcore.java.security.StandardNames.SSL_CONTEXT_PROTOCOLS ) { if ( protocol.equals ( StandardNames.SSL_CONTEXT_PROTOCOLS_DEFAULT ) ) { continue ; } javax.net.ssl.SSLContext sslContext = javax.net.ssl.SSLContext.getInstance ( protocol ) ; sslContext.init ( null , null , null ) ; } }
Source:
protected void finalize ( ) { cleanup ( ) ; if ( com.android.bluetooth.btservice.AdapterService.TRACE_REF ) { synchronized ( com.android.bluetooth.btservice.AdapterService.class ) { ( com.android.bluetooth.btservice.AdapterService.sRefCount ) -- ; debugLog ( ( "finalize() - REFCOUNT: FINALIZED. INSTANCE_COUNT= " + ( com.android.bluetooth.btservice.AdapterService.sRefCount ) ) ) ; } } }

Target:
protected void finalize ( ) { debugLog ( ( "finalize() - clean up object " + ( this ) ) ) ; cleanup ( ) ; if ( com.android.bluetooth.btservice.AdapterService.TRACE_REF ) { synchronized ( com.android.bluetooth.btservice.AdapterService.class ) { ( com.android.bluetooth.btservice.AdapterService.sRefCount ) -- ; debugLog ( ( "finalize() - REFCOUNT: FINALIZED. INSTANCE_COUNT= " + ( com.android.bluetooth.btservice.AdapterService.sRefCount ) ) ) ; } } }
Source:
public static final double previousDouble ( double value ) { if ( value == ( java.lang.Double.NEGATIVE_INFINITY ) ) { return value ; } long bits ; if ( value == 0 ) { bits = - 9223372036854775808L ; } else { bits = java.lang.Double.doubleToLongBits ( value ) ; } return java.lang.Double.longBitsToDouble ( ( value <= 0 ? bits + 1 : bits - 1 ) ) ; }

Target:
public static final double previousDouble ( double value ) { return java.lang.Math.nextAfter ( value , java.lang.Double.NEGATIVE_INFINITY ) ; }
Source:
public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel ( int subId , java.lang.String AID ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccOpenLogicalChannel ( subId , AID ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }

Target:
public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel ( int subId , java.lang.String AID , int p2 ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccOpenLogicalChannel ( subId , AID , p2 ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }
Source:
public boolean appliesTo ( @ com.android.annotations.NonNull com.android.resources.ResourceFolderType folderType ) { return ( ( ( ( ( folderType == ( com.android.resources.ResourceFolderType.LAYOUT ) ) || ( folderType == ( com.android.resources.ResourceFolderType.MENU ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.ANIMATOR ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.ANIMATOR ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.DRAWABLE ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.COLOR ) ) ; }

Target:
public boolean appliesTo ( @ com.android.annotations.NonNull com.android.resources.ResourceFolderType folderType ) { return ( ( ( ( ( folderType == ( com.android.resources.ResourceFolderType.LAYOUT ) ) || ( folderType == ( com.android.resources.ResourceFolderType.MENU ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.ANIM ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.ANIMATOR ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.DRAWABLE ) ) ) || ( folderType == ( com.android.resources.ResourceFolderType.COLOR ) ) ; }
Source:
public com.android.sched.vfs.InputOutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { final com.android.sched.vfs.InputOutputZipVFS vDir = new com.android.sched.vfs.InputOutputZipVFS ( new com.android.sched.util.file.OutputZipFile ( string , hooks , existence , change ) ) ; return vDir ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.InputOutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { final com.android.sched.vfs.ReadWriteZipFS vfs = new com.android.sched.vfs.ReadWriteZipFS ( new com.android.sched.util.file.OutputZipFile ( string , hooks , existence , change ) ) ; return new com.android.sched.vfs.GenericInputOutputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
private void resetMocks ( ) { org.mockito.Mockito.reset ( mockAudioManager , mockBluetoothManager , mockCallsManager , mockConnectionServiceWrapper ) ; org.mockito.Mockito.when ( mockCallsManager.getForegroundCall ( ) ) . thenReturn ( fakeCall ) ; org.mockito.Mockito.doNothing ( ) . when ( mockConnectionServiceWrapper ) . onCallAudioStateChanged ( org.mockito.Matchers.any ( com.android.server.telecom.Call.class ) , org.mockito.Matchers.any ( android.telecom.CallAudioState.class ) ) ; }

Target:
private void resetMocks ( ) { org.mockito.Mockito.reset ( mockAudioManager , mockBluetoothManager , mockCallsManager , mockConnectionServiceWrapper ) ; org.mockito.Mockito.when ( mockCallsManager.getForegroundCall ( ) ) . thenReturn ( fakeCall ) ; org.mockito.Mockito.when ( mockCallsManager.getLock ( ) ) . thenReturn ( mLock ) ; org.mockito.Mockito.doNothing ( ) . when ( mockConnectionServiceWrapper ) . onCallAudioStateChanged ( org.mockito.Matchers.any ( com.android.server.telecom.Call.class ) , org.mockito.Matchers.any ( android.telecom.CallAudioState.class ) ) ; }
Source:
public void flushPendingBatchResults ( int appIf , boolean isServer ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.flushPendingBatchResults ( appIf , isServer ) ; }

Target:
public void startScan ( int scannerId , android.bluetooth.le.ScanSettings settings , java.util.List < android.bluetooth.le.ScanFilter > filters , android.os.WorkSource workSource , java.util.List storages , java.lang.String callingPackage ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.startScan ( scannerId , settings , filters , workSource , storages , callingPackage ) ; }
Source:
public void testProcessChldReleaseActiveRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( ringingCall ) , org.mockito.Matchers.any ( int . class ) ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldReleaseActiveHold ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call heldCall = createHeldCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . unholdCall ( org.mockito.Matchers.eq ( heldCall ) ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
private static void startTimer ( ) { synchronized ( com.android.jack.server.Server.lockTimer ) { if ( ( com.android.jack.server.Server.timer ) != null ) { com.android.jack.server.Server.cancelTimer ( ) ; } com.android.jack.server.Server.logger.log ( java.util.logging.Level.INFO , "Start timer" ) ; com.android.jack.server.Server.timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( com.android.jack.server.Server.timer ) != null ; com.android.jack.server.Server.timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { com.android.jack.server.Server.shutdownFifo ( ) ; com.android.jack.server.Server.cancelTimer ( ) ; } } , com.android.jack.server.Server.timeout ) ; } }

Target:
private static void cancelTimer ( ) { synchronized ( com.android.jack.server.Server.lockTimer ) { if ( ( com.android.jack.server.Server.timer ) != null ) { com.android.jack.server.Server.logger.log ( java.util.logging.Level.FINE , "Cancel timer" ) ; com.android.jack.server.Server.timer.cancel ( ) ; com.android.jack.server.Server.timer.purge ( ) ; com.android.jack.server.Server.timer = null ; } } }
Source:
public void testAesCbcHmacSha384Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1000 , false ) ; }
Source:
private java.lang.CharSequence getDialerTos ( ) { if ( ! ( isVoicemailTranscriptionEnabled ( ) ) ) { return "" ; } return useSpanish ( ) ? context.getString ( R.string.dialer_terms_and_conditions_1_0_spanish ) : context.getString ( R.string.dialer_terms_and_conditions_1_0_english ) ; }

Target:
private java.lang.CharSequence getDialerTos ( ) { if ( ! ( isVoicemailTranscriptionEnabled ( ) ) ) { return "" ; } java.lang.String learnMoreText = context.getString ( R.string.dialer_terms_and_conditions_learn_more ) ; return isVvm3 ( ) ? context.getString ( R.string.dialer_terms_and_conditions_for_verizon_1_0 , learnMoreText ) : context.getString ( R.string.dialer_terms_and_conditions_1_0 , learnMoreText ) ; }
Source:
public void test_SSLEngine_setEnableSessionCreation_server ( ) throws java.lang.Exception { try { libcore.javax.net.ssl.TestSSLEnginePair p = libcore.javax.net.ssl.TestSSLEnginePair.create ( new libcore.javax.net.ssl.TestSSLEnginePair.Hooks ( ) { @ java.lang.Override void beforeBeginHandshake ( javax.net.ssl.SSLEngine client , javax.net.ssl.SSLEngine server ) { server.setEnableSessionCreation ( false ) ; } } ) ; assertTrue ( StandardNames.IS_RI ) ; assertNotConnected ( p ) ; } catch ( javax.net.ssl.SSLException maybeExpected ) { assertFalse ( StandardNames.IS_RI ) ; } }

Target:
public void test_SSLEngine_setEnableSessionCreation_server ( ) throws java.lang.Exception { libcore.javax.net.ssl.TestSSLEnginePair p = null ; try { p = libcore.javax.net.ssl.TestSSLEnginePair.create ( new libcore.javax.net.ssl.TestSSLEnginePair.Hooks ( ) { @ java.lang.Override void beforeBeginHandshake ( javax.net.ssl.SSLEngine client , javax.net.ssl.SSLEngine server ) { server.setEnableSessionCreation ( false ) ; } } ) ; assertTrue ( StandardNames.IS_RI ) ; assertNotConnected ( p ) ; } catch ( javax.net.ssl.SSLException maybeExpected ) { assertFalse ( StandardNames.IS_RI ) ; } finally { if ( p != null ) { p.close ( ) ; } } }
Source:
public static int fromKeymaster ( int mode ) { switch ( mode ) { case android.security.keymaster.KeymasterDefs.KM_MODE_ECB : return android.security.KeyStoreKeyConstraints.BlockMode.ECB ; case android.security.keymaster.KeymasterDefs.KM_MODE_CBC : return android.security.KeyStoreKeyConstraints.BlockMode.CBC ; case android.security.keymaster.KeymasterDefs.KM_MODE_CTR : return android.security.KeyStoreKeyConstraints.BlockMode.CTR ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown block mode: " + mode ) ) ; } }

Target:
public static int fromKeymaster ( int mode ) { switch ( mode ) { case android.security.keymaster.KeymasterDefs.KM_MODE_ECB : return android.security.KeyStoreKeyConstraints.BlockMode.ECB ; case android.security.keymaster.KeymasterDefs.KM_MODE_CBC : return android.security.KeyStoreKeyConstraints.BlockMode.CBC ; case android.security.keymaster.KeymasterDefs.KM_MODE_CTR : return android.security.KeyStoreKeyConstraints.BlockMode.CTR ; case android.security.keymaster.KeymasterDefs.KM_MODE_GCM : return android.security.KeyStoreKeyConstraints.BlockMode.GCM ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown block mode: " + mode ) ) ; } }
Source:
public boolean cancelDiscovery ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return false ; try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.cancelDiscovery ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return false ; }

Target:
public void setDiscoverableTimeout ( int timeout ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) mService.setDiscoverableTimeout ( timeout ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } }
Source:
synchronized boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return reportErrorNative ( error ) ; }

Target:
synchronized boolean disconnect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "disconnect(): device=" + device ) ) ; } if ( ! ( checkDevice ( device ) ) ) { return false ; } return mHidDeviceNativeInterface.disconnect ( ) ; }
Source:
public static void computeNativePowr ( android.renderscript.cts.TestNativePowr.ArgumentsFloatFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 32000 , 32000 , true ) ; if ( ( java.lang.Math.abs ( args.inV ) ) < 1.0E-20 ) { args.out = android.renderscript.cts.CoreMathVerifier.any32 ( t ) ; } else { args.out = android.renderscript.cts.CoreMathVerifier.powr ( args.inV , args.inY , t ) ; } }

Target:
public static void computeNativeRsqrt ( android.renderscript.cts.TestNativeRsqrt.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( android.renderscript.cts.CoreMathVerifier.NATIVE_PRECISION , android.renderscript.cts.CoreMathVerifier.NATIVE_PRECISION , true ) ; args.out = android.renderscript.cts.CoreMathVerifier.rsqrt ( args.inV , t ) ; }
Source:
public static java.lang.String formatProgressText ( long totalBytes , long currentBytes ) { if ( totalBytes <= 0 ) { return "0%" ; } long progress = ( currentBytes * 100 ) / totalBytes ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( progress ) ; sb.append ( '%' ) ; return sb.toString ( ) ; }

Target:
static boolean isSameOrSubDirectory ( java.io.File base , java.io.File child ) { try { base = base.getCanonicalFile ( ) ; child = child.getCanonicalFile ( ) ; java.io.File parentFile = child ; while ( parentFile != null ) { if ( base.equals ( parentFile ) ) { return true ; } parentFile = parentFile.getParentFile ( ) ; } return false ; } catch ( java.io.IOException ex ) { android.util.Log.e ( com.android.bluetooth.opp.BluetoothOppUtility.TAG , "Error while accessing file" , ex ) ; return false ; } }
Source:
public void recommendation_noScans_returnsCurrentConfig ( ) throws java.lang.Exception { android.net.wifi.ScanResult [ ] scanResults = new android.net.wifi.ScanResult [ 0 ] ; android.net.wifi.WifiConfiguration expectedConfig = new android.net.wifi.WifiConfiguration ( ) ; expectedConfig.SSID = "ssid" ; expectedConfig.BSSID = "bssid" ; android.net.RecommendationRequest request = new android.net.RecommendationRequest.Builder ( ) . setScanResults ( scanResults ) . setNetworkCapabilities ( new android.net.NetworkCapabilities ( ) . removeCapability ( NetworkCapabilities.NET_CAPABILITY_TRUSTED ) ) . setCurrentRecommendedWifiConfig ( expectedConfig ) . build ( ) ; android.net.RecommendationResult result = verifyAndCaptureResult ( request ) ; org.junit.Assert.assertEquals ( expectedConfig , result.getWifiConfiguration ( ) ) ; }

Target:
public void recommendation_noScans_returnsCurrentConfig ( ) throws java.lang.Exception { android.net.wifi.ScanResult [ ] scanResults = new android.net.wifi.ScanResult [ 0 ] ; android.net.wifi.WifiConfiguration expectedConfig = new android.net.wifi.WifiConfiguration ( ) ; expectedConfig.SSID = "ssid" ; expectedConfig.BSSID = "bssid" ; android.net.RecommendationRequest request = new android.net.RecommendationRequest.Builder ( ) . setScanResults ( scanResults ) . setDefaultWifiConfig ( expectedConfig ) . build ( ) ; android.net.RecommendationResult result = verifyAndCaptureResult ( request ) ; org.junit.Assert.assertEquals ( expectedConfig , result.getWifiConfiguration ( ) ) ; }
Source:
public void onAvailable ( android.net.Network network ) { try { mStartTime = ( java.lang.System.currentTimeMillis ( ) ) - ( mTolerance ) ; exerciseRemoteHost ( network ) ; mEndTime = ( java.lang.System.currentTimeMillis ( ) ) + ( mTolerance ) ; success = true ; synchronized ( this ) { this . notify ( ) ; } } catch ( java.lang.Exception e ) { android.util.Log.w ( android.app.usage.cts.NetworkUsageStatsTest.LOG_TAG , "exercising remote host failed." , e ) ; success = false ; } }

Target:
public void onAvailable ( android.net.Network network ) { try { mStartTime = ( java.lang.System.currentTimeMillis ( ) ) - ( mTolerance ) ; exerciseRemoteHost ( network , mUrl ) ; mEndTime = ( java.lang.System.currentTimeMillis ( ) ) + ( mTolerance ) ; success = true ; synchronized ( this ) { this . notify ( ) ; } } catch ( java.lang.Exception e ) { android.util.Log.w ( android.app.usage.cts.NetworkUsageStatsTest.LOG_TAG , "exercising remote host failed." , e ) ; success = false ; } }
Source:
public void tearDown ( ) throws java.lang.Exception { if ( ( videoView ) != null ) { getHelper ( ) . cleanUpView ( videoView ) ; } if ( ( videoViewFactory ) != null ) { videoViewFactory.release ( ) ; } super . tearDown ( ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( ( player ) != null ) { player.release ( ) ; } if ( ( videoView ) != null ) { getHelper ( ) . cleanUpView ( videoView ) ; } if ( ( videoViewFactory ) != null ) { videoViewFactory.release ( ) ; } super . tearDown ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; Main.testEnvironment ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; Main.testEnvironment ( ) ; Main.testNewStringObject ( ) ; }
Source:
public void testSendUuidIntent ( ) { mRemoteDevices.updateUuids ( mDevice1 ) ; if ( ( android.os.Looper.myLooper ( ) ) != null ) { android.os.Looper.myLooper ( ) . quitSafely ( ) ; } android.os.Looper.loop ( ) ; verify ( mAdapterService ) . sendBroadcast ( any ( ) , anyString ( ) ) ; verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void testSendUuidIntent ( ) { com.android.bluetooth.btservice.RemoteDevicesTest.MyAdapterSvc m = new com.android.bluetooth.btservice.RemoteDevicesTest.MyAdapterSvc ( ) ; com.android.bluetooth.btservice.RemoteDevices instance = new com.android.bluetooth.btservice.RemoteDevices ( m ) ; instance.updateUuids ( mDevice1 ) ; android.os.Looper.loop ( ) ; org.junit.Assert.assertTrue ( m.isRecvd ( ) ) ; }
Source:
private java.lang.String readEmbeddedTextFile ( java.io.InputStream templateStream ) throws java.io.IOException { java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.InputStreamReader ( templateStream ) ) ; try { java.lang.String line ; java.lang.StringBuilder total = new java.lang.StringBuilder ( reader.readLine ( ) ) ; while ( ( line = reader.readLine ( ) ) != null ) { total.append ( '\n' ) ; total.append ( line ) ; } return total.toString ( ) ; } finally { reader.close ( ) ; } }

Target:
private java.lang.String readEmbeddedTextFile ( java.io.InputStream templateStream ) throws java.io.IOException { java.io.InputStreamReader reader = new java.io.InputStreamReader ( templateStream , com.google.common.base.Charsets.UTF_8 ) ; try { return com.google.common.io.CharStreams.toString ( reader ) ; } finally { reader.close ( ) ; } }
Source:
protected void postUpdate ( ) { java.util.Collection < java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem > > lists = mResourceMap.values ( ) ; for ( java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem > list : lists ) { for ( int i = 0 ; i < ( list.size ( ) ) ; ) { if ( list.get ( i ) . hasNoSourceFile ( ) ) { list.remove ( i ) ; } else { i ++ ; } } } }

Target:
protected void postUpdate ( ) { java.util.Collection < java.util.List < com.android.ide.common.resources.ResourceItem > > lists = mResourceMap.values ( ) ; for ( java.util.List < com.android.ide.common.resources.ResourceItem > list : lists ) { for ( int i = 0 ; i < ( list.size ( ) ) ; ) { if ( list.get ( i ) . hasNoSourceFile ( ) ) { list.remove ( i ) ; } else { i ++ ; } } } }
Source:
public java.io.File getManifestFile ( ) { java.io.File manifestFile = new java.io.File ( mDir , com.android.SdkConstants.ANDROID_MANIFEST_XML ) ; if ( manifestFile.exists ( ) ) { return manifestFile ; } return null ; }

Target:
public java.util.List < java.io.File > getManifestFiles ( ) { if ( ( mManifestFiles ) == null ) { java.io.File manifestFile = new java.io.File ( mDir , com.android.SdkConstants.ANDROID_MANIFEST_XML ) ; if ( manifestFile.exists ( ) ) { mManifestFiles = java.util.Collections.singletonList ( manifestFile ) ; } else { mManifestFiles = java.util.Collections.emptyList ( ) ; } } return mManifestFiles ; }
Source:
private java.util.List < com.android.bluetooth.avrcp.MediaController > getMediaControllers ( ) { java.util.List < com.android.bluetooth.avrcp.MediaController > controllers = new java.util.ArrayList < com.android.bluetooth.avrcp.MediaController > ( ) ; synchronized ( mMediaPlayerInfoList ) { for ( com.android.bluetooth.avrcp.MediaPlayerInfo info : mMediaPlayerInfoList.values ( ) ) { if ( ( info.getMediaController ( ) ) != null ) { controllers.add ( info.getMediaController ( ) . getWrappedInstance ( ) ) ; } } } return controllers ; }

Target:
private void removeMediaController ( com.android.bluetooth.avrcp.MediaController controller ) { synchronized ( mMediaPlayerInfoList ) { for ( com.android.bluetooth.avrcp.MediaPlayerInfo info : mMediaPlayerInfoList.values ( ) ) { com.android.bluetooth.avrcp.MediaController c = info.getMediaController ( ) ; if ( ( c != null ) && ( c.equals ( controller ) ) ) info.setMediaController ( null ) ; } } }
Source:
public void testParseAaptOutputWithRange5 ( ) throws java.io.IOException { createTempXmlFile ( ) ; writeToFile ( "<resources xmlns:android='http://schemas.android.com/apk/res/android'>" , " <style name='wrongAttribute'>" , " <item name='nonexistent'>left</item>" ) ; java.lang.String messageText = "No resource found that matches the given name: attr 'nonexistent'." ; java.lang.String err = ( ( sourceFilePath ) + ":3: error: Error: " ) + messageText ; java.util.Collection < com.android.ide.common.blame.output.GradleMessage > messages = parser.parseToolOutput ( err ) ; assertHasCorrectErrorMessage ( messages , messageText , 3 , 17 ) ; }

Target:
public void testParseAaptOutputWithRange5 ( ) throws java.io.IOException { createTempXmlFile ( ) ; writeToFile ( "<resources xmlns:android='http://schemas.android.com/apk/res/android'>" , " <style name='wrongAttribute'>" , " <item name='nonexistent'>left</item>" ) ; java.lang.String messageText = "No resource found that matches the given name: attr 'nonexistent'." ; java.lang.String err = ( ( sourceFilePath ) + ":3: error: Error: " ) + messageText ; java.util.Collection < com.android.ide.common.blame.Message > messages = parser.parseToolOutput ( err ) ; assertHasCorrectErrorMessage ( messages , messageText , 3 , 17 ) ; }
Source:
public void onRequestPermissionsResult ( int requestCode , java.lang.String [ ] permissions , int [ ] grantResults ) { if ( requestCode == ( com.android.dialer.app.list.OldSpeedDialFragment.READ_CONTACTS_PERMISSION_REQUEST_CODE ) ) { if ( ( ( grantResults.length ) == 1 ) && ( ( android.content.pm.PackageManager.PERMISSION_GRANTED ) == ( grantResults [ 0 ] ) ) ) { com.android.dialer.util.PermissionsUtil.notifyPermissionGranted ( getActivity ( ) , android.Manifest.permission.READ_CONTACTS ) ; } } }

Target:
public void onRequestPermissionsResult ( int requestCode , java.lang.String [ ] permissions , int [ ] grantResults ) { if ( requestCode == ( com.android.dialer.app.list.OldSpeedDialFragment.READ_CONTACTS_PERMISSION_REQUEST_CODE ) ) { if ( ( ( grantResults.length ) == 1 ) && ( ( android.content.pm.PackageManager.PERMISSION_GRANTED ) == ( grantResults [ 0 ] ) ) ) { com.android.dialer.util.PermissionsUtil.notifyPermissionGranted ( getContext ( ) , android.Manifest.permission.READ_CONTACTS ) ; } } }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { onLicenseRadioSelected ( ) ; }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { super . widgetSelected ( e ) ; if ( printAction.equals ( e.text ) ) { mPackageText.print ( ) ; } else { org.eclipse.swt.graphics.Point p = mPackageText.getSelection ( ) ; mPackageText.selectAll ( ) ; mPackageText.copy ( ) ; mPackageText.setSelection ( p ) ; } }
Source:
void cleanUpResourcesLI ( ) { java.lang.String sourceFile = getCodePath ( ) ; int retCode = mInstaller.rmdex ( sourceFile ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( "Couldn't remove dex file for package: " + " at location " ) + ( sourceFile.toString ( ) ) ) + ", retcode=" ) + retCode ) ) ; } cleanUp ( ) ; }

Target:
void cleanUpResourcesLI ( ) { java.lang.String sourceDir = getCodePath ( ) ; if ( cleanUp ( ) ) { if ( ( instructionSet ) == null ) { throw new java.lang.IllegalStateException ( "instructionSet == null" ) ; } int retCode = mInstaller.rmdex ( sourceDir , instructionSet ) ; if ( retCode < 0 ) { android.util.Slog.w ( com.android.server.pm.PackageManagerService.TAG , ( ( ( ( "Couldn't remove dex file for package: " + " at location " ) + sourceDir ) + ", retcode=" ) + retCode ) ) ; } } }
Source:
public void test_getOption_IP_TOS_defaults ( ) throws java.lang.Exception { java.nio.channels.SocketChannel sc = java.nio.channels.SocketChannel.open ( ) ; int value = sc.getOption ( java.net.StandardSocketOptions.IP_TOS ) ; assertEquals ( 0 , value ) ; assertEquals ( value , sc.socket ( ) . getTrafficClass ( ) ) ; sc.close ( ) ; }

Target:
public void test_bind_unresolvedAddress ( ) throws java.io.IOException { java.nio.channels.SocketChannel sc = java.nio.channels.SocketChannel.open ( ) ; try { sc.socket ( ) . bind ( new java.net.InetSocketAddress ( "unresolvedname" , 31415 ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNull ( sc.socket ( ) . getLocalSocketAddress ( ) ) ; assertTrue ( sc.isOpen ( ) ) ; assertFalse ( sc.isConnected ( ) ) ; sc.close ( ) ; }
Source:
public void copyFromUnchecked ( byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFromUnchecked" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFromUnchecked ( short [ ] d ) { copyFromUnchecked ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
public void addProximityAlert ( double latitude , double longitude , float radius , long expiration , android.app.PendingIntent intent , java.lang.String packageName ) { validatePendingIntent ( intent ) ; try { synchronized ( mLock ) { addProximityAlertLocked ( latitude , longitude , radius , expiration , intent , packageName ) ; } } catch ( java.lang.SecurityException se ) { throw se ; } catch ( java.lang.IllegalArgumentException iae ) { throw iae ; } catch ( java.lang.Exception e ) { android.util.Slog.e ( com.android.server.LocationManagerService.TAG , "addProximityAlert got exception:" , e ) ; } }

Target:
private void checkCallerIsProvider ( ) { if ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.INSTALL_LOCATION_PROVIDER ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return ; } int uid = android.os.Binder.getCallingUid ( ) ; if ( ( mGeocodeProvider ) != null ) { if ( doesPackageHaveUid ( uid , mGeocodeProvider.getConnectedPackageName ( ) ) ) return ; } for ( com.android.server.location.LocationProviderProxy proxy : mProxyProviders ) { if ( doesPackageHaveUid ( uid , proxy.getConnectedPackageName ( ) ) ) return ; } throw new java.lang.SecurityException ( ( "need INSTALL_LOCATION_PROVIDER permission, " + "or UID of a currently bound location provider" ) ) ; }
Source:
protected void onStart ( ) { super . onStart ( ) ; mConversation.blockMarkAsRead ( true ) ; initFocus ( ) ; registerReceiver ( mHttpProgressReceiver , mHttpProgressFilter ) ; loadMessageContent ( ) ; mWorkingMessage.syncWorkingRecipients ( ) ; if ( android.util.Log.isLoggable ( LogTag.APP , Log.VERBOSE ) ) { com.android.mms.ui.ComposeMessageActivity.log ( ( "update title, mConversation=" + ( mConversation.toString ( ) ) ) ) ; } updateTitle ( mConversation.getRecipients ( ) ) ; android.app.ActionBar actionBar = getActionBar ( ) ; actionBar.setDisplayHomeAsUpEnabled ( true ) ; }

Target:
public void loadMessageContent ( ) { mConversation.blockMarkAsRead ( true ) ; mConversation.markAsRead ( ) ; startMsgListQuery ( ) ; updateSendFailedNotification ( ) ; drawBottomPanel ( ) ; }
Source:
public void testMergeWrite ( ) throws java.lang.Exception { com.android.builder.resources.ResourceSet mergedSet = com.android.builder.resources.ResourceMergerTest.getMergedSet ( ) ; java.io.File folder = com.android.builder.resources.ResourceMergerTest.getWrittenSet ( ) ; com.android.builder.resources.ResourceSet writtenSet = new com.android.builder.resources.ResourceSet ( ) ; writtenSet.addSource ( folder ) ; assertEquals ( mergedSet.getSize ( ) , writtenSet.getSize ( ) ) ; java.util.Map < java.lang.String , com.android.builder.resources.Resource > map = writtenSet.getResourceMap ( ) ; for ( com.android.builder.resources.Resource item : mergedSet.getResources ( ) ) { assertNotNull ( map.get ( item.getKey ( ) ) ) ; } }

Target:
public void testMergeWrite ( ) throws java.lang.Exception { com.android.builder.resources.ResourceMerger merger = com.android.builder.resources.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.android.builder.resources.ResourceMergerTest.getWrittenResources ( ) ; com.android.builder.resources.ResourceSet writtenSet = new com.android.builder.resources.ResourceSet ( "unused" ) ; writtenSet.addSource ( folder ) ; writtenSet.loadFromFiles ( ) ; compareResourceMaps ( merger , writtenSet , false ) ; }
Source:
private com.android.ide.common.resources.ResourceItem findDeclaredResourceItem ( com.android.resources.ResourceType type , java.lang.String name ) { java.util.List < com.android.ide.common.resources.ResourceItem > list = mResourceMap.get ( type ) ; if ( list != null ) { for ( com.android.ide.common.resources.ResourceItem item : list ) { if ( ( name.equals ( item.getName ( ) ) ) && ( ( item.isDeclaredInline ( ) ) == false ) ) { return item ; } } } return null ; }

Target:
private com.android.ide.common.resources.ResourceItem findDeclaredResourceItem ( com.android.resources.ResourceType type , java.lang.String name ) { java.util.Map < java.lang.String , com.android.ide.common.resources.ResourceItem > map = mResourceMap.get ( type ) ; if ( map != null ) { com.android.ide.common.resources.ResourceItem resourceItem = map.get ( name ) ; if ( ( resourceItem != null ) && ( ! ( resourceItem.isDeclaredInline ( ) ) ) ) { return resourceItem ; } } return null ; }
Source:
public libcore.io.BufferIterator getBufferIterator ( java.lang.String id ) { int index = java.util.Arrays.binarySearch ( ids , id ) ; if ( index < 0 ) { return null ; } libcore.io.BufferIterator it = mappedFile.bigEndianIterator ( ) ; it.skip ( byteOffsets [ index ] ) ; return it ; }

Target:
public libcore.io.BufferIterator getBufferIterator ( java.lang.String id ) { checkNotClosed ( ) ; int index = java.util.Arrays.binarySearch ( ids , id ) ; if ( index < 0 ) { return null ; } int byteOffset = byteOffsets [ index ] ; libcore.io.BufferIterator it = mappedFile.bigEndianIterator ( ) ; it.skip ( byteOffset ) ; return it ; }
Source:
public final com.android.tools.perflib.heap.ClassObj getClass ( java.lang.String name ) { return mClassesByName.get ( name ) ; }

Target:
public final com.android.tools.perflib.heap.ClassObj getClass ( java.lang.String name ) { java.util.Collection < com.android.tools.perflib.heap.ClassObj > classes = mClassesByName.get ( name ) ; if ( ( classes.size ( ) ) == 1 ) { return classes.iterator ( ) . next ( ) ; } return null ; }
Source:
public static com.android.jack.dx.rop.cst.CstFieldRef createFieldRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JFieldId field , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface receiverType ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( receiverType ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( field.getName ( ) ) ; com.android.jack.dx.rop.cst.CstNat nat = com.android.jack.backend.dex.rop.RopHelper.createSignature ( field ) ; com.android.jack.dx.rop.cst.CstFieldRef fieldRef = new com.android.jack.dx.rop.cst.CstFieldRef ( definingClass , name , nat ) ; return fieldRef ; }

Target:
public static com.android.jack.dx.rop.cst.CstFieldRef createFieldRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JFieldId field , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface receiverType ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( receiverType ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( field.getName ( ) ) ; com.android.jack.dx.rop.cst.CstString descriptor = com.android.jack.backend.dex.rop.RopHelper.createSignature ( field ) ; com.android.jack.dx.rop.cst.CstFieldRef fieldRef = new com.android.jack.dx.rop.cst.CstFieldRef ( definingClass , name , descriptor ) ; return fieldRef ; }
Source:
public void TestSimpleRules ( ) { expect ( ( "ab>x|y;" + "yc>z" ) , "eabcd" , "exzd" ) ; expect ( ( "ab>x|yzacw;" + ( ( "za>q;" + "qc>r;" ) + "cw>n" ) ) , "ab" , "xyqn" ) ; android.icu.text.Transliterator t = android.icu.text.Transliterator.createFromRules ( "<ID>" , ( "$dummy=;" + ( ( ( ( ( ( "$vowel=[aeiouAEIOU];" + "$lu=[:Lu:];" ) + "$vowel } $lu > '!';" ) + "$vowel > '&';" ) + "'!' { $lu > '^';" ) + "$lu > '*';" ) + "a>ERROR" ) ) , Transliterator.FORWARD ) ; expect ( t , "abcdefgABCDEFGU" , "&bcd&fg!^**!^*&" ) ; }

Target:
public void TestSimpleRules ( ) { android.icu.dev.test.translit.TransliteratorTest.expect ( ( "ab>x|y;" + "yc>z" ) , "eabcd" , "exzd" ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( ( "ab>x|yzacw;" + ( ( "za>q;" + "qc>r;" ) + "cw>n" ) ) , "ab" , "xyqn" ) ; android.icu.text.Transliterator t = android.icu.text.Transliterator.createFromRules ( "<ID>" , ( "$dummy=;" + ( ( ( ( ( ( "$vowel=[aeiouAEIOU];" + "$lu=[:Lu:];" ) + "$vowel } $lu > '!';" ) + "$vowel > '&';" ) + "'!' { $lu > '^';" ) + "$lu > '*';" ) + "a>ERROR" ) ) , Transliterator.FORWARD ) ; android.icu.dev.test.translit.TransliteratorTest.expect ( t , "abcdefgABCDEFGU" , "&bcd&fg!^**!^*&" ) ; }
Source:
public void stopTrackingBssids ( android.net.wifi.WifiScanner.BssidListener listener ) { com.android.internal.util.Preconditions.checkNotNull ( listener , "listener cannot be null" ) ; int key = removeListener ( listener ) ; if ( key == ( android.net.wifi.WifiScanner.INVALID_KEY ) ) return ; validateChannel ( ) ; mAsyncChannel.sendMessage ( android.net.wifi.WifiScanner.CMD_RESET_HOTLIST , 0 , key ) ; }

Target:
public void stopTrackingBssids ( android.net.wifi.WifiScanner.BssidListener listener ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
public final java.nio.Buffer limit ( int newLimit ) { limitImpl ( newLimit ) ; return this ; }

Target:
public final java.nio.Buffer limit ( int newLimit ) { if ( ( newLimit < 0 ) || ( newLimit > ( capacity ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( "Bad limit (capacity " + ( capacity ) ) + "): " ) + newLimit ) ) ; } limit = newLimit ; if ( ( position ) > newLimit ) { position = newLimit ; } if ( ( ( mark ) != ( java.nio.Buffer.UNSET_MARK ) ) && ( ( mark ) > newLimit ) ) { mark = java.nio.Buffer.UNSET_MARK ; } return this ; }
Source:
public boolean hasChanged ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.sdklib.repository.descriptors.PkgType > filters ) { for ( com.android.sdklib.repository.descriptors.PkgType filter : filters ) { for ( com.android.sdklib.repository.local.LocalDirInfo dirInfo : mVisitedDirs.get ( filter ) ) { if ( dirInfo.hasChanged ( ) ) { return true ; } } } return false ; }

Target:
public boolean hasChanged ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.sdklib.repository.descriptors.PkgType > filters ) { for ( com.android.sdklib.repository.descriptors.PkgType filter : filters ) { java.util.Collection < com.android.sdklib.repository.local.LocalDirInfo > dirInfos ; synchronized ( mLocalPackages ) { dirInfos = mVisitedDirs.get ( filter ) ; } for ( com.android.sdklib.repository.local.LocalDirInfo dirInfo : dirInfos ) { if ( dirInfo.hasChanged ( ) ) { return true ; } } } return false ; }
Source:
private void sendRssiChangeBroadcast ( final int newRssi ) { try { mBatteryStats.noteWifiRssiChanged ( newRssi ) ; } catch ( android.os.RemoteException e ) { } android.content.Intent intent = new android.content.Intent ( WifiManager.RSSI_CHANGED_ACTION ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; intent.putExtra ( WifiManager.EXTRA_NEW_RSSI , newRssi ) ; mContext.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }

Target:
private void sendRssiChangeBroadcast ( final int newRssi ) { try { mBatteryStats.noteWifiRssiChanged ( newRssi ) ; } catch ( android.os.RemoteException e ) { } android.content.Intent intent = new android.content.Intent ( android.net.wifi.WifiManager.RSSI_CHANGED_ACTION ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; intent.putExtra ( WifiManager.EXTRA_NEW_RSSI , newRssi ) ; mContext.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }
Source:
public void testZipFileLargerThan2GiB ( ) throws java.io.IOException { if ( false ) { java.io.File f = createZipFile ( 1024 , ( ( 3 * 1024 ) * 1024 ) ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { java.util.zip.ZipEntry zipEntry = e.nextElement ( ) ; ++ entryCount ; } assertEquals ( 1024 , entryCount ) ; zipFile.close ( ) ; } }

Target:
public void testZipFileLargerThan2GiB ( ) throws java.io.IOException { if ( false ) { java.io.File f = libcore.java.util.zip.ZipFileTest.createZipFile ( 1024 , ( ( 3 * 1024 ) * 1024 ) ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; int entryCount = 0 ; for ( java.util.Enumeration < ? extends java.util.zip.ZipEntry > e = zipFile.entries ( ) ; e.hasMoreElements ( ) ; ) { java.util.zip.ZipEntry zipEntry = e.nextElement ( ) ; ++ entryCount ; } assertEquals ( 1024 , entryCount ) ; zipFile.close ( ) ; } }
Source:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision> <r:major>1</r:major> </r:revision> " ) + "<r:min-platform-tools-rev>1</r:min-platform-tools-rev> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testLicenseIdNotFound ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.OPEN_TAG_REPO ) ) + "<r:license id=\"lic1\"> some license </r:license> " ) + "<r:tool> <r:uses-license ref=\"lic2\" /> <r:revision> <r:major>1</r:major> </r:revision> " ) + "<r:min-platform-tools-rev> <r:major>1</r:major> </r:min-platform-tools-rev> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:tool>" ) + ( com.android.sdklib.repository.ValidateRepositoryXmlTest.CLOSE_TAG_REPO ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-id.1: There is no ID/IDREF binding for IDREF 'lic2'.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }