auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void disableService ( ) { if ( ! ( android.autofillservice.cts.Helper.hasAutofillFeature ( ) ) ) return ; if ( ! ( android.autofillservice.cts.AutoFillServiceTestCase.isServiceEnabled ( ) ) ) return ; final android.autofillservice.cts.OneTimeSettingsListener observer = new android.autofillservice.cts.OneTimeSettingsListener ( android.autofillservice.cts.AutoFillServiceTestCase.getContext ( ) , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; android.autofillservice.cts.Helper.runShellCommand ( "settings delete secure %s" , android.provider.Settings.Secure.AUTOFILL_SERVICE ) ; observer.assertCalled ( ) ; android.autofillservice.cts.AutoFillServiceTestCase.assertServiceDisabled ( ) ; android.autofillservice.cts.InstrumentedAutoFillService.setIgnoreUnexpectedRequests ( false ) ; }

Target:
protected void enableService ( ) { android.autofillservice.cts.Helper.enableAutofillService ( android.autofillservice.cts.Helper.getContext ( ) , android.autofillservice.cts.InstrumentedAutoFillService.SERVICE_NAME ) ; android.autofillservice.cts.InstrumentedAutoFillService.setIgnoreUnexpectedRequests ( false ) ; }
Source:
private static io.appium.droiddriver.finders.Predicate < ? super io.appium.droiddriver.UiElement > [ ] getPredicates ( io.appium.droiddriver.finders.MatchFinder ... finders ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) io.appium.droiddriver.finders.Predicate < ? super io.appium.droiddriver.UiElement > [ ] predicates = new io.appium.droiddriver.finders.Predicate [ finders.length ] ; for ( int i = 0 ; i < ( finders.length ) ; i ++ ) { predicates [ i ] = finders [ i ] . predicate ; } return predicates ; }

Target:
private static java.util.List < io.appium.droiddriver.finders.Predicate < ? super io.appium.droiddriver.UiElement > > getPredicates ( io.appium.droiddriver.finders.MatchFinder ... finders ) { java.util.ArrayList < io.appium.droiddriver.finders.Predicate < ? super io.appium.droiddriver.UiElement > > predicates = new java.util.ArrayList ( finders.length ) ; for ( int i = 0 ; i < ( finders.length ) ; i ++ ) { predicates.add ( finders [ i ] . predicate ) ; } return predicates ; }
Source:
public void testGetInputStream ( ) throws java.io.IOException { java.lang.String resourceName = "resources/" + "test.rtf" ; java.net.URL url = java.lang.ClassLoader.getSystemClassLoader ( ) . getResource ( resourceName ) ; assertNotNull ( url ) ; java.net.URL anchorUrl = new java.net.URL ( url , "#anchor" ) ; assertNotNull ( ( "Cannot find test resource " + resourceName ) , anchorUrl ) ; libcore.net.url.FileURLConnection conn = new libcore.net.url.FileURLConnection ( anchorUrl ) ; assertNotNull ( conn.getInputStream ( ) ) ; java.lang.String localURLString = "file://localhost/" + ( url.getFile ( ) ) ; java.net.URL localURL = new java.net.URL ( localURLString ) ; conn = new libcore.net.url.FileURLConnection ( localURL ) ; assertNotNull ( conn.getInputStream ( ) ) ; assertEquals ( "file" , conn.getURL ( ) . getProtocol ( ) ) ; }

Target:
public void testGetInputStream ( ) throws java.io.IOException { java.net.URL url = createTempFileWithContent ( org.apache.harmony.tests.internal.net.www.protocol.file.FileURLConnectionTest.RESOURCE_NAME ) ; assertNotNull ( url ) ; java.net.URL anchorUrl = new java.net.URL ( url , "#anchor" ) ; assertNotNull ( ( "Cannot find test resource " + ( org.apache.harmony.tests.internal.net.www.protocol.file.FileURLConnectionTest.RESOURCE_NAME ) ) , anchorUrl ) ; libcore.net.url.FileURLConnection conn = new libcore.net.url.FileURLConnection ( anchorUrl ) ; assertNotNull ( conn.getInputStream ( ) ) ; }
Source:
public java.nio.ByteBuffer putChar ( char value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , ( ( short ) ( value ) ) , order ) ; position = newPosition ; return this ; }

