auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void updateA2dpAudioState ( int state ) { boolean isPlaying = state == ( android.bluetooth.BluetoothA2dp.STATE_PLAYING ) ; if ( isPlaying != ( isPlayingState ( mCurrentPlayState ) ) ) { if ( isPlaying && ( ! ( mAudioManager.isMusicActive ( ) ) ) ) return ; android.media.session.PlaybackState.Builder builder = new android.media.session.PlaybackState.Builder ( ) ; if ( isPlaying ) { builder.setState ( PlaybackState.STATE_PLAYING , PlaybackState.PLAYBACK_POSITION_UNKNOWN , 1.0F ) ; } else { builder.setState ( PlaybackState.STATE_PAUSED , PlaybackState.PLAYBACK_POSITION_UNKNOWN , 0.0F ) ; } updatePlayPauseState ( builder.build ( ) ) ; } }

Target:
private void updateA2dpAudioState ( int state ) { boolean isPlaying = state == ( android.bluetooth.BluetoothA2dp.STATE_PLAYING ) ; if ( isPlaying != ( isPlayingState ( mCurrentPlayState ) ) ) { if ( isPlaying && ( ! ( mAudioManager.isMusicActive ( ) ) ) ) return ; android.media.session.PlaybackState.Builder builder = new android.media.session.PlaybackState.Builder ( ) ; if ( isPlaying ) { builder.setState ( PlaybackState.STATE_PLAYING , PlaybackState.PLAYBACK_POSITION_UNKNOWN , 1.0F ) ; } else { builder.setState ( PlaybackState.STATE_PAUSED , PlaybackState.PLAYBACK_POSITION_UNKNOWN , 0.0F ) ; } updatePlaybackState ( builder.build ( ) ) ; } }
Source:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof com.android.tools.rpclib.binary.Handle ) ) { return false ; } if ( other == ( this ) ) { return true ; } return java.util.Arrays.equals ( mValue , ( ( com.android.tools.rpclib.binary.Handle ) ( other ) ) . mValue ) ; }

Target:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof com.android.tools.rpclib.binary.BinaryID ) ) { return false ; } if ( other == ( this ) ) { return true ; } return java.util.Arrays.equals ( mValue , ( ( com.android.tools.rpclib.binary.BinaryID ) ( other ) ) . mValue ) ; }
Source:
public void addChoices ( java.util.List < java.lang.String > titles , java.util.List < java.net.URL > iconUrls , java.util.List < java.lang.String > ids ) { com.android.ide.common.api.IAttributeInfo info = first.getAttributeInfo ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , attributeName ) ; if ( info != null ) { assert info.getFormats ( ) . contains ( IAttributeInfo.Format.FLAG ) ; for ( java.lang.String name : info.getFlagValues ( ) ) { titles.add ( getAttributeDisplayName ( name ) ) ; ids.add ( name ) ; } } }

Target:
public void addChoices ( java.util.List < java.lang.String > titles , java.util.List < java.net.URL > iconUrls , java.util.List < java.lang.String > ids ) { com.android.ide.common.api.IAttributeInfo info = first.getAttributeInfo ( com.android.util.XmlUtils.ANDROID_URI , attributeName ) ; if ( info != null ) { assert info.getFormats ( ) . contains ( IAttributeInfo.Format.FLAG ) ; for ( java.lang.String name : info.getFlagValues ( ) ) { titles.add ( getAttributeDisplayName ( name ) ) ; ids.add ( name ) ; } } }
Source:
private int getMinSize ( javax.swing.JComponent component ) { if ( isHonorMinimumSize ( ) ) { if ( ( ( ( ( component != null ) && ( ( myFirstComponent ) != null ) ) && ( myFirstComponent.isVisible ( ) ) ) && ( ( myLastComponent ) != null ) ) && ( myLastComponent.isVisible ( ) ) ) { if ( getOrientation ( ) ) { return component.getMinimumSize ( ) . height ; } else { return component.getMinimumSize ( ) . width ; } } } return com.intellij.openapi.ui.ThreeComponentsSplitter.MIN_SIZE ; }

Target:
private int getMinSize ( javax.swing.JComponent component ) { if ( isHonorMinimumSize ( ) ) { if ( ( ( ( ( component != null ) && ( ( myFirstComponent ) != null ) ) && ( myFirstComponent.isVisible ( ) ) ) && ( ( myLastComponent ) != null ) ) && ( myLastComponent.isVisible ( ) ) ) { if ( getOrientation ( ) ) { return component.getMinimumSize ( ) . height ; } else { return component.getMinimumSize ( ) . width ; } } } return myMinSize ; }
Source:
private void broadcastConfigChangedIntent ( int phoneId ) { android.content.Intent intent = new android.content.Intent ( android.telephony.CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED ) ; intent.addFlags ( ( ( android.content.Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) | ( android.content.Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND ) ) ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , phoneId ) ; android.app.ActivityManager.broadcastStickyIntent ( intent , UserHandle.USER_ALL ) ; mHasSentConfigChange [ phoneId ] = true ; }

