auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testWificondNullWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }

Target:
public void testDisableWifiFromSoftApModeState ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( null ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.SOFT_AP_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; mWifiStateMachinePrime.disableWifi ( ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.WIFI_DISABLED_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }
Source:
public java.nio.channels.FileChannel truncate ( long size ) throws java.io.IOException { checkOpen ( ) ; if ( size < 0 ) { throw new java.lang.IllegalArgumentException ( ( "size < 0: " + size ) ) ; } checkWritable ( ) ; if ( size < ( size ( ) ) ) { try { Libcore.os.ftruncate ( fd , size ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } } return this ; }

Target:
public java.nio.channels.FileChannel truncate ( long size ) throws java.io.IOException { checkOpen ( ) ; if ( size < 0 ) { throw new java.lang.IllegalArgumentException ( ( "size < 0: " + size ) ) ; } checkWritable ( ) ; if ( size < ( size ( ) ) ) { try { Libcore.os.ftruncate ( fd , size ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } } if ( ( position ( ) ) > size ) { position ( size ) ; } return this ; }
Source:
public void testCannotSetFixedLengthStreamingModeAfterConnect ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "A" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; assertEquals ( "A" , readAscii ( connection.getInputStream ( ) , java.lang.Integer.MAX_VALUE ) ) ; try { connection.setFixedLengthStreamingMode ( 1 ) ; fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }

Target:
public void testCannotSetFixedLengthStreamingModeAfterConnect ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setBody ( "A" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; org.junit.Assert.assertEquals ( "A" , readAscii ( connection.getInputStream ( ) , java.lang.Integer.MAX_VALUE ) ) ; try { connection.setFixedLengthStreamingMode ( 1 ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }
Source:
public final com.android.tools.perflib.heap.Instance findReference ( long id ) { for ( com.android.tools.perflib.heap.Heap heap : mHeaps.values ( ) ) { com.android.tools.perflib.heap.Instance instance = heap.getInstance ( id ) ; if ( instance != null ) { return instance ; } } return findClass ( id ) ; }

Target:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.ClassObj theClass = mHeaps.get ( i ) . getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }
Source:
protected void shutdownOutput ( ) throws java.io.IOException { if ( ( fd ) == null ) { throw new java.io.IOException ( "socket not created" ) ; } shutdown ( fd , false ) ; }

Target:
protected void shutdownOutput ( ) throws java.io.IOException { if ( ( fd ) == null ) { throw new java.io.IOException ( "socket not created" ) ; } try { android.system.Os.shutdown ( fd , OsConstants.SHUT_WR ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }
Source:
public void testUsesLibrary ( ) throws java.lang.Exception { java.lang.ClassLoader loader = getClass ( ) . getClassLoader ( ) ; if ( loader instanceof dalvik.system.BaseDexClassLoader ) { java.lang.Object [ ] dexElements = getDexElementsFromClassLoader ( ( ( dalvik.system.BaseDexClassLoader ) ( loader ) ) ) ; for ( java.lang.Object dexElement : dexElements ) { dalvik.system.DexFile dexFile = getDexFileFromDexElement ( dexElement ) ; assertTrue ( isDexFileBackedByOatFile ( dexFile ) ) ; } } }

Target:
public void testUsesLibrary ( ) throws java.lang.Exception { java.lang.ClassLoader loader = getClass ( ) . getClassLoader ( ) ; if ( loader instanceof dalvik.system.BaseDexClassLoader ) { dalvik.system.DexFile apkDexFile = getTestDexFile ( ( ( dalvik.system.BaseDexClassLoader ) ( loader ) ) ) ; assertTrue ( isDexFileBackedByOatFile ( apkDexFile ) ) ; } }
Source:
protected void onActivityResult ( int requestCode , int resultCode , android.content.Intent intent ) { if ( resultCode != ( RESULT_OK ) ) { return ; } switch ( requestCode ) { case NEW_PLAYLIST : android.net.Uri uri = intent.getData ( ) ; if ( uri != null ) { long [ ] list = new long [ 1 ] ; list [ 0 ] = com.android.music.MusicUtils.getCurrentAudioId ( ) ; int playlist = java.lang.Integer.parseInt ( uri.getLastPathSegment ( ) ) ; com.android.music.MusicUtils.addToPlaylist ( this , list , playlist ) ; } break ; } }

Target:
public void onStartTrackingTouch ( com.android.music.SeekBar bar ) { mLastSeekEventTime = 0 ; mmFromTouch = true ; }
Source:
public boolean countryUsesUtc ( java.lang.String isoCountryCode ) { return ( java.util.Arrays.binarySearch ( com.android.internal.telephony.TimeZoneLookupHelper.GMT_COUNTRY_CODES , isoCountryCode ) ) >= 0 ; }

Target:
public boolean countryUsesUtc ( java.lang.String isoCountryCode , long whenMillis ) { if ( android.text.TextUtils.isEmpty ( isoCountryCode ) ) { return false ; } libcore.util.CountryTimeZones countryTimeZones = libcore.util.TimeZoneFinder.getInstance ( ) . lookupCountryTimeZones ( isoCountryCode ) ; if ( countryTimeZones == null ) { return false ; } return countryTimeZones.hasUtcZone ( whenMillis ) ; }
Source:
private void setLoadedProgram ( @ javax.annotation.CheckForNull T program ) { loadedProgram = new java.lang.ref.SoftReference < > ( program ) ; }

Target:
private void setLoadedProgram ( @ javax.annotation.Nonnull com.android.jack.server.JackHttpServer.Assertion status , @ javax.annotation.CheckForNull T program ) { if ( program == null ) { loadedProgram.set ( status , null ) ; } else { assert ( loadedProgram.get ( status ) ) == null ; this . loadedProgram.set ( status , program ) ; } }
Source:
private static void assertArrayEquals ( byte [ ] expected , byte [ ] actual ) { if ( ! ( java.util.Arrays.equals ( expected , actual ) ) ) { fail ( ( ( ( "Expected " + ( libcore.util.HexEncoding.encodeToString ( expected ) ) ) + ", got " ) + ( libcore.util.HexEncoding.encodeToString ( actual ) ) ) ) ; } }

Target:
private static void assertArrayEquals ( byte [ ] expected , byte [ ] actual ) { if ( ! ( java.util.Arrays.equals ( expected , actual ) ) ) { fail ( ( ( ( "Expected " + ( libcore.java.util.Base64Test.hexString ( expected ) ) ) + ", got " ) + ( libcore.java.util.Base64Test.hexString ( actual ) ) ) ) ; } }
Source:
public void testGetSetFeature ( ) { java.lang.String [ ] features = new java.lang.String [ ] { tests.api.org.xml.sax.helpers.ParserAdapterTest.NAMESPACES , tests.api.org.xml.sax.helpers.ParserAdapterTest.NAMESPACE_PREFIXES , tests.api.org.xml.sax.helpers.ParserAdapterTest.XMLNS_URIs } ; for ( java.lang.String s : features ) { try { adapter.setFeature ( s , true ) ; assertEquals ( true , adapter.getFeature ( s ) ) ; adapter.setFeature ( s , false ) ; assertEquals ( false , adapter.getFeature ( s ) ) ; } catch ( org.xml.sax.SAXException e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } } try { adapter.setFeature ( "http://argle.bargle" , true ) ; fail ( "SAXNotRecognizedException expected" ) ; } catch ( org.xml.sax.SAXNotRecognizedException e ) { } catch ( org.xml.sax.SAXNotSupportedException e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }

Target:
public void testGetSetFeature ( ) { java.lang.String [ ] features = new java.lang.String [ ] { org.apache.harmony.tests.org.xml.sax.helpers.ParserAdapterTest.NAMESPACES , org.apache.harmony.tests.org.xml.sax.helpers.ParserAdapterTest.NAMESPACE_PREFIXES , org.apache.harmony.tests.org.xml.sax.helpers.ParserAdapterTest.XMLNS_URIs } ; for ( java.lang.String s : features ) { try { adapter.setFeature ( s , true ) ; assertEquals ( true , adapter.getFeature ( s ) ) ; adapter.setFeature ( s , false ) ; assertEquals ( false , adapter.getFeature ( s ) ) ; } catch ( org.xml.sax.SAXException e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } } try { adapter.setFeature ( "http://argle.bargle" , true ) ; fail ( "SAXNotRecognizedException expected" ) ; } catch ( org.xml.sax.SAXNotRecognizedException e ) { } catch ( org.xml.sax.SAXNotSupportedException e ) { throw new java.lang.RuntimeException ( "Unexpected exception" , e ) ; } }
Source:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , final com.google.common.base.Function < ? super I , ? extends O > function ) { return com.google.common.util.concurrent.Futures.transform ( input , function , com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor ( ) ) ; }

Target:
public static < I , O > com.google.common.util.concurrent.ListenableFuture < O > transform ( com.google.common.util.concurrent.ListenableFuture < I > input , com.google.common.util.concurrent.AsyncFunction < ? super I , ? extends O > function , java.util.concurrent.Executor executor ) { com.google.common.base.Preconditions.checkNotNull ( executor ) ; com.google.common.util.concurrent.Futures.ChainingListenableFuture < I , O > output = new com.google.common.util.concurrent.Futures.ChainingListenableFuture < I , O > ( function , input ) ; input.addListener ( com.google.common.util.concurrent.Futures.rejectionPropagatingRunnable ( output , output , executor ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; return output ; }
Source:
public void testKeyguardLock ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "KeyguardLockActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "KeyguardLockActivity" } ) ; mAmWmState.assertVisibility ( "KeyguardLockActivity" , true ) ; executeShellCommand ( android.server.cts.FINISH_ACTIVITY_BROADCAST ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; }

Target:
public void testDismissKeyguard_fromShowWhenLocked_notAllowed ( ) throws java.lang.Exception { if ( ( ! ( isHandheld ( ) ) ) || ( isUiModeLockedToVrHeadset ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( "ShowWhenLockedActivity" ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { "ShowWhenLockedActivity" } ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; assertShowingAndOccluded ( ) ; executeShellCommand ( "am broadcast -a trigger_broadcast --ez dismissKeyguard true" ) ; assertShowingAndOccluded ( ) ; mAmWmState.assertVisibility ( "ShowWhenLockedActivity" , true ) ; }
Source:
public void timeIcuBreakIterator ( int nreps ) { for ( int i = 0 ; i < nreps ; ++ i ) { java.text.BreakIterator it = java.text.com.android.ibm.icu.text.BreakIterator.getLineInstance ( text.locale ) ; it.setText ( text.text ) ; while ( ( it.next ( ) ) != java.text.com.android.ibm.icu.text.BreakIterator ) { } } }

Target:
public void timeIcuBreakIterator ( int nreps ) { for ( int i = 0 ; i < nreps ; ++ i ) { java.text.BreakIterator it = java.text.com.ibm.icu.text.BreakIterator.getLineInstance ( text.locale ) ; it.setText ( text.text ) ; while ( ( it.next ( ) ) != java.text.com.ibm.icu.text.BreakIterator ) { } } }
Source:
public int handleIncomingUser ( int callingPid , int callingUid , int userId , boolean allowAll , boolean requireFull , java.lang.String name , java.lang.String callerPackage ) { return handleIncomingUser ( callingPid , callingUid , userId , allowAll , ( requireFull ? com.android.server.am.ActivityManagerService.ALLOW_FULL_ONLY : com.android.server.am.ActivityManagerService.ALLOW_NON_FULL ) , name , callerPackage ) ; }

Target:
void dumpBroadcastStatsCheckinLocked ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args , int opti , boolean fullCheckin , java.lang.String dumpPackage ) { if ( ( mCurBroadcastStats ) == null ) { return ; } if ( ( mLastBroadcastStats ) != null ) { mLastBroadcastStats.dumpCheckinStats ( pw , dumpPackage ) ; if ( fullCheckin ) { mLastBroadcastStats = null ; return ; } } mCurBroadcastStats.dumpCheckinStats ( pw , dumpPackage ) ; if ( fullCheckin ) { mCurBroadcastStats = null ; } }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setResult ( com.android.cts.verifier.sensors.RESULT_CANCELED ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getApplicationContext ( ) . getSystemService ( Context.SENSOR_SERVICE ) ) ) ; com.android.cts.verifier.sensors.AccelerometerTestRenderer renderer = new com.android.cts.verifier.sensors.AccelerometerTestRenderer ( this ) ; mListener = renderer ; setContentView ( R.layout.pass_fail_gl ) ; mGLSurfaceView = ( ( android.opengl.GLSurfaceView ) ( findViewById ( R.id.gl_surface_view ) ) ) ; mGLSurfaceView.setRenderer ( renderer ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setResult ( com.android.cts.verifier.sensors.RESULT_CANCELED ) ; mSensorManager = ( ( android.hardware.SensorManager ) ( getApplicationContext ( ) . getSystemService ( Context.SENSOR_SERVICE ) ) ) ; com.android.cts.verifier.sensors.AccelerometerTestRenderer renderer = new com.android.cts.verifier.sensors.AccelerometerTestRenderer ( this ) ; mListener = renderer ; setContentView ( R.layout.pass_fail_gl ) ; setInfoTextResources ( R.string.snsr_accel_test , R.string.snsr_accel_test_info ) ; mGLSurfaceView = ( ( android.opengl.GLSurfaceView ) ( findViewById ( R.id.gl_surface_view ) ) ) ; mGLSurfaceView.setRenderer ( renderer ) ; }
Source:
private boolean isValidDevice ( android.bluetooth.BluetoothDevice device ) { if ( device == null ) return false ; if ( android.bluetooth.BluetoothAdapter.checkBluetoothAddress ( device.getAddress ( ) ) ) return true ; return false ; }

Target:
public boolean disableWBS ( ) { final android.bluetooth.IBluetoothHeadset service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { return service.disableWBS ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } return false ; }
Source:
public boolean removeCallbacks ( java.lang.Runnable action ) { android.os.Handler handler ; if ( ( mAttachInfo ) != null ) { handler = mAttachInfo.mHandler ; } else { android.view.ViewRoot.getRunQueue ( ) . removeCallbacks ( action ) ; return true ; } handler.removeCallbacks ( action ) ; return true ; }

Target:
final boolean hasIdentityMatrix ( ) { if ( ( mTransformationInfo ) != null ) { updateMatrix ( ) ; return mTransformationInfo.mMatrixIsIdentity ; } return true ; }
Source:
public void testCookiesWithLeadingPeriod ( ) throws java.lang.Exception { java.net.CookieManager cm = new java.net.CookieManager ( createCookieStore ( ) , null ) ; java.net.URI uri = new java.net.URI ( "http://services.chargepoint.com" ) ; java.util.List < java.lang.String > list = new java.util.ArrayList < > ( ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > responseHeaders = new java.util.HashMap < > ( ) ; list.add ( "b=c; domain=.chargepoint.com;" ) ; responseHeaders.put ( "Set-Cookie" , list ) ; cm.put ( uri , responseHeaders ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > cookies = cm.get ( new java.net.URI ( "https://webservices.chargepoint.com/foo" ) , responseHeaders ) ; assertEquals ( 1 , cookies.size ( ) ) ; java.util.List < java.lang.String > cookieList = cookies.values ( ) . iterator ( ) . next ( ) ; assertEquals ( "b=c" , cookieList.get ( 0 ) ) ; }

Target:
public void testCookiesWithLeadingPeriod ( ) throws java.lang.Exception { java.net.CookieManager cm = new java.net.CookieManager ( createCookieStore ( ) , null ) ; java.net.URI uri = new java.net.URI ( "http://services.chargepoint.com" ) ; java.util.List < java.lang.String > list = new java.util.ArrayList < > ( ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > responseHeaders = java.util.Collections.singletonMap ( "Set-Cookie" , java.util.Collections.singletonList ( "b=c; domain=.chargepoint.com;" ) ) ; cm.put ( uri , responseHeaders ) ; java.util.Map < java.lang.String , java.util.List < java.lang.String > > cookies = cm.get ( new java.net.URI ( "https://webservices.chargepoint.com/foo" ) , responseHeaders ) ; java.util.List < java.lang.String > cookieList = cookies.values ( ) . iterator ( ) . next ( ) ; assertEquals ( java.util.Collections.singletonList ( "b=c" ) , cookieList ) ; }
Source:
public void testgetIcon ( ) throws java.lang.Exception { assertNull ( com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getIcon ( com.android.ide.eclipse.adt.internal.resources.ResourceHelperTest.FakeQualifierClass.class ) ) ; com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = new com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration ( ) ; config.createDefault ( ) ; final int count = com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration.getQualifierCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qual = config.getQualifier ( i ) ; assertNotNull ( qual ) ; assertNotNull ( qual.getClass ( ) . getCanonicalName ( ) , com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getIcon ( qual.getClass ( ) ) ) ; } }

Target:
public void testgetIcon ( ) throws java.lang.Exception { assertNull ( com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getIcon ( com.android.ide.eclipse.adt.internal.resources.ResourceHelperTest.FakeQualifierClass.class ) ) ; com.android.ide.common.resources.configuration.FolderConfiguration config = new com.android.ide.common.resources.configuration.FolderConfiguration ( ) ; config.createDefault ( ) ; final int count = com.android.ide.common.resources.configuration.FolderConfiguration.getQualifierCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { com.android.ide.common.resources.configuration.ResourceQualifier qual = config.getQualifier ( i ) ; assertNotNull ( qual ) ; assertNotNull ( qual.getClass ( ) . getCanonicalName ( ) , com.android.ide.eclipse.adt.internal.resources.ResourceHelper.getIcon ( qual.getClass ( ) ) ) ; } }
Source:
public com.android.ims.ImsConfig getConfigInterface ( ) throws com.android.ims.ImsException { if ( ( ( mConfig ) != null ) && ( mConfig.isBinderAlive ( ) ) ) { return mConfig ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { android.telephony.ims.aidl.IImsConfig config = mMmTelFeatureConnection.getConfigInterface ( ) ; if ( config == null ) { throw new com.android.ims.ImsException ( "getConfigInterface()" , ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } mConfig = new com.android.ims.ImsConfig ( config , mContext ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getConfigInterface()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } return mConfig ; }

Target:
public com.android.ims.ImsConfig getConfigInterface ( ) throws com.android.ims.ImsException { if ( ( ( mConfig ) != null ) && ( mConfig.isBinderAlive ( ) ) ) { return mConfig ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { android.telephony.ims.aidl.IImsConfig config = mMmTelFeatureConnection.getConfigInterface ( ) ; if ( config == null ) { throw new com.android.ims.ImsException ( "getConfigInterface()" , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_SERVICE_UNAVAILABLE ) ; } mConfig = new com.android.ims.ImsConfig ( config , mContext ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getConfigInterface()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } return mConfig ; }
Source:
public void testSetNeutralButtonWithParamCharSequence ( ) throws java.lang.Throwable { runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setNeutralButton ( mTitle , mOnClickListener ) ; mDialog = mBuilder.show ( ) ; mButton = ( ( android.widget.Button ) ( mDialog.getWindow ( ) . findViewById ( R.id.button3 ) ) ) ; mButton.performClick ( ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; assertEquals ( mTitle , mButton.getText ( ) ) ; assertTrue ( mResult ) ; }

Target:
public void testSetNeutralButtonWithParamCharSequence ( ) throws java.lang.Throwable { runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { mBuilder = new android.app.AlertDialog.Builder ( mContext ) ; mBuilder.setNeutralButton ( mTitle , mOnClickListener ) ; mDialog = mBuilder.show ( ) ; mButton = mDialog.getButton ( DialogInterface.BUTTON_NEUTRAL ) ; mButton.performClick ( ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; assertEquals ( mTitle , mButton.getText ( ) ) ; assertTrue ( mResult ) ; }
Source:
static android.renderscript.FieldPacker createFieldPack ( java.lang.Object [ ] args ) { int len = 0 ; for ( java.lang.Object arg : args ) { len += android.renderscript.FieldPacker.getPackedSize ( arg ) ; } android.renderscript.FieldPacker fp = new android.renderscript.FieldPacker ( len ) ; for ( java.lang.Object arg : args ) { android.renderscript.FieldPacker.addToPack ( fp , arg ) ; } return fp ; }

Target:
static android.renderscript.FieldPacker createFromArray ( java.lang.Object [ ] args ) { android.renderscript.FieldPacker fp = new android.renderscript.FieldPacker ( ( ( RenderScript.sPointerSize ) * 8 ) ) ; for ( java.lang.Object arg : args ) { fp.addSafely ( arg ) ; } fp.resize ( fp.mPos ) ; return fp ; }
Source:
public void testPowerOn ( ) { mSimulatedCommands.setRadioPower ( true , null ) ; mSimulatedCommands.notifyRadioOn ( ) ; org.mockito.Mockito.when ( mUiccController.getUiccCard ( org.mockito.Mockito.anyInt ( ) ) ) . thenReturn ( mUiccCard ) ; mIccCardProxyUT.sendMessage ( mIccCardProxyUT.obtainMessage ( com.android.internal.telephony.uicc.IccCardProxyTest.EVENT_ICC_CHANGED ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( com.android.internal.telephony.uicc.IccCardProxyTest.SCARY_SLEEP_MS ) ; org.junit.Assert.assertEquals ( CommandsInterface.RadioState.RADIO_ON , mSimulatedCommands.getRadioState ( ) ) ; org.junit.Assert.assertEquals ( mIccCardProxyUT.getState ( ) , State.NOT_READY ) ; logd ( ( "IccCardProxy state = " + ( mIccCardProxyUT.getState ( ) ) ) ) ; }

Target:
public void testPowerOn ( ) { mSimulatedCommands.setRadioPower ( true , null ) ; mSimulatedCommands.notifyRadioOn ( ) ; org.mockito.Mockito.doReturn ( mUiccCard ) . when ( mUiccController ) . getUiccCard ( org.mockito.Mockito.anyInt ( ) ) ; mIccCardProxyUT.sendMessage ( mIccCardProxyUT.obtainMessage ( com.android.internal.telephony.uicc.IccCardProxyTest.EVENT_ICC_CHANGED ) ) ; com.android.internal.telephony.TelephonyTestUtils.waitForMs ( com.android.internal.telephony.uicc.IccCardProxyTest.SCARY_SLEEP_MS ) ; org.junit.Assert.assertEquals ( CommandsInterface.RadioState.RADIO_ON , mSimulatedCommands.getRadioState ( ) ) ; org.junit.Assert.assertEquals ( mIccCardProxyUT.getState ( ) , State.NOT_READY ) ; logd ( ( "IccCardProxy state = " + ( mIccCardProxyUT.getState ( ) ) ) ) ; }
Source:
public void onHold ( ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "onHold " + ( mCurrentCall ) ) ) ; if ( ( ! ( mClosed ) ) && ( ( mHeadsetProfile ) != null ) ) { mHeadsetProfile.holdCall ( mDevice ) ; } }

Target:
public synchronized void onDisconnect ( ) { if ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.DBG ) { android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( ( ( "onDisconnect call: " + ( mCurrentCall ) ) + " state: " ) + ( mClosed ) ) ) ; } if ( ! ( mClosed ) ) { mHeadsetProfile.terminateCall ( mDevice , mCurrentCall ) ; mLocalDisconnect = true ; } }
Source:
public boolean process ( java.util.Set < ? extends javax.lang.model.element.TypeElement > annotations , javax.annotation.processing.RoundEnvironment roundEnv ) { try { for ( javax.lang.model.element.Element annotatedElement : roundEnv.getElementsAnnotatedWith ( com.google.devtools.common.options.Option.class ) ) { checkModifiers ( annotatedElement ) ; checkInOptionBase ( annotatedElement ) ; } } catch ( com.google.devtools.common.options.processor.OptionProcessor.OptionProcessorException e ) { error ( e.elementInError , e.getMessage ( ) ) ; } return true ; }

Target:
public boolean process ( java.util.Set < ? extends javax.lang.model.element.TypeElement > annotations , javax.annotation.processing.RoundEnvironment roundEnv ) { for ( javax.lang.model.element.Element annotatedElement : roundEnv.getElementsAnnotatedWith ( com.google.devtools.common.options.Option.class ) ) { try { javax.lang.model.element.VariableElement optionField = ( ( javax.lang.model.element.VariableElement ) ( annotatedElement ) ) ; checkModifiers ( optionField ) ; checkInOptionBase ( optionField ) ; checkEffectTagRationality ( optionField ) ; checkMetadataTagAndCategoryRationality ( optionField ) ; } catch ( com.google.devtools.common.options.processor.OptionProcessor.OptionProcessorException e ) { error ( e.elementInError , e.getMessage ( ) ) ; } } return true ; }
Source:
private static int compareForRounding ( long n , long d ) { long halfD = d / 2 ; if ( ( n == halfD ) || ( n == ( - halfD ) ) ) { return ( ( int ) ( d & 1 ) ) ; } else { return java.math.BigDecimal.compareAbsoluteValues ( n , halfD ) ; } }

Target:
private static int compareForRounding ( long n , long d ) { long halfD = d / 2 ; if ( ( n == halfD ) || ( n == ( - halfD ) ) ) { int lsb = ( ( int ) ( d ) ) & 1 ; return - lsb ; } else { return java.math.BigDecimal.compareAbsoluteValues ( n , halfD ) ; } }
Source:
public int freeCache ( long freeStorageSize ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "freecache" ) ; builder.append ( ' ' ) ; builder.append ( java.lang.String.valueOf ( freeStorageSize ) ) ; return mInstaller.execute ( builder.toString ( ) ) ; }

Target:
public int freeCache ( java.lang.String uuid , long freeStorageSize ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "freecache" ) ; builder.append ( ' ' ) ; builder.append ( com.android.server.pm.Installer.escapeNull ( uuid ) ) ; builder.append ( ' ' ) ; builder.append ( java.lang.String.valueOf ( freeStorageSize ) ) ; return mInstaller.execute ( builder.toString ( ) ) ; }
Source:
public static java.lang.String getPropertyName ( org.jetbrains.java.generate.element.FieldElement fieldElement , com.intellij.openapi.project.Project project ) { java.lang.String name = fieldElement.getName ( ) ; com.intellij.psi.codeStyle.JavaCodeStyleManager codeStyleManager = com.intellij.psi.codeStyle.JavaCodeStyleManager.getInstance ( project ) ; return codeStyleManager.variableNameToPropertyName ( name , VariableKind.FIELD ) ; }

Target:
public static java.lang.String getPropertyName ( org.jetbrains.java.generate.element.FieldElement fieldElement , com.intellij.openapi.project.Project project ) { java.lang.String name = fieldElement.getName ( ) ; com.intellij.psi.codeStyle.JavaCodeStyleManager codeStyleManager = com.intellij.psi.codeStyle.JavaCodeStyleManager.getInstance ( project ) ; return codeStyleManager.variableNameToPropertyName ( name , ( fieldElement.isModifierStatic ( ) ? com.intellij.psi.codeStyle.VariableKind.STATIC_FIELD : com.intellij.psi.codeStyle.VariableKind.FIELD ) ) ; }
Source:
private android.graphics.drawable.Drawable getConnectionIcon ( ) { android.telecom.StatusHints statusHints = mPrimary.getTelecommCall ( ) . getDetails ( ) . getStatusHints ( ) ; if ( ( statusHints != null ) && ( ( statusHints.getIconResId ( ) ) != 0 ) ) { android.graphics.drawable.Drawable icon = statusHints.getIcon ( mContext ) ; if ( icon != null ) { return icon ; } } return getCallProviderIcon ( mPrimary ) ; }

Target:
private void maybeShowManageConferenceCallButton ( ) { getUi ( ) . showManageConferenceCallButton ( shouldShowManageConference ( ) ) ; }
Source:
public com.android.build.gradle.managed.ProductFlavor apply ( com.android.build.gradle.managed.ProductFlavor productFlavor ) { return new com.android.build.gradle.managed.adaptor.ProductFlavorAdaptor ( productFlavor ) ; }

Target:
public java.util.List < com.android.build.gradle.internal.ProductFlavorCombo < com.android.build.gradle.managed.ProductFlavor > > createProductFlavorCombo ( @ org.gradle.model.Path ( value = "android.productFlavors" ) org.gradle.model.ModelMap < com.android.build.gradle.managed.ProductFlavor > productFlavors ) { java.util.Set < java.lang.String > flavorDimensionList = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.android.build.gradle.managed.ProductFlavor flavor : productFlavors.values ( ) ) { if ( ( flavor.getDimension ( ) ) != null ) { flavorDimensionList.add ( flavor.getDimension ( ) ) ; } } return com.android.build.gradle.internal.ProductFlavorCombo.createCombinations ( com.google.common.collect.Lists.newArrayList ( flavorDimensionList ) , productFlavors.values ( ) ) ; }
Source:
public void copy1DRangeFrom ( int off , int count , byte [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFrom" ) ; validateIsInt8 ( ) ; copy1DRangeFromUnchecked ( off , count , d ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , java.lang.Object array ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , array , validateObjectIsPrimitiveArray ( array , true ) , java.lang.reflect.Array.getLength ( array ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private void dumpTimeRecs ( java.util.ArrayList < com.android.traceview.TimeLineView.Record > timeRecs ) { java.lang.System.out.format ( "\nid thread global start,end method\n" ) ; for ( com.android.traceview.TimeLineView.Record record : timeRecs ) { com.android.traceview.Call call = ( ( com.android.traceview.Call ) ( record.block ) ) ; long callTime = call.mThreadStartTime ; java.lang.System.out.format ( "%2d %6d %8d %8d %s\n" , call.getThreadId ( ) , callTime , call.mGlobalStartTime , call.mGlobalEndTime , call.getMethodData ( ) . getName ( ) ) ; } }

Target:
private void dumpCallTimes ( ) { java.lang.System.out.print ( "\nCall Times\n" ) ; java.lang.System.out.print ( "id t-start t-end g-start g-end excl. incl. method\n" ) ; for ( com.android.traceview.Call call : mCallList ) { java.lang.System.out.format ( "%2d %8d %8d %8d %8d %8d %8d %s\n" , call.getThreadId ( ) , call.mThreadStartTime , call.mThreadEndTime , call.mGlobalStartTime , call.mGlobalEndTime , call.mExclusiveCpuTime , call.mInclusiveCpuTime , call.getMethodData ( ) . getName ( ) ) ; } }
Source:
public void onPhoneDestroyed ( android.telecom.Phone phone ) { android.util.Log.i ( com.android.server.telecom.testapps.TestInCallServiceImpl.TAG , "onPhoneDestroyed" ) ; mPhone.removeListener ( mPhoneListener ) ; mPhone = null ; com.android.server.telecom.testapps.TestCallList.getInstance ( ) . clearCalls ( ) ; }

Target:
public boolean onUnbind ( android.content.Intent intent ) { android.util.Log.i ( com.android.server.telecom.testapps.TestInCallServiceImpl.TAG , "onPhoneDestroyed" ) ; mPhone.removeListener ( mPhoneListener ) ; mPhone = null ; com.android.server.telecom.testapps.TestCallList.getInstance ( ) . clearCalls ( ) ; com.android.server.telecom.testapps.TestInCallServiceImpl.sInstance = null ; return super . onUnbind ( intent ) ; }
Source:
public boolean isInEcm ( ) { if ( isPhoneTypeGsm ( ) ) { return false ; } else { return mIsPhoneInEcmState ; } }

Target:
public void exitEmergencyCallbackMode ( ) { if ( com.android.internal.telephony.GsmCdmaPhone.DBG ) { android.telephony.Rlog.d ( com.android.internal.telephony.GsmCdmaPhone.LOG_TAG , ( ( ( "exitEmergencyCallbackMode: mImsPhone=" + ( mImsPhone ) ) + " isPhoneTypeGsm=" ) + ( isPhoneTypeGsm ( ) ) ) ) ; } if ( isPhoneTypeGsm ( ) ) { if ( ( mImsPhone ) != null ) { mImsPhone.exitEmergencyCallbackMode ( ) ; } } else { if ( mWakeLock.isHeld ( ) ) { mWakeLock.release ( ) ; } mCi.exitEmergencyCallbackMode ( obtainMessage ( com.android.internal.telephony.EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE ) ) ; } }
Source:
public void adjustMasterVolume ( int steps , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.adjustMasterVolume ( steps , flags , mApplicationContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustMasterVolume" , e ) ; } }

Target:
public void adjustMasterVolume ( int steps , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { service.adjustMasterVolume ( steps , flags , getContext ( ) . getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustMasterVolume" , e ) ; } }
Source:
java.lang.String formatNsnUsingPattern ( java.lang.String nationalNumber , com.google.i18n.phonenumbers.Phonemetadata.NumberFormat formattingPattern , com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat numberFormat ) { return formatNsnUsingPattern ( nationalNumber , formattingPattern , numberFormat , null ) ; }

Target:
private java.lang.String formatNsn ( java.lang.String number , com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata metadata , com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat numberFormat , java.lang.String carrierCode ) { com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat [ ] intlNumberFormats = metadata.intlNumberFormat ; com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat [ ] availableFormats = ( ( ( intlNumberFormats.length ) == 0 ) || ( numberFormat == ( com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat.NATIONAL ) ) ) ? metadata.numberFormat : metadata.intlNumberFormat ; com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat formattingPattern = chooseFormattingPatternForNumber ( availableFormats , number ) ; return formattingPattern == null ? number : formatNsnUsingPattern ( number , formattingPattern , numberFormat , carrierCode ) ; }
Source:
boolean isMusicActive ( ) { final android.media.AudioManager am = ( ( android.media.AudioManager ) ( mContext.getSystemService ( Context.AUDIO_SERVICE ) ) ) ; if ( am == null ) { android.util.Log.w ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "isMusicActive: couldn't get AudioManager reference" ) ; return false ; } return am.isLocalOrRemoteMusicActive ( ) ; }

Target:
private void hideRecentApps ( boolean triggeredFromAltTab , boolean triggeredFromHome ) { mPreloadedRecentApps = false ; try { com.android.internal.statusbar.IStatusBarService statusbar = getStatusBarService ( ) ; if ( statusbar != null ) { statusbar.hideRecentApps ( triggeredFromAltTab , triggeredFromHome ) ; } } catch ( android.os.RemoteException e ) { android.util.Slog.e ( com.android.internal.policy.impl.PhoneWindowManager.TAG , "RemoteException when closing recent apps" , e ) ; mStatusBarService = null ; } }
Source:
public void setCurrency ( java.util.Currency currency ) { if ( currency != ( symbols.getCurrency ( ) ) ) { symbols.setCurrency ( currency ) ; } icuDecimalFormat.setDecimalFormatSymbols ( symbols.getIcuDecimalFormatSymbols ( ) ) ; }

Target:
public void setCurrency ( java.util.Currency currency ) { if ( ( currency != ( symbols.getCurrency ( ) ) ) || ( ! ( currency.getSymbol ( ) . equals ( symbols.getCurrencySymbol ( ) ) ) ) ) { symbols.setCurrency ( currency ) ; } icuDecimalFormat.setDecimalFormatSymbols ( symbols.getIcuDecimalFormatSymbols ( ) ) ; }
Source:
private static org.jetbrains.plugins.github.GithubAuthData getValidAuthData ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.project.Project project ) { final com.intellij.openapi.util.Ref < org.jetbrains.plugins.github.GithubAuthData > authDataRef = new com.intellij.openapi.util.Ref < org.jetbrains.plugins.github.GithubAuthData > ( ) ; com.intellij.openapi.progress.ProgressManager.getInstance ( ) . run ( new com.intellij.openapi.progress.Task.Modal ( project , "Access to GitHub" , true ) { public void run ( @ org.jetbrains.annotations.NotNull com.intellij.openapi.progress.ProgressIndicator indicator ) { authDataRef.set ( org.jetbrains.plugins.github.GithubUtil.getValidAuthDataFromConfig ( project , indicator ) ) ; } } ) ; return authDataRef.get ( ) ; }

Target:
private static org.jetbrains.plugins.github.util.GithubAuthData getValidAuthData ( @ org.jetbrains.annotations.NotNull final com.intellij.openapi.project.Project project ) throws java.io.IOException { return org.jetbrains.plugins.github.util.GithubUtil.computeValueInModal ( project , "Access to GitHub" , new com.intellij.util.ThrowableConvertor < com.intellij.openapi.progress.ProgressIndicator , org.jetbrains.plugins.github.util.GithubAuthData , java.io.IOException > ( ) { @ java.lang.Override public org.jetbrains.plugins.github.util.GithubAuthData convert ( com.intellij.openapi.progress.ProgressIndicator indicator ) throws java.io.IOException { return org.jetbrains.plugins.github.util.GithubUtil.getValidAuthDataFromConfig ( project , indicator ) ; } } ) ; }
Source:
public void testRsEnabledAnnotations ( ) throws java.io.IOException { java.io.File project = new java.io.File ( testDir , "extractRsEnabledAnnotations" ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "assembleDebug" ) ; java.io.File archiveFile = new java.io.File ( project , "build/outputs/aar/extractRsEnabledAnnotations-debug.aar" ) ; assertTrue ( archiveFile.isFile ( ) ) ; java.util.zip.ZipFile archive = null ; try { archive = new java.util.zip.ZipFile ( archiveFile ) ; java.util.zip.ZipEntry entry = archive.getEntry ( "annotations.zip" ) ; assertNotNull ( entry ) ; } finally { if ( archive != null ) { archive.close ( ) ; } } }

Target:
public void testRsEnabledAnnotations ( ) throws java.io.IOException { java.io.File project = new java.io.File ( regularDir , "extractRsEnabledAnnotations" ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , "assembleDebug" ) ; java.io.File archiveFile = new java.io.File ( project , "build/outputs/aar/extractRsEnabledAnnotations-debug.aar" ) ; assertTrue ( archiveFile.isFile ( ) ) ; java.util.zip.ZipFile archive = null ; try { archive = new java.util.zip.ZipFile ( archiveFile ) ; java.util.zip.ZipEntry entry = archive.getEntry ( "annotations.zip" ) ; assertNotNull ( entry ) ; } finally { if ( archive != null ) { archive.close ( ) ; } } }
Source:
public boolean isConnected ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return false ; } try { return ( android.bluetooth.BluetoothDevice.sService.getConnectionState ( this ) ) != ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_DISCONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }

Target:
public boolean isEncrypted ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return ( service.getConnectionState ( this ) ) > ( android.bluetooth.BluetoothDevice.CONNECTION_STATE_CONNECTED ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; return false ; } }
Source:
public void startInPlaceAnimationOnFrontMostApplication ( android.app.ActivityOptions opts ) throws android.os.RemoteException { if ( ( ( opts.getAnimationType ( ) ) != ( android.app.ActivityOptions.ANIM_CUSTOM_IN_PLACE ) ) || ( ( opts.getCustomInPlaceResId ( ) ) == 0 ) ) { throw new java.lang.IllegalArgumentException ( ( "Expected in-place ActivityOption " + "with valid animation" ) ) ; } mWindowManager.prepareAppTransition ( AppTransition.TRANSIT_TASK_IN_PLACE , false ) ; mWindowManager.overridePendingAppTransitionInPlace ( opts.getPackageName ( ) , opts.getCustomInPlaceResId ( ) ) ; mWindowManager.executeAppTransition ( ) ; }

Target:
public void startInPlaceAnimationOnFrontMostApplication ( android.app.ActivityOptions opts ) throws android.os.RemoteException { if ( ( ( opts.getAnimationType ( ) ) != ( android.app.ActivityOptions.ANIM_CUSTOM_IN_PLACE ) ) || ( ( opts.getCustomInPlaceResId ( ) ) == 0 ) ) { throw new java.lang.IllegalArgumentException ( ( "Expected in-place ActivityOption " + "with valid animation" ) ) ; } mWindowManager.prepareAppTransition ( com.android.server.wm.AppTransition.TRANSIT_TASK_IN_PLACE , false ) ; mWindowManager.overridePendingAppTransitionInPlace ( opts.getPackageName ( ) , opts.getCustomInPlaceResId ( ) ) ; mWindowManager.executeAppTransition ( ) ; }
Source:
void foo4 ( int [ ] array , int end ) { for ( int i = end ; i > 0 ; i -- ) { array [ ( i - 1 ) ] = 1 ; sum += array [ ( i - 1 ) ] ; } }

Target:
void foo4 ( int [ ] array , int end , boolean expectInterpreter ) { for ( int i = end ; i > 0 ; i -- ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ ( i - 1 ) ] = 1 ; sum += array [ ( i - 1 ) ] ; } }
Source:
public void testLintWarningOnGetSignaturesFlagInBitwiseOrExpression ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/GetSignaturesBitwiseOrTest.java:11: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + ( ( " .getPackageInfo(\"some.pkg\", GET_GIDS | GET_SIGNATURES | GET_PROVIDERS);\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( ( "src/test/pkg/GetSignaturesBitwiseOrTest.java.txt" + "=>src/test/pkg/GetSignaturesBitwiseOrTest.java" ) ) ) ; }

Target:
public void testLintWarningOnGetSignaturesFlagInBitwiseOrExpression ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/GetSignaturesBitwiseOrTest.java:11: Information: Reading app signatures from getPackageInfo: The app signatures could be exploited if not validated properly; see issue explanation for details. [PackageManagerGetSignatures]\n" + ( ( " .getPackageInfo(\"some.pkg\", GET_GIDS | GET_SIGNATURES | GET_PROVIDERS);\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( java ( "src/test/pkg/GetSignaturesBitwiseOrTest.java" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( "package test.pkg;\n" + "\n" ) + "import static android.content.pm.PackageManager.*;\n" ) + "\n" ) + "import android.app.Activity;\n" ) + "import android.content.pm.PackageManager;\n" ) + "\n" ) + "public class GetSignaturesBitwiseOrTest extends Activity {\n" ) + " public void failLintCheck() throws Exception {\n" ) + " getPackageManager()\n" ) + " .getPackageInfo(\"some.pkg\", GET_GIDS | GET_SIGNATURES | GET_PROVIDERS);\n" ) + " }\n" ) + "}" ) ) ) ) ) ; }
Source:
public java.lang.String getSdkLocation ( ) { return mManager.getLocation ( ) ; }

Target:
public java.lang.String getSdkOsLocation ( ) { java.lang.String path = ( ( mManager ) == null ) ? null : mManager.getLocation ( ) ; if ( path != null ) { if ( ( ( path.length ( ) ) > 0 ) && ( ! ( path.endsWith ( java.io.File.separator ) ) ) ) { path = path + ( java.io.File.separator ) ; } } return path ; }
Source:
public boolean enableDisableTdls ( boolean enable , java.lang.String macAdd , com.android.server.wifi.WifiNative.TdlsEventHandler tdlsCallBack ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { com.android.server.wifi.WifiNative.sTdlsEventHandler = tdlsCallBack ; return com.android.server.wifi.WifiNative.enableDisableTdlsNative ( com.android.server.wifi.WifiNative.sWlan0Index , enable , macAdd ) ; } }

Target:
public boolean enableDisableTdls ( boolean enable , java.lang.String macAdd , com.android.server.wifi.WifiNative.TdlsEventHandler tdlsCallBack ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "enableDisableTdls not supported" ) ; return false ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { com.android.server.wifi.WifiNative.sTdlsEventHandler = tdlsCallBack ; return com.android.server.wifi.WifiNative.enableDisableTdlsNative ( com.android.server.wifi.WifiNative.sWlan0Index , enable , macAdd ) ; } } }
Source:
public boolean setNetworkSSID ( android.net.wifi.WifiConfiguration config , java.lang.String ssid ) { if ( config == null ) { return false ; } if ( mVerboseLoggingEnabled ) localLog ( ( "setNetworkSSID: " + ( config.networkId ) ) ) ; if ( ! ( mWifiNative.setNetworkVariable ( config.networkId , WifiConfiguration.ssidVarName , com.android.server.wifi.WifiSupplicantControl.encodeSSID ( ssid ) ) ) ) { loge ( ( "Set SSID of network in wpa_supplicant failed on " + ( config.networkId ) ) ) ; return false ; } config.SSID = ssid ; return true ; }

Target:
public boolean setConfiguredNetworkBSSID ( java.lang.String bssid ) { if ( mVerboseLoggingEnabled ) localLog ( ( "setConfiguredNetworkBSSID: " + ( mSupplicantNetworkId ) ) ) ; if ( ! ( mWifiNative.setNetworkVariable ( mSupplicantNetworkId , WifiConfiguration.bssidVarName , bssid ) ) ) { loge ( ( "Set BSSID of network in wpa_supplicant failed on " + ( mSupplicantNetworkId ) ) ) ; return false ; } return true ; }
Source:
public com.android.ims.internal.IImsEcbm getEcbmInterface ( int slotId , int featureType ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.getEcbmInterface ( ) ; } } return null ; }

Target:
public com.android.ims.internal.IImsEcbm getEcbmInterface ( int slotId , int featureType ) throws android.os.RemoteException { enforceCallingOrSelfPermission ( android.Manifest.permission.MODIFY_PHONE_STATE , "getEcbmInterface" ) ; synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.getEcbmInterface ( ) ; } } return null ; }
Source:
private static java.lang.Object openDexFile ( java.lang.String sourceName , java.lang.String outputName , int flags ) throws java.io.IOException { return dalvik.system.DexFile.openDexFileNative ( new java.io.File ( sourceName ) . getAbsolutePath ( ) , ( outputName == null ? null : new java.io.File ( outputName ) . getAbsolutePath ( ) ) , flags ) ; }

Target:
private static java.lang.Object openDexFile ( java.lang.String sourceName , java.lang.String outputName , int flags , java.lang.ClassLoader loader ) throws java.io.IOException { return dalvik.system.DexFile.openDexFileNative ( new java.io.File ( sourceName ) . getAbsolutePath ( ) , ( outputName == null ? null : new java.io.File ( outputName ) . getAbsolutePath ( ) ) , flags , loader ) ; }