auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { boolean result = false ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { result = service.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 ; }

Target:
public boolean sendReport ( android.bluetooth.BluetoothDevice device , int id , byte [ ] data ) { boolean result = false ; final android.bluetooth.IBluetoothHidDevice service = mService ; if ( service != null ) { try { result = service.sendReport ( device , id , data ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHidDevice.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHidDevice.TAG , "Proxy not attached to service" ) ; } return result ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 1 ] ) ; Main.doTest ( ) ; Main.doTestOtherThreadWait ( ) ; Main.doTestOtherThreadBusyLoop ( ) ; Main.doTestAllStackTraces ( ) ; java.lang.System.out.println ( "Done" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.System.loadLibrary ( args [ 1 ] ) ; SameThread.doTest ( ) ; java.lang.System.out.println ( ) ; OtherThread.doTestOtherThreadWait ( ) ; java.lang.System.out.println ( ) ; OtherThread.doTestOtherThreadBusyLoop ( ) ; java.lang.System.out.println ( ) ; AllTraces.doTest ( ) ; java.lang.System.out.println ( "Done" ) ; }
Source:
private void bindAndInitialize ( ) throws android.telephony.mbms.MbmsInitializationException { try { int returnCode = mService.initialize ( mCallbackToApp , mAppName , mSubscriptionId ) ; if ( returnCode != 0 ) { throw new android.telephony.mbms.MbmsInitializationException ( returnCode ) ; } } catch ( android.os.RemoteException e ) { throw new android.telephony.mbms.MbmsInitializationException ( 0 ) ; } }

Target:
public void onServiceConnected ( ) { latch.countDown ( ) ; }
Source:
public void setAbsoluteVolume ( int volume ) { if ( volume == ( mLocalVolume ) ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "setAbsoluteVolume is setting same index, ignore " + volume ) ) ; return ; } mHandler.removeMessages ( com.android.bluetooth.avrcp.Avrcp.MSG_ADJUST_VOLUME ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_SET_ABSOLUTE_VOLUME , volume , 0 ) ; mHandler.sendMessage ( msg ) ; }

Target:
public void adjustVolume ( int direction ) { final com.android.bluetooth.avrcp.Avrcp.AvrcpMessageHandler handler = mHandler ; if ( handler == null ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "adjustVolume: mHandler is already null" ) ; return ; } android.os.Message msg = handler.obtainMessage ( com.android.bluetooth.avrcp.Avrcp.MSG_ADJUST_VOLUME , direction , 0 ) ; handler.sendMessage ( msg ) ; }
Source:
protected byte [ ] engineDoFinal ( ) { ensureKeystoreOperationInitialized ( ) ; byte [ ] result ; try { result = mChunkedStreamer.doFinal ( null , 0 , 0 ) ; } catch ( android.security.KeyStoreException e ) { throw android.security.KeyStore.getCryptoOperationException ( e ) ; } engineReset ( ) ; return result ; }

Target:
protected byte [ ] engineDoFinal ( ) { ensureKeystoreOperationInitialized ( ) ; byte [ ] result ; try { result = mChunkedStreamer.doFinal ( null , 0 , 0 ) ; } catch ( android.security.KeyStoreException e ) { throw android.security.KeyStore.getCryptoOperationException ( e ) ; } resetWhilePreservingInitState ( ) ; return result ; }
Source:
public static final android.os.Process.ProcessStartResult startWebView ( final java.lang.String processClass , final java.lang.String niceName , int uid , int gid , int [ ] gids , int debugFlags , int mountExternal , int targetSdkVersion , java.lang.String seInfo , java.lang.String abi , java.lang.String instructionSet , java.lang.String appDataDir , java.lang.String [ ] zygoteArgs ) { return android.webkit.WebViewZygote.getProcess ( ) . start ( processClass , niceName , uid , gid , gids , debugFlags , mountExternal , targetSdkVersion , seInfo , abi , instructionSet , appDataDir , zygoteArgs ) ; }