Target:
private void broadcastConfigChangedIntent ( int phoneId ) { android.content.Intent intent = new android.content.Intent ( android.telephony.CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED ) ; intent.addFlags ( ( ( android.content.Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) | ( android.content.Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND ) ) ) ; android.telephony.SubscriptionManager.putPhoneIdAndSubIdExtra ( intent , phoneId ) ; intent.putExtra ( CarrierConfigManager.EXTRA_SLOT_INDEX , phoneId ) ; android.app.ActivityManager.broadcastStickyIntent ( intent , UserHandle.USER_ALL ) ; mHasSentConfigChange [ phoneId ] = true ; }
Source:
protected boolean isValidSourceFile ( @ com.android.annotations.NonNull java.io.File sourceFolder , @ com.android.annotations.NonNull java.io.File file ) { if ( ! ( super . isValidSourceFile ( sourceFolder , file ) ) ) { return false ; } java.io.File parent = file.getParentFile ( ) ; while ( ( parent != null ) && ( ! ( parent.equals ( sourceFolder ) ) ) ) { if ( ! ( com.android.ide.common.packaging.PackagingUtils.checkFolderForPackaging ( parent.getName ( ) ) ) ) { return false ; } parent = parent.getParentFile ( ) ; } return parent != null ; }

Target:
protected boolean isValidSourceFile ( @ com.android.annotations.NonNull java.io.File sourceFolder , @ com.android.annotations.NonNull java.io.File file ) { if ( ! ( super . isValidSourceFile ( sourceFolder , file ) ) ) { return false ; } java.io.File parent = file.getParentFile ( ) ; while ( ( parent != null ) && ( ! ( parent.equals ( sourceFolder ) ) ) ) { if ( isIgnored ( parent ) ) { return false ; } parent = parent.getParentFile ( ) ; } return parent != null ; }
Source:
public void onMeasure ( final int widthMeasureSpec , final int heightMeasureSpec ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; } } ) ; return ; } mAwContents.onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; }

Target:
public boolean requestChildRectangleOnScreen ( final android.view.View child , final android.graphics.Rect rect , final boolean immediate ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestChildRectangleOnScreen ( child , rect , immediate ) ; } } ) ; return ret ; } return mAwContents.requestChildRectangleOnScreen ( child , rect , immediate ) ; }
Source:
public static com.ibm.icu.util.UResourceBundle getBundleInstance ( java.lang.String baseName , java.lang.String localeID , java.lang.ClassLoader root , boolean disableFallback ) { com.ibm.icu.util.UResourceBundle b = com.ibm.icu.impl.ICUResourceBundle.instantiateBundle ( baseName , localeID , root , disableFallback ) ; if ( b == null ) { throw new java.util.MissingResourceException ( ( ( ( ( "Could not find the bundle " + baseName ) + "/" ) + localeID ) + ".res" ) , "" , "" ) ; } return b ; }

Target:
public static com.ibm.icu.util.UResourceBundle getBundleInstance ( java.lang.String baseName , java.lang.String localeID , java.lang.ClassLoader root , boolean disableFallback ) { com.ibm.icu.util.UResourceBundle b = com.ibm.icu.impl.ICUResourceBundle.instantiateBundle ( baseName , localeID , root , ( disableFallback ? com.ibm.icu.impl.ICUResourceBundle.OpenType.DIRECT : com.ibm.icu.impl.ICUResourceBundle.OpenType.LOCALE_DEFAULT_ROOT ) ) ; if ( b == null ) { throw new java.util.MissingResourceException ( ( ( ( ( "Could not find the bundle " + baseName ) + "/" ) + localeID ) + ".res" ) , "" , "" ) ; } return b ; }
Source:
private void handleReceivedMessage ( byte [ ] buffer , int numRead ) throws java.io.IOException { java.lang.String text = new java.lang.String ( buffer , 0 , numRead ) . trim ( ) ; mHandler.sendReceivedMessage ( text ) ; if ( ( mNextMessageNumber ) <= 10 ) { sendMessage ( ) ; } else { mHandler.sendEmptyMessage ( com.android.cts.verifier.usb.UsbAccessoryTestActivity.MessageHandler.TEST_PASSED ) ; } }

