auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public int read ( byte [ ] buffer , int offset , int byteCount ) throws java.io.IOException { java.util.Arrays.checkOffsetAndCount ( buffer.length , offset , byteCount ) ; if ( ! ( channel.isBlocking ( ) ) ) { throw new java.nio.channels.IllegalBlockingModeException ( ) ; } java.nio.ByteBuffer buf = java.nio.ByteBuffer.wrap ( buffer , offset , byteCount ) ; return channel.read ( buf ) ; }

Target:
public int read ( byte [ ] buffer , int byteOffset , int byteCount ) throws java.io.IOException { java.util.Arrays.checkOffsetAndCount ( buffer.length , byteOffset , byteCount ) ; if ( ! ( channel.isBlocking ( ) ) ) { throw new java.nio.channels.IllegalBlockingModeException ( ) ; } java.nio.ByteBuffer buf = java.nio.ByteBuffer.wrap ( buffer , byteOffset , byteCount ) ; return channel.read ( buf ) ; }
Source:
private android.content.Intent getShowMissedCallIntentForDefaultDialer ( android.os.UserHandle userHandle ) { java.lang.String dialerPackage = android.telecom.DefaultDialerManager.getDefaultDialerApplication ( mContext , userHandle.getIdentifier ( ) ) ; if ( android.text.TextUtils.isEmpty ( dialerPackage ) ) { return null ; } return new android.content.Intent ( android.telecom.TelecomManager.ACTION_SHOW_MISSED_CALLS_NOTIFICATION ) . setPackage ( dialerPackage ) ; }

Target:
private android.content.Intent getShowMissedCallIntentForDefaultDialer ( android.os.UserHandle userHandle ) { java.lang.String dialerPackage = mDefaultDialerCache.getDefaultDialerApplication ( userHandle.getIdentifier ( ) ) ; if ( android.text.TextUtils.isEmpty ( dialerPackage ) ) { return null ; } return new android.content.Intent ( android.telecom.TelecomManager.ACTION_SHOW_MISSED_CALLS_NOTIFICATION ) . setPackage ( dialerPackage ) ; }
Source:
public void onProgressUpdated ( final android.telephony.mbms.DownloadRequest request , final android.telephony.mbms.FileInfo fileInfo , final int currentDownloadSize , final int fullDownloadSize , final int currentDecodedSize , final int fullDecodedSize ) throws android.os.RemoteException { if ( mIsStopped ) { return ; } mExecutor.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { long token = android.os.Binder.clearCallingIdentity ( ) ; try { mAppCallback.onProgressUpdated ( request , fileInfo , currentDownloadSize , fullDownloadSize , currentDecodedSize , fullDecodedSize ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } ) ; }

Target:
public void onProgressUpdated ( final android.telephony.mbms.DownloadRequest request , final android.telephony.mbms.FileInfo fileInfo , final int currentDownloadSize , final int fullDownloadSize , final int currentDecodedSize , final int fullDecodedSize ) throws android.os.RemoteException { if ( mIsStopped ) { return ; } mExecutor.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { long token = android.os.Binder.clearCallingIdentity ( ) ; try { mAppListener.onProgressUpdated ( request , fileInfo , currentDownloadSize , fullDownloadSize , currentDecodedSize , fullDecodedSize ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } ) ; }
Source:
private static void edgeSplitSuccessors ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getBlocksDepthFirst ( true ) ) { if ( ( block == ( cfg.getEntryBlock ( ) ) ) || ( block == ( cfg.getExitBlock ( ) ) ) ) { continue ; } for ( com.android.jack.ir.ast.cfg.JBasicBlock succ : block.getSuccessors ( ) ) { if ( com.android.jack.transformations.ssa.SsaBasicBlockSplitter.needsNewSuccessor ( block , succ ) ) { succ.split ( 0 ) ; } } } }

Target:
private static void edgeSplitSuccessors ( com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : cfg.getInternalBlocksUnordered ( ) ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock succ : block.getSuccessors ( ) ) { if ( com.android.jack.transformations.ssa.SsaBasicBlockSplitter.needsNewSuccessor ( block , succ ) ) { succ.split ( 0 ) ; } } } }
Source:
public static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.gsm.GsmCdmaPhone phone , com.android.internal.telephony.uicc.UiccCardApplication app ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone , app ) ; ret.mMessage = ussdMessage ; ret.mIsUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.mIsPendingUSSD = true ; ret.mState = State.PENDING ; } else { ret.mState = State.COMPLETE ; } return ret ; }

Target:
public static com.android.internal.telephony.gsm.GsmMmiCode newNetworkInitiatedUssd ( java.lang.String ussdMessage , boolean isUssdRequest , com.android.internal.telephony.GsmCdmaPhone phone , com.android.internal.telephony.uicc.UiccCardApplication app ) { com.android.internal.telephony.gsm.GsmMmiCode ret ; ret = new com.android.internal.telephony.gsm.GsmMmiCode ( phone , app ) ; ret.mMessage = ussdMessage ; ret.mIsUssdRequest = isUssdRequest ; if ( isUssdRequest ) { ret.mIsPendingUSSD = true ; ret.mState = State.PENDING ; } else { ret.mState = State.COMPLETE ; } return ret ; }
Source:
public void test_withNanoOfSecond_normal ( ) { java.time.LocalTime t = TEST_12_30_40_987654321 ; t = t.withNano ( 1 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 1 ) ; t = t.withNano ( 10 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 10 ) ; t = t.withNano ( 100 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 100 ) ; t = t.withNano ( 999999999 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 999999999 ) ; }