Target:
public static final android.os.Process.ProcessStartResult startWebView ( final java.lang.String processClass , final java.lang.String niceName , int uid , int gid , int [ ] gids , int debugFlags , int mountExternal , int targetSdkVersion , java.lang.String seInfo , java.lang.String abi , java.lang.String instructionSet , java.lang.String appDataDir , java.lang.String invokeWith , java.lang.String [ ] zygoteArgs ) { return android.webkit.WebViewZygote.getProcess ( ) . start ( processClass , niceName , uid , gid , gids , debugFlags , mountExternal , targetSdkVersion , seInfo , abi , instructionSet , appDataDir , invokeWith , zygoteArgs ) ; }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { return com.android.jack.dx.io.instructions.InstructionCodec.decodeRegisterRange ( this , opcodeUnit , in ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; long literal = in.readLong ( ) ; return new com.android.jack.dx.io.instructions.OneRegisterDecodedInstruction ( this , opcode , 0 , null , 0 , literal , a ) ; }
Source:
void set ( java.lang.Object value ) { for ( android.util.Pair < android.renderscript.ScriptGroup.Closure , java.lang.Integer > p : mArgIndex ) { android.renderscript.ScriptGroup.Closure closure = p.first ; int index = p.second.intValue ( ) ; closure.setArg ( index , value ) ; } for ( android.util.Pair < android.renderscript.ScriptGroup.Closure , android.renderscript.Script.FieldID > p : mFieldID ) { android.renderscript.ScriptGroup.Closure closure = p.first ; android.renderscript.Script.FieldID fieldID = p.second ; closure.setGlobal ( fieldID , value ) ; } }

Target:
void set ( java.lang.Object value ) { mValue = value ; for ( android.util.Pair < android.renderscript.ScriptGroup.Closure , java.lang.Integer > p : mArgIndex ) { android.renderscript.ScriptGroup.Closure closure = p.first ; int index = p.second.intValue ( ) ; closure.setArg ( index , value ) ; } for ( android.util.Pair < android.renderscript.ScriptGroup.Closure , android.renderscript.Script.FieldID > p : mFieldID ) { android.renderscript.ScriptGroup.Closure closure = p.first ; android.renderscript.Script.FieldID fieldID = p.second ; closure.setGlobal ( fieldID , value ) ; } }
Source:
private void dumpCallTimes ( ) { java.lang.String action ; java.lang.System.out.format ( "id thread global start,end method\n" ) ; for ( com.android.traceview.Call call : mCallList ) { if ( ( call.getMethodAction ( ) ) == 0 ) { action = "+" ; } else { action = " " ; } long callTime = call.mThreadStartTime ; java.lang.System.out.format ( "%2d %6d %8d %8d %s %s\n" , call.getThreadId ( ) , callTime , call.mGlobalStartTime , call.mGlobalEndTime , action , call.getMethodData ( ) . getName ( ) ) ; } }

Target:
private void dumpThreadTimes ( ) { java.lang.System.out.print ( "\nThread Times\n" ) ; java.lang.System.out.print ( "id t-start t-end g-start g-end name\n" ) ; for ( com.android.traceview.ThreadData threadData : mThreadMap.values ( ) ) { java.lang.System.out.format ( "%2d %8d %8d %8d %8d %s\n" , threadData.getId ( ) , threadData.mThreadStartTime , threadData.mThreadEndTime , threadData.mGlobalStartTime , threadData.mGlobalEndTime , threadData.getName ( ) ) ; } }
Source:
private void updateAll ( ) { if ( ( mTimeShiftManager.isAvailable ( ) ) && ( ! ( mTvView.isScreenBlocked ( ) ) ) ) { setEnabled ( true ) ; initializeTimeline ( ) ; mBackgroundView.setEnabled ( true ) ; } else { setEnabled ( false ) ; mBackgroundView.setEnabled ( false ) ; } updateControls ( ) ; }

Target:
private void updateControls ( boolean forceUpdate ) { if ( forceUpdate || ( getContentsView ( ) . isShown ( ) ) ) { updateTime ( ) ; updateProgress ( ) ; updateButtons ( ) ; updateRecordButton ( ) ; updateButtonMargin ( ) ; } }
Source:
public void setNetworkSelectionModeManual ( java.lang.String operatorNumeric , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + operatorNumeric ) ) ; rr.mParcel.writeString ( operatorNumeric ) ; send ( rr ) ; }

Target:
public void setNetworkSelectionModeManual ( java.lang.String operatorNumeric , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " " ) + operatorNumeric ) ) ; rr.mParcel.writeString ( operatorNumeric ) ; send ( rr ) ; }
Source:
final void get ( float [ ] dst , int dstOffset , int floatCount ) { int byteCount = checkGetBounds ( SizeOf.FLOAT , dst.length , dstOffset , floatCount ) ; this . block.peekFloatArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , floatCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void get ( float [ ] dst , int dstOffset , int floatCount ) { checkNotFreed ( ) ; int byteCount = checkGetBounds ( SizeOf.FLOAT , dst.length , dstOffset , floatCount ) ; this . block.peekFloatArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , floatCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void onItemSelected ( android.widget.AdapterView parent , android.view.View v , int pos , long id ) { android.os.Message msg = mHandler.obtainMessage ( com.android.settings.RadioInfo.EVENT_SET_PREFERRED_TYPE_DONE ) ; if ( ( pos >= 0 ) && ( pos <= 7 ) ) { phone.setPreferredNetworkType ( pos , msg ) ; } }

Target:
public void onItemSelected ( android.widget.AdapterView parent , android.view.View v , int pos , long id ) { android.os.Message msg = mHandler.obtainMessage ( com.android.settings.RadioInfo.EVENT_SET_PREFERRED_TYPE_DONE ) ; if ( ( pos >= 0 ) && ( pos <= ( ( mPreferredNetworkLabels.length ) - 2 ) ) ) { phone.setPreferredNetworkType ( pos , msg ) ; } }
Source:
public int getComponentEnabledSetting ( android.content.ComponentName componentName , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ; int uid = android.os.Binder.getCallingUid ( ) ; checkValidCaller ( uid , userId ) ; synchronized ( mPackages ) { return mSettings.getComponentEnabledSettingLPr ( componentName , userId ) ; } }

Target:
public int getApplicationEnabledSetting ( java.lang.String packageName , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ; int uid = android.os.Binder.getCallingUid ( ) ; enforceCrossUserPermission ( uid , userId , false , "get enabled" ) ; synchronized ( mPackages ) { return mSettings.getApplicationEnabledSettingLPr ( packageName , userId ) ; } }
Source:
void collapseViewHolder ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailViewHolder.collapseViewHolder" , "viewHolderId:%d is being collapsed, its MPViewUri:%s, its Uri is :%s" , viewHolderId , java.lang.String.valueOf ( mediaPlayerView.getVoicemailUri ( ) ) , java.lang.String.valueOf ( viewHolderVoicemailUri ) ) ; transcriptionTextView.setMaxLines ( 1 ) ; isViewHolderExpanded = false ; mediaPlayerView.reset ( ) ; mediaPlayerView.setVisibility ( android.view.View.GONE ) ; }

Target:
void collapseViewHolder ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailViewHolder.collapseViewHolder" , "viewHolderId:%d is being collapsed, its MPViewUri:%s, its Uri is :%s" , viewHolderId , java.lang.String.valueOf ( mediaPlayerView.getVoicemailUri ( ) ) , java.lang.String.valueOf ( viewHolderVoicemailUri ) ) ; transcriptionTextView.setMaxLines ( 1 ) ; transcriptionBrandingTextView.setVisibility ( android.view.View.GONE ) ; isViewHolderExpanded = false ; mediaPlayerView.reset ( ) ; mediaPlayerView.setVisibility ( android.view.View.GONE ) ; }
Source:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FQDN ; config.homeSp.friendlyName = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FRIENDLY_NAME ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.realm = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_REALM ; config.credential.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; config.credential.simCredential.imsi = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ; config.credential.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI_PARAM ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }

Target:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = createTestConfigWithSimCredential ( ) ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI_PARAM ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }
Source:
private static int translateHalStatusToAwareSessionCallbackTerminate ( int halStatus ) { switch ( halStatus ) { case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_TIMEOUT : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_USER_REQUEST : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_COUNT_REACHED : return android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE ; case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_INVALID : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_FAILURE : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_DE_SHUTDOWN : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_DISABLE_IN_PROGRESS : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_POST_DISC_ATTR_EXPIRED : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_POST_DISC_LEN_EXCEEDED : case com.android.server.wifi.aware.WifiAwareNative.AWARE_TERMINATED_REASON_FURTHER_AVAIL_MAP_EMPTY : return android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ; } return android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ; }

