auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
android.bluetooth.BluetoothGattCharacteristic getCharacteristicById ( android.bluetooth.BluetoothDevice device , int instanceId ) { for ( android.bluetooth.BluetoothGattService svc : mServices ) { for ( android.bluetooth.BluetoothGattCharacteristic charac : svc.getCharacteristics ( ) ) { android.util.Log.w ( android.bluetooth.BluetoothGatt.TAG , ( ( ( "getCharacteristicById() comparing " + ( charac.getInstanceId ( ) ) ) + " and " ) + instanceId ) ) ; if ( ( charac.getInstanceId ( ) ) == instanceId ) return charac ; } } return null ; }

Target:
android.bluetooth.BluetoothGattCharacteristic getCharacteristicById ( android.bluetooth.BluetoothDevice device , int instanceId ) { for ( android.bluetooth.BluetoothGattService svc : mServices ) { for ( android.bluetooth.BluetoothGattCharacteristic charac : svc.getCharacteristics ( ) ) { if ( ( charac.getInstanceId ( ) ) == instanceId ) return charac ; } } return null ; }
Source:
public static com.android.dialer.speeddial.SpeedDialCursor newInstance ( android.database.Cursor strequentCursor , java.util.List < com.android.dialer.speeddial.room.SpeedDialEntry > entries ) { if ( ( strequentCursor == null ) || ( ( strequentCursor.getCount ( ) ) == 0 ) ) { return null ; } com.android.dialer.speeddial.SpeedDialCursor cursor = new com.android.dialer.speeddial.SpeedDialCursor ( com.android.dialer.speeddial.SpeedDialCursor.buildCursors ( strequentCursor , entries ) ) ; strequentCursor.close ( ) ; return cursor ; }

Target:
public static com.android.dialer.speeddial.SpeedDialCursor newInstance ( android.database.Cursor strequentCursor ) { if ( ( strequentCursor == null ) || ( ( strequentCursor.getCount ( ) ) == 0 ) ) { return null ; } com.android.dialer.speeddial.SpeedDialCursor cursor = new com.android.dialer.speeddial.SpeedDialCursor ( com.android.dialer.speeddial.SpeedDialCursor.buildCursors ( strequentCursor ) ) ; strequentCursor.close ( ) ; return cursor ; }
Source:
public static void setupLogs ( ) throws com.android.jack.CLILogConfiguration.LogConfigurationException { com.android.jack.CLILogConfiguration.LogLevel level = com.android.jack.CLILogConfiguration.LogLevel.WARNING ; java.lang.String stringLevel = java.lang.System.getProperty ( "com.android.jack.log" ) ; if ( stringLevel != null ) { try { level = new com.android.sched.util.codec.EnumCodec < com.android.jack.CLILogConfiguration.LogLevel > ( com.android.jack.CLILogConfiguration.LogLevel.class , com.android.jack.CLILogConfiguration.LogLevel.values ( ) ) . checkString ( new com.android.sched.util.codec.CodecContext ( ) , stringLevel ) ; } catch ( com.android.sched.util.codec.ParsingException e ) { throw new com.android.jack.CLILogConfiguration.LogConfigurationException ( e.getMessage ( ) ) ; } } com.android.sched.util.log.LoggerFactory.configure ( level ) ; }

Target:
public static void setupLogs ( ) throws com.android.jack.CLILogConfiguration.LogConfigurationException { com.android.jack.CLILogConfiguration.LogLevel level = com.android.jack.CLILogConfiguration.LogLevel.WARNING ; java.lang.String stringLevel = java.lang.System.getProperty ( "com.android.jack.log" ) ; if ( stringLevel != null ) { try { level = new com.android.sched.util.codec.EnumCodec < com.android.jack.CLILogConfiguration.LogLevel > ( com.android.jack.CLILogConfiguration.LogLevel.class ) . checkString ( new com.android.sched.util.codec.CodecContext ( ) , stringLevel ) ; } catch ( com.android.sched.util.codec.ParsingException e ) { throw new com.android.jack.CLILogConfiguration.LogConfigurationException ( e.getMessage ( ) ) ; } } com.android.sched.util.log.LoggerFactory.configure ( level ) ; }
Source:
public java.lang.String getVisualVoicemailPackageName ( java.lang.String callingPackage , @ android.annotation.Nullable android.telecom.PhoneAccountHandle phoneAccountHandle ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( canReadPhoneState ( callingPackage , "getVisualVoicemailPackageName" ) ) ) { return null ; } int subId = com.android.phone.PhoneUtils.getSubIdForPhoneAccountHandle ( phoneAccountHandle ) ; return com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) . getPackageName ( ) ; }

Target:
public java.lang.String getVisualVoicemailPackageName ( java.lang.String callingPackage , int subId ) { mAppOps.checkPackage ( android.os.Binder.getCallingUid ( ) , callingPackage ) ; if ( ! ( canReadPhoneState ( callingPackage , "getVisualVoicemailPackageName" ) ) ) { return null ; } return com.android.phone.vvm.RemoteVvmTaskManager.getRemotePackage ( mPhone.getContext ( ) , subId ) . getPackageName ( ) ; }
Source:
static void setFloat ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , float value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertActualAndExpectedMatch ( exceptionThrown , expectFailure ) ; }

Target:
static void setFloat ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , float value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }
Source:
static void native_concat ( int nCanvas , int nMatrix ) { android.graphics.Canvas_Delegate canvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( nCanvas ) ; if ( canvasDelegate == null ) { return ; } android.graphics.Matrix_Delegate matrixDelegate = android.graphics.Matrix_Delegate.getDelegate ( nMatrix ) ; if ( matrixDelegate == null ) { return ; } com.android.layoutlib.bridge.impl.GcSnapshot snapshot = canvasDelegate.getSnapshot ( ) ; java.awt.geom.AffineTransform currentTx = snapshot.getTransform ( ) ; java.awt.geom.AffineTransform matrixTx = matrixDelegate.getAffineTransform ( ) ; currentTx.concatenate ( matrixTx ) ; snapshot.setTransform ( currentTx ) ; }

