auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void spyClass ( ) throws java.lang.Exception { com.android.dx.mockito.tests.MockTests.TestClass originalT = new com.android.dx.mockito.tests.MockTests.TestClass ( ) ; com.android.dx.mockito.tests.MockTests.TestClass t = org.mockito.Mockito.spy ( originalT ) ; org.junit.Assert.assertEquals ( "A" , t.returnA ( ) ) ; org.mockito.Mockito.when ( t.returnA ( ) ) . thenReturn ( "B" ) ; org.junit.Assert.assertEquals ( "B" , t.returnA ( ) ) ; org.junit.Assert.assertEquals ( "A" , originalT.returnA ( ) ) ; }

Target:
public void spyClass ( ) throws java.lang.Exception { com.android.dx.mockito.tests.GeneralMocking.TestClass originalT = new com.android.dx.mockito.tests.GeneralMocking.TestClass ( ) ; com.android.dx.mockito.tests.GeneralMocking.TestClass t = org.mockito.Mockito.spy ( originalT ) ; org.junit.Assert.assertEquals ( "A" , t.returnA ( ) ) ; org.mockito.Mockito.when ( t.returnA ( ) ) . thenReturn ( "B" ) ; org.junit.Assert.assertEquals ( "B" , t.returnA ( ) ) ; org.junit.Assert.assertEquals ( "A" , originalT.returnA ( ) ) ; }
Source:
public void getVoiceRegistrationState ( android.os.Message result ) { mGetVoiceRegistrationStateCallCount.incrementAndGet ( ) ; java.lang.String [ ] ret = new java.lang.String [ 14 ] ; ret [ 0 ] = java.lang.Integer.toString ( mVoiceRegState ) ; ret [ 3 ] = java.lang.Integer.toString ( mVoiceRadioTech ) ; resultSuccess ( result , ret ) ; }

Target:
public void getVoiceRegistrationState ( android.os.Message result ) { mGetVoiceRegistrationStateCallCount.incrementAndGet ( ) ; android.hardware.radio.V1_0.VoiceRegStateResult ret = new android.hardware.radio.V1_0.VoiceRegStateResult ( ) ; ret.regState = mVoiceRegState ; ret.rat = mVoiceRadioTech ; resultSuccess ( result , ret ) ; }
Source:
public int patchoat ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.patchoat ( apkPath , uid , isPublic , instructionSet ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , boolean vmSafeMode , boolean debuggable , @ android.annotation.Nullable java.lang.String outputPath ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , pkgName , instructionSet , dexoptNeeded , vmSafeMode , debuggable , outputPath ) ; }
Source:
public int getSerializedSize ( ) { int size = com.google.protobuf.nano.WireFormatNano.computeWireSize ( unknownFieldData ) ; cachedSize = size ; return size ; }

Target:
public int getSerializedSize ( ) { int size = 0 ; int unknownFieldCount = ( ( unknownFieldData ) == null ) ? 0 : unknownFieldData.size ( ) ; for ( int i = 0 ; i < unknownFieldCount ; i ++ ) { com.google.protobuf.nano.UnknownFieldData unknownField = unknownFieldData.get ( i ) ; size += com.google.protobuf.nano.CodedOutputByteBufferNano.computeRawVarint32Size ( unknownField.tag ) ; size += unknownField.bytes.length ; } cachedSize = size ; return size ; }
Source:
public boolean isDataAvailable ( int timeout ) throws java.io.IOException { boolean result = hasBufferedData ( ) ; if ( ! result ) { int oldtimeout = this . socket.getSoTimeout ( ) ; try { this . socket.setSoTimeout ( timeout ) ; fillBuffer ( ) ; result = hasBufferedData ( ) ; } catch ( java.io.InterruptedIOException e ) { if ( ! ( org.apache.http.impl.io.SocketInputBuffer.isSocketTimeoutException ( e ) ) ) { throw e ; } } finally { socket.setSoTimeout ( oldtimeout ) ; } } return result ; }

Target:
public boolean isDataAvailable ( int timeout ) throws java.io.IOException { boolean result = hasBufferedData ( ) ; if ( ! result ) { int oldtimeout = this . socket.getSoTimeout ( ) ; try { this . socket.setSoTimeout ( timeout ) ; fillBuffer ( ) ; result = hasBufferedData ( ) ; } catch ( java.io.InterruptedIOException e ) { if ( ! ( e instanceof java.net.SocketTimeoutException ) ) { throw e ; } } finally { socket.setSoTimeout ( oldtimeout ) ; } } return result ; }
Source:
private static void assertValues ( android.net.NetworkStats.Entry entry , java.lang.String iface , int uid , int set , int tag , int roaming ) { assertEquals ( iface , entry.iface ) ; assertEquals ( uid , entry.uid ) ; assertEquals ( set , entry.set ) ; assertEquals ( tag , entry.tag ) ; assertEquals ( roaming , entry.roaming ) ; }

Target:
private static void assertValues ( android.net.NetworkStats.Entry entry , java.lang.String iface , int uid , int set , int tag , int metered , int roaming ) { assertEquals ( iface , entry.iface ) ; assertEquals ( uid , entry.uid ) ; assertEquals ( set , entry.set ) ; assertEquals ( tag , entry.tag ) ; assertEquals ( metered , entry.metered ) ; assertEquals ( roaming , entry.roaming ) ; }
Source:
protected void restartRadio ( ) { android.util.Log.d ( LOG_TAG , "************TURN OFF RADIO**************" ) ; cleanUpConnection ( true , Phone.REASON_RADIO_TURNED_OFF ) ; phone.mCM.setRadioPower ( false , null ) ; int reset = java.lang.Integer.parseInt ( android.os.SystemProperties.get ( "net.ppp.reset-by-timeout" , "0" ) ) ; android.os.SystemProperties.set ( "net.ppp.reset-by-timeout" , java.lang.String.valueOf ( ( reset + 1 ) ) ) ; }