Target:
public void test_withNanoOfSecond_normal ( ) { java.time.LocalTime t = tck.java.time.TCKLocalTime.TEST_12_30_40_987654321 ; t = t.withNano ( 1 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 1 ) ; t = t.withNano ( 10 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 10 ) ; t = t.withNano ( 100 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 100 ) ; t = t.withNano ( 999999999 ) ; org.testng.Assert.assertEquals ( t.getNano ( ) , 999999999 ) ; }
Source:
public void testIsValidModuleName ( ) throws java.lang.Exception { assertTrue ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "app" ) ) ; assertTrue ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "lib" ) ) ; assertFalse ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "123:456" ) ) ; assertFalse ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "$boot" ) ) ; for ( java.lang.String s : NewCloudModuleDynamicWizardStep.INVALID_MSFT_FILENAMES ) { assertFalse ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( s ) ) ; } }

Target:
public void testIsValidModuleName ( ) throws java.lang.Exception { assertTrue ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "app" ) ) ; assertTrue ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "lib" ) ) ; assertFalse ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "123:456" ) ) ; assertFalse ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( "$boot" ) ) ; for ( java.lang.String s : com.android.tools.idea.wizard.WizardConstants.INVALID_WINDOWS_FILENAMES ) { assertFalse ( com.google.gct.idea.appengine.wizard.NewCloudModuleDynamicWizardStep.isValidModuleName ( s ) ) ; } }
Source:
public void onCreate ( android.database.sqlite.SQLiteDatabase db ) { com.android.dialer.common.LogUtil.enterBlock ( "AnnotatedCallLogDatabaseHelper.onCreate" ) ; long startTime = java.lang.System.currentTimeMillis ( ) ; db.execSQL ( com.android.dialer.calllog.database.AnnotatedCallLogDatabaseHelper.CREATE_TABLE_SQL ) ; db.execSQL ( java.lang.String.format ( java.util.Locale.US , com.android.dialer.calllog.database.AnnotatedCallLogDatabaseHelper.CREATE_TRIGGER_SQL , maxRows , maxRows ) ) ; com.android.dialer.common.LogUtil.i ( "AnnotatedCallLogDatabaseHelper.onCreate" , "took: %dms" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; }

Target:
public void onCreate ( android.database.sqlite.SQLiteDatabase db ) { com.android.dialer.common.LogUtil.enterBlock ( "AnnotatedCallLogDatabaseHelper.onCreate" ) ; long startTime = java.lang.System.currentTimeMillis ( ) ; db.execSQL ( com.android.dialer.calllog.database.AnnotatedCallLogDatabaseHelper.CREATE_TABLE_SQL ) ; db.execSQL ( java.lang.String.format ( java.util.Locale.US , com.android.dialer.calllog.database.AnnotatedCallLogDatabaseHelper.CREATE_TRIGGER_SQL , maxRows , maxRows ) ) ; db.execSQL ( com.android.dialer.calllog.database.AnnotatedCallLogDatabaseHelper.CREATE_INDEX_ON_CALL_TYPE_SQL ) ; com.android.dialer.common.LogUtil.i ( "AnnotatedCallLogDatabaseHelper.onCreate" , "took: %dms" , ( ( java.lang.System.currentTimeMillis ( ) ) - startTime ) ) ; }
Source:
protected void syncWithBuildFile ( ) { com.google.gct.idea.appengine.gradle.facet.AppEngineGradleFacet facet = com.google.gct.idea.appengine.gradle.facet.AppEngineGradleFacet.getInstance ( moduleSelector.getModule ( ) ) ; if ( facet != null ) { com.google.appengine.gradle.model.AppEngineModel model = facet.getIdeaAppEngineProject ( ) . getDelegate ( ) ; myServerPortField.setText ( model.getHttpPort ( ) . toString ( ) ) ; myServerAddressField.setText ( model.getHttpAddress ( ) ) ; myAppEngineSdkField.setText ( model.getAppEngineSdkRoot ( ) ) ; myWarPathField.setText ( model.getWarDir ( ) . getAbsolutePath ( ) ) ; } }

Target:
protected void syncWithBuildFile ( ) { com.google.gct.idea.appengine.gradle.facet.AppEngineGradleFacet facet = com.google.gct.idea.appengine.gradle.facet.AppEngineGradleFacet.getInstance ( moduleSelector.getModule ( ) ) ; if ( facet != null ) { com.google.gct.idea.appengine.gradle.facet.AppEngineConfigurationProperties model = facet.getConfiguration ( ) . getState ( ) ; if ( model != null ) { myServerPortField.setText ( model.HTTP_PORT.toString ( ) ) ; myServerAddressField.setText ( model.HTTP_ADDRESS ) ; myAppEngineSdkField.setText ( model.APPENGINE_SDKROOT ) ; myWarPathField.setText ( model.WAR_DIR ) ; } } }
Source:
public void run ( ) { try { mNwService.startAccessPoint ( config , mInterfaceName , android.net.wifi.WifiStateMachine.SOFTAP_IFACE ) ; } catch ( java.lang.Exception e ) { loge ( ( "Exception in softap start " + e ) ) ; try { mNwService.stopAccessPoint ( mInterfaceName ) ; mNwService.startAccessPoint ( config , mInterfaceName , android.net.wifi.WifiStateMachine.SOFTAP_IFACE ) ; } catch ( java.lang.Exception e1 ) { loge ( ( "Exception in softap re-start " + e1 ) ) ; sendMessage ( android.net.wifi.WifiStateMachine.CMD_START_AP_FAILURE ) ; return ; } } if ( android.net.wifi.WifiStateMachine.DBG ) log ( "Soft AP start successful" ) ; sendMessage ( android.net.wifi.WifiStateMachine.CMD_START_AP_SUCCESS ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String action = intent.getAction ( ) ; if ( action.equals ( Intent.ACTION_SCREEN_ON ) ) { enableRssiPolling ( true ) ; if ( mBackgroundScanSupported ) { enableBackgroundScanCommand ( false ) ; } enableAllNetworks ( ) ; sendMessage ( android.net.wifi.WifiStateMachine.CMD_CLEAR_SUSPEND_OPTIMIZATIONS ) ; } else if ( action.equals ( Intent.ACTION_SCREEN_OFF ) ) { enableRssiPolling ( false ) ; if ( mBackgroundScanSupported ) { enableBackgroundScanCommand ( true ) ; } mSuspendWakeLock.acquire ( 2000 ) ; sendMessage ( android.net.wifi.WifiStateMachine.CMD_SET_SUSPEND_OPTIMIZATIONS ) ; } }
Source:
private int getSpeedIndex ( java.lang.String value ) { try { int speed = java.lang.Integer.parseInt ( value ) ; for ( int i = 0 ; i < ( DOWNLOAD_SPEEDS.length ) ; i ++ ) { if ( ( DOWNLOAD_SPEEDS [ i ] ) == speed ) { return i ; } } } catch ( java.lang.NumberFormatException e ) { } return - 1 ; }

Target:
private int getSpeedIndex ( java.lang.String value ) { try { int speed = java.lang.Integer.parseInt ( value ) ; for ( int i = 0 ; i < ( com.android.ddmlib.EmulatorConsole.DOWNLOAD_SPEEDS.length ) ; i ++ ) { if ( ( com.android.ddmlib.EmulatorConsole.DOWNLOAD_SPEEDS [ i ] ) == speed ) { return i ; } } } catch ( java.lang.NumberFormatException e ) { } return - 1 ; }
Source:
public E next ( ) { synchronized ( this ) { checkForComodification ( ) ; int i = cursor ; if ( i >= ( elementCount ) ) throw new java.util.NoSuchElementException ( ) ; cursor = i + 1 ; return elementData ( ( lastRet = i ) ) ; } }

Target:
public E next ( ) { synchronized ( this ) { checkForComodification ( ) ; int i = cursor ; if ( i >= ( limit ) ) throw new java.util.NoSuchElementException ( ) ; cursor = i + 1 ; return elementData ( ( lastRet = i ) ) ; } }
Source:
private void cancelAllNotifications ( ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( "setNotification: cancelAllNotifications" ) ; android.app.NotificationManager notificationManager = ( ( android.app.NotificationManager ) ( mPhone.getContext ( ) . getSystemService ( Context.NOTIFICATION_SERVICE ) ) ) ; notificationManager.cancelAll ( ) ; }

Target:
private void cancelAllNotifications ( ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( "setNotification: cancelAllNotifications" ) ; android.app.NotificationManager notificationManager = ( ( android.app.NotificationManager ) ( mPhone.getContext ( ) . getSystemService ( Context.NOTIFICATION_SERVICE ) ) ) ; notificationManager.cancel ( com.android.internal.telephony.ServiceStateTracker.PS_NOTIFICATION ) ; notificationManager.cancel ( com.android.internal.telephony.ServiceStateTracker.CS_NOTIFICATION ) ; notificationManager.cancel ( com.android.internal.telephony.ServiceStateTracker.CS_REJECT_CAUSE_NOTIFICATION ) ; }
Source:
public final org.jf.dexlib2.iface.reference.MethodReference method_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.MethodReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableMethodReference fully_qualified_method209 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_METHOD , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_METHOD_in_method_literal3592 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_fully_qualified_method_in_method_literal3594 ) ; fully_qualified_method209 = fully_qualified_method ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = fully_qualified_method209 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final org.jf.dexlib2.iface.reference.MethodReference method_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.MethodReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableMethodReference method_reference209 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_METHOD , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_METHOD_in_method_literal3594 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_method_reference_in_method_literal3596 ) ; method_reference209 = method_reference ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = method_reference209 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
private void initSamples ( ) { mySamples.add ( com.google.gct.idea.samples.SampleImportTreeManagerTest.createSample ( "Test Goose" , "A Sample of Geese" , java.util.Arrays.asList ( "Animal" , "Bird" ) ) ) ; mySamples.add ( com.google.gct.idea.samples.SampleImportTreeManagerTest.createSample ( "Test Moose" , "A Sample of Moose" , java.util.Arrays.asList ( "Animal" , "Antlers" ) ) ) ; mySamples.add ( com.google.gct.idea.samples.SampleImportTreeManagerTest.createSample ( "Test House" , "A Worrying Sample of Houses" , java.util.Arrays.asList ( "Thing" , "Roof" ) ) ) ; }