Target:
static void native_concat ( long nCanvas , long nMatrix ) { android.graphics.Canvas_Delegate canvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( nCanvas ) ; if ( canvasDelegate == null ) { return ; } android.graphics.Matrix_Delegate matrixDelegate = android.graphics.Matrix_Delegate.getDelegate ( nMatrix ) ; if ( matrixDelegate == null ) { return ; } com.android.layoutlib.bridge.impl.GcSnapshot snapshot = canvasDelegate.getSnapshot ( ) ; java.awt.geom.AffineTransform currentTx = snapshot.getTransform ( ) ; java.awt.geom.AffineTransform matrixTx = matrixDelegate.getAffineTransform ( ) ; currentTx.concatenate ( matrixTx ) ; snapshot.setTransform ( currentTx ) ; }
Source:
public void requestNetwork ( android.net.NetworkRequest request , int timeoutMs , android.net.ConnectivityManager.NetworkCallback networkCallback , android.os.Handler handler ) { if ( timeoutMs <= 0 ) { throw new java.lang.IllegalArgumentException ( "Non-positive timeoutMs" ) ; } int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; android.net.ConnectivityManager.CallbackHandler cbHandler = new android.net.ConnectivityManager.CallbackHandler ( handler ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , cbHandler ) ; }

Target:
public void requestNetwork ( android.net.NetworkRequest request , android.net.ConnectivityManager.NetworkCallback networkCallback , android.os.Handler handler , int timeoutMs ) { if ( timeoutMs <= 0 ) { throw new java.lang.IllegalArgumentException ( "Non-positive timeoutMs" ) ; } int legacyType = inferLegacyTypeForNetworkCapabilities ( request.networkCapabilities ) ; android.net.ConnectivityManager.CallbackHandler cbHandler = new android.net.ConnectivityManager.CallbackHandler ( handler ) ; requestNetwork ( request , networkCallback , timeoutMs , legacyType , cbHandler ) ; }
Source:
static void setShort ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , short value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }

Target:
static void setShort ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , short value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( expectFailure , exceptionThrown ) ; }
Source:
public android.content.ComponentName getActivityClassForToken ( android.os.IBinder token ) { synchronized ( this ) { int index = indexOfTokenLocked ( token , false ) ; if ( index >= 0 ) { com.android.server.am.HistoryRecord r = ( ( com.android.server.am.HistoryRecord ) ( mHistory.get ( index ) ) ) ; return r.intent.getComponent ( ) ; } return null ; } }

Target:
public android.content.ComponentName getActivityClassForToken ( android.os.IBinder token ) { synchronized ( this ) { int index = indexOfTokenLocked ( token ) ; if ( index >= 0 ) { com.android.server.am.HistoryRecord r = ( ( com.android.server.am.HistoryRecord ) ( mHistory.get ( index ) ) ) ; return r.intent.getComponent ( ) ; } return null ; } }
Source:
public boolean isValid ( ) { ensureConstraintsAtIndex ( 0 ) ; return ( ( plan.get ( 0 ) . getNeedToAdd ( ) . containsAll ( request.getInitialTags ( ) ) ) && ( plan.get ( 0 ) . getNeedToRemove ( ) . containsNone ( request.getInitialTags ( ) ) ) ) && ( missingProductions.isEmpty ( ) ) ; }

Target:
public boolean isValid ( ) { ensureConstraintsAtIndex ( 0 ) ; return ( ( request.getInitialTags ( ) . containsAll ( plan.get ( 0 ) . getNeedToAdd ( ) ) ) && ( request.getInitialTags ( ) . containsNone ( plan.get ( 0 ) . getNeedToRemove ( ) ) ) ) && ( missingProductions.isEmpty ( ) ) ; }
Source:
public int createMapMnsRecord ( java.lang.String serviceName , int rfcommChannel , int l2capPsm , int version , int features ) { if ( ( com.android.bluetooth.sdp.SdpManager.sNativeAvailable ) == false ) { throw new java.lang.RuntimeException ( ( ( com.android.bluetooth.sdp.SdpManager.TAG ) + " sNativeAvailable == false - native not initialized" ) ) ; } return sdpCreateMapMnsRecordNative ( serviceName , rfcommChannel , l2capPsm , version , features ) ; }