Target:
protected void restartRadio ( ) { android.util.Log.d ( LOG_TAG , "************TURN OFF RADIO**************" ) ; cleanUpConnection ( true , Phone.REASON_RADIO_TURNED_OFF ) ; mGsmPhone.mSST.powerOffRadioSafely ( ) ; int reset = java.lang.Integer.parseInt ( android.os.SystemProperties.get ( "net.ppp.reset-by-timeout" , "0" ) ) ; android.os.SystemProperties.set ( "net.ppp.reset-by-timeout" , java.lang.String.valueOf ( ( reset + 1 ) ) ) ; }
Source:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier compareQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier referenceQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) ( reference ) ) ; if ( ( referenceQualifier.mValue ) == ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier.KeyboardState.SOFT ) ) { if ( ( ( compareQualifier.mValue ) == ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier.KeyboardState.EXPOSED ) ) && ( ( mValue ) == ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier.KeyboardState.SOFT ) ) ) { return true ; } } return false ; }

Target:
public boolean isBetterMatchThan ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier compareTo , com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier reference ) { if ( compareTo == null ) { return true ; } com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier compareQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) ( compareTo ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier referenceQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) ( reference ) ) ; if ( ( referenceQualifier.mValue ) == ( com.android.sdklib.resources.KeyboardState.SOFT ) ) { if ( ( ( compareQualifier.mValue ) == ( com.android.sdklib.resources.KeyboardState.EXPOSED ) ) && ( ( mValue ) == ( com.android.sdklib.resources.KeyboardState.SOFT ) ) ) { return true ; } } return false ; }
Source:
public void onDestroy ( ) { getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mVoicemailErrorManager.getContentObserver ( ) ) ; mVoicemailPlaybackPresenter.onDestroy ( ) ; mVoicemailErrorManager.onDestroy ( ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mVoicemailStatusObserver ) ; super . onDestroy ( ) ; }

Target:
public void onDestroy ( ) { if ( isAdded ( ) ) { getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mVoicemailErrorManager.getContentObserver ( ) ) ; mVoicemailPlaybackPresenter.onDestroy ( ) ; mVoicemailErrorManager.onDestroy ( ) ; getActivity ( ) . getContentResolver ( ) . unregisterContentObserver ( mVoicemailStatusObserver ) ; } super . onDestroy ( ) ; }
Source:
private void testChargingConstraintFails_notCharging ( ) { mTestEnvironment.setUp ( ) ; mTestEnvironment.setExpectedExecutions ( 0 ) ; android.app.job.JobInfo runOnCharge = new android.app.job.JobInfo.Builder ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , mMockComponent ) . setRequiresCharging ( true ) . build ( ) ; mJobScheduler.schedule ( runOnCharge ) ; sendBroadcastAndBlockForResult ( com.android.cts.verifier.jobscheduler.EXPEDITE_STABLE_CHARGING ) ; boolean testPassed ; try { testPassed = mTestEnvironment.awaitTimeout ( ) ; } catch ( java.lang.InterruptedException e ) { testPassed = false ; } mDeviceUnpluggedTestPassed = testPassed ; runOnUiThread ( new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ChargingConstraintTestResultRunner ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.OFF_CHARGING_JOB_ID , testPassed ) ) ; }

Target:
public void startTestImpl ( ) { android.os.BatteryManager bm = ( ( android.os.BatteryManager ) ( getSystemService ( com.android.cts.verifier.jobscheduler.BATTERY_SERVICE ) ) ) ; if ( bm.isCharging ( ) ) { new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.TestDevicePluggedInConstraint ( ) . execute ( ) ; } else if ( isDevicePluggedIn ( ) ) { mTestState = com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.STATE_WAITING_TO_START_ON_CHARGING_TEST ; showWaitingForStableChargingViews ( ) ; } }
Source:
private static com.android.ide.common.layout.Pair < com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode , java.lang.Integer > getLastPosition ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent ) { if ( ( parent != null ) && ( parent instanceof com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ) { return com.android.ide.common.layout.Pair.of ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent ) ) , parent.getUiChildren ( ) . size ( ) ) ; } return null ; }

Target:
private static com.android.sdklib.util.Pair < com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode , java.lang.Integer > getLastPosition ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode parent ) { if ( ( parent != null ) && ( parent instanceof com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ) { return com.android.sdklib.util.Pair.of ( ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent ) ) , parent.getUiChildren ( ) . size ( ) ) ; } return null ; }
Source:
public void testHandleWpsEventFailDueToConfigAuthError ( ) { mWifiMonitor.registerHandler ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , WifiMonitor.WPS_FAIL_EVENT , mHandlerSpy ) ; mWifiMonitor.handleWpsFailEvent ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , WpsConfigError.DEV_PASSWORD_AUTH_FAILURE , WpsErrorIndication.NO_ERROR ) ; mLooper.dispatchAll ( ) ; org.mockito.ArgumentCaptor < android.os.Message > messageCaptor = org.mockito.ArgumentCaptor.forClass ( android.os.Message.class ) ; org.mockito.Mockito.verify ( mHandlerSpy ) . handleMessage ( messageCaptor.capture ( ) ) ; org.junit.Assert.assertEquals ( WifiMonitor.WPS_FAIL_EVENT , messageCaptor.getValue ( ) . what ) ; org.junit.Assert.assertEquals ( WifiManager.WPS_AUTH_FAILURE , messageCaptor.getValue ( ) . arg1 ) ; }