Target:
private void initSamples ( ) { mySamples.add ( com.google.gct.idea.samples.SampleImportTreeManagerTest.createSample ( "Test Goose" , "A Sample of Geese" , java.util.Arrays.asList ( "Animal" , "Bird" ) ) ) ; mySamples.add ( com.google.gct.idea.samples.SampleImportTreeManagerTest.createSample ( "TestMoose" , "A Sample of Moose" , java.util.Arrays.asList ( "Animal" , "Antlers" ) ) ) ; mySamples.add ( com.google.gct.idea.samples.SampleImportTreeManagerTest.createSample ( "Test House" , "A Worrying Sample of Houses" , java.util.Arrays.asList ( "Thing" , "Roof" ) ) ) ; }
Source:
public void testSetLinkPropertiesInvalidAddress ( ) throws java.lang.Exception { android.telephony.data.DataCallResponse response = new android.telephony.data.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , java.util.Arrays.asList ( new android.telephony.data.InterfaceAddress ( "224.224.224.224" , 0 ) ) , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS ) ) , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY ) ) , java.util.Arrays.asList ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS ) , 1440 ) ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.ERR_UnacceptableParameter , setLinkProperties ( response , linkProperties ) ) ; }

Target:
public void testSetLinkPropertiesEmptyAddress ( ) throws java.lang.Exception { android.telephony.data.DataCallResponse response = new android.telephony.data.DataCallResponse ( 0 , ( - 1 ) , 1 , 2 , "IP" , com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_IFNAME , null , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_DNS ) ) , java.util.Arrays.asList ( android.net.NetworkUtils.numericToInetAddress ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_GATEWAY ) ) , java.util.Arrays.asList ( com.android.internal.telephony.dataconnection.DcTrackerTest.FAKE_PCSCF_ADDRESS ) , 1440 ) ; android.net.LinkProperties linkProperties = new android.net.LinkProperties ( ) ; org.junit.Assert.assertEquals ( SetupResult.ERR_UnacceptableParameter , setLinkProperties ( response , linkProperties ) ) ; }
Source:
public void sendSingleScanChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( channelsToSpec ( 2400 , 5150 , 5175 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , 2400 , 5150 , 5175 ) ) ; }