Target:
private static void onSubscribeTerminated ( int subscribeId , int status ) { if ( com.android.server.wifi.aware.WifiAwareNative.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNative.TAG , ( ( ( "onSubscribeTerminated: subscribeId=" + subscribeId ) + ", status=" ) + status ) ) ; } com.android.server.wifi.aware.WifiAwareStateManager.getInstance ( ) . onSessionTerminatedNotification ( subscribeId , ( status == ( com.android.server.wifi.aware.WifiAwareNative.AWARE_STATUS_SUCCESS ) ? android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_DONE : android.net.wifi.aware.WifiAwareDiscoverySessionCallback.TERMINATE_REASON_FAIL ) , false ) ; }
Source:
private static java.lang.Class defineClass ( java.lang.String name , java.lang.ClassLoader loader , java.lang.Object cookie , java.util.List < java.lang.Throwable > suppressed ) { java.lang.Class result = null ; try { result = dalvik.system.DexFile.defineClassNative ( name , loader , cookie ) ; } catch ( java.lang.NoClassDefFoundError e ) { if ( suppressed != null ) { suppressed.add ( e ) ; } } catch ( java.lang.ClassNotFoundException e ) { if ( suppressed != null ) { suppressed.add ( e ) ; } } return result ; }

Target:
private static java.lang.Class defineClass ( java.lang.String name , java.lang.ClassLoader loader , java.lang.Object cookie , dalvik.system.DexFile dexFile , java.util.List < java.lang.Throwable > suppressed ) { java.lang.Class result = null ; try { result = dalvik.system.DexFile.defineClassNative ( name , loader , cookie , dexFile ) ; } catch ( java.lang.NoClassDefFoundError e ) { if ( suppressed != null ) { suppressed.add ( e ) ; } } catch ( java.lang.ClassNotFoundException e ) { if ( suppressed != null ) { suppressed.add ( e ) ; } } return result ; }
Source:
public void setImmersive ( android.os.IBinder token , boolean immersive ) { synchronized ( this ) { final com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.isInStackLocked ( token ) ; if ( r == null ) { throw new java.lang.IllegalArgumentException ( ) ; } r.immersive = immersive ; if ( r == ( mFocusedActivity ) ) { if ( DEBUG_IMMERSIVE ) android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG_IMMERSIVE , ( "Frontmost changed immersion: " + r ) ) ; applyUpdateLockStateLocked ( r ) ; } } }

Target:
public void setImmersive ( android.os.IBinder token , boolean immersive ) { synchronized ( this ) { final com.android.server.am.ActivityRecord r = com.android.server.am.ActivityRecord.isInStackLocked ( token ) ; if ( r == null ) { throw new java.lang.IllegalArgumentException ( ) ; } r.immersive = immersive ; if ( r == ( mFocusedActivity ) ) { if ( com.android.server.am.ActivityManagerDebugConfig.DEBUG_IMMERSIVE ) android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG_IMMERSIVE , ( "Frontmost changed immersion: " + r ) ) ; applyUpdateLockStateLocked ( r ) ; } } }
Source:
public boolean reportError ( byte error ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "reportError(): error = " + error ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.reportError ( error ) ; } 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 connect ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "connect(): device=" + device ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.connect ( device ) ; } 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 int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "getConnectionState(): device=" + device ) ) ; if ( ( mService ) != null ) { try { return mService.getConnectionState ( device ) ; } 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 STATE_DISCONNECTED ; }

Target:
public int getConnectionState ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "getConnectionState(): device=" + device ) ) ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { return service.getConnectionState ( device ) ; } 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 STATE_DISCONNECTED ; }
Source:
public void setModel ( final com.android.uiautomator.UiAutomatorModel model , final org.eclipse.swt.graphics.Image screenshot ) { if ( ( org.eclipse.swt.widgets.Display.getDefault ( ) . getThread ( ) ) != ( java.lang.Thread.currentThread ( ) ) ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mUiAutomatorView.setModel ( model , screenshot ) ; } } ) ; } else { mUiAutomatorView.setModel ( model , screenshot ) ; } }

