auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void clientReadPhy ( int clientIf , java.lang.String address ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; java.lang.Integer connId = mClientMap.connIdByAddress ( clientIf , address ) ; if ( connId == null ) { android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "clientReadPhy() - no connection to " + address ) ) ; return ; } if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( ( ( "clientReadPhy() - address=" + address ) + ", connId=" ) + connId ) ) ; gattClientReadPhyNative ( clientIf , address ) ; }

Target:
void clientReadPhy ( int clientIf , java.lang.String address ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; java.lang.Integer connId = mClientMap.connIdByAddress ( clientIf , address ) ; if ( connId == null ) { if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "clientReadPhy() - no connection to " + address ) ) ; return ; } if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( ( ( "clientReadPhy() - address=" + address ) + ", connId=" ) + connId ) ) ; gattClientReadPhyNative ( clientIf , address ) ; }
Source:
public void testMaxLengthName ( ) throws java.lang.Exception { java.lang.String maxLengthName = libcore.java.util.zip.ZipEntryTest.makeString ( 65535 , "z" ) ; java.io.File f = createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = libcore.java.util.zip.ZipEntryTest.createZipOutputStream ( f ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( maxLengthName ) ) ; out.closeEntry ( ) ; out.close ( ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; assertNotNull ( zipFile.getEntry ( maxLengthName ) ) ; zipFile.close ( ) ; }

Target:
public void testMaxLengthName ( ) throws java.lang.Exception { java.lang.String maxLengthName = libcore.java.util.zip.ZipEntryTest.makeString ( 65535 , "z" ) ; java.io.File f = libcore.java.util.zip.ZipEntryTest.createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = libcore.java.util.zip.ZipEntryTest.createZipOutputStream ( f ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( maxLengthName ) ) ; out.closeEntry ( ) ; out.close ( ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; assertNotNull ( zipFile.getEntry ( maxLengthName ) ) ; zipFile.close ( ) ; }
Source:
private void updatePreferences ( ) { mPinDialog.setEnabled ( ( ( mPhone ) != null ) ) ; mPinToggle.setEnabled ( ( ( mPhone ) != null ) ) ; if ( ( mPhone ) != null ) { mPinToggle.setChecked ( mPhone.getIccCard ( ) . getIccLockEnabled ( ) ) ; } }

Target:
private void updatePreferences ( ) { if ( ( mPinDialog ) != null ) { mPinDialog.setEnabled ( ( ( mPhone ) != null ) ) ; } if ( ( mPinToggle ) != null ) { mPinToggle.setEnabled ( ( ( mPhone ) != null ) ) ; if ( ( mPhone ) != null ) { mPinToggle.setChecked ( mPhone.getIccCard ( ) . getIccLockEnabled ( ) ) ; } } }
Source:
private void processRegisterNotification ( int eventId , int param ) { switch ( eventId ) { case com.android.bluetooth.avrcp.Avrcp.EVT_PLAY_STATUS_CHANGED : mPlayStatusChangedNT = com.android.bluetooth.avrcp.Avrcp.NOTIFICATION_TYPE_INTERIM ; registerNotificationRspPlayStatusNative ( mPlayStatusChangedNT , convertPlayStateToPlayStatus ( mCurrentPlayState ) ) ; break ; case com.android.bluetooth.avrcp.Avrcp.EVT_TRACK_CHANGED : android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , "Track changed notification enabled" ) ; mTrackChangedNT = com.android.bluetooth.avrcp.Avrcp.NOTIFICATION_TYPE_INTERIM ; sendTrackChangedRsp ( ) ; break ; case com.android.bluetooth.avrcp.Avrcp.EVT_PLAY_POS_CHANGED : mPlayPosChangedNT = com.android.bluetooth.avrcp.Avrcp.NOTIFICATION_TYPE_INTERIM ; sendPlayPosNotificationRsp ( true ) ; mPlaybackIntervalMs = ( ( long ) ( param ) ) * 1000L ; break ; } }

Target:
private void processRegisterNotification ( int eventId , int param ) { switch ( eventId ) { case com.android.bluetooth.avrcp.Avrcp.EVT_PLAY_STATUS_CHANGED : mPlayStatusChangedNT = com.android.bluetooth.avrcp.Avrcp.NOTIFICATION_TYPE_INTERIM ; registerNotificationRspPlayStatusNative ( mPlayStatusChangedNT , convertPlayStateToPlayStatus ( mCurrentPlayState ) ) ; break ; case com.android.bluetooth.avrcp.Avrcp.EVT_TRACK_CHANGED : android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , "Track changed notification enabled" ) ; mTrackChangedNT = com.android.bluetooth.avrcp.Avrcp.NOTIFICATION_TYPE_INTERIM ; sendTrackChangedRsp ( ) ; break ; case com.android.bluetooth.avrcp.Avrcp.EVT_PLAY_POS_CHANGED : mPlayPosChangedNT = com.android.bluetooth.avrcp.Avrcp.NOTIFICATION_TYPE_INTERIM ; mPlaybackIntervalMs = ( ( long ) ( param ) ) * 1000L ; sendPlayPosNotificationRsp ( true ) ; break ; } }
Source:
public android.renderscript.cts.Floaty divide ( android.renderscript.cts.Floaty a ) { float num = java.lang.Math.abs ( mValue ) ; float den = java.lang.Math.abs ( a.mValue ) ; mError = ( ( num * ( a.mError ) ) + ( den * ( mError ) ) ) / ( den * ( den - ( a.mError ) ) ) ; mValue /= a.mValue ; return this ; }