Target:
public void testBroadcastWpsEventFailDueToConfigAuthError ( ) { mWifiMonitor.registerHandler ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , WifiMonitor.WPS_FAIL_EVENT , mHandlerSpy ) ; mWifiMonitor.broadcastWpsFailEvent ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , WpsConfigError.DEV_PASSWORD_AUTH_FAILURE , WpsErrorIndication.NO_ERROR ) ; mLooper.dispatchAll ( ) ; org.mockito.ArgumentCaptor < android.os.Message > messageCaptor = org.mockito.ArgumentCaptor.forClass ( android.os.Message.class ) ; org.mockito.Mockito.verify ( mHandlerSpy ) . handleMessage ( messageCaptor.capture ( ) ) ; org.junit.Assert.assertEquals ( WifiMonitor.WPS_FAIL_EVENT , messageCaptor.getValue ( ) . what ) ; org.junit.Assert.assertEquals ( WifiManager.WPS_AUTH_FAILURE , messageCaptor.getValue ( ) . arg1 ) ; }
Source:
void regularScanTimeout ( com.android.bluetooth.gatt.ScanClient client ) { if ( ( ! ( isExemptFromScanDowngrade ( client ) ) ) && ( client.stats.isScanningTooLong ( ) ) ) { android.util.Log.w ( com.android.bluetooth.gatt.ScanManager.TAG , ( ( "Moving scan client to opportunistic (scannerId " + ( client.scannerId ) ) + ")" ) ) ; setOpportunisticScanClient ( client ) ; client.stats.setScanTimeout ( ) ; } configureRegularScanParams ( ) ; if ( ( numRegularScanClients ( ) ) == 0 ) { logd ( "stop scan" ) ; gattClientScanNative ( false ) ; } }

Target:
void regularScanTimeout ( com.android.bluetooth.gatt.ScanClient client ) { if ( ( ! ( isExemptFromScanDowngrade ( client ) ) ) && ( client.stats.isScanningTooLong ( ) ) ) { android.util.Log.w ( com.android.bluetooth.gatt.ScanManager.TAG , ( ( "Moving scan client to opportunistic (scannerId " + ( client.scannerId ) ) + ")" ) ) ; setOpportunisticScanClient ( client ) ; removeScanFilters ( client.scannerId ) ; client.stats.setScanTimeout ( ) ; } configureRegularScanParams ( ) ; if ( ( numRegularScanClients ( ) ) == 0 ) { logd ( "stop scan" ) ; gattClientScanNative ( false ) ; } }
Source:
public boolean isAnnotationPresent ( java.lang.Class < ? extends java.lang.annotation.Annotation > annotationType ) { if ( annotationType == null ) { throw new java.lang.NullPointerException ( "annotationType == null" ) ; } if ( isDeclaredAnnotationPresent ( annotationType ) ) { return true ; } if ( annotationType.isDeclaredAnnotationPresent ( java.lang.annotation.Inherited.class ) ) { for ( java.lang.Class < ? > sup = getSuperclass ( ) ; sup != null ; sup = sup.getSuperclass ( ) ) { if ( sup.isDeclaredAnnotationPresent ( annotationType ) ) { return true ; } } } return false ; }