Target:
public void setModel ( final com.android.uiautomator.UiAutomatorModel model , final java.io.File modelFile , final org.eclipse.swt.graphics.Image screenshot ) { if ( ( org.eclipse.swt.widgets.Display.getDefault ( ) . getThread ( ) ) != ( java.lang.Thread.currentThread ( ) ) ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mUiAutomatorView.setModel ( model , modelFile , screenshot ) ; } } ) ; } else { mUiAutomatorView.setModel ( model , modelFile , screenshot ) ; } }
Source:
public static void genRandom ( long seed , int max , int factor , int offset , int [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = ( ( r.nextInt ( max ) ) * factor ) + offset ; } }

Target:
public static void genRandomInts ( long seed , int max , int offset , int [ ] array ) { java.util.Random r = new java.util.Random ( seed ) ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { array [ i ] = ( r.nextInt ( max ) ) + offset ; } }
Source:
public void test_getDisplayName_invalid ( ) throws java.lang.Exception { java.util.Locale invalid = new java.util.Locale ( "AaBbCc" , "DdEeFf" , "GgHhIi" ) ; assertEquals ( "aabbcc" , invalid.getLanguage ( ) ) ; assertEquals ( "DDEEFF" , invalid.getCountry ( ) ) ; assertEquals ( "GgHhIi" , invalid.getVariant ( ) ) ; assertEquals ( "aabbcc" , invalid.getDisplayLanguage ( ) ) ; assertEquals ( "" , invalid.getDisplayCountry ( ) ) ; assertEquals ( "DDEEFF_GGHHII" , invalid.getDisplayVariant ( ) ) ; assertEquals ( "aabbcc (DDEEFF,DDEEFF_GGHHII)" , invalid.getDisplayName ( ) ) ; }

Target:
public void test_getDisplayName_invalid ( ) throws java.lang.Exception { java.util.Locale invalid = new java.util.Locale ( "AaBbCc" , "DdEeFf" , "GgHhIi" ) ; assertEquals ( "aabbcc" , invalid.getLanguage ( ) ) ; assertEquals ( "DDEEFF" , invalid.getCountry ( ) ) ; assertEquals ( "GgHhIi" , invalid.getVariant ( ) ) ; assertEquals ( "aabbcc" , invalid.getDisplayLanguage ( ) ) ; assertEquals ( "DDEEFF" , invalid.getDisplayCountry ( ) ) ; assertEquals ( "GGHHII" , invalid.getDisplayVariant ( ) ) ; assertEquals ( "aabbcc (DDEEFF,GGHHII)" , invalid.getDisplayName ( ) ) ; }
Source:
public void loadEFImgTransparent ( int fileid , int highOffset , int lowOffset , int length , com.android.internal.telephony.uicc.Message onLoaded ) { com.android.internal.telephony.uicc.Message response = obtainMessage ( com.android.internal.telephony.uicc.EVENT_READ_ICON_DONE , fileid , 0 , onLoaded ) ; mCi.iccIOForApp ( com.android.internal.telephony.uicc.COMMAND_GET_RESPONSE , fileid , "img" , 0 , 0 , com.android.internal.telephony.uicc.GET_RESPONSE_EF_IMG_SIZE_BYTES , null , null , mAid , response ) ; }

Target:
public void loadEFImgTransparent ( int fileid , int highOffset , int lowOffset , int length , com.android.internal.telephony.uicc.Message onLoaded ) { com.android.internal.telephony.uicc.Message response = obtainMessage ( com.android.internal.telephony.uicc.EVENT_READ_ICON_DONE , fileid , 0 , onLoaded ) ; mCi.iccIOForApp ( com.android.internal.telephony.uicc.COMMAND_GET_RESPONSE , fileid , getEFPath ( fileid ) , 0 , 0 , com.android.internal.telephony.uicc.GET_RESPONSE_EF_IMG_SIZE_BYTES , null , null , mAid , response ) ; }
Source:
private java.lang.String getPreviousProgress ( java.lang.String encodedConfigurationInstance ) { java.lang.String progress = configurationProgress.get ( encodedConfigurationInstance ) ; return progress == null ? "" : progress ; }

Target:
private java.util.List < java.lang.String > getPreviousProgress ( java.lang.String encodedConfigurationInstance ) { java.util.List < java.lang.String > progressMessages = configurationProgress.get ( encodedConfigurationInstance ) ; if ( progressMessages == null ) { progressMessages = new java.util.LinkedList < java.lang.String > ( ) ; configurationProgress.put ( encodedConfigurationInstance , progressMessages ) ; } return progressMessages ; }
Source:
public boolean isEnterprise ( ) { return ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA_EAP ) ) || ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.IEEE8021X ) ) ; }