Target:
public android.renderscript.cts.Floaty divide ( android.renderscript.cts.Floaty a ) { double num = java.lang.Math.abs ( mValue ) ; double den = java.lang.Math.abs ( a.mValue ) ; mError = ( ( num * ( a.mError ) ) + ( den * ( mError ) ) ) / ( den * ( den - ( a.mError ) ) ) ; mValue /= a.mValue ; return this ; }
Source:
protected com.android.ide.common.res2.ResourceFile createFileAndItems ( java.io.File sourceFolder , java.io.File file , com.android.utils.ILogger logger ) throws com.android.ide.common.res2.MergingException { com.android.ide.common.res2.ResourceSet.FolderData folderData = com.android.ide.common.res2.ResourceSet.getFolderData ( file.getParentFile ( ) ) ; if ( folderData == null ) { return null ; } return com.android.ide.common.res2.ResourceSet.createResourceFile ( file , folderData , logger ) ; }

Target:
protected com.android.ide.common.res2.ResourceFile createFileAndItems ( java.io.File sourceFolder , java.io.File file , com.android.utils.ILogger logger ) throws com.android.ide.common.res2.MergingException { com.android.ide.common.res2.ResourceSet.FolderData folderData = getFolderData ( file.getParentFile ( ) ) ; if ( folderData == null ) { return null ; } return com.android.ide.common.res2.ResourceSet.createResourceFile ( file , folderData , logger ) ; }
Source:
public java.util.Collection < com.android.build.gradle.managed.SigningConfig > getSigningConfigs ( ) { return com.google.common.collect.ImmutableList.copyOf ( com.google.common.collect.Iterables.transform ( model.getSigningConfigs ( ) , new com.google.common.base.Function < com.android.build.gradle.managed.SigningConfig , com.android.build.gradle.managed.SigningConfig > ( ) { @ java.lang.Override public com.android.build.gradle.managed.SigningConfig apply ( com.android.build.gradle.managed.SigningConfig signingConfig ) { return new com.android.build.gradle.managed.adaptor.SigningConfigAdaptor ( signingConfig ) ; } } ) ) ; }

Target:
public java.util.Collection < com.android.build.gradle.managed.SigningConfig > getSigningConfigs ( ) { return com.google.common.collect.ImmutableList.copyOf ( com.google.common.collect.Iterables.transform ( model.getSigningConfigs ( ) . values ( ) , new com.google.common.base.Function < com.android.build.gradle.managed.SigningConfig , com.android.build.gradle.managed.SigningConfig > ( ) { @ java.lang.Override public com.android.build.gradle.managed.SigningConfig apply ( com.android.build.gradle.managed.SigningConfig signingConfig ) { return new com.android.build.gradle.managed.adaptor.SigningConfigAdaptor ( signingConfig ) ; } } ) ) ; }
Source:
private void loadPolicy ( ) { mAdapter.clear ( ) ; android.content.SharedPreferences prefs = getPreferences ( com.android.cts.verifier.admin.MODE_PRIVATE ) ; if ( prefs.getBoolean ( com.android.cts.verifier.admin.PolicySerializationTestActivity.LOAD_EXPECTED_POLICY_PREFERENCE , true ) ) { for ( com.android.cts.verifier.admin.PolicySerializationTestActivity.PolicyItem < ? > item : mPolicyItems ) { item.loadExpectedValue ( prefs ) ; item.loadActualValue ( mDevicePolicyManager , mAdmin ) ; mAdapter.add ( item ) ; } } }

Target:
private void loadPolicy ( ) { mAdapter.clear ( ) ; android.content.SharedPreferences prefs = getPreferences ( com.android.cts.verifier.admin.MODE_PRIVATE ) ; if ( prefs.getBoolean ( com.android.cts.verifier.admin.PolicySerializationTestActivity.LOAD_EXPECTED_POLICY_PREFERENCE , false ) ) { for ( com.android.cts.verifier.admin.PolicySerializationTestActivity.PolicyItem < ? > item : mPolicyItems ) { item.loadExpectedValue ( prefs ) ; item.loadActualValue ( mDevicePolicyManager , mAdmin ) ; mAdapter.add ( item ) ; } } }
Source:
public static java.lang.String hex ( int ch ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; java.lang.String foo = java.lang.Integer.toString ( ch , 16 ) . toUpperCase ( ) ; for ( int i = foo.length ( ) ; i < 4 ; ++ i ) { result.append ( '0' ) ; } return result + foo ; }

Target:
protected static java.lang.String hex ( int ch ) { java.lang.StringBuffer result = new java.lang.StringBuffer ( ) ; java.lang.String foo = java.lang.Integer.toString ( ch , 16 ) . toUpperCase ( ) ; for ( int i = foo.length ( ) ; i < 4 ; ++ i ) { result.append ( '0' ) ; } return result + foo ; }
Source:
public static void computeAcosh ( android.renderscript.cts.TestAcosh.ArgumentsFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 4 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.sqrt ( ( ( x - 1.0 ) / 2.0 ) ) ) ) ; }

Target:
public static void computeAcosh ( android.renderscript.cts.TestAcosh.ArgumentsFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 4 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.log ( ( x + ( java.lang.StrictMath.sqrt ( ( ( x * x ) - 1.0 ) ) ) ) ) ) ) ; }
Source:
public int getUidForSharedUser ( java.lang.String sharedUserName ) { if ( sharedUserName == null ) { return - 1 ; } synchronized ( mPackages ) { final com.android.server.pm.SharedUserSetting suid = mSettings.getSharedUserLPw ( sharedUserName , 0 , false ) ; if ( suid == null ) { return - 1 ; } return suid.userId ; } }

Target:
public int getUidForSharedUser ( java.lang.String sharedUserName ) { if ( sharedUserName == null ) { return - 1 ; } synchronized ( mPackages ) { final com.android.server.pm.SharedUserSetting suid = mSettings.getSharedUserLPw ( sharedUserName , 0 , 0 , false ) ; if ( suid == null ) { return - 1 ; } return suid.userId ; } }
Source:
public static java.lang.String pii ( java.lang.Object pii ) { if ( ( pii == null ) || ( android.telecom.Log.VERBOSE ) ) { return java.lang.String.valueOf ( pii ) ; } if ( pii instanceof android.net.Uri ) { return android.telecom.Log.piiUri ( ( ( android.net.Uri ) ( pii ) ) ) ; } return ( "[" + ( android.telecom.Log.secureHash ( java.lang.String.valueOf ( pii ) . getBytes ( ) ) ) ) + "]" ; }