Target:
public boolean isAnnotationPresent ( java.lang.Class < ? extends java.lang.annotation.Annotation > annotationClass ) { if ( annotationClass == null ) { throw new java.lang.NullPointerException ( "annotationClass == null" ) ; } if ( isDeclaredAnnotationPresent ( annotationClass ) ) { return true ; } if ( annotationClass.isDeclaredAnnotationPresent ( java.lang.annotation.Inherited.class ) ) { for ( java.lang.Class < ? > sup = getSuperclass ( ) ; sup != null ; sup = sup.getSuperclass ( ) ) { if ( sup.isDeclaredAnnotationPresent ( annotationClass ) ) { return true ; } } } return false ; }
Source:
public void testSuppressed ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( "src/test/pkg/LayoutInflationTest_ignored.java.txt=>src/test/pkg/LayoutInflationTest.java" , "res/layout/textsize.xml=>res/layout/your_layout.xml" , "res/layout/listseparator.xml=>res/layout-port/your_layout.xml" ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/LayoutInflationTest.java:13: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" + " convertView = mInflater.inflate(R.layout.your_layout, null);\n" ) + " ~~~~\n" ) + "src/test/pkg/LayoutInflationTest.java:14: Warning: Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout\'s root element) [InflateParams]\n" ) + " convertView = mInflater.inflate(R.layout.your_layout, null, true);\n" ) + " ~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( mLayoutInflationTest , copy ( "res/layout/textsize.xml" , "res/layout/your_layout.xml" ) , copy ( "res/layout/listseparator.xml" , "res/layout-port/your_layout.xml" ) ) ) ; }
Source:
static int foo ( ) { try { Main.assertIsManaged ( ) ; Main.constantIndexing2 ( new int [ 3 ] ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException e ) { Main.assertIsManaged ( ) ; try { Main.constantIndexingForward6 ( new int [ 3 ] ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException e2 ) { return 99 ; } } return 0 ; }

Target:
static int foo ( ) { try { Main.assertIsManaged ( ) ; Main.$opt$noinline$constantIndexing2 ( new int [ 3 ] ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException e ) { Main.assertIsManaged ( ) ; try { Main.constantIndexingForward6 ( new int [ 3 ] ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException e2 ) { return 99 ; } } return 0 ; }
Source:
public void testCompatDefault22 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatDefault" ) ; }

Target:
public void testKill ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testKill" ) ; fail ( "Expected remote failure" ) ; } catch ( java.lang.AssertionError expected ) { } }
Source:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onPageSelected" ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( getActivity ( ) ) instanceof com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ) { com.android.dialer.common.FragmentUtils.getParentUnsafe ( this , com.android.dialer.app.calllog.CallLogFragment.HostInterface.class ) . enableFloatingButton ( ( ! ( isModalAlertVisible ( ) ) ) ) ; } }

Target:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onPageSelected" ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( com.android.dialer.common.FragmentUtils.getParent ( this , com.android.dialer.app.calllog.CallLogFragment.HostInterface.class ) ) != null ) ) { com.android.dialer.common.FragmentUtils.getParentUnsafe ( this , com.android.dialer.app.calllog.CallLogFragment.HostInterface.class ) . enableFloatingButton ( ( ! ( isModalAlertVisible ( ) ) ) ) ; } }
Source:
private void sendEmergencyCallbackModeChange ( ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_ECM_STATE , mIsPhoneInEcmState ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManagerNative.broadcastStickyIntent ( intent , null , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , "sendEmergencyCallbackModeChange" ) ; }

Target:
private void sendEmergencyCallbackModeChange ( ) { android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED ) ; intent.putExtra ( PhoneConstants.PHONE_IN_ECM_STATE , isInEcm ( ) ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , getPhoneId ( ) ) ; android.app.ActivityManagerNative.broadcastStickyIntent ( intent , null , UserHandle.USER_ALL ) ; if ( com.android.internal.telephony.imsphone.ImsPhone.DBG ) android.telephony.Rlog.d ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , "sendEmergencyCallbackModeChange" ) ; }
Source:
void splitFromConferenceCall ( android.telecom.Call call1 ) { assertEquals ( "Lock should have no permits!" , 0 , mInCallCallbacks.lock.availablePermits ( ) ) ; call1.splitFromConference ( ) ; try { if ( ! ( mInCallCallbacks.lock.tryAcquire ( 2 , 3 , java.util.concurrent.TimeUnit.SECONDS ) ) ) { fail ( "Conference split failed" ) ; } } catch ( java.lang.InterruptedException e ) { android.util.Log.i ( android.telecom.cts.TAG , "Test interrupted!" ) ; } }

Target:
void splitFromConferenceCall ( android.telecom.Call call1 ) { assertEquals ( "Lock should have no permits!" , 0 , mInCallCallbacks.lock.availablePermits ( ) ) ; call1.splitFromConference ( ) ; try { if ( ! ( mInCallCallbacks.lock.tryAcquire ( 2 , 3 , java.util.concurrent.TimeUnit.SECONDS ) ) ) { fail ( "Conference split failed" ) ; } } catch ( java.lang.InterruptedException e ) { android.util.Log.i ( android.telecom.cts.TestUtils.TAG , "Test interrupted!" ) ; } }
Source:
public boolean hasResourceItem ( @ com.android.annotations.NonNull java.lang.String url ) { assert ( url.startsWith ( "@" ) ) || ( url.startsWith ( "?" ) ) : url ; int typeEnd = url.indexOf ( '/' , 1 ) ; if ( typeEnd != ( - 1 ) ) { int nameBegin = typeEnd + 1 ; int typeBegin = ( url.startsWith ( "@+" ) ) ? 2 : 1 ; int colon = url.lastIndexOf ( ':' , typeEnd ) ; if ( colon != ( - 1 ) ) { typeBegin = colon + 1 ; } java.lang.String typeName = url.substring ( typeBegin , typeEnd ) ; com.android.resources.ResourceType type = com.android.resources.ResourceType.getEnum ( typeName ) ; if ( type != null ) { java.lang.String name = url.substring ( nameBegin ) ; return hasResourceItem ( type , name ) ; } } return false ; }

Target:
public boolean hasResourceItem ( @ com.android.annotations.NonNull java.lang.String url ) { assert ( url.startsWith ( "@" ) ) || ( url.startsWith ( "?" ) ) : url ; ensureInitialized ( ) ; int typeEnd = url.indexOf ( '/' , 1 ) ; if ( typeEnd != ( - 1 ) ) { int nameBegin = typeEnd + 1 ; int typeBegin = ( url.startsWith ( "@+" ) ) ? 2 : 1 ; int colon = url.lastIndexOf ( ':' , typeEnd ) ; if ( colon != ( - 1 ) ) { typeBegin = colon + 1 ; } java.lang.String typeName = url.substring ( typeBegin , typeEnd ) ; com.android.resources.ResourceType type = com.android.resources.ResourceType.getEnum ( typeName ) ; if ( type != null ) { java.lang.String name = url.substring ( nameBegin ) ; return hasResourceItem ( type , name ) ; } } return false ; }
Source:
public java.util.ListIterator < V > listIterator ( int index ) { final com.google.common.collect.LinkedListMultimap < K , V > . NodeIterator nodes = new NodeIterator ( index ) ; return new com.google.common.collect.TransformedListIterator < com.google.common.collect.LinkedListMultimap.Node < K , V > , V > ( nodes ) { @ java.lang.Override V transform ( com.google.common.collect.LinkedListMultimap.Node < K , V > node ) { return node.value ; } @ java.lang.Override public void set ( V value ) { nodes.setValue ( value ) ; } } ; }

Target:
public java.util.ListIterator < V > listIterator ( int index ) { final com.google.common.collect.LinkedListMultimap < K , V > . NodeIterator nodeItr = new NodeIterator ( index ) ; return new com.google.common.collect.TransformedListIterator < java.util.Map.Entry < K , V > , V > ( nodeItr ) { @ java.lang.Override V transform ( java.util.Map.Entry < K , V > entry ) { return entry.getValue ( ) ; } @ java.lang.Override public void set ( V value ) { nodeItr.setValue ( value ) ; } } ; }
Source:
private java.lang.Object responseDataCallList ( android.os.Parcel p ) { java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > response ; int ver = p.readInt ( ) ; int num = p.readInt ( ) ; riljLog ( ( ( ( "responseDataCallList ver=" + ver ) + " num=" ) + num ) ) ; response = new java.util.ArrayList < com.android.internal.telephony.dataconnection.DataCallResponse > ( num ) ; for ( int i = 0 ; i < num ; i ++ ) { response.add ( getDataCallResponse ( p , ver ) ) ; } return response ; }

Target:
public void getAllowedCarriers ( android.os.Message result ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( result ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_GET_ALLOWED_CARRIERS , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } try { radioProxy.getAllowedCarriers ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getAllowedCarriers" , e ) ; } } }
Source:
public static long getLong ( java.lang.String key , long def ) { if ( ( key.length ( ) ) > ( android.os.SystemProperties.PROP_NAME_MAX ) ) { throw new java.lang.IllegalArgumentException ( ( "key.length > " + ( android.os.SystemProperties.PROP_NAME_MAX ) ) ) ; } return android.os.SystemProperties.native_get_long ( key , def ) ; }

Target:
public static long getLong ( java.lang.String key , long def ) { if ( ( key.length ( ) ) > ( android.os.SystemProperties.PROP_NAME_MAX ) ) { throw new java.lang.IllegalArgumentException ( ( "key.length > " + ( android.os.SystemProperties.PROP_NAME_MAX ) ) ) ; } if ( android.os.SystemProperties.TRACK_KEY_ACCESS ) android.os.SystemProperties.onKeyAccess ( key ) ; return android.os.SystemProperties.native_get_long ( key , def ) ; }
Source:
public void testGetPythonBinaryNullBuildInfo ( ) { com.android.tradefed.util.CommandResult findPythonresult = new com.android.tradefed.util.CommandResult ( ) ; findPythonresult.setStatus ( CommandStatus.SUCCESS ) ; findPythonresult.setStdout ( "/user/bin/python" ) ; com.android.tradefed.util.IRunUtil runUtil = createMockRunUtil ( findPythonresult ) ; mVtsPythonRunnerHelper = new com.android.tradefed.util.VtsPythonRunnerHelper ( null ) ; mVtsPythonRunnerHelper.setRunUtil ( runUtil ) ; java.lang.String pythonBinary = mVtsPythonRunnerHelper.getPythonBinary ( ) ; org.junit.Assert.assertEquals ( pythonBinary , "/user/bin/python" ) ; }

Target:
public void testActivateVirtualEnvNotExist ( ) { com.android.tradefed.util.IRunUtil runUtil = createMockRunUtil ( ) ; org.junit.Assert.assertEquals ( null , com.android.tradefed.util.VtsPythonRunnerHelper.getPythonBinDir ( mVirtualenvPath ) ) ; com.android.tradefed.util.VtsPythonRunnerHelper.activateVirtualenv ( runUtil , mVirtualenvPath ) ; java.lang.String pythonBinary = runUtil.runTimedCmd ( 1000 , "which" , "python" ) . getStdout ( ) ; org.junit.Assert.assertEquals ( pythonBinary , "/usr/bin/python" ) ; }
Source:
public java.nio.IntBuffer put ( java.nio.IntBuffer src ) { if ( src == ( this ) ) { throw new java.lang.IllegalArgumentException ( "src == this" ) ; } if ( ( src.remaining ( ) ) > ( remaining ( ) ) ) { throw new java.nio.BufferOverflowException ( ) ; } int [ ] contents = new int [ src.remaining ( ) ] ; src.get ( contents ) ; put ( contents ) ; return this ; }

Target:
public java.nio.IntBuffer put ( java.nio.IntBuffer src ) { if ( isReadOnly ( ) ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( src == ( this ) ) { throw new java.lang.IllegalArgumentException ( "src == this" ) ; } if ( ( src.remaining ( ) ) > ( remaining ( ) ) ) { throw new java.nio.BufferOverflowException ( ) ; } int [ ] contents = new int [ src.remaining ( ) ] ; src.get ( contents ) ; put ( contents ) ; return this ; }
Source:
static void closeServerSocket ( ) { try { if ( ( com.android.internal.os.ZygoteInit.sServerSocket ) != null ) { com.android.internal.os.ZygoteInit.sServerSocket.close ( ) ; } } catch ( java.io.IOException ex ) { android.util.Log.e ( com.android.internal.os.ZygoteInit.TAG , "Zygote: error closing sockets" , ex ) ; } com.android.internal.os.ZygoteInit.sServerSocket = null ; }

Target:
static void closeServerSocket ( ) { try { if ( ( com.android.internal.os.ZygoteInit.sServerSocket ) != null ) { java.io.FileDescriptor fd = com.android.internal.os.ZygoteInit.sServerSocket.getFileDescriptor ( ) ; com.android.internal.os.ZygoteInit.sServerSocket.close ( ) ; if ( fd != null ) { android.system.Os.close ( fd ) ; } } } catch ( java.io.IOException ex ) { android.util.Log.e ( com.android.internal.os.ZygoteInit.TAG , "Zygote: error closing sockets" , ex ) ; } catch ( android.system.ErrnoException ex ) { android.util.Log.e ( com.android.internal.os.ZygoteInit.TAG , "Zygote: error closing descriptor" , ex ) ; } com.android.internal.os.ZygoteInit.sServerSocket = null ; }
Source:
public void onCreate ( android.database.sqlite.SQLiteDatabase db ) { db.execSQL ( ( ( ( ( ( ( "CREATE TABLE raw (" + ( ( ( ( ( ( ( "_id INTEGER PRIMARY KEY," + "date INTEGER," ) + "reference_number INTEGER," ) + "count INTEGER," ) + "sequence INTEGER," ) + "destination_port INTEGER," ) + "address TEXT," ) + "sub_id INTEGER DEFAULT " ) ) + ( android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID ) ) + ", " ) + "pdu TEXT," ) + "deleted INTEGER DEFAULT 0," ) + "message_body TEXT);" ) ) ; }

Target:
public void onCreate ( android.database.sqlite.SQLiteDatabase db ) { db.execSQL ( ( ( ( ( ( ( ( "CREATE TABLE raw (" + ( ( ( ( ( ( ( "_id INTEGER PRIMARY KEY," + "date INTEGER," ) + "reference_number INTEGER," ) + "count INTEGER," ) + "sequence INTEGER," ) + "destination_port INTEGER," ) + "address TEXT," ) + "sub_id INTEGER DEFAULT " ) ) + ( android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID ) ) + ", " ) + "pdu TEXT," ) + "deleted INTEGER DEFAULT 0," ) + "message_body TEXT," ) + "display_originating_addr TEXT);" ) ) ; }
Source:
public void testVariantLevelAbiFilter ( ) { com.android.build.VariantOutput match ; java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; java.util.List < com.android.build.OutputFile > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , com.google.common.collect.Sets.newHashSet ( "bar" , "foo" ) , 160 , "foo" , "zzz" ) ; assertEquals ( 1 , result.size ( ) ) ; assertEquals ( match.getMainOutputFile ( ) , result.get ( 0 ) ) ; }

Target:
public void testVariantLevelAbiFilter ( ) throws com.android.ide.common.process.ProcessException { com.android.build.VariantOutput match ; java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , com.google.common.collect.Sets.newHashSet ( "bar" , "foo" ) , 160 , "foo" , "zzz" ) ; assertEquals ( 1 , result.size ( ) ) ; assertEquals ( match.getMainOutputFile ( ) . getOutputFile ( ) , result.get ( 0 ) ) ; }
Source:
public void srvccStateNotify ( int indicationType , int var2 ) { }

Target:
public void cellInfoList ( int indicationType , java.util.ArrayList < com.android.internal.telephony.V1_0.CellInfo > records ) { mRil.processIndication ( indicationType ) ; java.util.ArrayList < android.telephony.CellInfo > response = com.android.internal.telephony.RIL.responseCellInfoList ( records ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_CELL_INFO_LIST , response ) ; mRil.mRilCellInfoListRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , response , null ) ) ; }
Source:
public void setInput ( java.io.Reader reader ) throws org.xmlpull.v1.XmlPullParserException { this . reader = reader ; type = START_DOCUMENT ; name = null ; namespace = null ; degenerated = false ; attributeCount = - 1 ; encoding = null ; version = null ; standalone = null ; if ( reader == null ) { return ; } position = 0 ; limit = 0 ; bufferStartLine = 0 ; bufferStartColumn = 0 ; depth = 0 ; documentEntities = null ; }

Target:
public void setInput ( java.io.Reader reader ) throws org.xmlpull.v1.XmlPullParserException { this . reader = reader ; type = START_DOCUMENT ; parsedTopLevelStartTag = false ; name = null ; namespace = null ; degenerated = false ; attributeCount = - 1 ; encoding = null ; version = null ; standalone = null ; if ( reader == null ) { return ; } position = 0 ; limit = 0 ; bufferStartLine = 0 ; bufferStartColumn = 0 ; depth = 0 ; documentEntities = null ; }
Source:
public void mouseMoved ( java.awt.event.MouseEvent event ) { checkLockedRegion ( event.getX ( ) , event.getY ( ) ) ; updateHoverRegion ( event.getX ( ) , event.getY ( ) ) ; repaint ( ) ; }

Target:
public void mouseDragged ( java.awt.event.MouseEvent event ) { int x = imageXCoordinate ( event.getX ( ) ) ; int y = imageYCoordinate ( event.getY ( ) ) ; if ( ! ( checkLockedRegion ( x , y ) ) ) { moveLine ( x , y ) ; } updateEditRegion ( x , y ) ; }
Source:
public void onAlarm ( ) { final boolean stillScheduled ; synchronized ( this ) { stillScheduled = mScheduled ; mScheduled = false ; } if ( stillScheduled ) { android.os.Message msg = mHandler.obtainMessage ( mCmd , mArg1 , mArg2 ) ; mHandler.handleMessage ( msg ) ; msg.recycle ( ) ; } }

Target:
public void onAlarm ( ) { final boolean stillScheduled ; synchronized ( this ) { stillScheduled = mScheduled ; mScheduled = false ; } if ( stillScheduled ) { android.os.Message msg = mHandler.obtainMessage ( mCmd , mArg1 , mArg2 , mObj ) ; mHandler.handleMessage ( msg ) ; msg.recycle ( ) ; } }
Source:
public void mouseUp ( org.eclipse.swt.events.MouseEvent e ) { if ( ( mCurrentGesture ) == null ) { mCanvas.getSelectionManager ( ) . select ( e ) ; } finishGesture ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( mCanvas , e ) , false ) ; mCanvas.redraw ( ) ; }

Target:
public void mouseUp ( org.eclipse.swt.events.MouseEvent e ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint mousePos = com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( mCanvas , e ) ; if ( ( mCurrentGesture ) == null ) { com.android.util.Pair < com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem , com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionHandle > handlePair = mCanvas.getSelectionManager ( ) . findHandle ( mousePos ) ; if ( handlePair == null ) { mCanvas.getSelectionManager ( ) . select ( e ) ; } } if ( ( mCurrentGesture ) == null ) { updateCursor ( mousePos ) ; } else { finishGesture ( mousePos , false ) ; } mCanvas.redraw ( ) ; }
Source:
private void testScriptSide ( android.renderscript.RenderScript pRS ) { com.android.rs.test.ScriptC_element s = new com.android.rs.test.ScriptC_element ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.invoke_element_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; }

Target:
private void testScriptSide ( android.renderscript.RenderScript pRS ) { com.android.rs.test.ScriptC_element s = new com.android.rs.test.ScriptC_element ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.invoke_element_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; s.get_complexStruct ( ) . getAllocation ( ) . destroy ( ) ; s.get_complexStruct ( ) . getElement ( ) . destroy ( ) ; s.destroy ( ) ; }
Source:
public void close ( ) throws java.io.IOException { try { obuffer = cipher.doFinal ( ) ; } catch ( javax.crypto.IllegalBlockSizeException e ) { obuffer = null ; } catch ( javax.crypto.BadPaddingException e ) { obuffer = null ; } try { flush ( ) ; } catch ( java.io.IOException ignored ) { } out.close ( ) ; }

Target:
public void close ( ) throws java.io.IOException { if ( closed ) { return ; } closed = true ; try { obuffer = cipher.doFinal ( ) ; } catch ( javax.crypto.IllegalBlockSizeException | javax.crypto.BadPaddingException e ) { obuffer = null ; } try { flush ( ) ; } catch ( java.io.IOException ignored ) { } out.close ( ) ; }
Source:
public void testInterfaceCountersUdp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1000 , false ) ; }