Target:
public boolean isEnterprise ( ) { return ( ( ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.WPA_EAP ) ) || ( allowedKeyManagement.get ( android.net.wifi.WifiConfiguration.KeyMgmt.IEEE8021X ) ) ) && ( ( enterpriseConfig ) != null ) ) && ( ( enterpriseConfig.getEapMethod ( ) ) != ( WifiEnterpriseConfig.Eap.NONE ) ) ; }
Source:
public void validateUserCredentialWithoutPassword ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.userCredential = new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ; cred.userCredential.username = "username" ; cred.userCredential.eapType = android.net.wifi.EAPConstants.EAP_TTLS ; cred.userCredential.nonEapInnerMethod = "MS-CHAP" ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateSimCredentialWithoutIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithSimCredential ( ) ; cred.getSimCredential ( ) . setImsi ( null ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
public boolean isUserRunning ( int userId , boolean orStopped ) { if ( ( checkCallingPermission ( android.Manifest.permission.INTERACT_ACROSS_USERS ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { java.lang.String msg = ( ( ( ( "Permission Denial: isUserRunning() from pid=" + ( android.os.Binder.getCallingPid ( ) ) ) + ", uid=" ) + ( android.os.Binder.getCallingUid ( ) ) ) + " requires " ) + ( android.Manifest.permission.INTERACT_ACROSS_USERS ) ; android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , msg ) ; throw new java.lang.SecurityException ( msg ) ; } synchronized ( this ) { return isUserRunningLocked ( userId , orStopped ) ; } }

Target:
public android.content.pm.UserInfo getCurrentUser ( ) { return mUserController.getCurrentUser ( ) ; }
Source:
protected void verifyResourceExists ( com.android.ide.common.res2.DataMap < ? extends com.android.ide.common.res2.DataItem > dataMap , java.lang.String ... dataItemKeys ) { com.google.common.collect.ListMultimap < java.lang.String , ? extends com.android.ide.common.res2.DataItem > map = dataMap.getDataMap ( ) ; for ( java.lang.String resKey : dataItemKeys ) { java.util.List < ? extends com.android.ide.common.res2.DataItem > items = map.get ( resKey ) ; assertTrue ( ( ( "resource '" + resKey ) + "' is missing!" ) , ( ( items.size ( ) ) > 0 ) ) ; } }

Target:
protected void verifyResourceExists ( com.android.ide.common.res2.DataMap < ? extends com.android.ide.common.res2.DataItem > dataMap , java.lang.String ... dataItemKeys ) { com.google.common.collect.ListMultimap < java.lang.String , ? extends com.android.ide.common.res2.DataItem > map = dataMap.getDataMap ( ) ; for ( java.lang.String resKey : dataItemKeys ) { java.util.List < ? extends com.android.ide.common.res2.DataItem > items = map.get ( resKey ) ; assertTrue ( ( ( "resource '" + resKey ) + "' is missing!" ) , ( ! ( items.isEmpty ( ) ) ) ) ; } }
Source:
synchronized void recordAttributeAction ( @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull com.android.manifmerger.ActionRecorder.ActionType actionType , @ com.android.annotations.Nullable com.android.manifmerger.AttributeOperationType attributeOperationType ) { com.android.manifmerger.XmlElement originElement = attribute.getOwnerElement ( ) ; java.util.List < com.android.manifmerger.ActionRecorder.AttributeRecord > attributeRecords = getAttributeRecords ( attribute ) ; com.android.manifmerger.ActionRecorder.AttributeRecord attributeRecord = new com.android.manifmerger.ActionRecorder.AttributeRecord ( actionType , new com.android.manifmerger.ActionRecorder.ActionLocation ( originElement.getDocument ( ) . getSourceLocation ( ) , attribute.getPosition ( ) ) , attributeOperationType ) ; attributeRecords.add ( attributeRecord ) ; }

Target:
synchronized void recordAttributeAction ( @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull com.android.manifmerger.Actions.ActionType actionType , @ com.android.annotations.Nullable com.android.manifmerger.AttributeOperationType attributeOperationType ) { com.android.manifmerger.XmlElement originElement = attribute.getOwnerElement ( ) ; java.util.List < com.android.manifmerger.Actions.AttributeRecord > attributeRecords = getAttributeRecords ( attribute ) ; com.android.manifmerger.Actions.AttributeRecord attributeRecord = new com.android.manifmerger.Actions.AttributeRecord ( actionType , new com.android.manifmerger.Actions.ActionLocation ( originElement.getDocument ( ) . getSourceLocation ( ) , attribute.getPosition ( ) ) , attribute.getId ( ) , attributeOperationType ) ; attributeRecords.add ( attributeRecord ) ; }
Source:
public void interfaceAdded ( java.lang.String iface ) { super . interfaceAdded ( iface ) ; if ( mClatInterfaceName.equals ( iface ) ) { mCallback.setNeighborDiscoveryOffload ( false ) ; } }

Target:
public void interfaceAdded ( java.lang.String iface ) { super . interfaceAdded ( iface ) ; if ( mClatInterfaceName.equals ( iface ) ) { mCallback.setNeighborDiscoveryOffload ( false ) ; } else if ( ! ( mInterfaceName.equals ( iface ) ) ) { return ; } final java.lang.String msg = ( "interfaceAdded(" + iface ) + ")" ; logMsg ( msg ) ; }
Source:
protected void doTreeUp ( ) { org.eclipse.jface.viewers.ISelection selection = mTreeViewer.getSelection ( ) ; if ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > selected = filterSelection ( ( ( org.eclipse.jface.viewers.ITreeSelection ) ( selection ) ) ) ; mUiTreeActions.doUp ( selected ) ; } }

Target:
protected void doTreeUp ( ) { org.eclipse.jface.viewers.ISelection selection = mTreeViewer.getSelection ( ) ; if ( ( ! ( selection.isEmpty ( ) ) ) && ( selection instanceof org.eclipse.jface.viewers.ITreeSelection ) ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode > selected = filterSelection ( ( ( org.eclipse.jface.viewers.ITreeSelection ) ( selection ) ) ) ; mUiTreeActions.doUp ( selected , mDescriptorFilters ) ; } }
Source:
private int getErrorType ( int infoType ) { int error = - 1 ; switch ( infoType ) { case DrmInfoRequest.TYPE_REGISTRATION_INFO : error = DrmErrorEvent.TYPE_REGISTRATION_FAILED ; break ; case DrmInfoRequest.TYPE_UNREGISTRATION_INFO : error = DrmErrorEvent.TYPE_UNREGISTRATION_FAILED ; break ; case DrmInfoRequest.TYPE_RIGHTS_ACQUISITION_INFO : error = DrmErrorEvent.TYPE_RIGHTS_ACQUISITION_FAILED ; break ; } return error ; }

Target:
private int getEventType ( int infoType ) { int eventType = - 1 ; switch ( infoType ) { case DrmInfoRequest.TYPE_REGISTRATION_INFO : case DrmInfoRequest.TYPE_UNREGISTRATION_INFO : case DrmInfoRequest.TYPE_RIGHTS_ACQUISITION_INFO : eventType = DrmEvent.TYPE_DRM_INFO_PROCESSED ; break ; } return eventType ; }
Source:
private static char sadShort2ShortAlt2 ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; char sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { char s = s1 [ i ] ; char p = s2 [ i ] ; int x = s - p ; if ( x < 0 ) x = - x ; sad += x ; } return sad ; }

Target:
private static char sadChar2CharAlt2 ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; char sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { char s = s1 [ i ] ; char p = s2 [ i ] ; int x = s - p ; if ( x < 0 ) x = - x ; sad += x ; } return sad ; }
Source:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUshortUshortUshortUshort args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( short ) ( java.lang.StrictMath.min ( ( ( args.inMaxValue ) & 65535 ) , java.lang.StrictMath.max ( ( ( args.inValue ) & 65535 ) , ( ( args.inMinValue ) & 65535 ) ) ) ) ) ; }

