auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean isWifiCallingAvailable ( ) { try { return getITelephony ( ) . isWifiCallingAvailable ( ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
public int getAndroidCarrierIdForSubscription ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; return service.getSubscriptionCarrierId ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } return android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID ; }
Source:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { assert ( attribute.getName ( ) . equals ( com.android.SdkConstants.ATTR_ID ) ) || ( attribute.getLocalName ( ) . equals ( com.android.SdkConstants.ATTR_ID ) ) ; java.lang.String id = attribute.getValue ( ) ; mFileIds.add ( id ) ; mGlobalIds.add ( id ) ; }

Target:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { assert ( attribute.getName ( ) . equals ( com.android.SdkConstants.ATTR_ID ) ) || ( attribute.getLocalName ( ) . equals ( com.android.SdkConstants.ATTR_ID ) ) ; java.lang.String id = attribute.getValue ( ) ; mFileIds.add ( id ) ; mGlobalIds.add ( id ) ; if ( ( ( id.startsWith ( "@+" ) ) && ( ! ( id.startsWith ( com.android.SdkConstants.NEW_ID_PREFIX ) ) ) ) && ( ! ( id.startsWith ( "@+android:id/" ) ) ) ) { java.lang.String message = java.lang.String.format ( "ID definitions *must* be of the form @+id/name; try using %1$s" , ( ( com.android.SdkConstants.NEW_ID_PREFIX ) + ( id.substring ( 2 ) . replace ( '/' , '_' ) ) ) ) ; context.report ( com.android.tools.lint.checks.WrongIdDetector.INVALID , attribute , context.getLocation ( attribute ) , message , null ) ; } }
Source:
public void parse ( byte [ ] atraceOutput ) { mAtraceOutput = atraceOutput ; mAtraceLength = atraceOutput.length ; removeCrLf ( ) ; java.lang.String header = new java.lang.String ( mAtraceOutput , 0 , java.lang.Math.min ( 100 , mAtraceLength ) ) ; mSystraceIndex = locateSystraceData ( header ) ; if ( ( mSystraceIndex ) < 0 ) { throw new java.lang.RuntimeException ( ( "Unable to find trace start marker \'TRACE:\':\n" + header ) ) ; } }

Target:
public void parse ( byte [ ] atraceOutput ) { mAtraceOutput = atraceOutput ; mAtraceLength = atraceOutput.length ; if ( mHasCrLf ) { removeCrLf ( ) ; } java.lang.String header = new java.lang.String ( mAtraceOutput , 0 , java.lang.Math.min ( 100 , mAtraceLength ) ) ; mSystraceIndex = locateSystraceData ( header ) ; if ( ( mSystraceIndex ) < 0 ) { throw new java.lang.RuntimeException ( ( "Unable to find trace start marker \'TRACE:\':\n" + header ) ) ; } }
Source:
private void registerForSimRecordEvents ( ) { mIccRecords.registerForNetworkSelectionModeAutomatic ( this , com.android.internal.telephony.gsm.EVENT_SET_NETWORK_AUTOMATIC , null ) ; mIccRecords.registerForNewSms ( this , com.android.internal.telephony.gsm.EVENT_NEW_ICC_SMS , null ) ; mIccRecords.registerForRecordsEvents ( this , com.android.internal.telephony.gsm.EVENT_ICC_RECORD_EVENTS , null ) ; mIccRecords.registerForRecordsLoaded ( this , com.android.internal.telephony.gsm.EVENT_SIM_RECORDS_LOADED , null ) ; }

Target:
private void registerForSimRecordEvents ( ) { com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; if ( r == null ) { return ; } r.registerForNetworkSelectionModeAutomatic ( this , com.android.internal.telephony.gsm.EVENT_SET_NETWORK_AUTOMATIC , null ) ; r.registerForNewSms ( this , com.android.internal.telephony.gsm.EVENT_NEW_ICC_SMS , null ) ; r.registerForRecordsEvents ( this , com.android.internal.telephony.gsm.EVENT_ICC_RECORD_EVENTS , null ) ; r.registerForRecordsLoaded ( this , com.android.internal.telephony.gsm.EVENT_SIM_RECORDS_LOADED , null ) ; }
Source:
public boolean mergeUpdate ( java.lang.Package pkg ) { if ( ( mUpdatePkg ) == pkg ) { return true ; } if ( ( mMainPkg.canBeUpdatedBy ( pkg ) ) == ( com.android.sdklib.internal.repository.Package.UpdateInfo.UPDATE ) ) { if ( ( mUpdatePkg ) == null ) { mUpdatePkg = pkg ; } else if ( ( mUpdatePkg.canBeUpdatedBy ( pkg ) ) == ( com.android.sdklib.internal.repository.Package.UpdateInfo.UPDATE ) ) { mUpdatePkg = pkg ; } return true ; } return false ; }

Target:
public boolean mergeUpdate ( java.lang.Package pkg ) { if ( ( mUpdatePkg ) == pkg ) { return true ; } if ( ( mMainPkg.canBeUpdatedBy ( pkg ) ) == ( com.android.sdklib.internal.repository.packages.Package.UpdateInfo.UPDATE ) ) { if ( ( mUpdatePkg ) == null ) { mUpdatePkg = pkg ; } else if ( ( mUpdatePkg.canBeUpdatedBy ( pkg ) ) == ( com.android.sdklib.internal.repository.packages.Package.UpdateInfo.UPDATE ) ) { mUpdatePkg = pkg ; } return true ; } return false ; }
Source:
public void test_RAND_bytes_Success ( ) throws java.lang.Exception { byte [ ] output = new byte [ 32 ] ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.RAND_bytes ( output ) ; boolean isZero = true ; for ( int i = 0 ; i < ( output.length ) ; i ++ ) { isZero &= ( output [ i ] ) == 0 ; } assertFalse ( ( "Random output was zero. This is a very low probability event " + "and probably indicates an error." ) , isZero ) ; }

Target:
public void test_RAND_bytes_Success ( ) throws java.lang.Exception { byte [ ] output = new byte [ 128 ] ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.RAND_bytes ( output ) ; boolean isZero = true ; for ( int i = 0 ; i < ( output.length ) ; i ++ ) { isZero &= ( output [ i ] ) == 0 ; } assertFalse ( ( "Random output was zero. This is a very low probability event (1 in 2^128) " + "and probably indicates an error." ) , isZero ) ; }
Source:
public void visitAnyInstruction ( proguard.preverify.Clazz clazz , proguard.preverify.Method method , proguard.preverify.CodeAttribute codeAttribute , int offset , proguard.preverify.Instruction instruction ) { codeAttributeComposer.appendInstruction ( offset , instruction ) ; }

Target:
public void visitAnyInstruction ( proguard.preverify.Clazz clazz , proguard.preverify.Method method , proguard.preverify.CodeAttribute codeAttribute , int offset , proguard.preverify.Instruction instruction ) { if ( branchTargetFinder.isSubroutineStart ( offset ) ) { if ( proguard.preverify.CodeSubroutineInliner.DEBUG ) { java.lang.System.out.println ( ( ( " Replacing first subroutine instruction " + ( instruction.toString ( offset ) ) ) + " by a label" ) ) ; } codeAttributeComposer.appendLabel ( offset ) ; } else { codeAttributeComposer.appendInstruction ( offset , instruction ) ; } }
Source:
public boolean lookingAt ( ) { synchronized ( this ) { matchFound = java.util.regex.Matcher.lookingAtImpl ( address , input , matchOffsets ) ; } return matchFound ; }

Target:
public boolean find ( int start ) { if ( ( start < 0 ) || ( start > ( input.length ( ) ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "start=" + start ) + "; length=" ) + ( input.length ( ) ) ) ) ; } synchronized ( this ) { matchFound = java.util.regex.Matcher.findImpl ( address , start , matchOffsets ) ; } return matchFound ; }
Source:
public boolean startPnoScan ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.HwPnoDebouncer.Listener listener ) { if ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.DBG ) android.util.Log.d ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.TAG , "Starting PNO scan" ) ; mListener = listener ; if ( ! ( setPnoState ( true ) ) ) { mListener = null ; return false ; } return true ; }