Target:
public void testInterfaceCountersUdp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , android.net.cts.IpSecManagerTest.getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1000 , false ) ; }
Source:
public boolean resetUid ( int uid ) { try { mError = mBinder.reset_uid ( uid ) ; return ( mError ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }

Target:
public boolean isEmpty ( ) { return isEmpty ( android.os.UserHandle.myUserId ( ) ) ; }
Source:
public void onClick ( android.content.DialogInterface dialog , int which ) { finish ( ) ; }

Target:
private void showNoUsbAccessoryDialog ( ) { new android.app.AlertDialog.Builder ( this ) . setIcon ( android.R.drawable.ic_dialog_alert ) . setTitle ( R.string.usb_not_available_title ) . setMessage ( R.string.usb_not_available_message ) . setCancelable ( false ) . setPositiveButton ( android.R.string.ok , new android.content.DialogInterface.OnClickListener ( ) { @ java.lang.Override public void onClick ( android.content.DialogInterface dialog , int which ) { finish ( ) ; } } ) . show ( ) ; }
Source:
private void loadUrlOnUiThread ( final org.chromium.content.browser.LoadUrlParams loadUrlParams ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { assert ( mAppTargetSdkVersion ) < ( Build.VERSION_CODES.JELLY_BEAN_MR2 ) ; mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mAwContents.loadUrl ( loadUrlParams ) ; } } ) ; return ; } mAwContents.loadUrl ( loadUrlParams ) ; }