Target:
private boolean handleReceivedMessage ( byte [ ] buffer , int numRead ) throws java.io.IOException { java.lang.String text = new java.lang.String ( buffer , 0 , numRead ) . trim ( ) ; mHandler.sendReceivedMessage ( text ) ; if ( ( mNextMessageNumber ) <= 10 ) { sendMessage ( ) ; return false ; } else { mHandler.sendEmptyMessage ( com.android.cts.verifier.usb.UsbAccessoryTestActivity.MessageHandler.STAGE_PASSED ) ; return true ; } }
Source:
public void sendMessage ( int peerId , @ android.annotation.Nullable byte [ ] message , int messageId , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called post GC on WifiNanManager" ) ; return ; } mgr.sendMessage ( mSessionId , peerId , message , messageId , retryCount ) ; } }

Target:
public void sendMessage ( int peerId , @ android.annotation.Nullable byte [ ] message , int messageId , int retryCount ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "sendMessage: called post GC on WifiNanManager" ) ; return ; } mgr.sendMessage ( mClientId , mSessionId , peerId , message , messageId , retryCount ) ; } }
Source:
public void delete ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException , com.android.sched.util.file.CannotDeleteFileException { assert ! ( isClosed ( ) ) ; try { getSectionVFS ( fileType ) . getRootInputOutputVDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) . delete ( ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputOutputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { return getSectionVFS ( fileType ) . getRootDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public final void testOffsetBy ( ) { com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r = new com.android.ide.eclipse.adt.editors.layout.gscripts.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.eclipse.adt.editors.layout.gscripts.Rect r2 = r.offsetBy ( 100 , 200 ) ; assertSame ( r2 , r ) ; assertEquals ( 103 , r.x ) ; assertEquals ( 204 , r.y ) ; assertEquals ( 20 , r.w ) ; assertEquals ( 30 , r.h ) ; }

Target:
public final void testOffsetBy ( ) { com.android.ide.common.api.Rect r = new com.android.ide.common.api.Rect ( 3 , 4 , 20 , 30 ) ; com.android.ide.common.api.Rect r2 = r.offsetBy ( 100 , 200 ) ; assertSame ( r2 , r ) ; assertEquals ( 103 , r.x ) ; assertEquals ( 204 , r.y ) ; assertEquals ( 20 , r.w ) ; assertEquals ( 30 , r.h ) ; }
Source:
public void getSimIdentityEapAkaPrime ( ) { android.telephony.TelephonyManager tm = mock ( android.telephony.TelephonyManager.class ) ; when ( tm.getSubscriberId ( ) ) . thenReturn ( "3214561234567890" ) ; when ( tm.getSimState ( ) ) . thenReturn ( TelephonyManager.SIM_STATE_READY ) ; when ( tm.getSimOperator ( ) ) . thenReturn ( "321456" ) ; assertEquals ( "63214561234567890@wlan.mnc456.mcc321.3gppnetwork.org" , com.android.server.wifi.util.TelephonyUtil.getSimIdentity ( tm , WifiEnterpriseConfig.Eap.AKA_PRIME ) ) ; }

Target:
public void getSimIdentityEapAka ( ) { android.telephony.TelephonyManager tm = mock ( android.telephony.TelephonyManager.class ) ; when ( tm.getSubscriberId ( ) ) . thenReturn ( "3214561234567890" ) ; when ( tm.getSimState ( ) ) . thenReturn ( TelephonyManager.SIM_STATE_READY ) ; when ( tm.getSimOperator ( ) ) . thenReturn ( "321456" ) ; assertEquals ( "03214561234567890@wlan.mnc456.mcc321.3gppnetwork.org" , com.android.server.wifi.util.TelephonyUtil.getSimIdentity ( tm , com.android.server.wifi.WifiConfigurationTestUtil.createEapNetwork ( WifiEnterpriseConfig.Eap.AKA , WifiEnterpriseConfig.Phase2.NONE ) ) ) ; assertEquals ( "03214561234567890@wlan.mnc456.mcc321.3gppnetwork.org" , com.android.server.wifi.util.TelephonyUtil.getSimIdentity ( tm , com.android.server.wifi.WifiConfigurationTestUtil.createEapNetwork ( WifiEnterpriseConfig.Eap.PEAP , WifiEnterpriseConfig.Phase2.AKA ) ) ) ; }
Source:
public void testEmptyFileAndEmptyBuffer ( ) throws java.lang.Exception { byte [ ] emptyInput = libcore.java.util.zip.InflaterTest.deflate ( new byte [ 0 ] , null ) ; java.util.zip.Inflater inflater = new java.util.zip.Inflater ( ) ; inflater.setInput ( emptyInput ) ; assertFalse ( inflater.finished ( ) ) ; assertEquals ( 0 , inflater.inflate ( new byte [ 0 ] , 0 , 0 ) ) ; assertTrue ( inflater.finished ( ) ) ; }

Target:
public void testEmptyFileAndEmptyBuffer ( ) throws java.lang.Exception { byte [ ] emptyInput = libcore.java.util.zip.InflaterTest.deflate ( new byte [ 0 ] , null ) ; java.util.zip.Inflater inflater = new java.util.zip.Inflater ( ) ; inflater.setInput ( emptyInput ) ; assertFalse ( inflater.finished ( ) ) ; assertEquals ( 0 , inflater.inflate ( new byte [ 0 ] , 0 , 0 ) ) ; assertTrue ( inflater.finished ( ) ) ; inflater.end ( ) ; }
Source:
public void runTest ( junit.framework.Test test , junit.framework.TestResult result ) { if ( test instanceof android.test.AndroidTestCase ) { ( ( android.test.AndroidTestCase ) ( test ) ) . setContext ( mInstr.getTargetContext ( ) ) ; } if ( test instanceof android.test.InstrumentationTestCase ) { ( ( android.test.InstrumentationTestCase ) ( test ) ) . injectInstrumentation ( mInstr ) ; } super . runTest ( test , result ) ; }

Target:
public void runTest ( junit.framework.Test test , junit.framework.TestResult result ) { if ( test instanceof android.test.AndroidTestCase ) { ( ( android.test.AndroidTestCase ) ( test ) ) . setContext ( mInstr.getTargetContext ( ) ) ; } if ( test instanceof android.test.InstrumentationTestCase ) { ( ( android.test.InstrumentationTestCase ) ( test ) ) . injectInstrumentation ( mInstr ) ; } if ( test instanceof com.android.test.BundleTest ) { ( ( com.android.test.BundleTest ) ( test ) ) . injectBundle ( mBundle ) ; } super . runTest ( test , result ) ; }
Source:
private org.eclipse.swt.widgets.Text createAppToTraceText ( org.eclipse.swt.widgets.Composite parent , java.lang.String defaultMessage ) { mActivityToTraceText = new org.eclipse.swt.widgets.Text ( parent , org.eclipse.swt.SWT.BORDER ) ; mActivityToTraceText.setMessage ( defaultMessage ) ; mActivityToTraceText.setText ( mActivityToTrace ) ; mActivityToTraceText.setLayoutData ( new org.eclipse.swt.layout.GridData ( org.eclipse.swt.layout.GridData.FILL_HORIZONTAL ) ) ; mActivityToTraceText.addModifyListener ( new org.eclipse.swt.events.ModifyListener ( ) { @ java.lang.Override public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { validateAndSetMessage ( ) ; } } ) ; return mActivityToTraceText ; }

Target:
private org.eclipse.swt.widgets.Text createActivityToTraceText ( org.eclipse.swt.widgets.Composite parent , java.lang.String defaultMessage ) { mActivityToTraceText = new org.eclipse.swt.widgets.Text ( parent , org.eclipse.swt.SWT.BORDER ) ; mActivityToTraceText.setMessage ( defaultMessage ) ; mActivityToTraceText.setText ( mActivityToTrace ) ; mActivityToTraceText.setLayoutData ( new org.eclipse.swt.layout.GridData ( org.eclipse.swt.layout.GridData.FILL_HORIZONTAL ) ) ; mActivityToTraceText.addModifyListener ( new org.eclipse.swt.events.ModifyListener ( ) { @ java.lang.Override public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { validateAndSetMessage ( ) ; } } ) ; return mActivityToTraceText ; }
Source:
public void onMessageReceived ( java.lang.Object peerHandle , byte [ ] message ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "peerId" , ( ( android.net.wifi.nan.WifiNanManager.OpaquePeerHandle ) ( peerHandle ) ) . peerId ) ; mResults.putByteArray ( "message" , message ) ; mResults.putString ( "messageAsString" , new java.lang.String ( message ) ) ; mEventFacade.postEvent ( "WifiNanSessionOnMessageReceived" , mResults ) ; }

Target:
public void onMessageReceived ( java.lang.Object peerHandle , byte [ ] message ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "peerId" , ( ( android.net.wifi.aware.WifiAwareManager.OpaquePeerHandle ) ( peerHandle ) ) . peerId ) ; mResults.putByteArray ( "message" , message ) ; mResults.putString ( "messageAsString" , new java.lang.String ( message ) ) ; mEventFacade.postEvent ( "WifiAwareSessionOnMessageReceived" , mResults ) ; }
Source:
public void onServiceDiscovered ( java.lang.Object peerHandle , byte [ ] serviceSpecificInfo , byte [ ] matchFilter ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "peerId" , ( ( java.lang.Integer ) ( peerHandle ) ) ) ; mResults.putByteArray ( "serviceSpecificInfo" , serviceSpecificInfo ) ; mResults.putByteArray ( "matchFilter" , matchFilter ) ; mEventFacade.postEvent ( "WifiNanSessionOnServiceDiscovered" , mResults ) ; }