Target:
public void sendSingleScanChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( com.android.server.wifi.ScanTestUtil.channelsToSpec ( 2400 , 5150 , 5175 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , com.android.server.wifi.ScanTestUtil.computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , 2400 , 5150 , 5175 ) ) ; }
Source:
private void sendShutdownMessage ( ) { if ( mRemoveTimeoutMsg ) { android.content.Intent timeoutIntent = new android.content.Intent ( com.android.bluetooth.map.BluetoothMapService.USER_CONFIRM_TIMEOUT_ACTION ) ; sendBroadcast ( timeoutIntent , com.android.bluetooth.map.BluetoothMapService.BLUETOOTH_PERM ) ; mIsWaitingAuthorization = false ; cancelUserTimeoutAlarm ( ) ; } mSessionStatusHandler.removeCallbacksAndMessages ( null ) ; mSessionStatusHandler.obtainMessage ( com.android.bluetooth.map.BluetoothMapService.SHUTDOWN ) . sendToTarget ( ) ; }

Target:
private void sendConnectMessage ( int masId ) { if ( ( mSessionStatusHandler ) != null ) { android.os.Message msg = mSessionStatusHandler.obtainMessage ( com.android.bluetooth.map.BluetoothMapService.MSG_MAS_CONNECT , masId , 0 ) ; mSessionStatusHandler.sendMessageDelayed ( msg , 20 ) ; } }
Source:
public boolean iccCloseLogicalChannel ( int subId , int channel ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "iccCloseLogicalChannel: subId=" + subId ) + " chnl=" ) + channel ) ) ; if ( channel < 0 ) { return false ; } java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_CLOSE_CHANNEL , channel , subId ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "iccCloseLogicalChannel: " + success ) ) ; return success ; }

Target:
public boolean iccCloseLogicalChannel ( int subId , int channel ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege ( mApp , subId , "iccCloseLogicalChannel" ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "iccCloseLogicalChannel: subId=" + subId ) + " chnl=" ) + channel ) ) ; if ( channel < 0 ) { return false ; } java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_CLOSE_CHANNEL , channel , subId ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "iccCloseLogicalChannel: " + success ) ) ; return success ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( obj == ( this ) ) return true ; if ( ( obj == null ) || ( ( obj.getClass ( ) ) != ( getClass ( ) ) ) ) return false ; java.security.BasicPermission bp = ( ( java.security.BasicPermission ) ( obj ) ) ; return getName ( ) . equals ( bp.getName ( ) ) ; }

Target:
public boolean implies ( java.security.Permission p ) { return true ; }
Source:
public static com.android.monkeyrunner.MonkeyImage loadImageFromFile ( org.python.core.PyObject [ ] args , java.lang.String [ ] kws ) { org.python.core.ArgParser ap = com.android.monkeyrunner.JythonUtils.createArgParser ( args , kws ) ; com.google.common.base.Preconditions.checkNotNull ( ap ) ; java.lang.String path = ap.getString ( 0 ) ; return com.android.monkeyrunner.MonkeyImage.loadImageFromFile ( path ) ; }