Target:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUshortUshortUshortUshort args ) { args.out = android.renderscript.cts.CoreMathVerifier.minU16 ( args.inMaxValue , android.renderscript.cts.CoreMathVerifier.maxU16 ( args.inValue , args.inMinValue ) ) ; }
Source:
public boolean isMinifyEnabled ( ) { com.android.build.gradle.internal.core.Type type = getType ( ) ; return ( getBuildType ( ) . isMinifyEnabled ( ) ) && ( ( type != ( Type.TEST ) ) || ( ( getTestedConfig ( ) . getType ( ) ) != ( Type.LIBRARY ) ) ) ; }

Target:
public boolean isMinifyEnabled ( ) { com.android.build.gradle.internal.core.Type type = getType ( ) ; return ( getBuildType ( ) . isMinifyEnabled ( ) ) && ( ( ! ( type.isForTesting ( ) ) ) || ( ( getTestedConfig ( ) . getType ( ) ) != ( Type.LIBRARY ) ) ) ; }
Source:
private synchronized void onIntrData ( byte reportId , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onIntrData(): reportId=" + reportId ) ) ; } java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( data ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_INTR_DATA ) ; msg.arg1 = reportId ; msg.obj = bb ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onSetProtocolFromNative ( byte protocol ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "onSetProtocol(): protocol=" + protocol ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_SET_PROTOCOL ) ; msg.arg1 = protocol ; mHandler.sendMessage ( msg ) ; }
Source:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) ; return ( ( imsManager.isVtEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) && ( imsManager.isVtEnabledByUser ( ) ) ; }

Target:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , mPhone.getSubId ( ) , callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) ; return ( ( imsManager.isVtEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) && ( imsManager.isVtEnabledByUser ( ) ) ; }
Source:
private void reinitialize ( ) { android.telecom.CallAudioState initState = getInitialAudioState ( ) ; mAvailableRoutes = initState.getSupportedRouteMask ( ) ; mIsMuted = initState.isMuted ( ) ; setMuteOn ( mIsMuted ) ; mWasOnSpeaker = false ; mHasUserExplicitlyLeftBluetooth = false ; transitionTo ( mRouteCodeToQuiescentState.get ( initState.getRoute ( ) ) ) ; }