Target:
public void onServiceDiscovered ( java.lang.Object peerHandle , byte [ ] serviceSpecificInfo , byte [ ] matchFilter ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "peerId" , ( ( android.net.wifi.nan.WifiNanManager.OpaquePeerHandle ) ( peerHandle ) ) . peerId ) ; mResults.putByteArray ( "serviceSpecificInfo" , serviceSpecificInfo ) ; mResults.putByteArray ( "matchFilter" , matchFilter ) ; mEventFacade.postEvent ( "WifiNanSessionOnServiceDiscovered" , mResults ) ; }
Source:
void regularScanTimeout ( com.android.bluetooth.gatt.ScanClient client ) { if ( ( ! ( isExemptFromScanDowngrade ( client ) ) ) && ( client.stats.isScanningTooLong ( ) ) ) { android.util.Log.w ( com.android.bluetooth.gatt.ScanManager.TAG , ( ( "Moving scan client to opportunistic (scannerId " + ( client.scannerId ) ) + ")" ) ) ; setOpportunisticScanClient ( client ) ; removeScanFilters ( client.scannerId ) ; client.stats.setScanTimeout ( ) ; } configureRegularScanParams ( ) ; if ( ( numRegularScanClients ( ) ) == 0 ) { logd ( "stop scan" ) ; gattClientScanNative ( false ) ; } }

Target:
void regularScanTimeout ( com.android.bluetooth.gatt.ScanClient client ) { if ( ( ! ( isExemptFromScanDowngrade ( client ) ) ) && ( client.stats.isScanningTooLong ( ) ) ) { android.util.Log.w ( com.android.bluetooth.gatt.ScanManager.TAG , ( ( "Moving scan client to opportunistic (scannerId " + ( client.scannerId ) ) + ")" ) ) ; setOpportunisticScanClient ( client ) ; removeScanFilters ( client.scannerId ) ; client.stats.setScanTimeout ( client.scannerId ) ; } configureRegularScanParams ( ) ; if ( ( numRegularScanClients ( ) ) == 0 ) { if ( com.android.bluetooth.gatt.ScanManager.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.ScanManager.TAG , "stop scan" ) ; gattClientScanNative ( false ) ; } }
Source:
public void testNoWarningWhenAddJavascriptInterfaceCalledOnNonWebView ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/AddJavascriptInterfaceTest.java.txt=>src/test/pkg/AddJavascriptInterfaceTest.java" , "bytecode/AddJavascriptInterfaceTest.class.data=>bin/classes/test/pkg/AddJavascriptInterfaceTest.class" , ( "bytecode/AddJavascriptInterfaceTest$NonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$NonWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class" ) ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "src/test/pkg/AddJavascriptInterfaceTest.java:16: Warning: WebView.addJavascriptInterface should not be called [AddJavascriptInterface]\n" + ( ( ( ( ( " webView.addJavascriptInterface(object, string);\n" + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/AddJavascriptInterfaceTest.java:23: Warning: WebView.addJavascriptInterface should not be called [AddJavascriptInterface]\n" ) + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/AddJavascriptInterfaceTest.java.txt=>src/test/pkg/AddJavascriptInterfaceTest.java" , "bytecode/AddJavascriptInterfaceTest.class.data=>bin/classes/test/pkg/AddJavascriptInterfaceTest.class" , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$WebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$WebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$NonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$NonWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class" ) ) ) ; }
Source:
public void testPackageOverridePackageWithSuffixOnly ( ) { com.android.utils.StdLogger logger = new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) ; com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilder ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.builder.AndroidBuilderTest.ManifestParserMock ( "fake.package.name" ) , new com.android.builder.CommandLineRunner ( logger ) , logger , false ) ; mDebug.setPackageNameSuffix ( "fortytwo" ) ; builder.setBuildVariant ( mMain , mFlavor , mDebug ) ; assertEquals ( "fake.package.name.fortytwo" , builder.getPackageOverride ( "" ) ) ; }