Target:
public static com.android.monkeyrunner.MonkeyImage loadImageFromFile ( org.python.core.PyObject [ ] args , java.lang.String [ ] kws ) { org.python.core.ArgParser ap = com.android.monkeyrunner.JythonUtils.createArgParser ( args , kws ) ; com.google.common.base.Preconditions.checkNotNull ( ap ) ; java.lang.String path = ap.getString ( 0 ) ; com.android.monkeyrunner.core.IMonkeyImage image = com.android.monkeyrunner.core.MonkeyImageBase.loadImageFromFile ( path ) ; return new com.android.monkeyrunner.MonkeyImage ( image ) ; }
Source:
static java.net.URL getResource ( java.lang.String name ) { int numEntries = java.lang.VMClassLoader.getBootClassPathSize ( ) ; for ( int i = 0 ; i < numEntries ; i ++ ) { java.lang.String urlStr = java.lang.VMClassLoader.getBootClassPathResource ( name , i ) ; if ( urlStr != null ) { try { return new java.net.URL ( urlStr ) ; } catch ( java.net.MalformedURLException mue ) { mue.printStackTrace ( ) ; } } } return null ; }

Target:
static java.net.URL getResource ( java.lang.String name ) { for ( libcore.io.ClassPathURLStreamHandler urlHandler : java.lang.VMClassLoader.bootClassPathUrlHandlers ) { java.net.URL url = urlHandler.getEntryUrlOrNull ( name ) ; if ( url != null ) { return url ; } } return null ; }
Source:
public static void isNotMainThread ( ) { if ( ( com.android.voicemail.impl.Assert.sIsMainThreadForTest ) != null ) { com.android.voicemail.impl.Assert.isTrue ( ( ! ( com.android.voicemail.impl.Assert.sIsMainThreadForTest ) ) ) ; return ; } com.android.voicemail.impl.Assert.isTrue ( ( ! ( android.os.Looper.getMainLooper ( ) . equals ( android.os.Looper.myLooper ( ) ) ) ) ) ; }