Target:
public static java.lang.String pii ( java.lang.Object pii ) { if ( ( pii == null ) || ( android.telecom.Log.VERBOSE ) ) { return java.lang.String.valueOf ( pii ) ; } return ( "[" + ( android.telecom.Log.secureHash ( java.lang.String.valueOf ( pii ) . getBytes ( ) ) ) ) + "]" ; }
Source:
public int [ ] blend ( int [ ] src , int [ ] dst ) { return new int [ ] { java.lang.Math.min ( src [ 0 ] , dst [ 0 ] ) , java.lang.Math.min ( src [ 1 ] , dst [ 1 ] ) , java.lang.Math.min ( src [ 2 ] , dst [ 2 ] ) , java.lang.Math.min ( 255 , ( ( src [ 3 ] ) + ( dst [ 3 ] ) ) ) } ; }

Target:
public int [ ] blend ( int [ ] src , int [ ] dst , int [ ] result ) { for ( int i = 0 ; i < 3 ; i ++ ) { result [ i ] = java.lang.Math.min ( src [ i ] , dst [ i ] ) ; } result [ 3 ] = java.lang.Math.min ( 255 , ( ( src [ 3 ] ) + ( dst [ 3 ] ) ) ) ; return result ; }
Source:
public void testRemoveSingleOpenNetwork ( ) { android.net.wifi.WifiConfiguration openNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; java.util.List < android.net.wifi.WifiConfiguration > networks = new java.util.ArrayList < > ( ) ; networks.add ( openNetwork ) ; verifyAddNetworkToWifiConfigManager ( openNetwork ) ; verifyRemoveNetworkFromWifiConfigManager ( openNetwork ) ; assertTrue ( mWifiConfigManager.getConfiguredNetworks ( ) . isEmpty ( ) ) ; }

Target:
public void testRemoveSingleOpenNetwork ( ) { android.net.wifi.WifiConfiguration openNetwork = com.android.server.wifi.WifiConfigurationTestUtil.createOpenNetwork ( ) ; verifyAddNetworkToWifiConfigManager ( openNetwork ) ; assertFalse ( mWifiConfigManager.getConfiguredNetworks ( ) . isEmpty ( ) ) ; verifyRemoveNetworkFromWifiConfigManager ( openNetwork ) ; assertTrue ( mWifiConfigManager.getConfiguredNetworks ( ) . isEmpty ( ) ) ; }
Source:
private void computeDetectors ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Project project ) { mCurrentFolderType = null ; mCurrentVisitor = null ; com.android.tools.lint.client.api.Configuration configuration = project.getConfiguration ( ) ; mScopeDetectors = new java.util.EnumMap < com.android.tools.lint.detector.api.Scope , java.util.List < com.android.tools.lint.detector.api.Detector > > ( com.android.tools.lint.detector.api.Scope.class ) ; mApplicableDetectors = mRegistry.createDetectors ( mClient , configuration , mScope , mScopeDetectors ) ; validateScopeList ( ) ; }

Target:
private void computeDetectors ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Project project ) { mCurrentFolderType = null ; mCurrentVisitor = null ; com.android.tools.lint.client.api.Configuration configuration = project.getConfiguration ( this ) ; mScopeDetectors = new java.util.EnumMap < com.android.tools.lint.detector.api.Scope , java.util.List < com.android.tools.lint.detector.api.Detector > > ( com.android.tools.lint.detector.api.Scope.class ) ; mApplicableDetectors = mRegistry.createDetectors ( mClient , configuration , mScope , mScopeDetectors ) ; validateScopeList ( ) ; }
Source:
private int getStringIndex ( java.lang.String [ ] arr , java.lang.String toBeFound , int defaultIndex ) { for ( int i = 0 ; i < ( arr.length ) ; i ++ ) { if ( toBeFound.contains ( arr [ i ] ) ) return i ; } return defaultIndex ; }