Target:
public java.nio.ByteBuffer putChar ( char value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.CHAR ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeShort ( ( ( offset ) + ( position ) ) , ( ( short ) ( value ) ) , order ) ; position = newPosition ; return this ; }
Source:
public static java.util.List < com.android.sdklib.devices.Device > parse ( java.io.File devicesFile ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { javax.xml.parsers.SAXParser parser = com.android.sdklib.devices.DeviceParser.getParser ( ) ; com.android.sdklib.devices.DeviceParser.DeviceHandler dHandler = new com.android.sdklib.devices.DeviceParser.DeviceHandler ( devicesFile.getAbsoluteFile ( ) . getParentFile ( ) ) ; parser.parse ( devicesFile , dHandler ) ; return dHandler.getDevices ( ) ; }

Target:
public static java.util.List < com.android.sdklib.devices.Device > parse ( @ com.android.annotations.NonNull java.io.File devicesFile ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.io.InputStream stream = null ; try { stream = new java.io.FileInputStream ( devicesFile ) ; return com.android.sdklib.devices.DeviceParser.parseImpl ( stream , devicesFile.getAbsoluteFile ( ) . getParentFile ( ) ) ; } finally { if ( stream != null ) { try { stream.close ( ) ; } catch ( java.io.IOException ignore ) { } } } }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { com.google.common.base.Preconditions.checkArgument ( com.google.devtools.build.android.desugar.BitFlags.isSet ( access , Opcodes.ACC_INTERFACE ) ) ; com.google.common.base.Preconditions.checkState ( ( ( this . interfaces ) == null ) ) ; this . interfaces = com.google.common.collect.ImmutableList.copyOf ( interfaces ) ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { com.google.common.base.Preconditions.checkArgument ( com.google.devtools.build.android.desugar.io.BitFlags.isSet ( access , Opcodes.ACC_INTERFACE ) ) ; com.google.common.base.Preconditions.checkState ( ( ( this . interfaces ) == null ) ) ; this . interfaces = com.google.common.collect.ImmutableList.copyOf ( interfaces ) ; }
Source:
public android.content.Intent getIntent ( java.lang.Class newActivityClass ) { android.content.Intent intent = new android.content.Intent ( com.android.phone.SubscriptionInfoHelper.mContext , newActivityClass ) ; if ( hasSubId ( ) ) { intent.putExtra ( com.android.phone.SubscriptionInfoHelper.SUB_ID_EXTRA , com.android.phone.SubscriptionInfoHelper.mSubId ) ; } if ( ! ( android.text.TextUtils.isEmpty ( com.android.phone.SubscriptionInfoHelper.mSubLabel ) ) ) { intent.putExtra ( com.android.phone.SubscriptionInfoHelper.SUB_LABEL_EXTRA , com.android.phone.SubscriptionInfoHelper.mSubLabel ) ; } return intent ; }

Target:
public android.content.Intent getIntent ( java.lang.Class newActivityClass ) { android.content.Intent intent = new android.content.Intent ( mContext , newActivityClass ) ; if ( hasSubId ( ) ) { intent.putExtra ( com.android.phone.SubscriptionInfoHelper.SUB_ID_EXTRA , mSubId ) ; } if ( ! ( android.text.TextUtils.isEmpty ( mSubLabel ) ) ) { intent.putExtra ( com.android.phone.SubscriptionInfoHelper.SUB_LABEL_EXTRA , mSubLabel ) ; } return intent ; }
Source:
public int fetchIsimRecords ( com.android.internal.telephony.IccFileHandler iccFh , android.os.Handler h ) { iccFh.loadEFTransparent ( com.android.internal.telephony.IccConstants.EF_IMPI , h.obtainMessage ( IccRecords.EVENT_GET_ICC_RECORD_DONE , new com.android.internal.telephony.ims.IsimUiccRecords.EfIsimImpiLoaded ( ) ) ) ; iccFh.loadEFLinearFixedAll ( com.android.internal.telephony.IccConstants.EF_IMPU , h.obtainMessage ( IccRecords.EVENT_GET_ICC_RECORD_DONE , new com.android.internal.telephony.ims.IsimUiccRecords.EfIsimImpuLoaded ( ) ) ) ; iccFh.loadEFTransparent ( com.android.internal.telephony.IccConstants.EF_DOMAIN , h.obtainMessage ( IccRecords.EVENT_GET_ICC_RECORD_DONE , new com.android.internal.telephony.ims.IsimUiccRecords.EfIsimDomainLoaded ( ) ) ) ; return 3 ; }

Target:
public int getDisplayRule ( java.lang.String plmn ) { return 0 ; }
Source:
private void blockingInitAndVerify ( final java.lang.String engine , int errorCode ) throws java.lang.InterruptedException { android.speech.tts.TextToSpeech.OnInitListener listener = com.google.testing.littlemock.LittleMock.mock ( TextToSpeech.OnInitListener.class ) ; final java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.speech.tts.TextToSpeechTests.doCountDown ( latch ) . when ( listener ) . onInit ( errorCode ) ; mTts = new android.speech.tts.TextToSpeech ( getInstrumentation ( ) . getTargetContext ( ) , listener , engine , com.android.speech.tts.TextToSpeechTests.MOCK_PACKAGE , false ) ; com.android.speech.tts.TextToSpeechTests.awaitCountDown ( latch , 5 , java.util.concurrent.TimeUnit.SECONDS ) ; }

Target:
private void blockingInitAndVerify ( final java.lang.String engine , int errorCode ) throws java.lang.InterruptedException { android.speech.tts.TextToSpeech.OnInitListener listener = org.mockito.Mockito.mock ( TextToSpeech.OnInitListener.class ) ; final java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.speech.tts.TextToSpeechTests.doCountDown ( latch ) . when ( listener ) . onInit ( errorCode ) ; mTts = new android.speech.tts.TextToSpeech ( getInstrumentation ( ) . getTargetContext ( ) , listener , engine , com.android.speech.tts.TextToSpeechTests.MOCK_PACKAGE , false ) ; com.android.speech.tts.TextToSpeechTests.awaitCountDown ( latch , 5 , java.util.concurrent.TimeUnit.SECONDS ) ; }
Source:
public void startVoiceSearch ( ) { android.content.Intent intent = new android.content.Intent ( android.speech.RecognizerIntent.ACTION_WEB_SEARCH ) ; intent.putExtra ( RecognizerIntent.EXTRA_LANGUAGE_MODEL , RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH ) ; intent.putExtra ( RecognizerIntent.EXTRA_CALLING_PACKAGE , mActivity.getComponentName ( ) . flattenToString ( ) ) ; intent.putExtra ( com.android.browser.Controller.SEND_APP_ID_EXTRA , false ) ; intent.putExtra ( RecognizerIntent.EXTRA_WEB_SEARCH_ONLY , true ) ; mActivity.startActivity ( intent ) ; }

Target:
protected void onPreExecute ( ) { java.lang.CharSequence message = mActivity.getText ( R.string.saving_snapshot ) ; mProgressDialog = android.app.ProgressDialog.show ( mActivity , null , message , true , true , this ) ; mValues = mTab.createSnapshotValues ( ) ; }
Source:
public static int $noinline$returnInt ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 100000 ; ++ i ) { } while ( ! ( Main.isInOsrCode ( "$noinline$returnInt" ) ) ) { } java.lang.System.out.println ( i ) ; return 53 ; }

Target:
public static int $noinline$returnInt ( ) { boolean interpreting = Main.isInInterpreter ( "$noinline$returnInt" ) ; int i = 0 ; for ( ; i < 100000 ; ++ i ) { } if ( interpreting ) { while ( ! ( Main.isInOsrCode ( "$noinline$returnInt" ) ) ) { } } java.lang.System.out.println ( i ) ; return 53 ; }
Source:
public void writeContent ( @ javax.annotation.Nonnull com.android.jack.jayce.v0003.io.JayceInternalWriterImpl out ) throws java.io.IOException { assert ( retentionPolicy ) != null ; out.writeRetentionPolicyEnum ( retentionPolicy ) ; out.writeInt ( modifiers ) ; out.writeId ( signature ) ; out.writeIds ( superInterfaces ) ; out.writeId ( enclosingType ) ; out.writeIds ( inners ) ; out.writeNodes ( fields ) ; out.writeNodes ( methods ) ; out.writeNodes ( annotations ) ; out.writeNodes ( markers ) ; }