Target:
public int createMapMnsRecord ( java.lang.String serviceName , int rfcommChannel , int l2capPsm , int version , int features ) { if ( ! ( com.android.bluetooth.sdp.SdpManager.sNativeAvailable ) ) { throw new java.lang.RuntimeException ( ( ( com.android.bluetooth.sdp.SdpManager.TAG ) + " sNativeAvailable == false - native not initialized" ) ) ; } return sdpCreateMapMnsRecordNative ( serviceName , rfcommChannel , l2capPsm , version , features ) ; }
Source:
public boolean isSuppressed ( @ com.android.annotations.NonNull lombok.ast.Node scope , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { java.lang.String contents = getContents ( ) ; assert contents != null ; lombok.ast.Position position = scope.getPosition ( ) ; if ( position == null ) { return false ; } int start = position.getStart ( ) ; return isSuppressedWithComment ( start , issue ) ; }

Target:
public boolean isSuppressedWithComment ( @ com.android.annotations.NonNull lombok.ast.Node scope , @ com.android.annotations.NonNull com.android.tools.lint.detector.api.Issue issue ) { java.lang.String contents = getContents ( ) ; assert contents != null ; lombok.ast.Position position = scope.getPosition ( ) ; if ( position == null ) { return false ; } int start = position.getStart ( ) ; return isSuppressedWithComment ( start , issue ) ; }
Source:
public static int getCacheVersion ( ) { synchronized ( org.apache.harmony.security.fortress.Services.providers ) { if ( org.apache.harmony.security.fortress.Services.needRefresh ) { ( org.apache.harmony.security.fortress.Services.cacheVersion ) ++ ; synchronized ( org.apache.harmony.security.fortress.Services.services ) { org.apache.harmony.security.fortress.Services.services.clear ( ) ; } org.apache.harmony.security.fortress.Services.cachedSecureRandomService = null ; for ( java.security.Provider p : org.apache.harmony.security.fortress.Services.providers ) { org.apache.harmony.security.fortress.Services.initServiceInfo ( p ) ; } org.apache.harmony.security.fortress.Services.needRefresh = false ; } return org.apache.harmony.security.fortress.Services.cacheVersion ; } }

Target:
public static synchronized int getCacheVersion ( ) { if ( org.apache.harmony.security.fortress.Services.needRefresh ) { ( org.apache.harmony.security.fortress.Services.cacheVersion ) ++ ; synchronized ( org.apache.harmony.security.fortress.Services.services ) { org.apache.harmony.security.fortress.Services.services.clear ( ) ; } org.apache.harmony.security.fortress.Services.cachedSecureRandomService = null ; for ( java.security.Provider p : org.apache.harmony.security.fortress.Services.providers ) { org.apache.harmony.security.fortress.Services.initServiceInfo ( p ) ; } org.apache.harmony.security.fortress.Services.needRefresh = false ; } return org.apache.harmony.security.fortress.Services.cacheVersion ; }
Source:
public org.apache.harmony.security.fortress.Engine.SpiAndProvider getInstance ( java.lang.String algorithm , java.lang.Object param ) throws java.security.NoSuchAlgorithmException { if ( algorithm == null ) { throw new java.security.NoSuchAlgorithmException ( "Null algorithm name" ) ; } java.util.ArrayList < java.security.Provider.Service > services = getServices ( algorithm , null ) ; if ( services == null ) { throw notFound ( this . serviceName , algorithm ) ; } return new org.apache.harmony.security.fortress.Engine.SpiAndProvider ( services.get ( 0 ) . newInstance ( param ) , services.get ( 0 ) . getProvider ( ) ) ; }

Target:
public org.apache.harmony.security.fortress.Engine.SpiAndProvider getInstance ( java.lang.String algorithm , java.lang.Object param ) throws java.security.NoSuchAlgorithmException { if ( algorithm == null ) { throw new java.security.NoSuchAlgorithmException ( "Null algorithm name" ) ; } java.util.ArrayList < java.security.Provider.Service > services = getServices ( algorithm ) ; if ( services == null ) { throw notFound ( this . serviceName , algorithm ) ; } return new org.apache.harmony.security.fortress.Engine.SpiAndProvider ( services.get ( 0 ) . newInstance ( param ) , services.get ( 0 ) . getProvider ( ) ) ; }
Source:
public static org.conscrypt.OpenSSLX509Certificate fromX509DerInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { @ java.lang.SuppressWarnings ( value = "resource" ) final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is ) ; try { final long certCtx = org.conscrypt.NativeCrypto.d2i_X509_bio ( bis.getBioContext ( ) ) ; if ( certCtx == 0 ) { return null ; } return new org.conscrypt.OpenSSLX509Certificate ( certCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { bis.release ( ) ; } }

Target:
public static org.conscrypt.OpenSSLX509Certificate fromX509DerInputStream ( java.io.InputStream is ) throws org.conscrypt.OpenSSLX509CertificateFactory.ParsingException { @ java.lang.SuppressWarnings ( value = "resource" ) final org.conscrypt.OpenSSLBIOInputStream bis = new org.conscrypt.OpenSSLBIOInputStream ( is , true ) ; try { final long certCtx = org.conscrypt.NativeCrypto.d2i_X509_bio ( bis.getBioContext ( ) ) ; if ( certCtx == 0 ) { return null ; } return new org.conscrypt.OpenSSLX509Certificate ( certCtx ) ; } catch ( java.lang.Exception e ) { throw new org.conscrypt.OpenSSLX509CertificateFactory.ParsingException ( e ) ; } finally { bis.release ( ) ; } }
Source:
public void pnoRetryForLowRssiNetwork ( ) { when ( mWifiNS.selectNetwork ( anyObject ( ) , anyObject ( ) , anyBoolean ( ) , anyBoolean ( ) , anyBoolean ( ) ) ) . thenReturn ( null ) ; mWifiConnectivityManager.handleScreenStateChanged ( false ) ; int lowRssiNetworkRetryDelayStartValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; mWifiConnectivityManager.handleConnectionStateChanged ( WifiConnectivityManager.WIFI_STATE_DISCONNECTED ) ; int lowRssiNetworkRetryDelayAfterPnoValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; assertEquals ( ( lowRssiNetworkRetryDelayStartValue * 2 ) , lowRssiNetworkRetryDelayAfterPnoValue ) ; }

Target:
public void pnoRetryForLowRssiNetwork ( ) { when ( mWifiNS.selectNetwork ( anyObject ( ) , anyObject ( ) , anyObject ( ) , anyBoolean ( ) , anyBoolean ( ) , anyBoolean ( ) ) ) . thenReturn ( null ) ; mWifiConnectivityManager.handleScreenStateChanged ( false ) ; int lowRssiNetworkRetryDelayStartValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; mWifiConnectivityManager.handleConnectionStateChanged ( WifiConnectivityManager.WIFI_STATE_DISCONNECTED ) ; int lowRssiNetworkRetryDelayAfterPnoValue = mWifiConnectivityManager.getLowRssiNetworkRetryDelay ( ) ; assertEquals ( ( lowRssiNetworkRetryDelayStartValue * 2 ) , lowRssiNetworkRetryDelayAfterPnoValue ) ; }
Source:
public void binderDied ( ) { if ( com.android.server.am.ActivityManagerService.localLOGV ) android.util.Log.v ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Death received in " + ( this ) ) + " for thread " ) + ( mAppThread.asBinder ( ) ) ) ) ; removeRequestedPss ( mApp ) ; synchronized ( this ) { appDiedLocked ( mApp , mPid , mAppThread ) ; } }

Target:
public void binderDied ( ) { if ( com.android.server.am.ActivityManagerService.localLOGV ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Death received in " + ( this ) ) + " for thread " ) + ( mAppThread.asBinder ( ) ) ) ) ; removeRequestedPss ( mApp ) ; synchronized ( this ) { appDiedLocked ( mApp , mPid , mAppThread ) ; } }
Source:
protected static com.ibm.icu.util.UResourceBundle addToCache ( java.lang.ClassLoader cl , java.lang.String fullName , com.ibm.icu.util.ULocale defaultLocale , com.ibm.icu.util.UResourceBundle b ) { synchronized ( com.ibm.icu.util.UResourceBundle.cacheKey ) { com.ibm.icu.util.UResourceBundle.cacheKey.setKeyValues ( cl , fullName , defaultLocale ) ; com.ibm.icu.util.UResourceBundle cachedBundle = com.ibm.icu.util.UResourceBundle.BUNDLE_CACHE.get ( com.ibm.icu.util.UResourceBundle.cacheKey ) ; if ( cachedBundle != null ) { return cachedBundle ; } com.ibm.icu.util.UResourceBundle.BUNDLE_CACHE.put ( ( ( com.ibm.icu.util.UResourceBundle.ResourceCacheKey ) ( com.ibm.icu.util.UResourceBundle.cacheKey.clone ( ) ) ) , b ) ; return b ; } }

Target:
protected static com.ibm.icu.util.UResourceBundle addToCache ( java.lang.String fullName , com.ibm.icu.util.ULocale defaultLocale , com.ibm.icu.util.UResourceBundle b ) { synchronized ( com.ibm.icu.util.UResourceBundle.cacheKey ) { com.ibm.icu.util.UResourceBundle.cacheKey.setKeyValues ( fullName , defaultLocale ) ; com.ibm.icu.util.UResourceBundle cachedBundle = com.ibm.icu.util.UResourceBundle.BUNDLE_CACHE.get ( com.ibm.icu.util.UResourceBundle.cacheKey ) ; if ( cachedBundle != null ) { return cachedBundle ; } com.ibm.icu.util.UResourceBundle.BUNDLE_CACHE.put ( ( ( com.ibm.icu.util.UResourceBundle.ResourceCacheKey ) ( com.ibm.icu.util.UResourceBundle.cacheKey.clone ( ) ) ) , b ) ; return b ; } }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_primitives s = new com.android.rs.test.ScriptC_primitives ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; if ( ! ( initializeGlobals ( s ) ) ) { failTest ( ) ; } else { s.invoke_primitives_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; } pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_primitives s = new com.android.rs.test.ScriptC_primitives ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; if ( ! ( initializeGlobals ( s ) ) ) { failTest ( ) ; } else { s.invoke_primitives_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; } s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public static android.renderscript.Element U16_3 ( android.renderscript.RenderScript rs ) { if ( ( rs.mElement_USHORT_3 ) == null ) { rs.mElement_USHORT_3 = android.renderscript.Element.createVector ( rs , android.renderscript.Element.DataType.UNSIGNED_16 , 3 ) ; } return rs.mElement_USHORT_3 ; }

Target:
public static android.renderscript.Element U16_3 ( android.renderscript.RenderScript rs ) { if ( ( rs.mElement_USHORT_3 ) == null ) { synchronized ( rs ) { if ( ( rs.mElement_USHORT_3 ) == null ) { rs.mElement_USHORT_3 = android.renderscript.Element.createVector ( rs , android.renderscript.Element.DataType.UNSIGNED_16 , 3 ) ; } } } return rs.mElement_USHORT_3 ; }
Source:
private void verifyStats ( android.hardware.cts.helpers.SensorStats stats , boolean passed , float [ ] means ) { assertEquals ( passed , stats.getValue ( MeanVerification.PASSED_KEY ) ) ; float [ ] actual = ( ( float [ ] ) ( stats.getValue ( SensorStats.MEAN_KEY ) ) ) ; for ( int i = 0 ; i < ( means.length ) ; i ++ ) { assertEquals ( means [ i ] , actual [ i ] , 0.1 ) ; } }

Target:
private void verifyStats ( android.hardware.cts.helpers.SensorStats stats , boolean passed , float [ ] means ) { assertEquals ( passed , stats.getValue ( MeanVerification.PASSED_KEY ) ) ; float [ ] actual = ( ( float [ ] ) ( stats.getValue ( SensorStats.MEAN_KEY ) ) ) ; assertEquals ( means.length , actual.length ) ; for ( int i = 0 ; i < ( means.length ) ; i ++ ) { assertEquals ( means [ i ] , actual [ i ] , 0.1 ) ; } }
Source:
private void showError ( final java.lang.String msg , final java.lang.Throwable t , org.eclipse.core.runtime.IProgressMonitor monitor ) { monitor.done ( ) ; mViewer.getShell ( ) . getDisplay ( ) . syncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.eclipse.core.runtime.Status s = new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.ERROR , "Screenshot" , msg , t ) ; org.eclipse.jface.dialogs.ErrorDialog.openError ( mViewer.getShell ( ) , "Error" , "Error obtaining UI hierarchy" , s ) ; } } ) ; }

Target:
private void showError ( final java.lang.String msg , final java.lang.Throwable t ) { mViewer.getShell ( ) . getDisplay ( ) . syncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.eclipse.core.runtime.Status s = new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.ERROR , "Screenshot" , msg , t ) ; org.eclipse.jface.dialogs.ErrorDialog.openError ( mViewer.getShell ( ) , "Error" , "Error obtaining UI hierarchy" , s ) ; } } ) ; }
Source:
public void write ( boolean forceSync , com.android.server.wifi.WifiConfigStoreData storeData ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { byte [ ] sharedDataBytes = storeData.createSharedRawData ( ) ; byte [ ] userDataBytes = storeData.createUserRawData ( ) ; mSharedStore.storeRawDataToWrite ( sharedDataBytes ) ; mUserStore.storeRawDataToWrite ( userDataBytes ) ; if ( forceSync ) { writeBufferedData ( ) ; } else { startBufferedWriteAlarm ( ) ; } }

Target:
public void write ( boolean forceSync , com.android.server.wifi.WifiConfigStoreData storeData ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { byte [ ] sharedDataBytes = storeData.createSharedRawData ( ) ; mSharedStore.storeRawDataToWrite ( sharedDataBytes ) ; if ( ( mUserStore ) != null ) { byte [ ] userDataBytes = storeData.createUserRawData ( ) ; mUserStore.storeRawDataToWrite ( userDataBytes ) ; } if ( forceSync ) { writeBufferedData ( ) ; } else { startBufferedWriteAlarm ( ) ; } }
Source:
private void closeKeyChainConnections ( ) { final int n = mKeyChainConnectionByProfileId.size ( ) ; for ( int i = 0 ; i < n ; ++ i ) { mKeyChainConnectionByProfileId.valueAt ( i ) . close ( ) ; } mKeyChainConnectionByProfileId.clear ( ) ; }

Target:
private void closeKeyChainConnections ( ) { synchronized ( mKeyChainConnectionByProfileId ) { final int n = mKeyChainConnectionByProfileId.size ( ) ; for ( int i = 0 ; i < n ; ++ i ) { mKeyChainConnectionByProfileId.valueAt ( i ) . close ( ) ; } mKeyChainConnectionByProfileId.clear ( ) ; } }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { try { java.lang.Class < ? > c = java.lang.Class.forName ( "Test" ) ; java.lang.reflect.Method m = c.getMethod ( "ThrowException" , ( ( java.lang.Class [ ] ) ( null ) ) ) ; m.invoke ( null , ( ( java.lang.Object [ ] ) ( null ) ) ) ; } catch ( java.lang.VerifyError e ) { return ; } throw new java.lang.Error ( "Failed to preset verification error!" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { try { java.lang.Class < ? > c = java.lang.Class.forName ( "Test" ) ; java.lang.reflect.Method m = c.getMethod ( "ThrowException" ) ; m.invoke ( null ) ; } catch ( java.lang.VerifyError e ) { return ; } throw new java.lang.Error ( "Failed to preset verification error!" ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { art.Main.bindAgentJNI ( "android/jvmti/cts/JvmtiRedefineClassesTest" , getClass ( ) . getClassLoader ( ) ) ; android.jvmti.cts.JvmtiRedefineClassesTest.setTransformationEvent ( false ) ; android.jvmti.cts.JvmtiRedefineClassesTest.setPopTransformations ( true ) ; android.jvmti.cts.JvmtiRedefineClassesTest.clearTransformations ( ) ; android.jvmti.cts.JvmtiRedefineClassesTest.checkRedefinition ( android.jvmti.cts.JvmtiRedefineClassesTest.INITIAL_TRANSFORM ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { android.jvmti.cts.JvmtiRedefineClassesTest.setTransformationEvent ( false ) ; android.jvmti.cts.JvmtiRedefineClassesTest.setPopTransformations ( true ) ; android.jvmti.cts.JvmtiRedefineClassesTest.clearTransformations ( ) ; android.jvmti.cts.JvmtiRedefineClassesTest.checkRedefinition ( android.jvmti.cts.JvmtiRedefineClassesTest.INITIAL_TRANSFORM ) ; }
Source:
public void setStarts ( int label , com.android.jack.dx.rop.code.RegisterSpecSet specs ) { throwIfImmutable ( ) ; if ( specs == null ) { throw new java.lang.NullPointerException ( "specs == null" ) ; } try { blockStarts [ label ] = specs ; } catch ( java.lang.ArrayIndexOutOfBoundsException ex ) { throw new java.lang.IllegalArgumentException ( "bogus label" ) ; } }

Target:
public void setStarts ( int label , com.android.jack.dx.rop.code.RegisterSpecSet specs ) { assert specs != null ; throwIfImmutable ( ) ; try { blockStarts [ label ] = specs ; } catch ( java.lang.ArrayIndexOutOfBoundsException ex ) { throw new java.lang.IllegalArgumentException ( "bogus label" ) ; } }
Source:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.PARTIAL_COMPLETE , method = "getInterpolator" , args = { } ) } ) public void testAccessInterpolator ( ) { android.widget.ProgressBar progressBar = new android.widget.ProgressBar ( mContext , null , com.android.internal.R.attr.progressBarStyle ) ; assertTrue ( ( ( progressBar.getInterpolator ( ) ) instanceof android.view.animation.LinearInterpolator ) ) ; android.view.animation.Interpolator i = new android.view.animation.AccelerateDecelerateInterpolator ( ) ; progressBar.setInterpolator ( i ) ; assertEquals ( i , progressBar.getInterpolator ( ) ) ; progressBar.setInterpolator ( null ) ; assertNull ( progressBar.getInterpolator ( ) ) ; }

Target:
, @ dalvik.annotation.TestTargetNew ( level = dalvik.annotation.TestLevel.PARTIAL_COMPLETE , method = "getInterpolator" , args = { } ) } ) public void testAccessInterpolator ( ) { android.widget.ProgressBar progressBar = new android.widget.ProgressBar ( mContext ) ; assertTrue ( ( ( progressBar.getInterpolator ( ) ) instanceof android.view.animation.LinearInterpolator ) ) ; android.view.animation.Interpolator i = new android.view.animation.AccelerateDecelerateInterpolator ( ) ; progressBar.setInterpolator ( i ) ; assertEquals ( i , progressBar.getInterpolator ( ) ) ; }
Source:
static void copyNativeCanvasState ( int srcCanvas , int dstCanvas ) { android.graphics.Canvas_Delegate srcCanvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( srcCanvas ) ; if ( srcCanvasDelegate == null ) { return ; } android.graphics.Canvas_Delegate dstCanvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( dstCanvas ) ; if ( dstCanvasDelegate == null ) { return ; } }

Target:
static void copyNativeCanvasState ( long srcCanvas , long dstCanvas ) { android.graphics.Canvas_Delegate srcCanvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( srcCanvas ) ; if ( srcCanvasDelegate == null ) { return ; } android.graphics.Canvas_Delegate dstCanvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( dstCanvas ) ; if ( dstCanvasDelegate == null ) { return ; } }
Source:
public void registerForRecordsLoaded ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; recordsLoadedRegistrants.add ( r ) ; if ( ( ( recordsToLoad ) == 0 ) && ( ( recordsRequested ) == true ) ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }

Target:
public void registerForRecordsLoaded ( android.os.Handler h , int what , java.lang.Object obj ) { if ( mDestroyed.get ( ) ) { return ; } android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; recordsLoadedRegistrants.add ( r ) ; if ( ( ( recordsToLoad ) == 0 ) && ( ( recordsRequested ) == true ) ) { r.notifyRegistrant ( new android.os.AsyncResult ( null , null , null ) ) ; } }
Source:
private void waitForObbActionCompletion ( final java.io.File file , final android.os.storage.cts.StorageManagerTest.ObbObserver observer , int expectedState , boolean checkPath ) { assertTrue ( "Mount should have completed" , observer.waitForCompletion ( ) ) ; assertTrue ( "OBB should be mounted" , mStorageManager.isObbMounted ( file.getPath ( ) ) ) ; if ( checkPath ) { assertEquals ( "Actual file and resolved file should be the same" , file.getPath ( ) , observer.getPath ( ) ) ; } assertEquals ( expectedState , observer.getState ( ) ) ; }

Target:
private void waitForObbActionCompletion ( final java.io.File file , final android.os.storage.cts.StorageManagerTest.ObbObserver observer , int expectedState ) { assertTrue ( "Mount should have completed" , observer.waitForCompletion ( ) ) ; assertTrue ( "OBB should be mounted" , mStorageManager.isObbMounted ( observer.getPath ( ) ) ) ; assertEquals ( expectedState , observer.getState ( ) ) ; }
Source:
public void addF32 ( android.support.v8.renderscript.Float4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addF32 ( new android.support.v8.renderscript.Float4 ( v.x , v.y , v.z , v.w ) ) ; return ; } addF32 ( v.x ) ; addF32 ( v.y ) ; addF32 ( v.z ) ; addF32 ( v.w ) ; }

Target:
public void addF32 ( android.support.v8.renderscript.Float4 v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addF32 ( v ) ; return ; } addF32 ( v.x ) ; addF32 ( v.y ) ; addF32 ( v.z ) ; addF32 ( v.w ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( obj == null ) || ( ! ( obj instanceof sun.security.x509.AccessDescription ) ) ) { return false ; } sun.security.x509.AccessDescription that = ( ( sun.security.x509.AccessDescription ) ( obj ) ) ; if ( ( this ) == that ) { return true ; } return ( accessMethod.equals ( that.getAccessMethod ( ) ) ) && ( accessLocation.equals ( that.getAccessLocation ( ) ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( obj == null ) || ( ! ( obj instanceof sun.security.x509.AccessDescription ) ) ) { return false ; } sun.security.x509.AccessDescription that = ( ( sun.security.x509.AccessDescription ) ( obj ) ) ; if ( ( this ) == that ) { return true ; } return ( accessMethod.equals ( ( ( java.lang.Object ) ( that.getAccessMethod ( ) ) ) ) ) && ( accessLocation.equals ( that.getAccessLocation ( ) ) ) ; }
Source:
public void testReplacedFile ( ) 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/file_replaced_by_alias" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.ide.common.res2.ResourceItem layout = values.get ( 1 ) ; assertNotNull ( layout.getValue ( ) ) ; }

Target:
public void testReplacedFile ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; 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/file_replaced_by_alias" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.ide.common.res2.ResourceItem layout = values.get ( 1 ) ; assertNotNull ( layout.getValue ( ) ) ; }
Source:
protected int buildConnectionCapabilities ( ) { int capabilities = super . buildConnectionCapabilities ( ) ; capabilities |= CAPABILITY_MUTE ; if ( ! ( shouldTreatAsEmergencyCall ( ) ) ) { capabilities |= CAPABILITY_SUPPORT_HOLD ; if ( ( ( getState ( ) ) == ( STATE_ACTIVE ) ) || ( ( getState ( ) ) == ( STATE_HOLDING ) ) ) { capabilities |= CAPABILITY_HOLD ; } } if ( ( ( getConnectionProperties ( ) ) & ( PROPERTY_IS_DOWNGRADED_CONFERENCE ) ) != 0 ) { capabilities |= CAPABILITY_CONFERENCE_HAS_NO_CHILDREN ; } return capabilities ; }

Target:
protected int buildConnectionCapabilities ( ) { int capabilities = super . buildConnectionCapabilities ( ) ; capabilities |= CAPABILITY_MUTE ; if ( ! ( shouldTreatAsEmergencyCall ( ) ) ) { capabilities |= CAPABILITY_SUPPORT_HOLD ; if ( ( ( getState ( ) ) == ( STATE_ACTIVE ) ) || ( ( getState ( ) ) == ( STATE_HOLDING ) ) ) { capabilities |= CAPABILITY_HOLD ; } } return capabilities ; }
Source:
private void addRemoteExtra ( com.android.sdklib.repository.NoPreviewRevision revision , com.android.sdklib.repository.descriptors.IdDisplay vendor , java.lang.String path , java.lang.String name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newExtra ( vendor , path , name , null , revision ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemoteExtra ( com.android.sdklib.repository.NoPreviewRevision revision , com.android.sdklib.repository.descriptors.IdDisplay vendor , java.lang.String path , java.lang.String name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newExtra ( vendor , path , name , null , revision ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource , 0 ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }
Source:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { super . init ( workbench , selection ) ; setWindowTitle ( "New Android App" ) ; mValues = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizardState ( ) ; mMainPage = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectPage ( mValues ) ; mActivityPage = new com.android.ide.eclipse.adt.internal.wizards.templates.ActivityPage ( mValues ) ; }

Target:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { super . init ( workbench , selection ) ; setWindowTitle ( "New Android App" ) ; mValues = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizardState ( ) ; mMainPage = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectPage ( mValues ) ; mActivityPage = new com.android.ide.eclipse.adt.internal.wizards.templates.ActivityPage ( mValues , true , true ) ; }
Source:
public void test_socket_accept_Blocking_NotBound ( ) throws java.io.IOException { java.net.ServerSocket gotSocket = serverChannel.socket ( ) ; serverChannel.configureBlocking ( true ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } serverChannel.close ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } }

Target:
public void test_socket_accept_Blocking_NotBound ( ) throws java.io.IOException { java.net.ServerSocket gotSocket = serverChannel.socket ( ) ; serverChannel.configureBlocking ( true ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException expected ) { } serverChannel.close ( ) ; try { gotSocket.accept ( ) ; fail ( "Should throw an IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException expected ) { } }
Source:
private static android.content.pm.ApplicationInfo getApplicationInfo ( android.content.Context context ) throws android.content.pm.PackageManager.NameNotFoundException { android.content.pm.PackageManager pm ; java.lang.String packageName ; try { pm = context.getPackageManager ( ) ; packageName = context.getPackageName ( ) ; } catch ( java.lang.RuntimeException e ) { android.util.Log.w ( android.support.multidex.MultiDex.TAG , ( "Failure while trying to obtain ApplicationInfo from Context. " + "Must be running in test mode. Skip patching." ) , e ) ; return null ; } if ( ( pm == null ) || ( packageName == null ) ) { return null ; } android.content.pm.ApplicationInfo applicationInfo = pm.getApplicationInfo ( packageName , PackageManager.GET_META_DATA ) ; return applicationInfo ; }

Target:
private static android.content.pm.ApplicationInfo getApplicationInfo ( android.content.Context context ) { try { return context.getApplicationInfo ( ) ; } catch ( java.lang.RuntimeException e ) { android.util.Log.w ( android.support.multidex.MultiDex.TAG , ( "Failure while trying to obtain ApplicationInfo from Context. " + "Must be running in test mode. Skip patching." ) , e ) ; return null ; } }
Source:
public void binderDied ( ) { if ( com.android.server.am.ActivityManagerService.localLOGV ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Death received in " + ( this ) ) + " for thread " ) + ( mAppThread.asBinder ( ) ) ) ) ; removeRequestedPss ( mApp ) ; synchronized ( this ) { appDiedLocked ( mApp , mPid , mAppThread ) ; } }

Target:
public void binderDied ( ) { if ( com.android.server.am.ActivityManagerService.localLOGV ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( ( ( "Death received in " + ( this ) ) + " for thread " ) + ( mAppThread.asBinder ( ) ) ) ) ; synchronized ( this ) { appDiedLocked ( mApp , mPid , mAppThread ) ; } }
Source:
protected void logFail ( java.lang.String message , java.lang.Exception e ) { android.util.Log.e ( com.android.cts.verifier.notifications.InteractiveVerifierActivity.TAG , ( ( "failed " + ( this . getClass ( ) . getSimpleName ( ) ) ) + ( message == null ? "" : ": " + message ) ) , e ) ; }

Target:
protected void logFail ( java.lang.String message , java.lang.Throwable e ) { android.util.Log.e ( com.android.cts.verifier.notifications.InteractiveVerifierActivity.TAG , ( ( "failed " + ( this . getClass ( ) . getSimpleName ( ) ) ) + ( message == null ? "" : ": " + message ) ) , e ) ; }
Source:
public void setAnimation ( android.view.animation.Animation anim ) { if ( com.android.server.WindowManagerService.localLOGV ) android.util.Log.v ( com.android.server.WindowManagerService.TAG , ( ( ( "Setting animation in " + ( this ) ) + ": " ) + anim ) ) ; mAnimating = false ; mLocalAnimating = false ; mAnimation = anim ; mAnimation.restrictDuration ( com.android.server.WindowManagerService.MAX_ANIMATION_DURATION ) ; mAnimation.scaleCurrentDuration ( mWindowAnimationScale ) ; }

Target:
public void setAnimation ( android.view.animation.Animation anim ) { if ( com.android.server.WindowManagerService.localLOGV ) android.util.Slog.v ( com.android.server.WindowManagerService.TAG , ( ( ( "Setting animation in " + ( this ) ) + ": " ) + anim ) ) ; mAnimating = false ; mLocalAnimating = false ; mAnimation = anim ; mAnimation.restrictDuration ( com.android.server.WindowManagerService.MAX_ANIMATION_DURATION ) ; mAnimation.scaleCurrentDuration ( mWindowAnimationScale ) ; }
Source:
protected boolean cleanup ( ) { if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mPanDevices ) != null ) { java.util.List < android.bluetooth.BluetoothDevice > DevList = getConnectedDevices ( ) ; for ( android.bluetooth.BluetoothDevice dev : DevList ) { handlePanDeviceStateChange ( dev , mPanIfName , BluetoothProfile.STATE_DISCONNECTED , BluetoothPan.LOCAL_PANU_ROLE , BluetoothPan.REMOTE_NAP_ROLE ) ; } mPanDevices.clear ( ) ; } if ( ( mBluetoothIfaceAddresses ) != null ) { mBluetoothIfaceAddresses.clear ( ) ; } return true ; }

Target:
protected boolean cleanup ( ) { if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mPanDevices ) != null ) { java.util.List < android.bluetooth.BluetoothDevice > DevList = getConnectedDevices ( ) ; for ( android.bluetooth.BluetoothDevice dev : DevList ) { handlePanDeviceStateChange ( dev , mPanIfName , BluetoothProfile.STATE_DISCONNECTED , BluetoothPan.LOCAL_PANU_ROLE , BluetoothPan.REMOTE_NAP_ROLE ) ; } mPanDevices.clear ( ) ; } return true ; }
Source:
public void testNotifyPrimaryForeignUse ( ) { notifyDexLoad ( mFooUser0 , mBarUser0.getBaseAndSplitDexPaths ( ) , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mBarUser0 ) ; org.junit.Assert.assertNotNull ( pui ) ; org.junit.Assert.assertTrue ( pui.isUsedByOtherApps ( ) ) ; org.junit.Assert.assertTrue ( pui.getDexUseInfoMap ( ) . isEmpty ( ) ) ; }

Target:
public void testNotifyPrimaryForeignUse ( ) { notifyDexLoad ( mFooUser0 , mBarUser0.getBaseAndSplitDexPaths ( ) , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mBarUser0 ) ; org.junit.Assert.assertTrue ( pui.isUsedByOtherApps ( ) ) ; org.junit.Assert.assertTrue ( pui.getDexUseInfoMap ( ) . isEmpty ( ) ) ; }
Source:
private void applyBackgroundTint ( ) { if ( ( ( mBackground ) != null ) && ( ( mBackgroundTint ) != null ) ) { final android.view.View.TintInfo tintInfo = mBackgroundTint ; if ( ( tintInfo.mHasTintList ) || ( tintInfo.mHasTintMode ) ) { mBackground = mBackground.mutate ( ) ; if ( tintInfo.mHasTintList ) { mBackground.setTintList ( tintInfo.mTintList ) ; } if ( tintInfo.mHasTintMode ) { mBackground.setTintMode ( tintInfo.mTintMode ) ; } if ( mBackground.isStateful ( ) ) { mBackground.setState ( getDrawableState ( ) ) ; } } } }

Target:
private void applyBackgroundTint ( ) { if ( ( ( mBackground ) != null ) && ( ( mBackgroundTint ) != null ) ) { final android.view.View.TintInfo tintInfo = mBackgroundTint ; if ( ( tintInfo.mHasTintList ) || ( tintInfo.mHasTintMode ) ) { mBackground = mBackground.mutate ( ) ; if ( tintInfo.mHasTintList ) { mBackground.setTintList ( tintInfo.mTintList ) ; } if ( tintInfo.mHasTintMode ) { mBackground.setTintMode ( tintInfo.mTintMode ) ; } } } }
Source:
protected void setUp ( ) throws java.lang.Exception { mMockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; org.easymock.EasyMock.expect ( mMockDevice.getSerialNumber ( ) ) . andStubReturn ( "serial" ) ; mMockListener = org.easymock.EasyMock.createNiceMock ( com.android.ddmlib.testrunner.ITestRunListener.class ) ; mRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_PACKAGE , com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_RUNNER , mMockDevice ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { mMockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; org.easymock.EasyMock.expect ( mMockDevice.getName ( ) ) . andStubReturn ( "serial" ) ; mMockListener = org.easymock.EasyMock.createNiceMock ( com.android.ddmlib.testrunner.ITestRunListener.class ) ; mRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_PACKAGE , com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_RUNNER , mMockDevice ) ; }
Source:
public void registerContentObservers ( android.content.Context appContext ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFramework.registerContentObservers" ) ; if ( com.android.dialer.configprovider.ConfigProviderBindings.get ( appContext ) . getBoolean ( "is_nui_shortcut_enabled" , false ) ) { for ( com.android.dialer.calllog.datasources.CallLogDataSource dataSource : dataSources.getDataSourcesIncludingSystemCallLog ( ) ) { dataSource.registerContentObservers ( appContext , this ) ; } } else { com.android.dialer.common.LogUtil.i ( "CallLogFramework.registerContentObservers" , "not registering content observers" ) ; } }

Target:
public void registerContentObservers ( android.content.Context appContext ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFramework.registerContentObservers" ) ; if ( com.android.dialer.configprovider.ConfigProviderBindings.get ( appContext ) . getBoolean ( "is_nui_shortcut_enabled" , false ) ) { for ( com.android.dialer.calllog.datasources.CallLogDataSource dataSource : dataSources.getDataSourcesIncludingSystemCallLog ( ) ) { dataSource.registerContentObservers ( appContext ) ; } } else { com.android.dialer.common.LogUtil.i ( "CallLogFramework.registerContentObservers" , "not registering content observers" ) ; } }
Source:
public void test_getParameterCount ( ) throws java.lang.Exception { java.lang.Class [ ] expectedParameters = new java.lang.Class [ ] { java.lang.Object.class } ; java.lang.reflect.Constructor < ? > constructor = libcore.java.lang.reflect.ConstructorTest.ConstructorTestHelper.class . getConstructor ( expectedParameters ) ; int count = constructor.getParameterCount ( ) ; assertEquals ( 1 , count ) ; }

Target:
public void test_getParameterCount ( ) throws java.lang.Exception { java.lang.Class [ ] expectedParameters = new java.lang.Class [ 0 ] ; java.lang.reflect.Constructor < ? > constructor = libcore.java.lang.reflect.ConstructorTest.ConstructorTestHelper.class . getConstructor ( expectedParameters ) ; assertEquals ( 0 , constructor.getParameterCount ( ) ) ; expectedParameters = new java.lang.Class [ ] { java.lang.Object.class } ; constructor = libcore.java.lang.reflect.ConstructorTest.ConstructorTestHelper.class . getConstructor ( expectedParameters ) ; int count = constructor.getParameterCount ( ) ; assertEquals ( 1 , count ) ; }