Target:
private int getStringIndex ( java.lang.String [ ] arr , java.lang.String toBeFound , int defaultIndex ) { for ( int i = 0 ; i < ( arr.length ) ; i ++ ) { if ( toBeFound.equals ( arr [ i ] ) ) return i ; } return defaultIndex ; }
Source:
public boolean sendReport ( int id , byte [ ] data ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "sendReport(): id=" + id ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.sendReport ( id , data ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }

Target:
public boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { boolean result = false ; if ( ( mService ) != null ) { try { result = mService.sendReport ( device , id , data ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }
Source:
public boolean startWpsPbc ( java.lang.String bssid ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.startWpsPbc ( bssid ) ; } else { if ( android.text.TextUtils.isEmpty ( bssid ) ) { return doBooleanCommand ( "WPS_PBC" ) ; } else { return doBooleanCommand ( ( "WPS_PBC " + bssid ) ) ; } } }

Target:
public boolean startWpsPbc ( java.lang.String bssid ) { return mSupplicantStaIfaceHal.startWpsPbc ( bssid ) ; }
Source:
public void onDestroy ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onDestroy" ) ; mAdapter.changeCursor ( null ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mCallLogObserver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mContactsObserver ) ; super . onDestroy ( ) ; }

Target:
public void onDestroy ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onDestroy" ) ; if ( ( mAdapter ) != null ) { mAdapter.changeCursor ( null ) ; } getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mCallLogObserver ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mContactsObserver ) ; super . onDestroy ( ) ; }
Source:
private void createScript ( ) { mRS = android.renderscript.RenderScript.create ( this ) ; mInAllocation = android.renderscript.Allocation.createFromBitmap ( mRS , mBitmapIn , Allocation.MipmapControl.MIPMAP_NONE , Allocation.USAGE_SCRIPT ) ; mOutAllocation = android.renderscript.Allocation.createFromBitmap ( mRS , mBitmapOut , Allocation.MipmapControl.MIPMAP_NONE , Allocation.USAGE_SCRIPT ) ; mScript = new com.example.android.rs.hellocompute.ScriptC_mono ( mRS , getResources ( ) , R.raw.mono ) ; mScript.forEach_root ( mInAllocation , mOutAllocation ) ; mOutAllocation.copyTo ( mBitmapOut ) ; }

Target:
private void createScript ( ) { mRS = android.renderscript.RenderScript.create ( this ) ; mInAllocation = android.renderscript.Allocation.createFromBitmap ( mRS , mBitmapIn , Allocation.MipmapControl.MIPMAP_NONE , Allocation.USAGE_SCRIPT ) ; mOutAllocation = android.renderscript.Allocation.createFromBitmap ( mRS , mBitmapOut , Allocation.MipmapControl.MIPMAP_NONE , Allocation.USAGE_SCRIPT ) ; mScript = new com.example.android.rs.hellocompute.ScriptC_mono ( mRS ) ; mScript.forEach_root ( mInAllocation , mOutAllocation ) ; mOutAllocation.copyTo ( mBitmapOut ) ; }
Source:
public boolean setLoggingEventHandler ( com.android.server.wifi.WifiNative.WifiLoggerEventHandler handler ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.setLoggingEventHandler ( handler ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { int oldId = com.android.server.wifi.WifiNative.sLogCmdId ; com.android.server.wifi.WifiNative.sLogCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; if ( ! ( com.android.server.wifi.WifiNative.setLoggingEventHandlerNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sLogCmdId ) ) ) { com.android.server.wifi.WifiNative.sLogCmdId = oldId ; return false ; } com.android.server.wifi.WifiNative.sWifiLoggerEventHandler = handler ; return true ; } else { return false ; } } } }

Target:
public boolean setLoggingEventHandler ( com.android.server.wifi.WifiNative.WifiLoggerEventHandler handler ) { return mWifiVendorHal.setLoggingEventHandler ( handler ) ; }
Source:
public java.lang.Object clone ( ) { java.util.TreeSet < E > clone = null ; try { clone = ( ( java.util.TreeSet < E > ) ( super . clone ( ) ) ) ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( ) ; } clone.m = new java.util.TreeMap < > ( m ) ; return clone ; }

Target:
public java.lang.Object clone ( ) { java.util.TreeSet < E > clone ; try { clone = ( ( java.util.TreeSet < E > ) ( super . clone ( ) ) ) ; } catch ( java.lang.CloneNotSupportedException e ) { throw new java.lang.InternalError ( e ) ; } clone.m = new java.util.TreeMap < > ( m ) ; return clone ; }
Source:
public void testAesCbcHmacSha512Udp4 ( ) 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_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testAesCbcHmacSha512Udp4 ( ) 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_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }
Source:
public void copyTo ( short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt16 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.SIGNED_16 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyTo ( short [ ] d ) { validateIsInt16 ( ) ; copyTo ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
private void markConnectionFailed ( android.bluetooth.BluetoothSocket s ) { if ( com.android.bluetooth.opp.BluetoothOppTransfer.V ) android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , ( "markConnectionFailed " + s ) ) ; try { if ( s != null ) { s.close ( ) ; } } catch ( java.io.IOException e ) { if ( com.android.bluetooth.opp.BluetoothOppTransfer.V ) android.util.Log.e ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , "Error when close socket" ) ; } mSessionHandler.obtainMessage ( com.android.bluetooth.opp.BluetoothOppTransfer.TRANSPORT_ERROR ) . sendToTarget ( ) ; return ; }