Target:
private void reinitialize ( ) { android.telecom.CallAudioState initState = getInitialAudioState ( ) ; mDeviceSupportedRoutes = initState.getSupportedRouteMask ( ) ; mAvailableRoutes = ( mDeviceSupportedRoutes ) & ( getCurrentCallSupportedRoutes ( ) ) ; mIsMuted = initState.isMuted ( ) ; setMuteOn ( mIsMuted ) ; mWasOnSpeaker = false ; mHasUserExplicitlyLeftBluetooth = false ; mLastKnownCallAudioState = initState ; transitionTo ( mRouteCodeToQuiescentState.get ( initState.getRoute ( ) ) ) ; }
Source:
public void testAll ( ) throws java.lang.Exception { assertEquals ( ( "formatstrings.xml:5: Warning: Formatting string \'missing\' is not referencing numbered arguments [1, 2]\n" + ( ( ( ( ( ( ( "pkg/StringFormatActivity.java:13: Error: Wrong argument type for formatting argument \'#1\' in hello: conversion is \'d\', received String\n" + "=> values-es/formatstrings.xml:3: Conflicting argument declaration here\n" ) + "pkg/StringFormatActivity.java:15: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2\n" ) + "=> values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "values-es/formatstrings.xml:3: Error: Inconsistent formatting types for argument #1 in format string hello (\'%1$d\'): Found both \'s\' and \'d\' (in values/formatstrings.xml)\n" ) + "=> values/formatstrings.xml:3: Conflicting argument type here\n" ) + "values-es/formatstrings.xml:4: Warning: Inconsistent number of arguments in formatting string hello2; found both 2 and 3\n" ) + "=> values/formatstrings.xml:4: Conflicting number of arguments here" ) ) , lintProject ( "res/values/formatstrings.xml" , "res/values-es/formatstrings.xml" , "src/test/pkg/StringFormatActivity.java.txt=>src/test/pkg/StringFormatActivity.java" ) ) ; }

Target:
public void testAll ( ) throws java.lang.Exception { assertEquals ( ( "formatstrings.xml:5: Warning: Formatting string \'missing\' is not referencing numbered arguments [1, 2]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( "pkg/StringFormatActivity.java:13: Error: Wrong argument type for formatting argument \'#1\' in hello: conversion is \'d\', received String\n" + "=> values-es/formatstrings.xml:3: Conflicting argument declaration here\n" ) + "pkg/StringFormatActivity.java:15: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2\n" ) + "=> values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "pkg/StringFormatActivity.java:24: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2\n" ) + "=> values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "pkg/StringFormatActivity.java:25: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2\n" ) + "=> values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "pkg/StringFormatActivity.java:26: Error: Wrong argument count, format string hello2 requires 3 but format call supplies 2\n" ) + "=> values-es/formatstrings.xml:4: This definition requires 3 arguments\n" ) + "values-es/formatstrings.xml:3: Error: Inconsistent formatting types for argument #1 in format string hello (\'%1$d\'): Found both \'s\' and \'d\' (in values/formatstrings.xml)\n" ) + "=> values/formatstrings.xml:3: Conflicting argument type here\n" ) + "values-es/formatstrings.xml:4: Warning: Inconsistent number of arguments in formatting string hello2; found both 2 and 3\n" ) + "=> values/formatstrings.xml:4: Conflicting number of arguments here" ) ) , lintProject ( "res/values/formatstrings.xml" , "res/values-es/formatstrings.xml" , "src/test/pkg/StringFormatActivity.java.txt=>src/test/pkg/StringFormatActivity.java" ) ) ; }
Source:
public void testBuildWithCtrlPressed ( ) { android.support.test.espresso.action.EspressoKey key = new android.support.test.espresso.action.EspressoKey.Builder ( ) . withKeyCode ( android.support.test.espresso.action.EspressoKeyBuilderTest.KEY_CODE ) . withCtrlPressed ( true ) . build ( ) ; assertEquals ( android.support.test.espresso.action.EspressoKeyBuilderTest.KEY_CODE , key.getKeyCode ( ) ) ; if ( ( Build.VERSION.SDK_INT ) >= ( Build.VERSION_CODES.HONEYCOMB ) ) { assertEquals ( KeyEvent.META_CTRL_ON , key.getMetaState ( ) ) ; } else { assertEquals ( 0 , key.getMetaState ( ) ) ; } }

Target:
public void buildWithCtrlPressed ( ) { android.support.test.espresso.action.EspressoKey key = new android.support.test.espresso.action.EspressoKey.Builder ( ) . withKeyCode ( android.support.test.espresso.action.EspressoKeyBuilderTest.KEY_CODE ) . withCtrlPressed ( true ) . build ( ) ; org.junit.Assert.assertEquals ( android.support.test.espresso.action.EspressoKeyBuilderTest.KEY_CODE , key.getKeyCode ( ) ) ; if ( ( Build.VERSION.SDK_INT ) >= ( Build.VERSION_CODES.HONEYCOMB ) ) { org.junit.Assert.assertEquals ( KeyEvent.META_CTRL_ON , key.getMetaState ( ) ) ; } else { org.junit.Assert.assertEquals ( 0 , key.getMetaState ( ) ) ; } }
Source:
public int getHighestKnownApiLevel ( ) { int max = com.android.ide.common.sdk.SdkVersionInfo.HIGHEST_KNOWN_API ; for ( com.android.sdklib.IAndroidTarget target : getTargets ( ) ) { if ( target.isPlatform ( ) ) { int api = target.getVersion ( ) . getApiLevel ( ) ; if ( ( api > max ) && ( ! ( target.getVersion ( ) . isPreview ( ) ) ) ) { max = api ; } } } return max ; }

Target:
public int getHighestKnownApiLevel ( ) { int max = com.android.ide.common.sdk.SdkVersionInfo.HIGHEST_KNOWN_STABLE_API ; for ( com.android.sdklib.IAndroidTarget target : getTargets ( ) ) { if ( target.isPlatform ( ) ) { int api = target.getVersion ( ) . getApiLevel ( ) ; if ( ( api > max ) && ( ! ( target.getVersion ( ) . isPreview ( ) ) ) ) { max = api ; } } } return max ; }
Source:
public void sendSmsFromMissedCall ( java.lang.String number , android.net.Uri callUri ) { closeSystemDialogs ( context ) ; com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.markSingleMissedCallInCallLogAsRead ( context , callUri ) ; com.android.dialer.app.calllog.MissedCallNotifier.cancelSingleMissedCallNotification ( context , callUri ) ; com.android.dialer.util.DialerUtils.startActivityWithErrorToast ( context , com.android.dialer.util.IntentUtil.getSendSmsIntent ( number ) . setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ) ; }

Target:
public void sendSmsFromMissedCall ( java.lang.String number , android.net.Uri callUri ) { closeSystemDialogs ( context ) ; com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.markSingleMissedCallInCallLogAsRead ( context , callUri ) ; com.android.dialer.notification.missedcalls.MissedCallNotificationCanceller.cancelSingle ( context , callUri ) ; com.android.dialer.util.DialerUtils.startActivityWithErrorToast ( context , com.android.dialer.util.IntentUtil.getSendSmsIntent ( number ) . setFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ) ; }
Source:
private boolean addMediaPlayerController ( com.android.bluetooth.avrcp.MediaController controller ) { java.lang.String packageName = controller.getPackageName ( ) ; com.android.bluetooth.avrcp.MediaPlayerInfo info = new com.android.bluetooth.avrcp.MediaPlayerInfo ( com.android.bluetooth.avrcp.MediaController.wrap ( controller ) , AvrcpConstants.PLAYER_TYPE_AUDIO , AvrcpConstants.PLAYER_SUBTYPE_NONE , getPlayStateBytes ( controller.getPlaybackState ( ) ) , getFeatureBitMask ( packageName ) , controller.getPackageName ( ) , getAppLabel ( packageName ) ) ; return addMediaPlayerInfo ( info ) ; }

Target:
private boolean addMediaPlayerController ( com.android.bluetooth.avrcp.MediaController controller ) { java.lang.String packageName = controller.getPackageName ( ) ; com.android.bluetooth.avrcp.MediaPlayerInfo info = new com.android.bluetooth.avrcp.MediaPlayerInfo ( com.android.bluetooth.avrcp.MediaController.wrap ( controller ) , AvrcpConstants.PLAYER_TYPE_AUDIO , AvrcpConstants.PLAYER_SUBTYPE_NONE , getBluetoothPlayState ( controller.getPlaybackState ( ) ) , getFeatureBitMask ( packageName ) , controller.getPackageName ( ) , getAppLabel ( packageName ) ) ; return addMediaPlayerInfo ( info ) ; }
Source:
public final < X > com.google.common.reflect.TypeToken < T > where ( com.google.common.reflect.TypeParameter < X > typeParam , com.google.common.reflect.TypeToken < X > typeArg ) { com.google.common.reflect.TypeResolver resolver = new com.google.common.reflect.TypeResolver ( ) . where ( com.google.common.collect.ImmutableMap.of ( typeParam.typeVariable , typeArg.runtimeType ) ) ; return new com.google.common.reflect.TypeToken.SimpleTypeToken < T > ( resolver.resolveType ( runtimeType ) ) ; }

Target:
public final < X > com.google.common.reflect.TypeToken < T > where ( com.google.common.reflect.TypeParameter < X > typeParam , com.google.common.reflect.TypeToken < X > typeArg ) { com.google.common.reflect.TypeResolver resolver = new com.google.common.reflect.TypeResolver ( ) . where ( com.google.common.collect.ImmutableMap.of ( new com.google.common.reflect.TypeResolver.TypeVariableKey ( typeParam.typeVariable ) , typeArg.runtimeType ) ) ; return new com.google.common.reflect.TypeToken.SimpleTypeToken < T > ( resolver.resolveType ( runtimeType ) ) ; }
Source:
public static void wtf ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { java.lang.String msg = android.telecom.Log.buildMessage ( prefix , format , args ) ; android.util.Log.wtf ( android.telecom.Log.TAG , msg , new java.lang.IllegalStateException ( msg ) ) ; }

Target:
public static void wtf ( java.lang.Object objectPrefix , java.lang.String format , java.lang.Object ... args ) { java.lang.String msg = android.telecom.Log.buildMessage ( android.telecom.Log.getPrefixFromObject ( objectPrefix ) , format , args ) ; android.util.Slog.wtf ( android.telecom.Log.TAG , msg , new java.lang.IllegalStateException ( msg ) ) ; }
Source:
public boolean retainAll ( final java.util.Collection < ? > c ) { com.google.common.base.Preconditions.checkNotNull ( c ) ; com.google.common.base.Predicate < java.util.Map.Entry < R , V > > predicate = new com.google.common.base.Predicate < java.util.Map.Entry < R , V > > ( ) { @ java.lang.Override public boolean apply ( java.util.Map.Entry < R , V > entry ) { return ! ( c.contains ( entry.getValue ( ) ) ) ; } } ; return removePredicate ( predicate ) ; }

Target:
public boolean retainAll ( final java.util.Collection < ? > c ) { return removeFromColumnIf ( com.google.common.collect.Maps.< R > keyPredicateOnEntries ( com.google.common.base.Predicates.not ( com.google.common.base.Predicates.in ( c ) ) ) ) ; }
Source:
public void onForegroundCallChanged ( android.content.Context context , @ android.support.annotation.Nullable com.android.incallui.call.DialerCall newForegroundCall ) { if ( newForegroundCall == null ) { updateThemeColors ( context , pendingPhoneAccountHandle , false ) ; } else { updateThemeColors ( context , newForegroundCall.getAccountHandle ( ) , newForegroundCall.isSpam ( ) ) ; } }

Target:
public void onForegroundCallChanged ( android.content.Context context , @ android.support.annotation.Nullable com.android.incallui.call.DialerCall newForegroundCall ) { if ( newForegroundCall == null ) { updateThemeColors ( context , getHighlightColor ( context , pendingPhoneAccountHandle ) , false ) ; } else { updateThemeColors ( context , getHighlightColor ( context , newForegroundCall.getAccountHandle ( ) ) , newForegroundCall.isSpam ( ) ) ; } }