Target:
public void testPackageOverridePackageWithSuffixOnly ( ) { com.android.utils.StdLogger logger = new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) ; com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilderTest.AndroidBuilderMock ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.builder.AndroidBuilderTest.ManifestParserMock ( "fake.package.name" ) , new com.android.builder.CommandLineRunner ( logger ) , logger , false ) ; mDebug.getBuildType ( ) . setPackageNameSuffix ( "fortytwo" ) ; builder.setBuildVariant ( mMain , mDebug ) ; builder.addProductFlavor ( mFlavor ) ; assertEquals ( "fake.package.name.fortytwo" , builder.getPackageOverride ( "" ) ) ; }
Source:
public void setCdmaRoamingPreference ( int cdmaRoamingType , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( cdmaRoamingType ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + cdmaRoamingType ) ) ; send ( rr ) ; }

Target:
public void setCdmaRoamingPreference ( int cdmaRoamingType , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE , response , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( cdmaRoamingType ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " : " ) + cdmaRoamingType ) ) ; send ( rr ) ; }
Source:
public static android.net.MacAddress.MacAddressType macAddressType ( byte [ ] addr ) { if ( ! ( android.net.MacAddress.isMacAddress ( addr ) ) ) { return null ; } if ( java.util.Arrays.equals ( addr , android.net.MacAddress.ETHER_ADDR_BROADCAST ) ) { return android.net.MacAddress.MacAddressType.BROADCAST ; } if ( ( ( addr [ 0 ] ) & 1 ) == 1 ) { return android.net.MacAddress.MacAddressType.MULTICAST ; } return android.net.MacAddress.MacAddressType.UNICAST ; }