Target:
public static void isNotMainThread ( ) { if ( ( com.android.voicemail.impl.Assert.isMainThreadForTest ) != null ) { com.android.voicemail.impl.Assert.isTrue ( ( ! ( com.android.voicemail.impl.Assert.isMainThreadForTest ) ) ) ; return ; } com.android.voicemail.impl.Assert.isTrue ( ( ! ( android.os.Looper.getMainLooper ( ) . equals ( android.os.Looper.myLooper ( ) ) ) ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mCarrierIdProviderTestable = new com.android.providers.telephony.CarrierIdProviderTestable ( ) ; mContext = new com.android.providers.telephony.CarrierIdProviderTest.MockContextWithProvider ( mCarrierIdProviderTestable ) ; mContentResolver = mContext.getContentResolver ( ) ; mContentObserver = new com.android.providers.telephony.CarrierIdProviderTest.FakeContentObserver ( null ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mCarrierIdProviderTestable = new com.android.providers.telephony.CarrierIdProviderTestable ( ) ; mContext = new com.android.providers.telephony.CarrierIdProviderTest.MockContextWithProvider ( mCarrierIdProviderTestable ) ; mContentResolver = mContext.getContentResolver ( ) ; mContentObserver = new com.android.providers.telephony.CarrierIdProviderTest.FakeContentObserver ( null ) ; java.lang.reflect.Field field = com.android.internal.telephony.SubscriptionController.class . getDeclaredField ( "sInstance" ) ; field.setAccessible ( true ) ; field.set ( null , mSubController ) ; }
Source:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.buildPropertyName ( null ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; com.android.sched.vfs.VPath clonedPath = typePath.clone ( ) ; clonedPath.addSuffix ( fileType.getFileExtension ( ) ) ; return vfs.getRootInputOutputVDir ( ) . createOutputVFile ( clonedPath ) ; }

Target:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; putProperty ( fileType.buildPropertyName ( null ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; com.android.sched.vfs.VPath clonedPath = typePath.clone ( ) ; clonedPath.addSuffix ( fileType.getFileExtension ( ) ) ; return vfs.getRootInputOutputVDir ( ) . createOutputVFile ( clonedPath ) ; }
Source:
public void setSecurityController ( com.android.systemui.statusbar.policy.SecurityController sc ) { if ( com.android.systemui.statusbar.SignalClusterView.DEBUG ) android.util.Log.d ( com.android.systemui.statusbar.SignalClusterView.TAG , ( "SecurityController=" + sc ) ) ; mSC = sc ; mSC.addCallback ( this ) ; mVpnVisible = mSC.isVpnEnabled ( ) ; }

Target:
public void setSecurityController ( com.android.systemui.statusbar.policy.SecurityController sc ) { if ( com.android.systemui.statusbar.SignalClusterView.DEBUG ) android.util.Log.d ( com.android.systemui.statusbar.SignalClusterView.TAG , ( "SecurityController=" + sc ) ) ; mSC = sc ; mSC.addCallback ( this ) ; mVpnVisible = mSC.isVpnEnabled ( ) ; mVpnIconId = currentVpnIconId ( mSC.isVpnBranded ( ) ) ; }
Source:
public void resetSimNetworks ( ) { if ( mVerboseLoggingEnabled ) localLog ( "resetSimNetworks" ) ; for ( android.net.wifi.WifiConfiguration config : getInternalConfiguredNetworks ( ) ) { if ( com.android.server.wifi.util.TelephonyUtil.isSimConfig ( config ) ) { java.lang.String currentIdentity = com.android.server.wifi.util.TelephonyUtil.getSimIdentity ( mTelephonyManager , config ) ; config.enterpriseConfig.setIdentity ( currentIdentity ) ; if ( ( config.enterpriseConfig.getEapMethod ( ) ) != ( WifiEnterpriseConfig.Eap.PEAP ) ) { config.enterpriseConfig.setAnonymousIdentity ( "" ) ; } } } }

Target:
public void resetSimNetworks ( boolean simPresent ) { if ( mVerboseLoggingEnabled ) localLog ( "resetSimNetworks" ) ; for ( android.net.wifi.WifiConfiguration config : getInternalConfiguredNetworks ( ) ) { if ( com.android.server.wifi.util.TelephonyUtil.isSimConfig ( config ) ) { java.lang.String currentIdentity = null ; if ( simPresent ) { currentIdentity = com.android.server.wifi.util.TelephonyUtil.getSimIdentity ( mTelephonyManager , config ) ; } config.enterpriseConfig.setIdentity ( currentIdentity ) ; if ( ( config.enterpriseConfig.getEapMethod ( ) ) != ( WifiEnterpriseConfig.Eap.PEAP ) ) { config.enterpriseConfig.setAnonymousIdentity ( "" ) ; } } } mSimPresent = simPresent ; }
Source:
private static void assertNotificationType ( int expected , java.lang.String actualTag ) { assertEquals ( java.lang.Integer.toString ( expected ) , actualTag.substring ( ( ( actualTag.lastIndexOf ( ':' ) ) + 1 ) ) ) ; }

Target:
private static void assertNotificationType ( int expected , java.lang.String actualTag ) { assertEquals ( ( ( "notification type mismatch for '" + actualTag ) + "'" ) , java.lang.Integer.toString ( expected ) , actualTag.substring ( ( ( actualTag.lastIndexOf ( ':' ) ) + 1 ) ) ) ; }
Source:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm64 " ) ; if ( device.noBootImageAvailable ( ) ) { commandBuilder.append ( "-Ximage:/data/art-test/core.art -Xnorelocate " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeOnDevice ( commandBuilder.toString ( ) , true ) ; }

Target:
public void execute ( java.lang.String programName ) { java.lang.StringBuilder commandBuilder = new java.lang.StringBuilder ( ) ; commandBuilder.append ( "dalvikvm64 " ) ; if ( device.noBootImageAvailable ( ) ) { commandBuilder.append ( "-Ximage:/data/art-test/core.art -Xnorelocate " ) ; } commandBuilder.append ( "-cp " ) . append ( testLocation ) . append ( "/" ) . append ( programName ) . append ( " " ) ; commandBuilder.append ( executeClass ) ; executionResult = executeCommandWithTimeout ( commandBuilder.toString ( ) , true ) ; }
Source:
public void onClick ( android.view.View v ) { if ( ( mDelayBeforeSending ) && ( v != null ) ) { android.os.Message msg = mDelayHandler.obtainMessage ( 0 , this ) ; mDelayHandler.sendMessageDelayed ( msg , com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.DELAY_BEFORE_SENDING_MSEC ) ; } else { com.android.cellbroadcastreceiver.tests.SendGsmCmasMessages.testSendSafetyInfoAlert ( this , getSerialNumber ( ) ) ; } }

Target:
public void onClick ( android.view.View v ) { if ( ( mDelayBeforeSending ) && ( v != null ) ) { android.os.Message msg = mDelayHandler.obtainMessage ( 0 , this ) ; mDelayHandler.sendMessageDelayed ( msg , com.android.cellbroadcastreceiver.tests.SendTestBroadcastActivity.DELAY_BEFORE_SENDING_MSEC ) ; } else { com.android.cellbroadcastreceiver.tests.SendGsmCmasMessages.testSendPublicSafetyMessagesAlert ( this , getSerialNumber ( ) ) ; } }
Source:
public < E extends T > com.google.common.collect.ImmutableList < E > immutableSortedCopy ( java.lang.Iterable < E > iterable ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E [ ] elements = ( ( E [ ] ) ( com.google.common.collect.Iterables.toArray ( iterable ) ) ) ; for ( E e : elements ) { com.google.common.base.Preconditions.checkNotNull ( e ) ; } java.util.Arrays.sort ( elements , this ) ; return com.google.common.collect.ImmutableList.asImmutableList ( elements ) ; }

Target:
public < E extends T > com.google.common.collect.ImmutableList < E > immutableSortedCopy ( java.lang.Iterable < E > elements ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E [ ] array = ( ( E [ ] ) ( com.google.common.collect.Iterables.toArray ( elements ) ) ) ; for ( E e : array ) { com.google.common.base.Preconditions.checkNotNull ( e ) ; } java.util.Arrays.sort ( array , this ) ; return com.google.common.collect.ImmutableList.asImmutableList ( array ) ; }
Source:
private static com.android.server.telecom.Call createFakeCall ( com.android.server.telecom.tests.ConnectionServiceFocus connSvr , int state ) { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getConnectionServiceWrapper ( ) ) . thenReturn ( connSvr ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( state ) ; return call ; }

Target:
private static com.android.server.telecom.Call createFakeCall ( com.android.server.telecom.tests.ConnectionServiceFocus connSvr , int state ) { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getConnectionServiceWrapper ( ) ) . thenReturn ( connSvr ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( state ) ; org.mockito.Mockito.when ( call.isFocusable ( ) ) . thenReturn ( true ) ; return call ; }
Source:
public void onRttStatusChanged ( android.telecom.Call call , boolean enabled , android.telecom.Call.RttCall rttCall ) { com.android.dialer.common.LogUtil.v ( "TelecomCallCallback.onRttStatusChanged" , "enabled=%b" , enabled ) ; update ( ) ; }

Target:
public void onRttStatusChanged ( android.telecom.Call call , boolean enabled , android.telecom.Call.RttCall rttCall ) { com.android.dialer.common.LogUtil.v ( "TelecomCallCallback.onRttStatusChanged" , "enabled=%b" , enabled ) ; if ( enabled ) { com.android.dialer.logging.Logger.get ( context ) . logCallImpression ( DialerImpression.Type.RTT_MID_CALL_ENABLED , getUniqueCallId ( ) , getTimeAddedMs ( ) ) ; } update ( ) ; }
Source:
public void testBasicWorkingSntpClientQuery ( ) throws java.lang.Exception { mServer.setServerReply ( libcore.util.HexEncoding.decode ( android.net.SntpClientTest.WORKING_VERSION4.toCharArray ( ) , false ) ) ; assertTrue ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 ) ) ; assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; assertEquals ( 1 , mServer.numRepliesSent ( ) ) ; }

Target:
public void testBasicWorkingSntpClientQuery ( ) throws java.lang.Exception { mServer.setServerReply ( libcore.util.HexEncoding.decode ( android.net.SntpClientTest.WORKING_VERSION4.toCharArray ( ) , false ) ) ; assertTrue ( mClient.requestTime ( mServer.getAddress ( ) , mServer.getPort ( ) , 500 , mNetwork ) ) ; assertEquals ( 1 , mServer.numRequestsReceived ( ) ) ; assertEquals ( 1 , mServer.numRepliesSent ( ) ) ; }
Source:
public int compare ( java.io.File file , java.io.File file2 ) { if ( file.isDirectory ( ) ) { return - 1 ; } else if ( file2.isDirectory ( ) ) { return 1 ; } else if ( ( file.length ( ) ) > ( file2.length ( ) ) ) { return 1 ; } return - 1 ; }

Target:
public int compare ( java.io.File file , java.io.File file2 ) { if ( file.isDirectory ( ) ) { return - 1 ; } else if ( file2.isDirectory ( ) ) { return 1 ; } long diff = ( file.length ( ) ) - ( file2.length ( ) ) ; return diff > 0 ? 1 : diff < 0 ? - 1 : 0 ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , short [ ] data ) { mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 2 ) ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , short [ ] data ) { validateIsInt16 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_16 , data.length ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Throwable { Main.testThrowException ( ) ; Main.testDropArguments ( ) ; Main.testCatchException ( ) ; Main.testGuardWithTest ( ) ; Main.testArrayElementGetter ( ) ; Main.testArrayElementSetter ( ) ; Main.testIdentity ( ) ; Main.testConstant ( ) ; Main.testBindTo ( ) ; Main.testFilterReturnValue ( ) ; Main.testPermuteArguments ( ) ; Main.testInvokers ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Throwable { Main.testThrowException ( ) ; Main.testDropArguments ( ) ; Main.testCatchException ( ) ; Main.testGuardWithTest ( ) ; Main.testArrayElementGetter ( ) ; Main.testArrayElementSetter ( ) ; Main.testIdentity ( ) ; Main.testConstant ( ) ; Main.testBindTo ( ) ; Main.testFilterReturnValue ( ) ; Main.testPermuteArguments ( ) ; Main.testInvokers ( ) ; Main.testSpreaders_reference ( ) ; Main.testSpreaders_primitive ( ) ; }
Source:
public final int doFinal ( byte [ ] input , int inputOffset , int inputLen , byte [ ] output , int outputOffset ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } javax.crypto.Cipher.checkInputOffsetAndCount ( input.length , inputOffset , inputLen ) ; return spiImpl.engineDoFinal ( input , inputOffset , inputLen , output , outputOffset ) ; }

Target:
public final byte [ ] doFinal ( byte [ ] input , int inputOffset , int inputLen ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } javax.crypto.Cipher.checkInputOffsetAndCount ( input.length , inputOffset , inputLen ) ; return getSpi ( ) . engineDoFinal ( input , inputOffset , inputLen ) ; }
Source:
synchronized boolean connect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "connect(): device=" + device ) ) ; } return ( checkCallingUid ( ) ) && ( mHidDeviceNativeInterface.connect ( device ) ) ; }