Target:
public void saveWebArchive ( final java.lang.String basename , final boolean autoname , final android.webkit.ValueCallback < java.lang.String > callback ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { saveWebArchive ( basename , autoname , callback ) ; } } ) ; return ; } mAwContents.saveWebArchive ( basename , autoname , callback ) ; }
Source:
public static void jarjarJackToJack ( com.android.jack.Options options , java.io.File in , java.lang.String classpath , java.io.File out , java.io.File jarjarRules , boolean zip ) throws java.lang.Exception { options.jayceImport = new java.util.ArrayList < java.io.File > ( 1 ) ; options.jayceImport.add ( in ) ; options.classpath = classpath ; if ( zip ) { options.jayceOutZip = out ; } else { options.jayceOutDir = out ; } options.jarjarRulesFile = jarjarRules ; com.android.jack.Jack.run ( options ) ; }

Target:
public static void jarjarJackToJack ( com.android.jack.Options options , java.io.File in , java.lang.String classpath , java.io.File out , java.io.File jarjarRules , boolean zip ) throws java.lang.Exception { options.jayceImport = new java.util.ArrayList < java.io.File > ( 1 ) ; options.jayceImport.add ( in ) ; options.classpath = classpath ; if ( zip ) { options.libraryOutZip = out ; } else { options.libraryOutDir = out ; } options.jarjarRulesFile = jarjarRules ; com.android.jack.Jack.run ( options ) ; }
Source:
public V2 transformEntry ( K key , V1 value ) { return function.apply ( value ) ; }