Target:
public android.net.MacAddress.MacAddressType addressType ( ) { if ( equals ( android.net.MacAddress.BROADCAST_ADDRESS ) ) { return android.net.MacAddress.MacAddressType.BROADCAST ; } if ( isMulticastAddress ( ) ) { return android.net.MacAddress.MacAddressType.MULTICAST ; } return android.net.MacAddress.MacAddressType.UNICAST ; }
Source:
public void testWrongSeparator2 ( ) throws java.lang.Exception { assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:15: Warning: Use \'$\' instead of \'.\' for inner classes (or use only lowercase letters in package names) [InnerclassSeparator]\n" ) + " android:name=\".Foo.Bar\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong2.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }

Target:
public void testWrongSeparator2 ( ) throws java.lang.Exception { mScopes = null ; assertEquals ( ( "AndroidManifest.xml:14: Error: Class referenced in the manifest, test.pkg.Foo.Bar, was not found in the project or the libraries [MissingRegistered]\n" + ( ( ( ( ( " <activity\n" + " ^\n" ) + "AndroidManifest.xml:15: Warning: Use \'$\' instead of \'.\' for inner classes (or use only lowercase letters in package names) [InnerclassSeparator]\n" ) + " android:name=\".Foo.Bar\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "registration/AndroidManifestWrong2.xml=>AndroidManifest.xml" , "bytecode/.classpath=>.classpath" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" , "registration/Bar.java.txt=>src/test/pkg/Foo/Bar.java" ) ) ; }
Source:
public void testNoCallbackAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testTimedoutAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public android.media.midi.MidiInputPort openInputPort ( int portNumber ) { try { android.os.IBinder token = new android.os.Binder ( ) ; android.os.ParcelFileDescriptor pfd = mDeviceServer.openInputPort ( token , portNumber ) ; if ( pfd == null ) { return null ; } return new android.media.midi.MidiInputPort ( mDeviceServer , token , pfd , portNumber ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.midi.MidiDevice.TAG , "RemoteException in openInputPort" ) ; return null ; } }

Target:
public android.media.midi.MidiInputPort openInputPort ( int portNumber ) { if ( mIsDeviceClosed ) { return null ; } try { android.os.IBinder token = new android.os.Binder ( ) ; android.os.ParcelFileDescriptor pfd = mDeviceServer.openInputPort ( token , portNumber ) ; if ( pfd == null ) { return null ; } return new android.media.midi.MidiInputPort ( mDeviceServer , token , pfd , portNumber ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.midi.MidiDevice.TAG , "RemoteException in openInputPort" ) ; return null ; } }
Source:
public void createUserData ( java.lang.String uuid , int userId , int userSerial , int flags ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createUserData ( uuid , userId , userSerial , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void createUserData ( java.lang.String uuid , int userId , int userSerial , int flags ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.createUserData ( uuid , userId , userSerial , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
private static void rename ( @ javax.annotation.Nonnull com.android.jack.ir.ast.CanBeRenamed node , @ javax.annotation.Nonnull com.android.jack.shrob.obfuscation.nameprovider.NameProvider nameProvider ) { if ( com.android.jack.shrob.obfuscation.Renamer.mustBeRenamed ( ( ( com.android.sched.marker.MarkerManager ) ( node ) ) ) ) { java.lang.String newName = nameProvider.getNewName ( com.android.jack.shrob.obfuscation.Renamer.getKey ( node ) ) ; ( ( com.android.sched.marker.MarkerManager ) ( node ) ) . addMarker ( new com.android.jack.shrob.obfuscation.OriginalNameMarker ( node.getName ( ) ) ) ; node.setName ( newName ) ; } }

Target:
private static void rename ( @ javax.annotation.Nonnull com.android.jack.ir.ast.CanBeRenamed node , @ javax.annotation.Nonnull com.android.jack.shrob.obfuscation.nameprovider.NameProvider nameProvider ) { if ( com.android.jack.shrob.obfuscation.Renamer.mustBeRenamed ( ( ( com.android.sched.marker.MarkerManager ) ( node ) ) ) ) { java.lang.String newName = nameProvider.getNewName ( com.android.jack.shrob.obfuscation.key.Key.getKey ( node ) ) ; ( ( com.android.sched.marker.MarkerManager ) ( node ) ) . addMarker ( new com.android.jack.shrob.obfuscation.OriginalNameMarker ( node.getName ( ) ) ) ; node.setName ( newName ) ; } }
Source:
public final int doFinal ( java.nio.ByteBuffer input , java.nio.ByteBuffer output ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == output ) { throw new java.lang.IllegalArgumentException ( "input == output" ) ; } return spiImpl.engineDoFinal ( input , output ) ; }

Target:
public final int update ( java.nio.ByteBuffer input , java.nio.ByteBuffer output ) throws javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == output ) { throw new java.lang.IllegalArgumentException ( "input == output" ) ; } return getSpi ( ) . engineUpdate ( input , output ) ; }
Source:
public void run ( ) { while ( ! ( closed ) ) { try { java.net.Socket s = ss.accept ( ) ; new java.lang.Thread ( new tests.support.Support_TestWebServer.Worker ( s ) , "additional worker" ) . start ( ) ; } catch ( java.net.SocketException e ) { log ( e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { log ( e.getMessage ( ) ) ; } } log ( ( "AcceptThread terminated" + ( this ) ) ) ; }

Target:
public void run ( ) { while ( ! ( closed ) ) { try { java.net.Socket s = ss.accept ( ) ; new java.lang.Thread ( new tests.support.Support_TestWebServer.Worker ( s ) . setDelay ( mDelay ) , "additional worker" ) . start ( ) ; } catch ( java.net.SocketException e ) { log ( e.getMessage ( ) ) ; } catch ( java.io.IOException e ) { log ( e.getMessage ( ) ) ; } } log ( ( "AcceptThread terminated" + ( this ) ) ) ; }
Source:
private void setupDataOnConnectableApns ( java.lang.String reason ) { for ( com.android.internal.telephony.dataconnection.ApnContext apnContext : mApnContexts.values ( ) ) { if ( ( apnContext.getState ( ) ) == ( DctConstants.State.FAILED ) ) { apnContext.setState ( DctConstants.State.IDLE ) ; } if ( apnContext.isConnectable ( ) ) { log ( "setupDataOnConnectableApns: isConnectable() call trySetupData" ) ; apnContext.setReason ( reason ) ; trySetupData ( apnContext ) ; } } }

Target:
private void setupDataOnConnectableApns ( java.lang.String reason ) { if ( DBG ) log ( ( "setupDataOnConnectableApns: " + reason ) ) ; for ( com.android.internal.telephony.dataconnection.ApnContext apnContext : mPrioritySortedApnContexts ) { if ( DBG ) log ( ( "setupDataOnConnectableApns: apnContext " + apnContext ) ) ; if ( ( apnContext.getState ( ) ) == ( DctConstants.State.FAILED ) ) { apnContext.setState ( DctConstants.State.IDLE ) ; } if ( apnContext.isConnectable ( ) ) { log ( "setupDataOnConnectableApns: isConnectable() call trySetupData" ) ; apnContext.setReason ( reason ) ; trySetupData ( apnContext ) ; } } }
Source:
public java.lang.String getPackageOverride ( ) { java.lang.String packageName = mMergedFlavor.getPackageName ( ) ; java.lang.String packageSuffix = mBuildType.getPackageNameSuffix ( ) ; if ( ( packageSuffix != null ) && ( ( packageSuffix.length ( ) ) > 0 ) ) { if ( packageName == null ) { packageName = getPackageFromManifest ( ) ; } if ( ( packageSuffix.charAt ( 0 ) ) == '.' ) { packageName = packageName + packageSuffix ; } else { packageName = ( packageName + '.' ) + packageSuffix ; } } return packageName ; }

Target:
public java.lang.String getPackageOverride ( ) { java.lang.String packageName = mMergedFlavor.getPackageName ( ) ; java.lang.String packageSuffix = mBuildType.getPackageNameSuffix ( ) ; if ( ( packageSuffix != null ) && ( ! ( packageSuffix.isEmpty ( ) ) ) ) { if ( packageName == null ) { packageName = getPackageFromManifest ( ) ; } if ( ( packageSuffix.charAt ( 0 ) ) == '.' ) { packageName = packageName + packageSuffix ; } else { packageName = ( packageName + '.' ) + packageSuffix ; } } return packageName ; }
Source:
public static void openDrawer ( int drawerLayoutId , int gravity ) { if ( android.support.test.espresso.contrib.DrawerActions.checkDrawer ( drawerLayoutId , android.support.test.espresso.contrib.DrawerMatchers.isOpen ( gravity ) ) ) { return ; } android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.registerListener ( ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.actionOpenDrawer ( gravity ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.unregisterListener ( ) ) ; }

Target:
public static void openDrawer ( int drawerLayoutId , int gravity ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( drawerLayoutId ) ) . perform ( android.support.test.espresso.contrib.DrawerActions.open ( gravity ) ) ; }
Source:
private void testChargingConstraintExecutes_onCharging ( ) { mTestEnvironment.setUp ( ) ; android.app.job.JobInfo delayConstraintAndUnexpiredDeadline = new android.app.job.JobInfo.Builder ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ON_CHARGING_JOB_ID , mMockComponent ) . setRequiresCharging ( true ) . build ( ) ; mTestEnvironment.setExpectedExecutions ( 1 ) ; mJobScheduler.schedule ( delayConstraintAndUnexpiredDeadline ) ; sendBroadcast ( com.android.cts.verifier.jobscheduler.EXPEDITE_STABLE_CHARGING ) ; boolean testPassed ; try { testPassed = mTestEnvironment.awaitExecution ( ) ; } catch ( java.lang.InterruptedException e ) { testPassed = false ; } runOnUiThread ( new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ChargingConstraintTestResultRunner ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ON_CHARGING_JOB_ID , testPassed ) ) ; }

Target:
private void testChargingConstraintExecutes_onCharging ( ) { mTestEnvironment.setUp ( ) ; android.app.job.JobInfo delayConstraintAndUnexpiredDeadline = new android.app.job.JobInfo.Builder ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ON_CHARGING_JOB_ID , mMockComponent ) . setRequiresCharging ( true ) . build ( ) ; mTestEnvironment.setExpectedExecutions ( 1 ) ; mJobScheduler.schedule ( delayConstraintAndUnexpiredDeadline ) ; boolean testPassed ; try { testPassed = mTestEnvironment.awaitExecution ( ) ; } catch ( java.lang.InterruptedException e ) { testPassed = false ; } mTestState = ( testPassed ) ? com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.STATE_ON_CHARGING_TEST_PASSED : com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.STATE_NOT_RUNNING ; runOnUiThread ( new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ChargingConstraintTestResultRunner ( com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.ON_CHARGING_JOB_ID , testPassed ) ) ; }
Source:
public android.telephony.ModemActivityInfo getModemActivityInfo ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getModemActivityInfo ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getModemActivityInfo" , e ) ; } return null ; }

Target:
public void requestModemActivityInfo ( android.os.ResultReceiver result ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { service.requestModemActivityInfo ( result ) ; return ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getModemActivityInfo" , e ) ; } result.send ( 0 , null ) ; }
Source:
public static android.app.admin.DevicePolicyManager create ( android.content.Context context ) { android.app.admin.DevicePolicyManager me = new android.app.admin.DevicePolicyManager ( context , false ) ; return ( me.mService ) != null ? me : null ; }

Target:
public boolean clearResetPasswordToken ( android.content.ComponentName admin ) { throwIfParentInstance ( "clearResetPasswordToken" ) ; if ( ( mService ) != null ) { try { return mService.clearResetPasswordToken ( admin ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
public void screenTurnedOff ( int why ) { android.util.EventLog.writeEvent ( 70000 , 0 ) ; synchronized ( mLock ) { mScreenOnEarly = false ; mScreenOnFully = false ; } if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onScreenTurnedOff ( why ) ; } synchronized ( mLock ) { updateOrientationListenerLp ( ) ; updateLockScreenTimeout ( ) ; } }

Target:
public int interceptMotionBeforeQueueingWhenScreenOff ( int policyFlags ) { int result = 0 ; final boolean isWakeMotion = ( policyFlags & ( ( android.view.WindowManagerPolicy.FLAG_WAKE ) | ( android.view.WindowManagerPolicy.FLAG_WAKE_DROPPED ) ) ) != 0 ; if ( isWakeMotion ) { if ( ( ( mKeyguardMediator ) != null ) && ( mKeyguardMediator.isShowing ( ) ) ) { mKeyguardMediator.onWakeMotionWhenKeyguardShowingTq ( ) ; } else { result |= ACTION_WAKE_UP ; } } return result ; }
Source:
public final int getInt ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } int result = this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }

Target:
final void get ( short [ ] dst , int dstOffset , int shortCount ) { int byteCount = checkGetBounds ( SizeOf.SHORT , dst.length , dstOffset , shortCount ) ; this . block.peekShortArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , shortCount , order.needsSwap ) ; position += byteCount ; }
Source:
public int readInt ( ) { int result = libcore.io.Memory.peekInt ( ( ( address ) + ( position ) ) , swap ) ; position += SizeOf.INT ; return result ; }

Target:
public int readInt ( ) { file.checkNotClosed ( ) ; libcore.io.NioBufferIterator.checkReadBounds ( position , length , SizeOf.INT ) ; int result = libcore.io.Memory.peekInt ( ( ( address ) + ( position ) ) , swap ) ; position += SizeOf.INT ; return result ; }
Source:
public void testBinderDeath ( ) throws java.lang.Exception { org.mockito.ArgumentCaptor < android.os.IBinder.DeathRecipient > deathRecipient = org.mockito.ArgumentCaptor.forClass ( IBinder.DeathRecipient.class ) ; int clientId = doConnect ( ) ; org.mockito.Mockito.verify ( mBinderMock ) . linkToDeath ( deathRecipient.capture ( ) , org.mockito.Matchers.eq ( 0 ) ) ; deathRecipient.getValue ( ) . binderDied ( ) ; org.mockito.Mockito.verify ( mNanStateManagerMock ) . disconnect ( clientId ) ; validateInternalStateCleanedUp ( clientId ) ; }

Target:
public void testBinderDeath ( ) throws java.lang.Exception { org.mockito.ArgumentCaptor < android.os.IBinder.DeathRecipient > deathRecipient = org.mockito.ArgumentCaptor.forClass ( IBinder.DeathRecipient.class ) ; int clientId = doConnect ( ) ; org.mockito.Mockito.verify ( mBinderMock ) . linkToDeath ( deathRecipient.capture ( ) , org.mockito.Matchers.eq ( 0 ) ) ; deathRecipient.getValue ( ) . binderDied ( ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . disconnect ( clientId ) ; validateInternalStateCleanedUp ( clientId ) ; }
Source:
private void notifyCallLogChange ( ) { mContext.getContentResolver ( ) . notifyChange ( Calls.CONTENT_URI , null , false ) ; android.content.Intent intent = new android.content.Intent ( "android.intent.action.CALL_LOG_CHANGE" ) ; intent.setComponent ( new android.content.ComponentName ( "com.android.calllogbackup" , "com.android.calllogbackup.CallLogChangeReceiver" ) ) ; if ( ! ( mContext.getPackageManager ( ) . queryBroadcastReceivers ( intent , 0 ) . isEmpty ( ) ) ) { mContext.sendBroadcast ( intent ) ; } }

Target:
private void notifyCallLogChange ( ) { mContext.getContentResolver ( ) . notifyChange ( Calls.CONTENT_URI , null , false ) ; android.content.Intent intent = new android.content.Intent ( "com.android.internal.action.CALL_LOG_CHANGE" ) ; intent.setComponent ( new android.content.ComponentName ( "com.android.calllogbackup" , "com.android.calllogbackup.CallLogChangeReceiver" ) ) ; if ( ! ( mContext.getPackageManager ( ) . queryBroadcastReceivers ( intent , 0 ) . isEmpty ( ) ) ) { mContext.sendBroadcast ( intent ) ; } }
Source:
public void onActivitySaveInstanceState ( android.app.Activity activity , android.os.Bundle outState ) { if ( BuildConfig.IS_DEBUG ) { assert ( ( java.lang.reflect.Proxy.isProxyClass ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_WRAPPER_CLASS ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS ) ) ; } }

Target:
public void onActivityResumed ( android.app.Activity activity ) { if ( BuildConfig.DCHECK_IS_ON ) { assert ( ( java.lang.reflect.Proxy.isProxyClass ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_WRAPPER_CLASS ) ) ) || ( activity.getWindow ( ) . getCallback ( ) . getClass ( ) . getName ( ) . equals ( org.chromium.base.BaseChromiumApplication.TOOLBAR_CALLBACK_INTERNAL_WRAPPER_CLASS ) ) ; } }
Source:
public void pushThreadState ( @ javax.annotation.Nonnull com.android.sched.util.log.ThreadTracerState state ) { if ( parentThreadSupport ) { com.android.sched.util.log.EventType [ ] types = ( ( com.android.sched.util.log.tracer.AbstractTracer.ThreadTracerStateImpl ) ( state ) ) . types ; for ( int idx = 0 ; idx < ( types.length ) ; idx ++ ) { start ( types [ idx ] ) ; } } }

Target:
public void pushThreadState ( @ javax.annotation.Nonnull com.android.sched.util.log.ThreadTracerState state ) { if ( parentThreadSupport ) { com.android.sched.util.log.EventType [ ] types = ( ( com.android.sched.util.log.tracer.AbstractTracer.ThreadTracerStateImpl ) ( state ) ) . types ; for ( int idx = 0 ; idx < ( types.length ) ; idx ++ ) { open ( types [ idx ] ) ; } } }
Source:
public com.android.tv.dvr.ScheduledRecording addSchedule ( com.android.tv.data.Program program ) { if ( ! ( com.android.tv.common.SoftPreconditions.checkState ( mDataManager.isDvrScheduleLoadFinished ( ) ) ) ) { return null ; } com.android.tv.dvr.SeriesRecording seriesRecording = getSeriesRecording ( program ) ; return addSchedule ( program , ( seriesRecording == null ? mScheduleManager.suggestNewPriority ( ) : seriesRecording.getPriority ( ) ) ) ; }

Target:
public com.android.tv.dvr.data.ScheduledRecording addSchedule ( com.android.tv.data.Program program ) { if ( ! ( com.android.tv.common.SoftPreconditions.checkState ( mDataManager.isDvrScheduleLoadFinished ( ) ) ) ) { return null ; } com.android.tv.dvr.data.SeriesRecording seriesRecording = getSeriesRecording ( program ) ; return addSchedule ( program , ( seriesRecording == null ? mScheduleManager.suggestNewPriority ( ) : seriesRecording.getPriority ( ) ) ) ; }