Target:
private void markConnectionFailed ( android.bluetooth.BluetoothSocket s ) { if ( com.android.bluetooth.opp.BluetoothOppTransfer.V ) { android.util.Log.v ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , ( "markConnectionFailed " + s ) ) ; } try { if ( s != null ) { s.close ( ) ; } } catch ( java.io.IOException e ) { if ( com.android.bluetooth.opp.BluetoothOppTransfer.V ) { android.util.Log.e ( com.android.bluetooth.opp.BluetoothOppTransfer.TAG , "Error when close socket" ) ; } } mSessionHandler.obtainMessage ( com.android.bluetooth.opp.BluetoothOppTransfer.TRANSPORT_ERROR ) . sendToTarget ( ) ; return ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( ( method.getEnclosingType ( ) . isExternal ( ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.transformations.ast.BooleanTestTransformer.Visitor visitor = new com.android.jack.transformations.ast.BooleanTestTransformer.Visitor ( method ) ; visitor.accept ( method ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.transformations.ast.BooleanTestTransformer.Visitor visitor = new com.android.jack.transformations.ast.BooleanTestTransformer.Visitor ( method ) ; visitor.accept ( method ) ; }
Source:
public void testConstructor_Success ( ) throws java.lang.Exception { android.security.AndroidKeyPairGeneratorSpec spec = new android.security.AndroidKeyPairGeneratorSpec ( getContext ( ) , android.security.AndroidKeyPairGeneratorSpecTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorSpecTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorSpecTest.SERIAL_1 , android.security.AndroidKeyPairGeneratorSpecTest.NOW , android.security.AndroidKeyPairGeneratorSpecTest.NOW_PLUS_10_YEARS ) ; assertEquals ( "Context should be the one specified" , getContext ( ) , spec.getContext ( ) ) ; assertEquals ( "Alias should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.TEST_ALIAS_1 , spec.getKeystoreAlias ( ) ) ; assertEquals ( "subjectDN should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.TEST_DN_1 , spec.getSubjectDN ( ) ) ; assertEquals ( "startDate should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.NOW , spec.getStartDate ( ) ) ; assertEquals ( "endDate should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.NOW_PLUS_10_YEARS , spec.getEndDate ( ) ) ; }

Target:
public void testConstructor_Success ( ) throws java.lang.Exception { android.security.AndroidKeyPairGeneratorSpec spec = new android.security.AndroidKeyPairGeneratorSpec ( getContext ( ) , android.security.AndroidKeyPairGeneratorSpecTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorSpecTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorSpecTest.SERIAL_1 , android.security.AndroidKeyPairGeneratorSpecTest.NOW , android.security.AndroidKeyPairGeneratorSpecTest.NOW_PLUS_10_YEARS , 0 ) ; assertEquals ( "Context should be the one specified" , getContext ( ) , spec.getContext ( ) ) ; assertEquals ( "Alias should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.TEST_ALIAS_1 , spec.getKeystoreAlias ( ) ) ; assertEquals ( "subjectDN should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.TEST_DN_1 , spec.getSubjectDN ( ) ) ; assertEquals ( "startDate should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.NOW , spec.getStartDate ( ) ) ; assertEquals ( "endDate should be the one specified" , android.security.AndroidKeyPairGeneratorSpecTest.NOW_PLUS_10_YEARS , spec.getEndDate ( ) ) ; }
Source:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" , "fr_CH" , "fr_SA" , "fr_CH@rg=sazzzz" , "fr_CH@calendar=japanese;rg=sazzzz" , "fr_TH@rg=SA" , "th@rg=SA" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "buddhist" , "buddhist" , "buddhist" , "gregorian" , "gregorian" , "islamic-umalqura" , "islamic-umalqura" , "japanese" , "buddhist" , "buddhist" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }

Target:
public void TestTypes ( ) { java.lang.String [ ] locs = new java.lang.String [ ] { "en_US_VALLEYGIRL" , "en_US_VALLEYGIRL@collation=phonebook;calendar=japanese" , "en_US_VALLEYGIRL@collation=phonebook;calendar=gregorian" , "ja_JP@calendar=japanese" , "th_TH@calendar=buddhist" , "th-TH-u-ca-gregory" , "ja_JP_TRADITIONAL" , "th_TH_TRADITIONAL" , "th_TH_TRADITIONAL@calendar=gregorian" , "en_US" , "th_TH" , "th" , "en_TH" , "th_TH@calendar=iso8601" , "fr_CH" , "fr_SA" , "fr_CH@rg=sazzzz" , "fr_CH@calendar=japanese;rg=sazzzz" , "fr_TH@rg=SA" , "th@rg=SA" } ; java.lang.String [ ] types = new java.lang.String [ ] { "gregorian" , "japanese" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "japanese" , "buddhist" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "gregorian" , "japanese" , "gregorian" , "gregorian" } ; for ( int i = 0 ; i < ( locs.length ) ; i ++ ) { com.ibm.icu.util.Calendar cal = com.ibm.icu.util.Calendar.getInstance ( new com.ibm.icu.util.ULocale ( locs [ i ] ) ) ; if ( ! ( cal.getType ( ) . equals ( types [ i ] ) ) ) { errln ( ( ( ( ( ( locs [ i ] ) + " Calendar type " ) + ( cal.getType ( ) ) ) + " instead of " ) + ( types [ i ] ) ) ) ; } } }
Source:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.AssertStatement x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; com.android.jack.ir.ast.JExpression exceptionArgument = pop ( x.exceptionArgument ) ; com.android.jack.ir.ast.JExpression assertExpression = pop ( x.assertExpression ) ; push ( new com.android.jack.ir.ast.JAssertStatement ( info , assertExpression , exceptionArgument ) ) ; } catch ( java.lang.Throwable e ) { throw translateException ( x , e ) ; } }

Target:
public void endVisit ( org.eclipse.jdt.internal.compiler.ast.AssertStatement x , org.eclipse.jdt.internal.compiler.lookup.BlockScope scope ) { try { com.android.jack.ir.sourceinfo.SourceInfo info = makeSourceInfo ( x ) ; com.android.jack.ir.ast.JExpression exceptionArgument = pop ( x.exceptionArgument ) ; com.android.jack.ir.ast.JExpression assertExpression = pop ( x.assertExpression ) ; push ( new com.android.jack.ir.ast.JAssertStatement ( info , assertExpression , exceptionArgument ) ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public boolean containsValue ( @ javax.annotation.Nullable java.lang.Object value ) { if ( value == null ) { return false ; } for ( java.util.Map < C , V > map : backingMap.values ( ) ) { if ( map.containsValue ( value ) ) { return true ; } } return false ; }

Target:
public boolean containsValue ( @ javax.annotation.Nullable java.lang.Object value ) { return ( value != null ) && ( super . containsValue ( value ) ) ; }
Source:
public static void permuteArguments_boxingCallee ( boolean a , java.lang.Integer b ) { if ( a && ( ( b.intValue ( ) ) == 42 ) ) { return ; } java.lang.System.out.println ( ( ( ( "Unexpected arguments: " + a ) + ", " ) + b ) ) ; }

Target:
public static void permuteArguments_boxingCallee ( boolean a , java.lang.Integer b ) { if ( a && ( ( b.intValue ( ) ) == 42 ) ) { return ; } Main.fail ( ( ( ( "Unexpected arguments: " + a ) + ", " ) + b ) ) ; }
Source:
private boolean isLegal ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { if ( expr.getType ( ) . isSameType ( JPrimitiveTypeEnum.VOID.getType ( ) ) ) { return true ; } return ( ( expr instanceof com.android.jack.ir.ast.JAsgOperation ) || ( expr instanceof com.android.jack.ir.ast.JVariableRef ) ) || ( expr instanceof com.android.jack.ir.ast.JMethodCall ) ; }

Target:
private boolean isLegal ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { if ( ( expr.getType ( ) ) == ( JPrimitiveTypeEnum.VOID.getType ( ) ) ) { return true ; } return ( ( expr instanceof com.android.jack.ir.ast.JAsgOperation ) || ( expr instanceof com.android.jack.ir.ast.JVariableRef ) ) || ( expr instanceof com.android.jack.ir.ast.JMethodCall ) ; }
Source:
public void assign ( java.net.HttpCookie cookie , java.lang.String attrName , java.lang.String attrValue ) { if ( ( cookie.getMaxAge ( ) ) == ( java.net.HttpCookie.MAX_AGE_UNSPECIFIED ) ) { java.util.Date date = libcore.net.http.HttpDate.parse ( attrValue ) ; long maxAgeInSeconds = 0 ; if ( date != null ) { maxAgeInSeconds = ( ( date.getTime ( ) ) - ( cookie.whenCreated ) ) / 1000 ; if ( maxAgeInSeconds < 0 ) { maxAgeInSeconds = 0 ; } } cookie.setMaxAge ( maxAgeInSeconds ) ; } }

Target:
public void assign ( java.net.HttpCookie cookie , java.lang.String attrName , java.lang.String attrValue ) { if ( ( cookie.getMaxAge ( ) ) == ( java.net.HttpCookie.MAX_AGE_UNSPECIFIED ) ) { java.util.Date date = libcore.net.http.HttpDate.parse ( attrValue ) ; long maxAgeInSeconds = 0 ; if ( date != null ) { maxAgeInSeconds = ( ( date.getTime ( ) ) - ( cookie.whenCreated ) ) / 1000 ; if ( maxAgeInSeconds == ( java.net.HttpCookie.MAX_AGE_UNSPECIFIED ) ) { maxAgeInSeconds = 0 ; } } cookie.setMaxAge ( maxAgeInSeconds ) ; } }
Source:
static void callChangeCallbacks ( ) { synchronized ( android.os.SystemProperties.sChangeCallbacks ) { if ( ( android.os.SystemProperties.sChangeCallbacks.size ( ) ) == 0 ) { return ; } java.util.ArrayList < java.lang.Runnable > callbacks = new java.util.ArrayList < java.lang.Runnable > ( android.os.SystemProperties.sChangeCallbacks ) ; for ( int i = 0 ; i < ( callbacks.size ( ) ) ; i ++ ) { callbacks.get ( i ) . run ( ) ; } } }

Target:
private static void callChangeCallbacks ( ) { synchronized ( android.os.SystemProperties.sChangeCallbacks ) { if ( ( android.os.SystemProperties.sChangeCallbacks.size ( ) ) == 0 ) { return ; } java.util.ArrayList < java.lang.Runnable > callbacks = new java.util.ArrayList < java.lang.Runnable > ( android.os.SystemProperties.sChangeCallbacks ) ; for ( int i = 0 ; i < ( callbacks.size ( ) ) ; i ++ ) { callbacks.get ( i ) . run ( ) ; } } }
Source:
public void run ( org.eclipse.core.runtime.IProgressMonitor monitor ) throws java.lang.InterruptedException , java.lang.reflect.InvocationTargetException { com.android.ddmlib.SyncService.SyncResult result = sync.pullFile ( remote , local , new com.android.ddmuilib.SyncProgressMonitor ( monitor , java.lang.String.format ( "Pulling %1$s from the device" , remote.getName ( ) ) ) ) ; if ( ( result.getCode ( ) ) != ( com.android.ddmlib.SyncService.RESULT_OK ) ) { com.android.ddmuilib.console.DdmConsole.printErrorToConsole ( java.lang.String.format ( "Failed to pull %1$s: %2$s" , remote , result.getMessage ( ) ) ) ; } sync.close ( ) ; }

Target:
public void close ( ) { sync.close ( ) ; }
Source:
public void testConnectFailureDueToNetworkSaveException ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( true ) ; org.mockito.Mockito.doThrow ( new java.lang.IllegalArgumentException ( "Some error!!!" ) ) . when ( mSupplicantStaNetworkMock ) . saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) , false ) ) ; org.mockito.Mockito.verify ( mISupplicantStaIfaceMock , org.mockito.Mockito.times ( 2 ) ) . removeNetwork ( org.mockito.Matchers.anyInt ( ) ) ; }

Target:
public void testConnectFailureDueToNetworkSaveException ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; setupMocksForConnectSequence ( true ) ; org.mockito.Mockito.doThrow ( new java.lang.IllegalArgumentException ( "Some error!!!" ) ) . when ( mSupplicantStaNetworkMock ) . saveWifiConfiguration ( org.mockito.Matchers.any ( android.net.wifi.WifiConfiguration.class ) ) ; assertFalse ( mDut.connectToNetwork ( new android.net.wifi.WifiConfiguration ( ) ) ) ; org.mockito.Mockito.verify ( mISupplicantStaIfaceMock , org.mockito.Mockito.times ( 2 ) ) . removeNetwork ( org.mockito.Matchers.anyInt ( ) ) ; }
Source:
public static void computeTgamma ( android.renderscript.cts.TestTgamma.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 16 , 128 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.in ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.tgamma ( in.mid32 ( ) ) , android.renderscript.cts.CoreMathVerifier.tgamma ( in.min32 ( ) ) , android.renderscript.cts.CoreMathVerifier.tgamma ( in.max32 ( ) ) ) ; }