Target:
public void writeContent ( @ javax.annotation.Nonnull com.android.jack.jayce.v0003.io.JayceInternalWriterImpl out ) throws java.io.IOException { assert ( retentionPolicy ) != null ; out.writeRetentionPolicyEnum ( retentionPolicy ) ; out.writeInt ( modifiers ) ; out.writeId ( signature ) ; out.writeIds ( superInterfaces ) ; out.writeId ( enclosingType ) ; out.writeIds ( inners ) ; out.writeNodes ( getFields ( ) ) ; out.writeNodes ( getMethods ( ) ) ; out.writeNodes ( annotations ) ; out.writeNodes ( markers ) ; }
Source:
private void setActiveMediaSession ( android.media.session.MediaSession.Token token ) { com.android.bluetooth.avrcp.MediaController activeController = new com.android.bluetooth.avrcp.MediaController ( mContext , token ) ; if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "Set active media session " + ( activeController.getPackageName ( ) ) ) ) ; addMediaPlayerController ( activeController ) ; setAddressedMediaSessionPackage ( activeController.getPackageName ( ) ) ; }

Target:
private void setActiveMediaSession ( android.media.session.MediaSession.Token token ) { com.android.bluetooth.avrcp.MediaController activeController = new com.android.bluetooth.avrcp.MediaController ( mContext , token ) ; if ( activeController.getPackageName ( ) . equals ( "com.android.server.telecom" ) ) { android.util.Log.d ( com.android.bluetooth.avrcp.Avrcp.TAG , "Ignore active media session change to telecom" ) ; return ; } if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) { android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "Set active media session " + ( activeController.getPackageName ( ) ) ) ) ; } addMediaPlayerController ( activeController ) ; setAddressedMediaSessionPackage ( activeController.getPackageName ( ) ) ; }
Source:
public boolean isSimPinEnabled ( ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.isSimPinEnabled ( getOpPackageName ( ) ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#isSimPinEnabled" , e ) ; } return false ; }

Target:
public boolean setOperatorBrandOverride ( int subId , java.lang.String brand ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setOperatorBrandOverride ( subId , brand ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setOperatorBrandOverride RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setOperatorBrandOverride NPE" , ex ) ; } return false ; }
Source:
protected void onDetachedFromWindow ( ) { super . onDetachedFromWindow ( ) ; if ( ( mLayer ) != null ) { boolean success = executeHardwareAction ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { destroySurface ( ) ; } } ) ; if ( ! success ) { android.util.Log.w ( android.view.TextureView.LOG_TAG , ( "TextureView was not able to destroy its surface: " + ( this ) ) ) ; } } }

Target:
protected void onVisibilityChanged ( android.view.View changedView , int visibility ) { super . onVisibilityChanged ( changedView , visibility ) ; if ( ( mSurface ) != null ) { if ( visibility == ( VISIBLE ) ) { if ( ( mLayer ) != null ) { mSurface.setOnFrameAvailableListener ( mUpdateListener , mAttachInfo.mHandler ) ; } updateLayerAndInvalidate ( ) ; } else { mSurface.setOnFrameAvailableListener ( null ) ; } } }
Source:
private boolean removeMenu ( ) { try { if ( ( ( mCurrentMenu.items.size ( ) ) == 1 ) && ( ( mCurrentMenu.items.get ( 0 ) ) == null ) ) { return true ; } } catch ( java.lang.NullPointerException e ) { com.android.internal.telephony.gsm.stk.StkLog.d ( this , "Unable to get Menu's items size" ) ; return true ; } return false ; }

Target:
private boolean removeMenu ( ) { try { if ( ( ( mCurrentMenu.items.size ( ) ) == 1 ) && ( ( mCurrentMenu.items.get ( 0 ) ) == null ) ) { return true ; } } catch ( java.lang.NullPointerException e ) { com.android.internal.telephony.cat.CatLog.d ( this , "Unable to get Menu's items size" ) ; return true ; } return false ; }
Source:
private void startSearch ( java.lang.String initialQuery , boolean selectInitialQuery , android.os.Bundle appSearchData , boolean globalSearch ) { if ( appSearchData == null ) { appSearchData = createGoogleSearchSourceBundle ( com.android.browser.Controller.GOOGLE_SEARCH_SOURCE_TYPE ) ; } com.android.browser.search.SearchEngine searchEngine = mSettings.getSearchEngine ( ) ; if ( ( searchEngine != null ) && ( ! ( searchEngine.supportsVoiceSearch ( ) ) ) ) { appSearchData.putBoolean ( SearchManager.DISABLE_VOICE_SEARCH , true ) ; } mActivity.startSearch ( initialQuery , selectInitialQuery , appSearchData , globalSearch ) ; }

Target:
private com.android.browser.Tab getNextTab ( ) { int pos = ( mTabControl.getCurrentPosition ( ) ) + 1 ; if ( pos >= ( mTabControl.getTabCount ( ) ) ) { pos = 0 ; } return mTabControl.getTab ( pos ) ; }
Source:
public void setUp ( int repoXsdLevel ) throws java.lang.Exception { mRepoXsdLevel = repoXsdLevel ; mLog = new com.android.sdklib.mock.MockLog ( ) ; mFakeSdk = makeFakeSdk ( ) ; mSdkManager = com.android.sdklib.SdkManager.createManager ( mFakeSdk.getAbsolutePath ( ) , mLog ) ; assertNotNull ( "SdkManager location was invalid" , mSdkManager ) ; mAvdManager = new com.android.sdklib.SdkManagerTestCase.TmpAvdManager ( mSdkManager , mLog ) ; }

Target:
public void setUp ( int repoXsdLevel ) throws java.lang.Exception { mRepoXsdLevel = repoXsdLevel ; mLog = new com.android.sdklib.mock.MockLog ( ) ; makeFakeAndroidHome ( ) ; makeFakeSdk ( ) ; mSdkManager = com.android.sdklib.SdkManager.createManager ( mFakeSdk.getAbsolutePath ( ) , mLog ) ; assertNotNull ( "SdkManager location was invalid" , mSdkManager ) ; mAvdManager = new com.android.sdklib.SdkManagerTestCase.TmpAvdManager ( mSdkManager , mLog ) ; }
Source:
private com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker getOrCreateRFICMarker ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface accessorClass ) { com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker marker = accessorClass.getMarker ( com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker.class ) ; if ( marker == null ) { com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker newMarker = new com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker ( ) ; marker = accessorClass.addMarkerIfAbsent ( newMarker ) ; if ( marker == null ) { marker = newMarker ; } } return marker ; }

Target:
private com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker getOrCreateRFICMarker ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface accessorClass ) { com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker marker = accessorClass.getMarker ( com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker.class ) ; if ( marker == null ) { marker = new com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker ( ) ; accessorClass.addMarker ( marker ) ; } return marker ; }
Source:
public java.io.OutputStream openWrite ( ) throws java.io.IOException { assert ! ( isClosed ( ) ) ; return new java.security.DigestOutputStream ( file.openWrite ( ) , this . mdFactory.create ( ) ) { @ java.lang.Override public void close ( ) throws java.io.IOException { super . close ( ) ; com.android.sched.vfs.MessageDigestOutputVFS.MessageDigestOutputVFile.this . digest = new java.lang.String ( encode ( getMessageDigest ( ) . digest ( ) ) ) ; } } ; }