Target:
public boolean startPnoScan ( com.android.server.wifi.WifiNative.PnoSettings pnoSettings , com.android.server.wifi.scanner.SupplicantWifiScannerImpl.HwPnoDebouncer.Listener listener ) { if ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.DBG ) android.util.Log.d ( com.android.server.wifi.scanner.SupplicantWifiScannerImpl.TAG , "Starting PNO scan" ) ; mListener = listener ; mPnoSettings = pnoSettings ; if ( ! ( setPnoState ( true ) ) ) { mListener = null ; return false ; } return true ; }
Source:
public void testAesCbcHmacSha512Tcp4 ( ) 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_SHA512 , getAuthKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_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 ) ; }
Source:
public void binderDied ( ) { foregroundTokenDied ( this ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String [ ] pkgs = intent.getStringArrayExtra ( Intent.EXTRA_PACKAGES ) ; if ( pkgs != null ) { for ( java.lang.String pkg : pkgs ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false ) ) { setResultCode ( Activity.RESULT_OK ) ; return ; } } } } }
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 int removeRights ( java.lang.String path ) { if ( ( null == path ) || ( path.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( "Given path should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _removeRights ( mUniqueId , path ) ; }
Source:
public void startCallWaiting ( com.android.server.telecom.Call call ) { if ( mSystemSettingsUtil.isTheaterModeOn ( mContext ) ) { return ; } if ( mInCallController.doesConnectedDialerSupportRinging ( ) ) { com.android.server.telecom.Log.event ( call , Log.Events.SKIP_RINGING ) ; return ; } com.android.server.telecom.Log.v ( this , "Playing call-waiting tone." ) ; stopRinging ( ) ; if ( ( mCallWaitingPlayer ) == null ) { com.android.server.telecom.Log.event ( call , Log.Events.START_CALL_WAITING_TONE ) ; mCallWaitingCall = call ; mCallWaitingPlayer = mPlayerFactory.createPlayer ( InCallTonePlayer.TONE_CALL_WAITING ) ; mCallWaitingPlayer.startTone ( ) ; } }

Target:
public void startCallWaiting ( com.android.server.telecom.Call call ) { if ( mSystemSettingsUtil.isTheaterModeOn ( mContext ) ) { return ; } if ( mInCallController.doesConnectedDialerSupportRinging ( ) ) { android.telecom.Log.addEvent ( call , LogUtils.Events.SKIP_RINGING ) ; return ; } android.telecom.Log.v ( this , "Playing call-waiting tone." ) ; stopRinging ( ) ; if ( ( mCallWaitingPlayer ) == null ) { android.telecom.Log.addEvent ( call , LogUtils.Events.START_CALL_WAITING_TONE ) ; mCallWaitingCall = call ; mCallWaitingPlayer = mPlayerFactory.createPlayer ( InCallTonePlayer.TONE_CALL_WAITING ) ; mCallWaitingPlayer.startTone ( ) ; } }
Source:
public void testSingleOutofOrder ( ) { android.hardware.cts.helpers.SensorStats stats = new android.hardware.cts.helpers.SensorStats ( ) ; android.hardware.cts.helpers.sensorverification.EventOrderingVerification verification = android.hardware.cts.helpers.sensorverification.EventOrderingVerificationTest.getVerification ( 0 , 2 , 1 , 3 , 4 ) ; try { verification.verify ( stats ) ; fail ( "Expected an AssertionError" ) ; } catch ( java.lang.AssertionError e ) { } verifyStats ( stats , false , 1 ) ; java.util.List < java.lang.Integer > indices = getIndices ( stats ) ; assertTrue ( indices.contains ( 2 ) ) ; }

Target:
public void testSingleOutofOrder ( ) { android.hardware.cts.helpers.SensorStats stats = new android.hardware.cts.helpers.SensorStats ( ) ; android.hardware.cts.helpers.sensorverification.EventOrderingVerification verification = android.hardware.cts.helpers.sensorverification.EventOrderingVerificationTest.getVerification ( 0 , 2 , 1 , 3 , 4 ) ; try { verification.verify ( stats ) ; throw new java.lang.Error ( "Expected an AssertionError" ) ; } catch ( java.lang.AssertionError e ) { } verifyStats ( stats , false , 1 ) ; java.util.List < java.lang.Integer > indices = getIndices ( stats ) ; assertTrue ( indices.contains ( 2 ) ) ; }
Source:
private void logTestFailure ( java.io.PrintStream logStream , java.lang.String provider , libcore.javax.crypto.CipherTest.CipherTestParam params , java.lang.Exception e ) { logStream.append ( ( ( ( ( ( ( "Error encountered checking " + ( params.transformation ) ) + ", keySize=" ) + ( ( params.encryptKey.getEncoded ( ) . length ) * 8 ) ) + " with provider " ) + provider ) + "\n" ) ) ; e.printStackTrace ( logStream ) ; }

Target:
private void logTestFailure ( java.io.PrintStream logStream , java.lang.String provider , libcore.javax.crypto.CipherTest.CipherTestParam params , java.lang.Throwable e ) { logStream.append ( ( "Error encountered checking " + ( params.transformation ) ) ) ; if ( ( params.encryptKey ) instanceof javax.crypto.SecretKey ) { logStream.append ( ( ", keySize=" + ( ( params.encryptKey.getEncoded ( ) . length ) * 8 ) ) ) ; } logStream.append ( ( ( " with provider " + provider ) + "\n" ) ) ; e.printStackTrace ( logStream ) ; }
Source:
public android.content.Intent getIntent ( android.content.Context context ) { return new android.content.Intent ( android.content.Intent.ACTION_VIEW , new android.net.Uri.Builder ( ) . scheme ( "https" ) . authority ( "play.google.com" ) . appendEncodedPath ( "store/apps/details" ) . appendQueryParameter ( "id" , "com.google.android.apps.tachyon" ) . appendQueryParameter ( "referrer" , "utm_source=dialer&utm_medium=text&utm_campaign=product" ) . build ( ) ) ; }

Target:
public android.content.Intent getIntent ( android.content.Context context ) { return new android.content.Intent ( android.content.Intent.ACTION_VIEW , new android.net.Uri.Builder ( ) . scheme ( "https" ) . authority ( "play.google.com" ) . appendEncodedPath ( "store/apps/details" ) . appendQueryParameter ( "id" , DuoConstants.PACKAGE_NAME ) . appendQueryParameter ( "referrer" , "utm_source=dialer&utm_medium=text&utm_campaign=product" ) . build ( ) ) ; }
Source:
public void test_bind_null ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = createReceiverChannel ( ) ; assertNotNull ( dc.getLocalAddress ( ) ) ; assertTrue ( dc.isOpen ( ) ) ; assertFalse ( dc.isConnected ( ) ) ; dc.close ( ) ; try { dc.getLocalAddress ( ) ; fail ( ) ; } catch ( java.nio.channels.ClosedChannelException expected ) { } assertFalse ( dc.isOpen ( ) ) ; assertFalse ( dc.isConnected ( ) ) ; }

Target:
public void test_open ( ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; assertFalse ( dc.getOption ( java.net.StandardSocketOptions.SO_REUSEADDR ) ) ; assertTrue ( dc.getOption ( java.net.StandardSocketOptions.IP_MULTICAST_LOOP ) ) ; assertNull ( dc.getLocalAddress ( ) ) ; assertTrue ( dc.isOpen ( ) ) ; assertFalse ( dc.isConnected ( ) ) ; dc.close ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; myPatch = new com.intellij.updater.Patch ( myOlderDir , myNewerDir , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , TEST_UI ) ; }

Target:
public void testDigestFiles ( ) throws java.lang.Exception { java.util.Map < java.lang.String , java.lang.Long > checkSums = myPatch.digestFiles ( getDataDir ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; org.junit.Assert.assertEquals ( 9 , checkSums.size ( ) ) ; }
Source:
public int read ( byte [ ] buffer , int offset , int count ) throws java.io.IOException { if ( ( in ) == null ) { return - 1 ; } java.util.Arrays.checkOffsetAndCount ( buffer.length , offset , count ) ; while ( ( in ) != null ) { int result = in.read ( buffer , offset , count ) ; if ( result >= 0 ) { return result ; } nextStream ( ) ; } return - 1 ; }

Target:
public int read ( byte [ ] buffer , int byteOffset , int byteCount ) throws java.io.IOException { if ( ( in ) == null ) { return - 1 ; } java.util.Arrays.checkOffsetAndCount ( buffer.length , byteOffset , byteCount ) ; while ( ( in ) != null ) { int result = in.read ( buffer , byteOffset , byteCount ) ; if ( result >= 0 ) { return result ; } nextStream ( ) ; } return - 1 ; }
Source:
public void onResume ( ) { super . onResume ( ) ; boolean conn = checkNow ( this . getApplicationContext ( ) ) ; android.content.Intent returnIntent = new android.content.Intent ( ) ; returnIntent.putExtra ( com.android.tests.connectivity.uid.ConnectivityTestActivity.RESULT , conn ) ; setResult ( com.android.tests.connectivity.uid.RESULT_OK , returnIntent ) ; finish ( ) ; }

Target:
public void onResume ( ) { super . onResume ( ) ; boolean conn = checkNow ( ) ; android.content.Intent returnIntent = new android.content.Intent ( ) ; returnIntent.putExtra ( com.android.tests.connectivity.uid.ConnectivityTestActivity.RESULT , conn ) ; setResult ( com.android.tests.connectivity.uid.RESULT_OK , returnIntent ) ; android.os.Bundle extras = getIntent ( ) . getExtras ( ) ; downloadData ( extras ) ; finish ( ) ; }
Source:
public void onSuccessfulIncomingCall ( com.android.server.telecom.Call incomingCall ) { com.android.server.telecom.Log.d ( this , "onSuccessfulIncomingCall" ) ; setCallState ( incomingCall , CallState.RINGING , "successful incoming call" ) ; if ( hasMaximumRingingCalls ( ) ) { incomingCall.reject ( false , null ) ; mMissedCallNotifier.showMissedCallNotification ( incomingCall ) ; mCallLogManager.logCall ( incomingCall , Calls.MISSED_TYPE ) ; } else { addCall ( incomingCall ) ; } }

Target:
public void onSuccessfulIncomingCall ( com.android.server.telecom.Call incomingCall ) { com.android.server.telecom.Log.d ( this , "onSuccessfulIncomingCall" ) ; setCallState ( incomingCall , CallState.RINGING , "successful incoming call" ) ; if ( ( hasMaximumRingingCalls ( ) ) || ( hasMaximumDialingCalls ( ) ) ) { incomingCall.reject ( false , null ) ; mMissedCallNotifier.showMissedCallNotification ( incomingCall ) ; mCallLogManager.logCall ( incomingCall , Calls.MISSED_TYPE ) ; } else { addCall ( incomingCall ) ; } }
Source:
private boolean isRequired ( ) { int first_api_level = android.os.SystemProperties.getInt ( "ro.product.first_api_level" , 0 ) ; if ( ( first_api_level > 0 ) && ( first_api_level < ( android.security.cts.EncryptionTest.min_api_level ) ) ) { return false ; } else { return ! ( hasLowRAM ( ) ) ; } }

Target:
private boolean isRequired ( ) { int first_api_level = android.os.SystemProperties.getInt ( "ro.product.first_api_level" , 0 ) ; if ( ( first_api_level > 0 ) && ( first_api_level < ( android.security.cts.EncryptionTest.min_api_level ) ) ) { return false ; } else { return ( ! ( hasLowRAM ( ) ) ) && ( ! ( isTelevision ( ) ) ) ; } }
Source:
public static android.os.ParcelFileDescriptor [ ] createSocketPair ( ) throws java.io.IOException { try { final java.io.FileDescriptor fd0 = new java.io.FileDescriptor ( ) ; final java.io.FileDescriptor fd1 = new java.io.FileDescriptor ( ) ; Libcore.os.socketpair ( libcore.io.OsConstants.AF_UNIX , libcore.io.OsConstants.SOCK_STREAM , 0 , fd0 , fd1 ) ; return new android.os.ParcelFileDescriptor [ ] { new android.os.ParcelFileDescriptor ( fd0 ) , new android.os.ParcelFileDescriptor ( fd1 ) } ; } catch ( libcore.io.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }

Target:
public static android.os.ParcelFileDescriptor [ ] createSocketPair ( ) throws java.io.IOException { try { final java.io.FileDescriptor fd0 = new java.io.FileDescriptor ( ) ; final java.io.FileDescriptor fd1 = new java.io.FileDescriptor ( ) ; android.system.Os.socketpair ( android.system.OsConstants.AF_UNIX , android.system.OsConstants.SOCK_STREAM , 0 , fd0 , fd1 ) ; return new android.os.ParcelFileDescriptor [ ] { new android.os.ParcelFileDescriptor ( fd0 ) , new android.os.ParcelFileDescriptor ( fd1 ) } ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }
Source:
private java.lang.String generateFileName ( boolean internal , java.lang.String preferredExtension , java.lang.String directoryName ) { java.lang.String name = java.lang.String.valueOf ( java.lang.System.currentTimeMillis ( ) ) ; if ( internal ) { throw new java.lang.UnsupportedOperationException ( "Writing to internal storage is not supported." ) ; } else { return ( ( ( ( ( com.android.providers.media.MediaProvider.mExternalStoragePaths [ 0 ] ) + "/" ) + directoryName ) + "/" ) + name ) + preferredExtension ; } }

Target:
private java.lang.String generateFileName ( boolean internal , java.lang.String preferredExtension , java.lang.String directoryName ) { java.lang.String name = java.lang.String.valueOf ( java.lang.System.currentTimeMillis ( ) ) ; if ( internal ) { throw new java.lang.UnsupportedOperationException ( "Writing to internal storage is not supported." ) ; } else { return ( ( ( ( ( mExternalStoragePaths [ 0 ] ) + "/" ) + directoryName ) + "/" ) + name ) + preferredExtension ; } }
Source:
public void normalLogRecSizeIsUsedByDefault ( ) { for ( int i = 0 ; i < ( ( WifiStateMachine.NUM_LOG_RECS_NORMAL ) * 2 ) ; i ++ ) { mWsm.sendMessage ( WifiStateMachine.CMD_BOOT_COMPLETED ) ; } mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( WifiStateMachine.NUM_LOG_RECS_NORMAL , mWsm.getLogRecSize ( ) ) ; }

Target:
public void normalLogRecSizeIsUsedByDefault ( ) { for ( int i = 0 ; i < ( ( WifiStateMachine.NUM_LOG_RECS_NORMAL ) * 2 ) ; i ++ ) { mWsm.sendMessage ( WifiStateMachine.CMD_DISCONNECT ) ; } mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( WifiStateMachine.NUM_LOG_RECS_NORMAL , mWsm.getLogRecSize ( ) ) ; }
Source:
public void testNewInstance_ThreadGroup ( ) { checkNewInstanceTag ( "Ljava/lang/ThreadGroup;" , "(Ljava/lang/String;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long stringId = debuggeeWrapper.vmMirror.createString ( "foo" ) ; assertTrue ( "Invalid string id" , ( stringId != ( - 1 ) ) ) ; assertTrue ( "Null string id" , ( stringId != 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( JDWPConstants.Tag.STRING_TAG , stringId ) ) ; } } , JDWPConstants.Tag.THREAD_GROUP_TAG ) ; }

Target:
public void testNewInstance_ThreadGroup ( ) { checkNewInstanceTag ( "Ljava/lang/ThreadGroup;" , "(Ljava/lang/String;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long stringId = debuggeeWrapper.vmMirror.createString ( "foo" ) ; assertTrue ( "Invalid string id" , ( stringId != ( - 1 ) ) ) ; assertTrue ( "Null string id" , ( stringId != 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( JDWPConstants.Tag.STRING_TAG , stringId ) ) ; } } , new org.apache.harmony.jpda.tests.jdwp.ClassType.Checker ( JDWPConstants.Tag.THREAD_GROUP_TAG ) ) ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { super . writeToParcel ( dest , flags ) ; dest.writeString ( mSerializedPattern ) ; dest.writeInt ( mDisplayMode ) ; dest.writeValue ( mInputEnabled ) ; dest.writeValue ( mInStealthMode ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { super . writeToParcel ( dest , flags ) ; dest.writeString ( mSerializedPattern ) ; dest.writeInt ( mDisplayMode ) ; dest.writeValue ( mInputEnabled ) ; dest.writeValue ( mInStealthMode ) ; dest.writeValue ( mTactileFeedbackEnabled ) ; }
Source:
public boolean enableSupplicant ( ) { if ( ( mClientInterface ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "No valid wificond client interface handler" ) ; return false ; } try { return mClientInterface.enableSupplicant ( ) ; } catch ( android.os.RemoteException e ) { } return false ; }

Target:
public boolean tearDownInterfaces ( ) { mWificond = mWifiInjector.makeWificond ( ) ; if ( ( mWificond ) == null ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to get reference to wificond" ) ; return false ; } try { mWificond.tearDownInterfaces ( ) ; return true ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( com.android.server.wifi.WificondControl.TAG , "Failed to tear down interfaces due to remote exception" ) ; } return false ; }
Source:
public void test_EVP_get_digestbyname ( ) throws java.lang.Exception { assertTrue ( ( ( org.conscrypt.NativeCrypto.EVP_get_digestbyname ( "sha256" ) ) != ( org.conscrypt.NativeCryptoTest.NULL ) ) ) ; try { org.conscrypt.NativeCrypto.EVP_get_digestbyname ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { org.conscrypt.NativeCrypto.EVP_get_digestbyname ( "" ) ; org.conscrypt.NativeCrypto.EVP_get_digestbyname ( "foobar" ) ; fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } }

Target:
public void test_EVP_get_digestbyname_NullArgument ( ) throws java.lang.Exception { org.conscrypt.NativeCrypto.EVP_get_digestbyname ( null ) ; }
Source:
public void mouseDragged ( java.awt.event.MouseEvent event ) { if ( ! ( checkLockedRegion ( event.getX ( ) , event.getY ( ) ) ) ) { moveLine ( event.getX ( ) , event.getY ( ) ) ; } }

Target:
public void mouseDragged ( java.awt.event.MouseEvent event ) { int x = imageXCoordinate ( event.getX ( ) ) ; int y = imageYCoordinate ( event.getY ( ) ) ; if ( ! ( checkLockedRegion ( x , y ) ) ) { moveLine ( x , y ) ; } updateEditRegion ( x , y ) ; }
Source:
public void wifiNanTerminateSession ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId ) throws android.os.RemoteException { android.net.wifi.nan.WifiNanDiscoveryBaseSession session = mSessions.get ( sessionId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanTerminateSession before session (session ID " + sessionId ) + " is ready" ) ) ; } session.terminate ( ) ; mSessions.remove ( sessionId ) ; }

Target:
public void wifiNanDisconnect ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId ) throws android.os.RemoteException , org.json.JSONException { android.net.wifi.nan.WifiNanSession session ; synchronized ( mLock ) { session = mSessions.get ( clientId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanDisconnect before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } session.disconnect ( ) ; }
Source:
public android.security.net.config.NetworkSecurityConfig build ( ) { boolean cleartextPermitted = getEffectiveCleartextTrafficPermitted ( ) ; boolean hstsEnforced = getEffectiveCleartextTrafficPermitted ( ) ; android.security.net.config.PinSet pinSet = getEffectivePinSet ( ) ; java.util.List < android.security.net.config.CertificatesEntryRef > entryRefs = getEffectiveCertificatesEntryRefs ( ) ; return new android.security.net.config.NetworkSecurityConfig ( cleartextPermitted , hstsEnforced , pinSet , entryRefs ) ; }

Target:
public android.security.net.config.NetworkSecurityConfig build ( ) { boolean cleartextPermitted = getEffectiveCleartextTrafficPermitted ( ) ; boolean hstsEnforced = getEffectiveHstsEnforced ( ) ; android.security.net.config.PinSet pinSet = getEffectivePinSet ( ) ; java.util.List < android.security.net.config.CertificatesEntryRef > entryRefs = getEffectiveCertificatesEntryRefs ( ) ; return new android.security.net.config.NetworkSecurityConfig ( cleartextPermitted , hstsEnforced , pinSet , entryRefs ) ; }
Source:
public void run ( ) { mHandler.removeCallbacks ( this ) ; android.content.pm.PackageStats stats = new android.content.pm.PackageStats ( packageName ) ; final boolean success ; synchronized ( mInstallLock ) { success = getPackageSizeInfoLI ( packageName , stats ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.INIT_COPY ) ; msg.obj = new com.android.server.pm.PackageManagerService.MeasureParams ( stats , success , observer ) ; mHandler.sendMessage ( msg ) ; }

Target:
public void getPackageSizeInfo ( final java.lang.String packageName , final android.content.pm.IPackageStatsObserver observer ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.GET_PACKAGE_SIZE , null ) ; android.content.pm.PackageStats stats = new android.content.pm.PackageStats ( packageName ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.INIT_COPY ) ; msg.obj = new com.android.server.pm.PackageManagerService.MeasureParams ( stats , observer ) ; mHandler.sendMessage ( msg ) ; }
Source:
public void testReplacedLayout ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > mergedMap = merger.getDataMap ( ) ; java.util.List < com.android.ide.common.res2.ResourceItem > values = mergedMap.get ( "layout/main" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.ide.common.res2.ResourceItem mainLayout = values.get ( 1 ) ; com.android.ide.common.res2.ResourceFile sourceFile = mainLayout.getSource ( ) ; assertTrue ( sourceFile.getFile ( ) . getAbsolutePath ( ) . endsWith ( getPlatformPath ( "overlay/layout/main.xml" ) ) ) ; }

Target:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; verifyResourceExists ( merger , "drawable/icon" , "drawable-ldpi/icon" , "drawable/icon2" , "drawable/patch" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "drawable/color_drawable" , "drawable/drawable_ref" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/xliff_with_carriage_return" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen-sw600dp/offset" , "id/item_id" , "integer/integer" ) ; }
Source:
public void checkValidity ( ) { if ( ! ( ( ( parent ) instanceof com.android.jack.ir.ast.JPackage ) || ( ( parent ) instanceof com.android.jack.ir.ast.JSession ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent" ) ; } }

Target:
public void checkValidity ( ) { if ( ( parent ) instanceof com.android.jack.ir.ast.JPackage ) { if ( ( parent ) != ( enclosingPackage ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent or enclosing package" ) ; } } else if ( ( parent ) instanceof com.android.jack.ir.ast.JSession ) { if ( ( enclosingPackage ) != null ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent or enclosing package" ) ; } } else { throw new com.android.jack.ir.JNodeInternalError ( this , "Invalid parent or enclosing package" ) ; } }
Source:
public void testVload_uchar ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.I8 ( mRS ) , w ) ) ; byte [ ] tmp = randomByteArray ( w ) ; byte [ ] tmp2 = new byte [ w ] ; script.forEach_copy2d_uchar ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch uchar: " ) ; }

Target:
public void testVload_uchar ( ) { testSetup ( android.renderscript.cts.Type.createX ( mRS , android.renderscript.cts.Element.U8 ( mRS ) , w ) ) ; byte [ ] tmp = randomByteArray ( w ) ; byte [ ] tmp2 = new byte [ w ] ; script.forEach_copy2d_uchar ( walkAlloc ) ; verify ( tmp , tmp2 , "Data mismatch uchar: " ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , long [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params , boolean mUseInc ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , mUseInc ) ; } else { rsnScriptForEach ( mContext , mIncCon , id , slot , ain , aout , params , mUseInc ) ; } }
Source:
public void testStageInstallWithErrorCode_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertInstallDistroStaged ( distro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertInstallDistroStaged ( distro ) ; assertNoInstalledDistro ( ) ; }
Source:
public com.google.common.collect.ImmutableSet.Builder < E > addAll ( java.lang.Iterable < ? extends E > elements ) { if ( elements instanceof java.util.Collection ) { java.util.Collection < ? > collection = ( ( java.util.Collection < ? > ) ( elements ) ) ; expandFor ( collection.size ( ) ) ; } super . addAll ( elements ) ; return this ; }

Target:
public com.google.common.collect.ImmutableSet.Builder < E > add ( E element ) { super . add ( element ) ; return this ; }
Source:
public static float nextUp ( float f ) { if ( ( sun.misc.FpUtils.isNaN ( f ) ) || ( f == ( sun.misc.FloatConsts.POSITIVE_INFINITY ) ) ) return f ; else { f += 0.0F ; return java.lang.Float.intBitsToFloat ( ( ( java.lang.Float.floatToRawIntBits ( f ) ) + ( f >= 0.0F ? + 1 : - 1 ) ) ) ; } }

Target:
public static float ulp ( float f ) { return java.lang.Math.ulp ( f ) ; }
Source:
private static boolean isRootStorageDir ( java.lang.String artPath ) { for ( int i = 0 ; i < ( com.android.providers.media.MediaProvider.mExternalStoragePaths.length ) ; i ++ ) { if ( ( ( com.android.providers.media.MediaProvider.mExternalStoragePaths [ i ] ) != null ) && ( artPath.equalsIgnoreCase ( com.android.providers.media.MediaProvider.mExternalStoragePaths [ i ] ) ) ) return true ; } return false ; }

Target:
private boolean isSecondaryExternalPath ( java.lang.String path ) { for ( int i = 1 ; i < ( mExternalStoragePaths.length ) ; i ++ ) { if ( path.startsWith ( mExternalStoragePaths [ i ] ) ) { return true ; } } return false ; }
Source:
public static java.lang.String summarize ( byte [ ] hwaddr , byte [ ] buffer , int length ) { if ( ( hwaddr == null ) || ( ( hwaddr.length ) != ( ETHER_ADDR_LEN ) ) ) return null ; if ( buffer == null ) return null ; length = java.lang.Math.min ( length , buffer.length ) ; return new android.net.util.ConnectivityPacketSummary ( hwaddr , buffer , length ) . toString ( ) ; }

Target:
public static java.lang.String summarize ( android.net.MacAddress macAddr , byte [ ] buffer , int length ) { if ( ( macAddr == null ) || ( buffer == null ) ) return null ; length = java.lang.Math.min ( length , buffer.length ) ; return new android.net.util.ConnectivityPacketSummary ( macAddr , buffer , length ) . toString ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 0 ] ) ; Main.prepareNativeLibFileName ( args [ 0 ] ) ; Main.doTest ( false , false ) ; Main.appendToBootClassLoader ( Main.DEX_PARENT_BOOT ) ; Main.doTest ( true , false ) ; Main.appendToBootClassLoader ( Main.DEX_CHILD ) ; Main.doTest ( true , true ) ; java.lang.System.out.println ( "Done" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 0 ] ) ; Main.prepareNativeLibFileName ( args [ 0 ] ) ; Main.init ( ) ; Main.doTest ( false , false ) ; Main.appendToBootClassLoader ( Main.DEX_PARENT_BOOT ) ; Main.doTest ( true , false ) ; Main.appendToBootClassLoader ( Main.DEX_CHILD ) ; Main.doTest ( true , true ) ; java.lang.System.out.println ( "Done" ) ; }
Source:
void onUserInitialized ( com.android.server.am.UserState uss , boolean foreground , int oldUserId , int newUserId ) { synchronized ( this ) { if ( foreground ) { moveUserToForeground ( uss , oldUserId , newUserId ) ; } } completeSwitchAndInitialize ( uss , newUserId , true , false ) ; }

Target:
public boolean isInHomeStack ( int taskId ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "getStackInfo()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { final com.android.server.am.TaskRecord tr = mStackSupervisor.anyTaskForIdLocked ( taskId , ( ! ( com.android.server.am.ActivityStackSupervisor.RESTORE_FROM_RECENTS ) ) , StackId.INVALID_STACK_ID ) ; return ( ( tr != null ) && ( ( tr.stack ) != null ) ) && ( tr.stack.isHomeStack ( ) ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
public int runLaunchpad ( java.lang.String action ) { android.app.cts.LaunchpadActivity.setCallingTest ( this ) ; synchronized ( this ) { mIntent.setAction ( action ) ; mFinished = false ; mIntent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; mContext.startActivity ( mIntent ) ; } return waitForResultOrThrow ( ( 60 * 1000 ) ) ; }

Target:
public int runLaunchpad ( java.lang.String action ) { startLaunchpadActivity ( action ) ; return waitForResultOrThrow ( android.app.cts.ActivityTestsBase.TIMEOUT_MS ) ; }
Source:
public void testAddAll2_IndexOutOfBoundsException ( ) { try { java.util.concurrent.CopyOnWriteArrayList c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; c.add ( "asdasd" ) ; c.add ( "asdasdasd" ) ; c.addAll ( 100 , new java.util.LinkedList ( ) ) ; 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 void subscribe ( int clientId , android.os.Looper looper , android.net.wifi.nan.SubscribeConfig subscribeConfig , android.net.wifi.nan.WifiNanDiscoverySessionCallback callback ) { if ( android.net.wifi.nan.WifiNanManager.VDBG ) { if ( android.net.wifi.nan.WifiNanManager.VDBG ) { android.util.Log.v ( android.net.wifi.nan.WifiNanManager.TAG , ( ( ( "subscribe(): clientId=" + clientId ) + ", config=" ) + subscribeConfig ) ) ; } } try { mService.subscribe ( clientId , subscribeConfig , new android.net.wifi.nan.WifiNanManager.WifiNanDiscoverySessionCallbackProxy ( this , looper , false , callback , clientId ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void subscribe ( int clientId , android.os.Looper looper , android.net.wifi.aware.SubscribeConfig subscribeConfig , android.net.wifi.aware.WifiAwareDiscoverySessionCallback callback ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) { if ( android.net.wifi.aware.WifiAwareManager.VDBG ) { android.util.Log.v ( android.net.wifi.aware.WifiAwareManager.TAG , ( ( ( "subscribe(): clientId=" + clientId ) + ", config=" ) + subscribeConfig ) ) ; } } try { mService.subscribe ( clientId , subscribeConfig , new android.net.wifi.aware.WifiAwareManager.WifiAwareDiscoverySessionCallbackProxy ( this , looper , false , callback , clientId ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
static com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata getAlternateFormatsForCountry ( int countryCallingCode ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.countryCodeSet.contains ( countryCallingCode ) ) ) { return null ; } synchronized ( com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap.containsKey ( countryCallingCode ) ) ) { com.google.i18n.phonenumbers.MetadataManager.loadAlternateFormatsMetadataFromFile ( countryCallingCode ) ; } } return com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap.get ( countryCallingCode ) ; }

Target:
static com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata getShortNumberMetadataForRegion ( java.lang.String regionCode ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.shortNumberMetadataRegionCodes.contains ( regionCode ) ) ) { return null ; } return com.google.i18n.phonenumbers.MetadataManager.getMetadataFromMultiFilePrefix ( regionCode , com.google.i18n.phonenumbers.MetadataManager.shortNumberMetadataMap , com.google.i18n.phonenumbers.MetadataManager.SHORT_NUMBER_METADATA_FILE_PREFIX , com.google.i18n.phonenumbers.MetadataManager.DEFAULT_METADATA_LOADER ) ; }
Source:
public void setDescription ( final java.lang.String description ) { syncExec ( mLabel , new java.lang.Runnable ( ) { public void run ( ) { mLabel.setText ( description ) ; } } ) ; synchronized ( mLogText ) { mLogText.append ( "** " ) . append ( description ) ; } }

Target:
public void setDescription ( final java.lang.String description ) { syncExec ( mLabel , new java.lang.Runnable ( ) { public void run ( ) { mLabel.setText ( description ) ; } } ) ; if ( acceptLog ( description ) ) { if ( ( mLog ) != null ) { mLog.printf ( "%1$s" , description ) ; } else { synchronized ( mLogText ) { mLogText.append ( description ) ; } } } }
Source:
public boolean clearNetworkConnectChoice ( int networkId ) { android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setConnectChoice ( null ) ; config.getNetworkSelectionStatus ( ) . setConnectChoiceTimestamp ( NetworkSelectionStatus.INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP ) ; return true ; }

Target:
public boolean clearNetworkConnectChoice ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManagerNew.TAG , ( "Clear network connect choice for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.getNetworkSelectionStatus ( ) . setConnectChoice ( null ) ; config.getNetworkSelectionStatus ( ) . setConnectChoiceTimestamp ( NetworkSelectionStatus.INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP ) ; return true ; }
Source:
public void sendRttModifyRequest ( ) { logi ( "sendRttModifyRequest" ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "sendRttModifyRequest::no session" ) ; } if ( mCallProfile.mMediaProfile.isRttCall ( ) ) { logi ( "sendRttModifyRequest::Already RTT call, ignoring." ) ; return ; } android.os.Parcel p = android.os.Parcel.obtain ( ) ; mCallProfile.writeToParcel ( p , 0 ) ; android.telephony.ims.ImsCallProfile requestedProfile = new android.telephony.ims.ImsCallProfile ( p ) ; requestedProfile.mMediaProfile.setRttMode ( ImsStreamMediaProfile.RTT_MODE_FULL ) ; mSession.sendRttModifyRequest ( requestedProfile ) ; } }

Target:
public void sendRttModifyRequest ( ) { logi ( "sendRttModifyRequest" ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "sendRttModifyRequest::no session" ) ; } if ( mCallProfile.mMediaProfile.isRttCall ( ) ) { logi ( "sendRttModifyRequest::Already RTT call, ignoring." ) ; return ; } android.os.Parcel p = android.os.Parcel.obtain ( ) ; mCallProfile.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.ims.ImsCallProfile requestedProfile = new android.telephony.ims.ImsCallProfile ( p ) ; requestedProfile.mMediaProfile.setRttMode ( ImsStreamMediaProfile.RTT_MODE_FULL ) ; mSession.sendRttModifyRequest ( requestedProfile ) ; } }
Source:
native void rsnAllocationData1D ( int con , int id , int off , int mip , int count , float [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationData2D ( int id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID ) ; }
Source:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUintUintUintUint args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; long min = ( args.inMinValue ) & 4294967295L ; long max = ( args.inMaxValue ) & 4294967295L ; long in = ( args.inValue ) & 4294967295L ; args.out = ( ( int ) ( java.lang.StrictMath.min ( max , java.lang.StrictMath.max ( in , min ) ) ) ) ; }

Target:
public static void computeConvert ( android.renderscript.cts.TestConvert.ArgumentsIntUshort args ) { args.out = android.renderscript.cts.CoreMathVerifier.convertIntToUshort ( args.inV ) ; }
Source:
public java.util.Iterator < com.android.sched.vfs.InputVFile > iterator ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType ) { if ( ! ( containsFileType ( fileType ) ) ) { return com.google.common.collect.Iterators.emptyIterator ( ) ; } java.util.List < com.android.sched.vfs.InputVFile > inputVFiles = new java.util.ArrayList < com.android.sched.vfs.InputVFile > ( ) ; try { fillFiles ( getSectionVFS ( fileType ) . getRootInputVDir ( ) , fileType , inputVFiles ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new java.lang.AssertionError ( e ) ; } return inputVFiles.listIterator ( ) ; }

Target:
public java.util.Iterator < com.android.sched.vfs.InputVFile > iterator ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType ) { if ( ! ( containsFileType ( fileType ) ) ) { return com.google.common.collect.ImmutableSet.< com.android.sched.vfs.InputVFile > of ( ) . iterator ( ) ; } java.util.List < com.android.sched.vfs.InputVFile > inputVFiles = new java.util.ArrayList < com.android.sched.vfs.InputVFile > ( ) ; try { fillFiles ( getSectionVFS ( fileType ) . getRootInputVDir ( ) , fileType , inputVFiles ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new java.lang.AssertionError ( e ) ; } return inputVFiles.listIterator ( ) ; }