Target:
public static < K , V1 , V2 > com.google.common.collect.ListMultimap < K , V2 > transformValues ( com.google.common.collect.ListMultimap < K , V1 > fromMultimap , final com.google.common.base.Function < ? super V1 , V2 > function ) { com.google.common.base.Preconditions.checkNotNull ( function ) ; com.google.common.collect.Maps.EntryTransformer < K , V1 , V2 > transformer = com.google.common.collect.Maps.asEntryTransformer ( function ) ; return com.google.common.collect.Multimaps.transformEntries ( fromMultimap , transformer ) ; }
Source:
private synchronized void onConnectStateChanged ( byte [ ] address , int state ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "onConnectStateChanged(): address=" + ( java.util.Arrays.toString ( address ) ) ) + " state=" ) + state ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_CONNECT_STATE_CHANGED ) ; msg.obj = address ; msg.arg1 = state ; mHandler.sendMessage ( msg ) ; }

Target:
synchronized void onConnectStateChangedFromNative ( android.bluetooth.BluetoothDevice device , int state ) { if ( com.android.bluetooth.hid.HidDeviceService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDeviceService.TAG , ( ( ( "onConnectStateChanged(): device=" + device ) + " state=" ) + state ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDeviceService.MESSAGE_CONNECT_STATE_CHANGED ) ; msg.obj = device ; msg.arg1 = state ; mHandler.sendMessage ( msg ) ; }
Source:
protected int getFirstItemPosition ( ) { if ( ( ( mSeriesRecording ) != null ) && ( ( mSeriesRecording.getState ( ) ) == ( com.android.tv.dvr.SeriesRecording.STATE_SERIES_STOPPED ) ) ) { return 0 ; } return super . getFirstItemPosition ( ) ; }

Target:
private void updateEmptyMessage ( ) { if ( ( ( mPrograms ) == null ) || ( mPrograms.isEmpty ( ) ) ) { if ( ( mSeriesRecording.getState ( ) ) == ( com.android.tv.dvr.data.SeriesRecording.STATE_SERIES_STOPPED ) ) { showEmptyMessage ( R.string.dvr_series_schedules_stopped_empty_state ) ; } else { showEmptyMessage ( R.string.dvr_series_schedules_empty_state ) ; } } else { hideEmptyMessage ( ) ; } }
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.getRootDir ( ) . 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 { 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 setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mContentResolver = new android.test.mock.MockContentResolver ( mContext ) ; mContentResolver.addProvider ( Settings.AUTHORITY , new com.android.internal.util.test.FakeSettingsProvider ( ) ) ; org.mockito.Mockito.when ( mContext.getPackageName ( ) ) . thenReturn ( "OffloadControllerTest" ) ; org.mockito.Mockito.when ( mContext.getContentResolver ( ) ) . thenReturn ( mContentResolver ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.when ( mContext.getApplicationInfo ( ) ) . thenReturn ( mApplicationInfo ) ; org.mockito.Mockito.when ( mContext.getPackageName ( ) ) . thenReturn ( "OffloadControllerTest" ) ; mContentResolver = new android.test.mock.MockContentResolver ( mContext ) ; mContentResolver.addProvider ( Settings.AUTHORITY , new com.android.internal.util.test.FakeSettingsProvider ( ) ) ; org.mockito.Mockito.when ( mContext.getContentResolver ( ) ) . thenReturn ( mContentResolver ) ; }
Source:
public static void refresh ( @ android.support.annotation.NonNull android.content.Context context , java.util.List < com.android.contacts.common.list.ContactEntry > contacts ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.Assert.isNotNull ( context ) ; if ( ( Build.VERSION.SDK_INT ) < ( Build.VERSION_CODES.N_MR1 ) ) { return ; } if ( ! ( com.android.dialer.shortcuts.Shortcuts.areDynamicShortcutsEnabled ( context ) ) ) { return ; } com.android.dialer.common.concurrent.DialerExecutors.createNonUiTaskBuilder ( context , new com.android.dialer.shortcuts.ShortcutRefresher.RefreshWorker ( context ) ) . build ( ) . executeSerial ( new java.util.ArrayList ( contacts ) ) ; }

Target:
public static void refresh ( @ android.support.annotation.NonNull android.content.Context context , java.util.List < com.android.contacts.common.list.ContactEntry > contacts ) { com.android.dialer.common.Assert.isMainThread ( ) ; com.android.dialer.common.Assert.isNotNull ( context ) ; if ( ( Build.VERSION.SDK_INT ) < ( Build.VERSION_CODES.N_MR1 ) ) { return ; } if ( ! ( com.android.dialer.shortcuts.Shortcuts.areDynamicShortcutsEnabled ( context ) ) ) { return ; } com.android.dialer.common.concurrent.DialerExecutorComponent.get ( context ) . dialerExecutorFactory ( ) . createNonUiTaskBuilder ( new com.android.dialer.shortcuts.ShortcutRefresher.RefreshWorker ( context ) ) . build ( ) . executeSerial ( new java.util.ArrayList ( contacts ) ) ; }
Source:
void clientConnect ( int clientIf , java.lang.String address , boolean isDirect , int transport , int phy ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( ( ( "clientConnect() - address=" + address ) + ", isDirect=" ) + isDirect ) ) ; gattClientConnectNative ( clientIf , address , isDirect , transport ) ; }

Target:
void clientConnect ( int clientIf , java.lang.String address , boolean isDirect , int transport , int phy ) { enforceCallingOrSelfPermission ( com.android.bluetooth.gatt.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( ( ( ( ( "clientConnect() - address=" + address ) + ", isDirect=" ) + isDirect ) + ", phy= " ) + phy ) ) ; gattClientConnectNative ( clientIf , address , isDirect , transport , phy ) ; }
Source:
private void showUsage ( ) { java.lang.System.err.println ( "usage: input ..." ) ; java.lang.System.err.println ( " input text <string>" ) ; java.lang.System.err.println ( " input keyevent <key code number or name>" ) ; java.lang.System.err.println ( " input [touchscreen|touchpad] tap <x> <y>" ) ; java.lang.System.err.println ( " input [touchscreen|touchpad] swipe <x1> <y1> <x2> <y2>" ) ; java.lang.System.err.println ( " input trackball press" ) ; java.lang.System.err.println ( " input trackball roll <dx> <dy>" ) ; }

Target:
private void showUsage ( ) { java.lang.System.err.println ( "usage: input ..." ) ; java.lang.System.err.println ( " input text <string>" ) ; java.lang.System.err.println ( " input keyevent <key code number or name> ..." ) ; java.lang.System.err.println ( " input [touchscreen|touchpad] tap <x> <y>" ) ; java.lang.System.err.println ( " input [touchscreen|touchpad] swipe <x1> <y1> <x2> <y2>" ) ; java.lang.System.err.println ( " input trackball press" ) ; java.lang.System.err.println ( " input trackball roll <dx> <dy>" ) ; }