Target:
public static void computeTgamma ( android.renderscript.cts.TestTgamma.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 16 , 128 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inV ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.tgamma ( in.mid32 ( ) ) , android.renderscript.cts.CoreMathVerifier.tgamma ( in.min32 ( ) ) , android.renderscript.cts.CoreMathVerifier.tgamma ( in.max32 ( ) ) ) ; }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction withIndex ( int newFirstIndex , int newSecondIndex ) { assert ( getSecondIndexType ( ) ) == ( com.android.jack.dx.io.IndexType.NONE ) ; return new com.android.jack.dx.io.instructions.FourRegisterDecodedInstruction ( getFormat ( ) , getOpcode ( ) , newFirstIndex , getFirstIndexType ( ) , getTarget ( ) , getLiteral ( ) , a , b , c , d ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction withIndex ( int newFirstIndex , int newSecondIndex ) { return new com.android.jack.dx.io.instructions.FourRegisterDecodedInstruction ( getFormat ( ) , getOpcode ( ) , newFirstIndex , getFirstIndexType ( ) , getTarget ( ) , getLiteral ( ) , a , b , c , d , newSecondIndex , getSecondIndexType ( ) ) ; }
Source:
public static void computeErf ( android.renderscript.cts.TestErf.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 16 , 128 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.in ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.erf ( args.in ) , android.renderscript.cts.CoreMathVerifier.erf ( in.min32 ( ) ) , android.renderscript.cts.CoreMathVerifier.erf ( in.max32 ( ) ) ) ; }

Target:
public static void computeErf ( android.renderscript.cts.TestErf.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 16 , 128 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inV ) ; args.out = t.new32 ( android.renderscript.cts.CoreMathVerifier.erf ( args.inV ) , android.renderscript.cts.CoreMathVerifier.erf ( in.min32 ( ) ) , android.renderscript.cts.CoreMathVerifier.erf ( in.max32 ( ) ) ) ; }
Source:
public void setListening ( boolean listening ) { mListening = listening ; if ( mListening ) { mContext.registerReceiver ( mNfcReceiver , new android.content.IntentFilter ( android.nfc.NfcAdapter.ACTION_ADAPTER_STATE_CHANGED ) ) ; if ( ( mAdapter ) == null ) { try { mAdapter = android.nfc.NfcAdapter.getNfcAdapter ( mContext ) ; } catch ( java.lang.UnsupportedOperationException e ) { mAdapter = null ; } } } else { mContext.unregisterReceiver ( mNfcReceiver ) ; } }