Target:
public java.io.OutputStream getOutputStream ( ) throws com.android.sched.util.file.WrongPermissionException { assert ! ( isClosed ( ) ) ; return new java.security.DigestOutputStream ( file.getOutputStream ( ) , this . mdFactory.create ( ) ) { @ java.lang.Override public void close ( ) throws java.io.IOException { super . close ( ) ; com.android.sched.vfs.MessageDigestOutputVFS.MessageDigestOutputVFile.this . digest = new java.lang.String ( encode ( getMessageDigest ( ) . digest ( ) ) ) ; } } ; }
Source:
public void setRadioPower ( boolean on , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_RADIO_POWER , result ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( on ? 1 : 0 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ( on ? " on" : " off" ) ) ) ; } send ( rr ) ; }

Target:
public void setRadioPower ( boolean on , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_RADIO_POWER , result , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( on ? 1 : 0 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + ( on ? " on" : " off" ) ) ) ; } send ( rr ) ; }
Source:
public void run ( ) { mResult = mActivity.mProcessor.getInstrumentationResult ( mTestName ) ; android.util.Log.v ( TAG , ( ( ( "Benchmark for test \"" + ( mTestName.toString ( ) ) ) + "\" is: " ) + ( mResult ) ) ) ; synchronized ( this ) { this . notify ( ) ; } }

Target:
public void run ( ) { mResult = mActivity.mProcessor.getInstrumentationResult ( mTestName ) ; android.util.Log.v ( TAG , ( ( ( "Benchmark for test \"" + ( mTestName.toString ( ) ) ) + "\" is: " ) + ( ( mResult.getAvg ( ) ) * 1000.0F ) ) ) ; synchronized ( this ) { this . notify ( ) ; } }
Source:
public com.android.server.wifi.hotspot2.ANQPData getEntry ( com.android.server.wifi.hotspot2.NetworkDetail network ) { com.android.server.wifi.hotspot2.ANQPData data ; com.android.server.wifi.hotspot2.AnqpCache.CacheKey key = com.android.server.wifi.hotspot2.AnqpCache.CacheKey.buildKey ( network , com.android.server.wifi.hotspot2.AnqpCache.STANDARD_ESS ) ; synchronized ( mANQPCache ) { data = mANQPCache.get ( key ) ; } return ( data != null ) && ( data.isValid ( network ) ) ? data : null ; }