Target:
synchronized boolean connect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( "connect(): device=" + device ) ) ; } return ( checkCallingUid ( ) ) && ( mHidDeviceNativeInterface.connect ( device ) ) ; }
Source:
public void error ( java.lang.String tag , java.lang.String message , java.lang.Object data ) { java.lang.String description = describe ( message ) ; com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , "%1$s: %2$s" , mName , description ) ; if ( ( ( tag == null ) && ( message != null ) ) && ( message.startsWith ( "Failed to find style " ) ) ) { tag = com.android.ide.common.rendering.api.LayoutLog.TAG_RESOURCES_RESOLVE_THEME_ATTR ; } addError ( tag , description ) ; }

Target:
public void error ( java.lang.String tag , java.lang.String message , java.lang.Object data ) { java.lang.String description = describe ( message ) ; appendToIdeLog ( null , IStatus.ERROR , description ) ; if ( ( ( tag == null ) && ( message != null ) ) && ( message.startsWith ( "Failed to find style " ) ) ) { tag = com.android.ide.common.rendering.api.LayoutLog.TAG_RESOURCES_RESOLVE_THEME_ATTR ; } addError ( tag , description ) ; }
Source:
public java.lang.String wifiNanCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "role" , description = "The role of the device: Initiator (0) or Responder (1)" ) java.lang.Integer role , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.nan.WifiNanDiscoveryBaseSession session ; synchronized ( mLock ) { session = mDiscoverySessions.get ( sessionId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( role , peerId , bytes ) ; }

Target:
public java.lang.String wifiNanCreateNetworkSpecifier ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "role" , description = "The role of the device: Initiator (0) or Responder (1)" ) java.lang.Integer role , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "sessionId" , description = "The session ID returned when session was created using publish or subscribe" ) java.lang.Integer sessionId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "peerId" , description = "The ID of the peer (obtained through OnMatch or OnMessageReceived" ) java.lang.Integer peerId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "token" , description = "Arbitrary token message to be sent to peer as part of data-path creation process" ) java.lang.String token ) { android.net.wifi.nan.WifiNanDiscoveryBaseSession session ; synchronized ( mLock ) { session = mDiscoverySessions.get ( sessionId ) ; } if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling wifiNanStartRanging before session (session ID " + sessionId ) + " is ready" ) ) ; } byte [ ] bytes = token.getBytes ( ) ; return session.createNetworkSpecifier ( role , new android.net.wifi.nan.WifiNanManager.OpaquePeerHandle ( peerId ) , bytes ) ; }
Source:
public boolean createBondOutOfBand ( int transport , android.bluetooth.OobData oobData ) { try { return android.bluetooth.BluetoothDevice.sService.createBondOutOfBand ( this , transport , oobData ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean createBondOutOfBand ( int transport , android.bluetooth.OobData oobData ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.w ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled, createBondOutOfBand failed" ) ; return false ; } try { return service.createBondOutOfBand ( this , transport , oobData ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public void testCanAccessScanResults_CallerIsActiveNwScorer ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mActiveNwScorer = true ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }

Target:
public void testCanAccessScanResults_CallerIsActiveNwScorer ( ) throws java.lang.Exception { boolean output = false ; mThrowSecurityException = false ; mActiveNwScorer = true ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; mCurrentUser = android.os.UserHandle.USER_CURRENT_OR_SELF ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScorerAppManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , true ) ; }
Source:
static com.android.builder.resources.AssetSet getBaseAssetSet ( ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { if ( ( com.android.builder.resources.AssetSetTest.sBaseResourceSet ) == null ) { java.io.File root = com.android.builder.TestUtils.getRoot ( "assets" , "baseSet" ) ; com.android.builder.resources.AssetSetTest.sBaseResourceSet = new com.android.builder.resources.AssetSet ( "main" ) ; com.android.builder.resources.AssetSetTest.sBaseResourceSet.addSource ( root ) ; com.android.builder.resources.AssetSetTest.sBaseResourceSet.loadFromFiles ( ) ; } return com.android.builder.resources.AssetSetTest.sBaseResourceSet ; }

Target:
static com.android.builder.resources.AssetSet getBaseAssetSet ( ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { if ( ( com.android.builder.resources.AssetSetTest.sBaseResourceSet ) == null ) { java.io.File root = com.android.builder.TestUtils.getRoot ( "assets" , "baseSet" ) ; com.android.builder.resources.RecordingLogger logger = new com.android.builder.resources.RecordingLogger ( ) ; com.android.builder.resources.AssetSetTest.sBaseResourceSet = new com.android.builder.resources.AssetSet ( "main" ) ; com.android.builder.resources.AssetSetTest.sBaseResourceSet.addSource ( root ) ; com.android.builder.resources.AssetSetTest.sBaseResourceSet.loadFromFiles ( logger ) ; checkLogger ( logger ) ; } return com.android.builder.resources.AssetSetTest.sBaseResourceSet ; }
Source:
protected void handleActivityResult ( int requestCode , int resultCode , android.content.Intent data ) { switch ( requestCode ) { case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_MANAGED_PROVISIONING : return ; case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_PROFILE_OWNER_STATUS : { handleStatusUpdate ( resultCode , data ) ; } break ; case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_INTENT_FILTERS_STATUS : { handleIntentFiltersStatus ( resultCode ) ; } break ; default : { super . handleActivityResult ( requestCode , resultCode , data ) ; } } }

Target:
protected void handleActivityResult ( int requestCode , int resultCode , android.content.Intent data ) { switch ( requestCode ) { case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_MANAGED_PROVISIONING : return ; case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_PROFILE_OWNER_STATUS : handleStatusUpdate ( resultCode , data ) ; break ; case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_CHECK_DISK_ENCRYPTION : handleDiskEncryptionStatus ( resultCode , data ) ; break ; case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_SET_LOCK_FOR_ENCRYPTION : handleSetLockForEncryption ( ) ; break ; case com.android.cts.verifier.managedprovisioning.ByodFlowTestActivity.REQUEST_INTENT_FILTERS_STATUS : handleIntentFiltersStatus ( resultCode ) ; break ; default : super . handleActivityResult ( requestCode , resultCode , data ) ; } }
Source:
public void encode ( com.android.dx.io.instructions.DecodedInstruction insn , com.android.dx.io.instructions.CodeOutput out ) { com.android.dx.io.instructions.InstructionCodec.encodeRegisterList ( insn , out ) ; }

Target:
public void encode ( com.android.dx.io.instructions.DecodedInstruction insn , com.android.dx.io.instructions.CodeOutput out ) { out.write ( com.android.dx.io.instructions.InstructionCodec.codeUnit ( insn.getOpcode ( ) , insn.getRegisterCount ( ) ) , insn.getIndexUnit ( ) , insn.getCUnit ( ) , insn.getProtoIndex ( ) ) ; }