Target:
public void setListening ( boolean listening ) { mListening = listening ; if ( mListening ) { mContext.registerReceiver ( mNfcReceiver , new android.content.IntentFilter ( android.nfc.NfcAdapter.ACTION_ADAPTER_STATE_CHANGED ) ) ; } else { mContext.unregisterReceiver ( mNfcReceiver ) ; } }
Source:
protected boolean inSystemImage ( int callerUid ) { java.lang.String [ ] packages = mContext.getPackageManager ( ) . getPackagesForUid ( callerUid ) ; for ( java.lang.String name : packages ) { try { android.content.pm.PackageInfo packageInfo = mContext.getPackageManager ( ) . getPackageInfo ( name , 0 ) ; if ( ( ( packageInfo.applicationInfo.flags ) & ( ApplicationInfo.FLAG_SYSTEM ) ) != 0 ) { return true ; } } catch ( android.content.pm.PackageManager e ) { return false ; } } return false ; }

Target:
protected boolean inSystemImage ( int callerUid ) { java.lang.String [ ] packages = mContext.getPackageManager ( ) . getPackagesForUid ( callerUid ) ; if ( packages != null ) { for ( java.lang.String name : packages ) { try { android.content.pm.PackageInfo packageInfo = mContext.getPackageManager ( ) . getPackageInfo ( name , 0 ) ; if ( ( ( packageInfo.applicationInfo.flags ) & ( ApplicationInfo.FLAG_SYSTEM ) ) != 0 ) { return true ; } } catch ( android.content.pm.PackageManager e ) { return false ; } } } return false ; }
Source:
synchronized void nAllocationData2D ( int id , int xoff , int yoff , int mip , int face , int w , int h , int [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }
Source:
void setUp ( ) { BRANCH ( ( ( 39808.0 - ( cts ) ) - ( dev ) ) ) ; delayTime = 15000 ; createChannels ( ) ; sendNotifications ( com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.SEND_B , com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.MODE_URI , false , true ) ; sleep ( 1000 ) ; sendNotifications ( com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.SEND_C , com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.MODE_URI , false , true ) ; status = READY_AFTER_LONG_DELAY ; }

Target:
protected void setUp ( ) { delayTime = 15000 ; createChannels ( ) ; sendNotifications ( com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.SEND_B , com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.MODE_URI , false , true ) ; sleep ( 1000 ) ; sendNotifications ( com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.SEND_C , com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.MODE_URI , false , true ) ; status = READY_AFTER_LONG_DELAY ; }
Source:
public void testHeadsetAnswerCall ( ) throws java.lang.Exception { com.android.server.telecom.Call mockCall = createRingingCall ( ) ; boolean callAnswered = mBluetoothPhoneService.mBinder.answerCall ( ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( mockCall ) , org.mockito.Matchers.any ( int . class ) ) ; assertEquals ( callAnswered , true ) ; }

Target:
public void testHeadsetAnswerCall ( ) throws java.lang.Exception { com.android.server.telecom.Call mockCall = createRingingCall ( ) ; boolean callAnswered = mBluetoothPhoneService.mBinder.answerCall ( ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . answerCall ( org.mockito.Matchers.eq ( mockCall ) , org.mockito.Matchers.any ( int . class ) ) ; org.junit.Assert.assertEquals ( callAnswered , true ) ; }
Source:
public static long $noinline$runSmaliTestLong ( java.lang.String name , long arg ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , long . class ) ; return ( ( java.lang.Long ) ( m.invoke ( null , arg ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }

Target:
public static long $noinline$runSmaliTestLong ( java.lang.String name , long arg ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "SmaliTests" ) ; java.lang.reflect.Method m = c.getMethod ( name , long . class ) ; return ( ( java.lang.Long ) ( m.invoke ( null , arg ) ) ) ; } catch ( java.lang.Exception ex ) { throw new java.lang.Error ( ex ) ; } }
Source:
private static java.lang.String configToString ( android.net.wifi.WifiConfiguration config ) { if ( config == null ) { return null ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) . append ( "ID=" ) . append ( config.networkId ) . append ( ",SSID=" ) . append ( config.SSID ) . append ( ",useExternalScores=" ) . append ( config.useExternalScores ) . append ( ",meteredHint=" ) . append ( config.meteredHint ) . append ( ",meteredOverride=" ) . append ( config.meteredOverride ) ; return sb.toString ( ) ; }

Target:
private static java.lang.String configToString ( android.net.wifi.WifiConfiguration config ) { if ( config == null ) { return null ; } java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) . append ( "ID=" ) . append ( config.networkId ) . append ( ",SSID=" ) . append ( config.SSID ) . append ( ",useExternalScores=" ) . append ( config.useExternalScores ) . append ( ",meteredHint=" ) . append ( config.meteredHint ) ; return sb.toString ( ) ; }
Source:
public void testStyleables2 ( ) throws java.lang.Exception { check ( "test.pkg" , ( "int[] styleable LimitedSizeLinearLayout { 0x7f010000, 0x7f010001 }\n" + ( ( "int styleable LimitedSizeLinearLayout_max_height 1\n" + "int styleable LimitedSizeLinearLayout_max_width 0\n" ) + "int xml authenticator 0x7f040000\n" ) ) , ( "/* AUTO-GENERATED FILE. DO NOT MODIFY.\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " *\n" + " * This class was automatically generated by the\n" ) + " * aapt tool from the resource data it found. It\n" ) + " * should not be modified by hand.\n" ) + " */\n" ) + "package test.pkg;\n" ) + "\n" ) + "public final class R {\n" ) + " public static final class styleable {\n" ) + " public static final int[] LimitedSizeLinearLayout = { 0x7f010000, 0x7f010001 };\n" ) + " public static final int LimitedSizeLinearLayout_max_height = 1;\n" ) + " public static final int LimitedSizeLinearLayout_max_width = 0;\n" ) + " }\n" ) + " public static final class xml {\n" ) + " public static final int authenticator = 0x7f040000;\n" ) + " }\n" ) + "}\n" ) ) ) ; }

Target:
public void testStyleables2 ( ) throws java.lang.Exception { check ( "test.pkg" , ( "/* AUTO-GENERATED FILE. DO NOT MODIFY.\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " *\n" + " * This class was automatically generated by the\n" ) + " * aapt tool from the resource data it found. It\n" ) + " * should not be modified by hand.\n" ) + " */\n" ) + "package test.pkg;\n" ) + "\n" ) + "public final class R {\n" ) + " public static final class styleable {\n" ) + " public static final int[] LimitedSizeLinearLayout = { 0x7f010000, 0x7f010001 };\n" ) + " public static final int LimitedSizeLinearLayout_max_height = 1;\n" ) + " public static final int LimitedSizeLinearLayout_max_width = 0;\n" ) + " }\n" ) + " public static final class xml {\n" ) + " public static final int authenticator = 0x7f040000;\n" ) + " }\n" ) + "}\n" ) ) , null , ( "int[] styleable LimitedSizeLinearLayout { 0x7f010000, 0x7f010001 }\n" + ( ( "int styleable LimitedSizeLinearLayout_max_height 1\n" + "int styleable LimitedSizeLinearLayout_max_width 0\n" ) + "int xml authenticator 0x7f040000\n" ) ) ) ; }
Source:
void expectAvailableCallbacks ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent , boolean expectSuspended , boolean expectValidated , int timeoutMs ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , agent , timeoutMs ) ; if ( expectSuspended ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.SUSPENDED , agent , timeoutMs ) ; } if ( expectValidated ) { expectCapabilitiesWith ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent ) ; } else { expectCapabilitiesWithout ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent ) ; } expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.LINK_PROPERTIES , agent , timeoutMs ) ; }

Target:
void expectAvailableCallbacks ( com.android.server.ConnectivityServiceTest.MockNetworkAgent agent , boolean expectSuspended , boolean expectValidated , int timeoutMs ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , agent , timeoutMs ) ; if ( expectSuspended ) { expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.SUSPENDED , agent , timeoutMs ) ; } if ( expectValidated ) { expectCapabilitiesWith ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent , timeoutMs ) ; } else { expectCapabilitiesWithout ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED , agent , timeoutMs ) ; } expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.LINK_PROPERTIES , agent , timeoutMs ) ; }
Source:
public com.android.sched.vfs.BaseVFile createVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) throws com.android.sched.util.file.CannotCreateFileException { com.android.sched.vfs.BaseVDir dir = this ; java.util.Iterator < java.lang.String > iter = path.split ( ) . iterator ( ) ; java.lang.String name ; while ( iter.hasNext ( ) ) { name = iter.next ( ) ; if ( iter.hasNext ( ) ) { dir = vfs.createVDir ( dir , name ) ; } else { return vfs.createVFile ( dir , name ) ; } } throw new java.lang.AssertionError ( ) ; }

Target:
public com.android.sched.vfs.BaseVFile createVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) throws com.android.sched.util.file.CannotCreateFileException { com.android.sched.vfs.BaseVDir dir = this ; java.util.Iterator < java.lang.String > iter = path.split ( ) . iterator ( ) ; java.lang.String name ; while ( iter.hasNext ( ) ) { name = iter.next ( ) ; if ( iter.hasNext ( ) ) { dir = dir.createVDir ( name ) ; } else { return dir.createVFile ( name ) ; } } throw new java.lang.AssertionError ( ) ; }