Target:
public com.android.server.wifi.hotspot2.ANQPData getEntry ( com.android.server.wifi.hotspot2.ANQPNetworkKey key ) { return mANQPCache.get ( key ) ; }
Source:
public void test_getBucketLabel_invalid ( ) throws java.lang.Exception { libcore.icu.AlphabeticIndex ai = new libcore.icu.AlphabeticIndex ( java.util.Locale.US ) ; try { ai.getBucketLabel ( ( - 1 ) ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } try { ai.getBucketLabel ( 123456 ) ; fail ( ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void test_getBucketIndex_NPE ( ) throws java.lang.Exception { libcore.icu.ImmutableIndex ii = libcore.icu.AlphabeticIndexTest.createIndex ( java.util.Locale.US ) ; try { ii.getBucketIndex ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }
Source:
void applyTunnelModeTransform ( android.net.IpSecManager.IpSecTunnelInterface tunnel , int direction , android.net.IpSecTransform transform ) throws java.io.IOException { }

Target:
public void applyTunnelModeTransform ( android.net.IpSecManager.IpSecTunnelInterface tunnel , int direction , android.net.IpSecTransform transform ) throws java.io.IOException { try { mService.applyTunnelModeTransform ( tunnel.getResourceId ( ) , direction , transform.getResourceId ( ) ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; if ( skipTest ( ) ) return ; com.android.bluetooth.mapclient.MapUtils.setMnsService ( mMockMnsService ) ; startServices ( ) ; cleanUpInstanceMap ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; org.junit.Assume.assumeTrue ( "Ignore test when MapClientService is not enabled" , mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_mapmce ) ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.android.bluetooth.TestUtils.setAdapterService ( mAdapterService ) ; com.android.bluetooth.mapclient.MapUtils.setMnsService ( mMockMnsService ) ; com.android.bluetooth.TestUtils.startService ( mServiceRule , com.android.bluetooth.mapclient.MapClientService.class ) ; mService = com.android.bluetooth.mapclient.MapClientService.getMapClientService ( ) ; org.junit.Assert.assertNotNull ( mService ) ; cleanUpInstanceMap ( ) ; mAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; }
Source:
public boolean getDataEnabled ( int subId ) { boolean retVal = false ; try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) retVal = telephony.getDataEnabled ( subId ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getDataEnabled" , e ) ; } catch ( java.lang.NullPointerException e ) { } return retVal ; }

Target:
public boolean setNetworkSelectionModeManual ( java.lang.String operatorNumeric , boolean persistSelection ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.setNetworkSelectionModeManual ( getSubId ( ) , operatorNumeric , persistSelection ) ; } } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual NPE" , ex ) ; } return false ; }
Source:
public java.lang.String getGradleBuildscript ( ) { return ( ( ( ( ( ( ( ( ( ( ( "buildscript {\n" + ( " repositories {\n" + " maven { url '" ) ) + ( getRepoDir ( ) . toString ( ) ) ) + "\' }\n" ) + " }\n" ) + " dependencies {\n" ) + " classpath \"com.android.tools.build:gradle" ) + ( experimentalMode ? "-experimental" : "" ) ) + ":" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.ANDROID_GRADLE_VERSION ) ) + "\"\n" ) + " }\n" ) + "}\n" ; }

Target:
public java.lang.String getGradleBuildscript ( ) { return ( ( ( ( "apply from: \"../commonHeader.gradle\"\n" + "buildscript { apply from: \"../commonBuildScript" ) + ( experimentalMode ? "Experimental" : "" ) ) + ".gradle\", to: buildscript }\n" ) + "\n" ) + "apply from: \"../commonLocalRepo.gradle\"\n" ; }
Source:
public void testDecode_nonPrintableBytes_urlAlphabet ( ) throws java.lang.Exception { assertNull ( libcore.io.Base64Test.decodeToBytes ( "_w==" ) ) ; assertNull ( libcore.io.Base64Test.decodeToBytes ( "_-4=" ) ) ; assertNull ( libcore.io.Base64Test.decodeToBytes ( "_-7d" ) ) ; assertNull ( libcore.io.Base64Test.decodeToBytes ( "_-7dzA==" ) ) ; assertNull ( libcore.io.Base64Test.decodeToBytes ( "_-7dzLs=" ) ) ; assertNull ( libcore.io.Base64Test.decodeToBytes ( "_-7dzLuq" ) ) ; assertNull ( libcore.io.Base64Test.decodeToBytes ( "_-7dzLuqmQ==" ) ) ; assertNull ( libcore.io.Base64Test.decodeToBytes ( "_-7dzLuqmYg=" ) ) ; }

Target:
private static java.lang.String decodeToString ( java.lang.String in ) throws java.lang.Exception { byte [ ] bytes = libcore.io.Base64Test.asciiToBytes ( in ) ; byte [ ] out = libcore.io.Base64.decode ( bytes ) ; if ( out == null ) { return null ; } return libcore.io.Base64Test.bytesToAscii ( out ) ; }
Source:
public void testReverting ( ) throws java.lang.Exception { createPatch ( ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; preparationResult.patch.getActions ( ) . add ( new com.intellij.updater.PatchFileCreatorTest.MyFailOnApplyPatchAction ( ) ) ; assertNothingHasChanged ( preparationResult , new java.util.HashMap < java.lang.String , com.intellij.updater.ValidationResult.Option > ( ) ) ; }

Target:
public void testApplyWhenCommonFileChangesStrict ( ) throws java.lang.Exception { myPatchSpec.setStrict ( true ) ; com.intellij.updater.Patch patch = com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.openapi.util.io.FileUtil.copy ( new java.io.File ( myOlderDir , "/lib/bootstrap.jar" ) , new java.io.File ( myOlderDir , "/lib/boot.jar" ) ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertEquals ( 1 , preparationResult.validationResults.size ( ) ) ; assertEquals ( new com.intellij.updater.ValidationResult ( ValidationResult.Kind.ERROR , "lib/boot.jar" , ValidationResult.Action.VALIDATE , ValidationResult.MODIFIED_MESSAGE , ValidationResult.Option.NONE ) , preparationResult.validationResults.get ( 0 ) ) ; }
Source:
public static < K extends java.lang.Comparable < ? super K > , V > com.google.common.collect.ImmutableSortedMap < K , V > of ( K k1 , V v1 , K k2 , V v2 , K k3 , V v3 ) { return new com.google.common.collect.ImmutableSortedMap.Builder < K , V > ( com.google.common.collect.Ordering.natural ( ) ) . put ( k1 , v1 ) . put ( k2 , v2 ) . put ( k3 , v3 ) . build ( ) ; }

Target:
public static < K extends java.lang.Comparable < ? super K > , V > com.google.common.collect.ImmutableSortedMap < K , V > of ( K k1 , V v1 , K k2 , V v2 , K k3 , V v3 ) { return com.google.common.collect.ImmutableSortedMap.fromEntries ( com.google.common.collect.Ordering.natural ( ) , false , 3 , com.google.common.collect.ImmutableMap.entryOf ( k1 , v1 ) , com.google.common.collect.ImmutableMap.entryOf ( k2 , v2 ) , com.google.common.collect.ImmutableMap.entryOf ( k3 , v3 ) ) ; }
Source:
public static java.util.concurrent.ExecutorService getExitingExecutorService ( java.util.concurrent.ThreadPoolExecutor executor , long terminationTimeout , java.util.concurrent.TimeUnit timeUnit ) { executor.setThreadFactory ( new com.google.common.util.concurrent.ThreadFactoryBuilder ( ) . setDaemon ( true ) . setThreadFactory ( executor.getThreadFactory ( ) ) . build ( ) ) ; java.util.concurrent.ExecutorService service = java.util.concurrent.Executors.unconfigurableExecutorService ( executor ) ; com.google.common.util.concurrent.MoreExecutors.addDelayedShutdownHook ( service , terminationTimeout , timeUnit ) ; return service ; }

Target:
public static java.util.concurrent.ExecutorService getExitingExecutorService ( java.util.concurrent.ThreadPoolExecutor executor , long terminationTimeout , java.util.concurrent.TimeUnit timeUnit ) { return new com.google.common.util.concurrent.MoreExecutors.Application ( ) . getExitingExecutorService ( executor , terminationTimeout , timeUnit ) ; }
Source:
public void testAllCharacterDevicesAreSecure ( ) throws java.lang.Exception { java.util.Set < java.io.File > insecure = getAllInsecureDevicesInDirAndSubdir ( new java.io.File ( "/dev" ) , FileUtils.S_IFCHR ) ; java.util.Set < java.io.File > insecurePts = getAllInsecureDevicesInDirAndSubdir ( new java.io.File ( "/dev/pts" ) , FileUtils.S_IFCHR ) ; insecure.removeAll ( android.permission.cts.FileSystemPermissionTest.CHAR_DEV_EXCEPTIONS ) ; insecure.removeAll ( insecurePts ) ; assertTrue ( ( "Found insecure character devices: " + ( insecure.toString ( ) ) ) , insecure.isEmpty ( ) ) ; }

Target:
public void testAllCharacterDevicesAreSecure ( ) throws java.lang.Exception { java.util.Set < java.io.File > insecure = android.permission.cts.FileSystemPermissionTest.getAllInsecureDevicesInDirAndSubdir ( new java.io.File ( "/dev" ) , FileUtils.S_IFCHR ) ; java.util.Set < java.io.File > insecurePts = android.permission.cts.FileSystemPermissionTest.getAllInsecureDevicesInDirAndSubdir ( new java.io.File ( "/dev/pts" ) , FileUtils.S_IFCHR ) ; insecure.removeAll ( android.permission.cts.FileSystemPermissionTest.CHAR_DEV_EXCEPTIONS ) ; insecure.removeAll ( insecurePts ) ; assertTrue ( ( "Found insecure character devices: " + ( insecure.toString ( ) ) ) , insecure.isEmpty ( ) ) ; }
Source:
public java.lang.String isValid ( java.lang.String newText ) { if ( ( newText == null ) || ( ( newText.length ( ) ) == 0 ) ) { return "Error: URL field is empty. Please enter a URL." ; } if ( ( ( ( ! ( newText.startsWith ( "file://" ) ) ) && ( ! ( newText.startsWith ( "ftp://" ) ) ) ) && ( ! ( newText.startsWith ( "http://" ) ) ) ) && ( ! ( newText.startsWith ( "https://" ) ) ) ) { return "Error: The URL must start by one of file://, ftp://, http:// or https://" ; } for ( com.android.sdklib.internal.repository.SdkSource s : knowSources ) { if ( newText.equalsIgnoreCase ( s.getUrl ( ) ) ) { return "Error : This site is already listed." ; } } return null ; }

Target:
public java.lang.String isValid ( java.lang.String newText ) { newText = ( newText == null ) ? null : newText.trim ( ) ; if ( ( newText == null ) || ( ( newText.length ( ) ) == 0 ) ) { return "Error: URL field is empty. Please enter a URL." ; } if ( ( ( ( ! ( newText.startsWith ( "file://" ) ) ) && ( ! ( newText.startsWith ( "ftp://" ) ) ) ) && ( ! ( newText.startsWith ( "http://" ) ) ) ) && ( ! ( newText.startsWith ( "https://" ) ) ) ) { return "Error: The URL must start by one of file://, ftp://, http:// or https://" ; } for ( com.android.sdklib.internal.repository.SdkSource s : knowSources ) { if ( newText.equalsIgnoreCase ( s.getUrl ( ) ) ) { return "Error : This site is already listed." ; } } return null ; }
Source:
public java.lang.String getFolderSegment ( com.android.sdklib.IAndroidTarget target ) { if ( target == null ) { return com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier.getFolderSegment ( mVersion ) ; } com.android.sdklib.AndroidVersion version = target.getVersion ( ) ; if ( ( version.getApiLevel ( ) ) >= 3 ) { return com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier.getFolderSegment ( mVersion ) ; } return "" ; }

Target:
public java.lang.String getLongDisplayValue ( ) { if ( ( mVersion ) != ( com.android.ide.eclipse.adt.internal.resources.configurations.VersionQualifier.DEFAULT_VERSION ) ) { return java.lang.String.format ( "API Level %1$d" , mVersion ) ; } return "" ; }
Source:
protected int checkArray ( java.lang.String msg , java.util.Locale [ ] array , java.lang.String [ ] expected ) { java.lang.String [ ] strs = new java.lang.String [ array.length ] ; for ( int i = 0 ; i < ( array.length ) ; ++ i ) strs [ i ] = array [ i ] . toString ( ) ; return checkArray ( msg , strs , expected ) ; }

Target:
protected static int checkArray ( java.lang.String msg , java.util.Locale [ ] array , java.lang.String [ ] expected ) { java.lang.String [ ] strs = new java.lang.String [ array.length ] ; for ( int i = 0 ; i < ( array.length ) ; ++ i ) { strs [ i ] = array [ i ] . toString ( ) ; } return android.icu.dev.test.TestFmwk.checkArray ( msg , strs , expected ) ; }
Source:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky , int sendingUser ) { synchronized ( this ) { requestPssAllProcsLocked ( android.os.SystemClock.uptimeMillis ( ) , true , false ) ; } }

Target:
public final void activityResumed ( android.os.IBinder token ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; synchronized ( this ) { com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; if ( stack != null ) { stack.activityResumedLocked ( token ) ; } } android.os.Binder.restoreCallingIdentity ( origId ) ; }
Source:
public final long long_literal ( ) throws org.jf.smali.RecognitionException { long value = 0 ; org.antlr.runtime.tree.CommonTree LONG_LITERAL205 = null ; try { { LONG_LITERAL205 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.LONG_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_LONG_LITERAL_in_long_literal3453 ) ) ) ; value = org.jf.smali.LiteralTools.parseLong ( ( LONG_LITERAL205 != null ? LONG_LITERAL205.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final double double_literal ( ) throws org.jf.smali.RecognitionException { double value = 0.0 ; org.antlr.runtime.tree.CommonTree DOUBLE_LITERAL214 = null ; try { { DOUBLE_LITERAL214 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.DOUBLE_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_DOUBLE_LITERAL_in_double_literal3570 ) ) ) ; value = org.jf.smali.LiteralTools.parseDouble ( ( DOUBLE_LITERAL214 != null ? DOUBLE_LITERAL214.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public void onDestroy ( ) { com.android.dialer.common.LogUtil.enterBlock ( "DialerCall.onDestroy" ) ; if ( ( rttTranscript ) != null ) { com.google.common.util.concurrent.Futures.addCallback ( com.android.dialer.rtt.RttTranscriptUtil.saveRttTranscript ( context , rttTranscript ) , new com.android.dialer.common.concurrent.DefaultFutureCallback ( ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; rttTranscript = null ; } }

Target:
void onRemovedFromCallList ( ) { com.android.dialer.common.LogUtil.enterBlock ( "DialerCall.onRemovedFromCallList" ) ; videoTechManager.dispatchRemovedFromCallList ( ) ; if ( ( rttTranscript ) != null ) { com.google.common.util.concurrent.Futures.addCallback ( com.android.dialer.rtt.RttTranscriptUtil.saveRttTranscript ( context , rttTranscript ) , new com.android.dialer.common.concurrent.DefaultFutureCallback ( ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; rttTranscript = null ; } }
Source:
public org.eclipse.core.resources.IFile getFile ( ) { java.lang.String reference = mId ; if ( ! ( reference.contains ( com.android.ide.eclipse.adt.AndroidConstants.WS_SEP ) ) ) { reference = ( ( com.android.sdklib.SdkConstants.FD_LAYOUT ) + ( com.android.ide.eclipse.adt.AndroidConstants.WS_SEP ) ) + reference ; } java.lang.String projectPath = ( ( ( ( com.android.sdklib.SdkConstants.FD_RESOURCES ) + ( com.android.ide.eclipse.adt.AndroidConstants.WS_SEP ) ) + reference ) + '.' ) + ( com.android.ide.eclipse.adt.AndroidConstants.EXT_XML ) ; org.eclipse.core.resources.IResource member = mProject.findMember ( projectPath ) ; if ( member instanceof org.eclipse.core.resources.IFile ) { return ( ( org.eclipse.core.resources.IFile ) ( member ) ) ; } return null ; }

Target:
public org.eclipse.core.resources.IFile getFile ( ) { java.lang.String reference = mId ; if ( ! ( reference.contains ( com.android.ide.eclipse.adt.AdtConstants.WS_SEP ) ) ) { reference = ( ( com.android.sdklib.SdkConstants.FD_LAYOUT ) + ( com.android.ide.eclipse.adt.AdtConstants.WS_SEP ) ) + reference ; } java.lang.String projectPath = ( ( ( ( com.android.sdklib.SdkConstants.FD_RESOURCES ) + ( com.android.ide.eclipse.adt.AdtConstants.WS_SEP ) ) + reference ) + '.' ) + ( com.android.ide.eclipse.adt.AdtConstants.EXT_XML ) ; org.eclipse.core.resources.IResource member = mProject.findMember ( projectPath ) ; if ( member instanceof org.eclipse.core.resources.IFile ) { return ( ( org.eclipse.core.resources.IFile ) ( member ) ) ; } return null ; }
Source:
private static void addText ( java.lang.StringBuilder sb , org.w3c.dom.Node node ) { if ( ( node.getNodeType ( ) ) == ( org.w3c.dom.Node.TEXT_NODE ) ) { sb.append ( com.android.tools.lint.checks.StringFormatDetector.strip ( node.getNodeValue ( ) . trim ( ) ) ) ; } else { org.w3c.dom.NodeList childNodes = node.getChildNodes ( ) ; for ( int i = 0 , n = childNodes.getLength ( ) ; i < n ; i ++ ) { com.android.tools.lint.checks.StringFormatDetector.addText ( sb , childNodes.item ( i ) ) ; } } }

Target:
private static void addText ( java.lang.StringBuilder sb , org.w3c.dom.Node node ) { if ( ( node.getNodeType ( ) ) == ( org.w3c.dom.Node.TEXT_NODE ) ) { sb.append ( com.android.tools.lint.checks.StringFormatDetector.stripQuotes ( node.getNodeValue ( ) . trim ( ) ) ) ; } else { org.w3c.dom.NodeList childNodes = node.getChildNodes ( ) ; for ( int i = 0 , n = childNodes.getLength ( ) ; i < n ; i ++ ) { com.android.tools.lint.checks.StringFormatDetector.addText ( sb , childNodes.item ( i ) ) ; } } }
Source:
public void fireBeforeActionPerformed ( com.intellij.openapi.actionSystem.impl.AnAction action , com.intellij.openapi.actionSystem.impl.DataContext dataContext , com.intellij.openapi.actionSystem.impl.AnActionEvent event ) { if ( action != null ) { myPrevPerformedActionId = myLastPreformedActionId ; myLastPreformedActionId = getId ( action ) ; com.intellij.idea.IdeaLogger.ourLastActionId = myLastPreformedActionId ; } for ( com.intellij.openapi.actionSystem.ex.AnActionListener listener : myActionListeners ) { listener.beforeActionPerformed ( action , dataContext , event ) ; } }

Target:
public void fireBeforeActionPerformed ( com.intellij.openapi.actionSystem.impl.AnAction action , com.intellij.openapi.actionSystem.impl.DataContext dataContext , com.intellij.openapi.actionSystem.impl.AnActionEvent event ) { if ( action != null ) { if ( ! ( com.intellij.openapi.actionSystem.impl.ActionManagerImpl.ourActionsExcludedFromTracking.containsKey ( action.getClass ( ) ) ) ) { SystemHealthMonitor.ourStudioActionCount.incrementAndGet ( ) ; } myPrevPerformedActionId = myLastPreformedActionId ; myLastPreformedActionId = getId ( action ) ; com.intellij.idea.IdeaLogger.ourLastActionId = myLastPreformedActionId ; } for ( com.intellij.openapi.actionSystem.ex.AnActionListener listener : myActionListeners ) { listener.beforeActionPerformed ( action , dataContext , event ) ; } }
Source:
public void exit ( ) { if ( com.android.internal.telephony.dataconnection.DataConnection.DBG ) log ( ( "DcActiveState: exit dc=" + ( this ) ) ) ; mNetworkInfo.setDetailedState ( NetworkInfo.DetailedState.DISCONNECTED , mNetworkInfo.getReason ( ) , mNetworkInfo.getExtraInfo ( ) ) ; mNetworkAgent.sendNetworkInfo ( mNetworkInfo ) ; mNetworkAgent = null ; }

Target:
public void exit ( ) { if ( com.android.internal.telephony.dataconnection.DataConnection.DBG ) log ( ( "DcActiveState: exit dc=" + ( this ) ) ) ; java.lang.String reason = mNetworkInfo.getReason ( ) ; if ( ( ( mDisconnectParams ) != null ) && ( ( mDisconnectParams.mReason ) != null ) ) { reason = mDisconnectParams.mReason ; } else if ( ( mDcFailCause ) != null ) { reason = mDcFailCause.toString ( ) ; } mNetworkInfo.setDetailedState ( NetworkInfo.DetailedState.DISCONNECTED , reason , mNetworkInfo.getExtraInfo ( ) ) ; mNetworkAgent.sendNetworkInfo ( mNetworkInfo ) ; mNetworkAgent = null ; }
Source:
public static boolean hasProxyChanged ( android.net.wifi.WifiConfiguration existingConfig , android.net.wifi.WifiConfiguration newConfig ) { if ( ( existingConfig.getProxySettings ( ) ) != ( newConfig.getProxySettings ( ) ) ) { return true ; } if ( ( newConfig.getProxySettings ( ) ) == ( IpConfiguration.ProxySettings.PAC ) ) { android.net.ProxyInfo existingHttpProxy = existingConfig.getHttpProxy ( ) ; android.net.ProxyInfo newHttpProxy = newConfig.getHttpProxy ( ) ; if ( existingHttpProxy != null ) { return ! ( existingHttpProxy.equals ( newHttpProxy ) ) ; } else { return newHttpProxy != null ; } } return false ; }

Target:
public static boolean hasProxyChanged ( android.net.wifi.WifiConfiguration existingConfig , android.net.wifi.WifiConfiguration newConfig ) { if ( existingConfig == null ) { return ( newConfig.getProxySettings ( ) ) != ( IpConfiguration.ProxySettings.NONE ) ; } if ( ( newConfig.getProxySettings ( ) ) != ( existingConfig.getProxySettings ( ) ) ) { return true ; } return ! ( java.util.Objects.equals ( existingConfig.getHttpProxy ( ) , newConfig.getHttpProxy ( ) ) ) ; }
Source:
public void setWifiLinkLayerStats ( java.lang.String iface , int enable ) { if ( iface == null ) return ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.setWifiLinkLayerStatsNative ( com.android.server.wifi.WifiNative.sWlan0Index , enable ) ; } } }

Target:
public void setWifiLinkLayerStats ( java.lang.String iface , int enable ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { } else { if ( iface == null ) return ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.setWifiLinkLayerStatsNative ( com.android.server.wifi.WifiNative.sWlan0Index , enable ) ; } } } }
Source:
public com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier.Density getDensity ( ) { if ( ( mCurrentConfig ) != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier qual = mCurrentConfig.getPixelDensityQualifier ( ) ; if ( qual != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier.Density d = qual.getValue ( ) ; if ( d != ( com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier.Density.NODPI ) ) { return d ; } } } return com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier.Density.MEDIUM ; }

Target:
public com.android.sdklib.resources.Density getDensity ( ) { if ( ( mCurrentConfig ) != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.PixelDensityQualifier qual = mCurrentConfig.getPixelDensityQualifier ( ) ; if ( qual != null ) { com.android.sdklib.resources.Density d = qual.getValue ( ) ; if ( d != ( com.android.sdklib.resources.Density.NODPI ) ) { return d ; } } } return com.android.sdklib.resources.Density.MEDIUM ; }
Source:
public void testGetExampleShortNumberForCost ( ) { assertEquals ( "3010" , shortInfo.getExampleShortNumberForCost ( RegionCode.FR , ShortNumberInfo.ShortNumberCost.TOLL_FREE ) ) ; assertEquals ( "1023" , shortInfo.getExampleShortNumberForCost ( RegionCode.FR , ShortNumberInfo.ShortNumberCost.STANDARD_RATE ) ) ; assertEquals ( "42000" , shortInfo.getExampleShortNumberForCost ( RegionCode.FR , ShortNumberInfo.ShortNumberCost.PREMIUM_RATE ) ) ; assertEquals ( "" , shortInfo.getExampleShortNumberForCost ( RegionCode.FR , ShortNumberInfo.ShortNumberCost.UNKNOWN_COST ) ) ; }

Target:
public void testGetExampleShortNumber ( ) { assertEquals ( "8711" , com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.getExampleShortNumber ( RegionCode.AM ) ) ; assertEquals ( "1010" , com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.getExampleShortNumber ( RegionCode.FR ) ) ; assertEquals ( "" , com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.getExampleShortNumber ( RegionCode.UN001 ) ) ; assertEquals ( "" , com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.getExampleShortNumber ( null ) ) ; }
Source:
private void maybeLogMessage ( com.android.internal.util.State state , int what ) { if ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.DBG ) { android.util.Log.d ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.TAG , ( ( ( ( ( state.getName ( ) ) + " got " ) + ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.sMagicDecoderRing.get ( what , java.lang.Integer.toString ( what ) ) ) ) + ", Iface = " ) + ( mIfaceName ) ) ) ; } }

Target:
private void logMessage ( com.android.internal.util.State state , int what ) { mLog.log ( ( ( ( state.getName ( ) ) + " got " ) + ( com.android.server.connectivity.tethering.TetherInterfaceStateMachine.sMagicDecoderRing.get ( what , java.lang.Integer.toString ( what ) ) ) ) ) ; }
Source:
public void testCheckAndSet ( ) { assertEquals ( true , rq.checkAndSet ( "rUS" , config ) ) ; assertTrue ( ( ( config.getRegionQualifier ( ) ) != null ) ) ; assertEquals ( "US" , config.getRegionQualifier ( ) . getValue ( ) ) ; assertEquals ( "rUS" , config.getRegionQualifier ( ) . toString ( ) ) ; }

Target:
public void testCheckAndSet ( ) { assertEquals ( true , rq.checkAndSet ( "rUS" , config ) ) ; assertTrue ( ( ( config.getRegionQualifier ( ) ) != null ) ) ; assertEquals ( "US" , config.getRegionQualifier ( ) . getValue ( ) ) ; assertEquals ( "US" , config.getEffectiveRegion ( ) . getValue ( ) ) ; assertEquals ( "rUS" , config.getRegionQualifier ( ) . toString ( ) ) ; assertEquals ( "rUS" , config.getRegionQualifier ( ) . toString ( ) ) ; }