auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGreenScreenshot ( ) throws java.lang.Exception { android.util.Log.i ( android.assist.cts.ScreenshotTest.TAG , "Starting screenshot test" ) ; mTestActivity.startTest ( android.assist.cts.ScreenshotTest.TEST_CASE_TYPE ) ; android.util.Log.i ( android.assist.cts.ScreenshotTest.TAG , "start waitForAssistantToBeReady()" ) ; waitForAssistantToBeReady ( mReadyLatch ) ; waitForActivityResumeAndAssist ( Color.GREEN ) ; verifyAssistDataNullness ( false , false , false , false ) ; assertTrue ( mScreenshotMatches ) ; }

Target:
public void testGreenScreenshot ( ) throws java.lang.Exception { if ( mActivityManager.isLowRamDevice ( ) ) { android.util.Log.d ( android.assist.cts.ScreenshotTest.TAG , "Not running assist tests on low-RAM device." ) ; return ; } android.util.Log.i ( android.assist.cts.ScreenshotTest.TAG , "Starting screenshot test" ) ; mTestActivity.startTest ( android.assist.cts.ScreenshotTest.TEST_CASE_TYPE ) ; android.util.Log.i ( android.assist.cts.ScreenshotTest.TAG , "start waitForAssistantToBeReady()" ) ; waitForAssistantToBeReady ( mReadyLatch ) ; waitForActivityResumeAndAssist ( Color.GREEN ) ; verifyAssistDataNullness ( false , false , false , false ) ; assertTrue ( mScreenshotMatches ) ; }
Source:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky ) throws android.os.RemoteException { android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.UPDATED_MEDIA_STATUS , ( reportStatus ? 1 : 0 ) , 1 , keys ) ; mHandler.sendMessage ( msg ) ; }

Target:
public void performReceive ( android.content.Intent intent , int resultCode , java.lang.String data , android.os.Bundle extras , boolean ordered , boolean sticky , int sendingUser ) throws android.os.RemoteException { android.os.Message msg = mHandler.obtainMessage ( com.android.server.pm.PackageManagerService.UPDATED_MEDIA_STATUS , ( reportStatus ? 1 : 0 ) , 1 , keys ) ; mHandler.sendMessage ( msg ) ; }
Source:
public static com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration create ( @ com.android.annotations.NonNull com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration other , @ com.android.annotations.NonNull com.android.ide.eclipse.adt.internal.editors.layout.configuration.Configuration parent ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration configuration = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration ( other.mConfigChooser , parent ) ; configuration.mOverrideLocale = other.mOverrideLocale ; configuration.mOverrideTarget = other.mOverrideTarget ; configuration.mOverrideDevice = other.mOverrideDevice ; configuration.mOverrideDeviceState = other.mOverrideDeviceState ; configuration.mOverrideNightMode = other.mOverrideNightMode ; configuration.mOverrideUiMode = other.mOverrideUiMode ; return configuration ; }

Target:
public static com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration create ( @ com.android.annotations.NonNull com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration other , @ com.android.annotations.NonNull com.android.ide.eclipse.adt.internal.editors.layout.configuration.Configuration parent ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration configuration = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.ComplementingConfiguration ( other.mConfigChooser , parent ) ; configuration.setDisplayName ( other.getDisplayName ( ) ) ; configuration.setActivity ( other.getActivity ( ) ) ; configuration.mUpdateDisplayName = other.mUpdateDisplayName ; configuration.mOverrideLocale = other.mOverrideLocale ; configuration.mOverrideTarget = other.mOverrideTarget ; configuration.mOverrideDevice = other.mOverrideDevice ; configuration.mOverrideDeviceState = other.mOverrideDeviceState ; configuration.mOverrideNightMode = other.mOverrideNightMode ; configuration.mOverrideUiMode = other.mOverrideUiMode ; return configuration ; }
Source:
public int onStartCommand ( android.content.Intent intent , int flags , int startId ) { return START_NOT_STICKY ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( intent.getAction ( ) . equals ( BluetoothDevice.ACTION_BOND_STATE_CHANGED ) ) { android.bluetooth.BluetoothDevice device = intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ; int state = intent.getIntExtra ( BluetoothDevice.EXTRA_BOND_STATE , BluetoothDevice.BOND_NONE ) ; switch ( state ) { case android.bluetooth.BluetoothDevice.BOND_BONDED : mBluetoothGatt = com.android.cts.verifier.bluetooth.BleClientService.connectGatt ( device , mContext , false , mSecure , mGattCallbacks ) ; break ; case android.bluetooth.BluetoothDevice.BOND_NONE : notifyError ( "Failed to create bond." ) ; break ; case android.bluetooth.BluetoothDevice.BOND_BONDING : default : break ; } } }
Source:
public static com.android.apksig.internal.util.Pair < byte [ ] , java.lang.Integer > generateApkSignatureSchemeV2Block ( com.android.apksig.util.DataSource beforeCentralDir , com.android.apksig.util.DataSource centralDir , com.android.apksig.util.DataSource eocd , java.util.List < com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig > signerConfigs ) throws java.io.IOException , java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , java.security.SignatureException { com.android.apksig.internal.util.Pair < java.util.List < com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig > , java.util.Map < com.android.apksig.internal.apk.ContentDigestAlgorithm , byte [ ] > > digestInfo = com.android.apksig.internal.apk.ApkSigningBlockUtils.computeContentDigests ( beforeCentralDir , centralDir , eocd , signerConfigs ) ; return com.android.apksig.internal.apk.v2.V2SchemeSigner.generateApkSignatureSchemeV2Block ( digestInfo.getFirst ( ) , digestInfo.getSecond ( ) ) ; }

Target:
public static com.android.apksig.internal.util.Pair < byte [ ] , java.lang.Integer > generateApkSignatureSchemeV2Block ( com.android.apksig.util.DataSource beforeCentralDir , com.android.apksig.util.DataSource centralDir , com.android.apksig.util.DataSource eocd , java.util.List < com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig > signerConfigs , boolean v3SigningEnabled ) throws java.io.IOException , java.security.InvalidKeyException , java.security.NoSuchAlgorithmException , java.security.SignatureException { com.android.apksig.internal.util.Pair < java.util.List < com.android.apksig.internal.apk.ApkSigningBlockUtils.SignerConfig > , java.util.Map < com.android.apksig.internal.apk.ContentDigestAlgorithm , byte [ ] > > digestInfo = com.android.apksig.internal.apk.ApkSigningBlockUtils.computeContentDigests ( beforeCentralDir , centralDir , eocd , signerConfigs ) ; return com.android.apksig.internal.apk.v2.V2SchemeSigner.generateApkSignatureSchemeV2Block ( digestInfo.getFirst ( ) , digestInfo.getSecond ( ) , v3SigningEnabled ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.DiffTest" , "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { if ( ( args.length ) == 0 ) { args = new java.lang.String [ ] { "com.android.ahat.DiffFieldsTest" , "com.android.ahat.DiffTest" , "com.android.ahat.InstanceTest" , "com.android.ahat.NativeAllocationTest" , "com.android.ahat.ObjectHandlerTest" , "com.android.ahat.OverviewHandlerTest" , "com.android.ahat.PerformanceTest" , "com.android.ahat.RootedHandlerTest" , "com.android.ahat.QueryTest" , "com.android.ahat.SiteHandlerTest" } ; } org.junit.runner.JUnitCore.main ( args ) ; }
Source:
public java.lang.invoke.VarHandle findStaticVarHandle ( java.lang.Class < ? > decl , java.lang.String name , java.lang.Class < ? > type ) throws java.lang.IllegalAccessException , java.lang.NoSuchFieldException { java.lang.invoke.MethodHandles.unsupported ( "MethodHandles.Lookup.findStaticVarHandle()" ) ; return null ; }

Target:
public java.lang.invoke.VarHandle findStaticVarHandle ( java.lang.Class < ? > decl , java.lang.String name , java.lang.Class < ? > type ) throws java.lang.IllegalAccessException , java.lang.NoSuchFieldException { final java.lang.reflect.Field field = findFieldOfType ( decl , name , type ) ; final boolean isStatic = true ; final boolean performAccessChecks = true ; commonFieldChecks ( field , decl , type , isStatic , performAccessChecks ) ; return java.lang.invoke.FieldVarHandle.create ( field ) ; }
Source:
private java.lang.String getPrefixForNs ( org.w3c.dom.NamedNodeMap attributes , java.lang.String ns ) { if ( attributes != null ) { for ( int i = 0 , n = attributes.getLength ( ) ; i < n ; i ++ ) { org.w3c.dom.Attr attribute = ( ( org.w3c.dom.Attr ) ( attributes.item ( i ) ) ) ; if ( ( ns.equals ( attribute.getValue ( ) ) ) && ( ns.startsWith ( SdkConstants.XMLNS_PREFIX ) ) ) { return attribute.getName ( ) ; } } } return null ; }

Target:
public java.io.File findMatchingSourceFile ( java.io.File file ) { for ( java.io.File sourceFile : mSourceFiles ) { if ( sourceFile.equals ( file ) ) { return sourceFile ; } else if ( sourceFile.isDirectory ( ) ) { java.lang.String sourcePath = ( sourceFile.getAbsolutePath ( ) ) + ( java.io.File.separator ) ; if ( file.getAbsolutePath ( ) . startsWith ( sourcePath ) ) { return sourceFile ; } } } return null ; }
Source:
protected void onSizeChanged ( int w , int h , int ow , int oh ) { super . onSizeChanged ( w , h , ow , oh ) ; mZoomCenterX = ( getViewWidth ( ) ) * 0.5F ; mZoomCenterY = ( getViewHeight ( ) ) * 0.5F ; if ( ! ( mMinZoomScaleFixed ) ) { mMinZoomScale = ( ( float ) ( getViewWidth ( ) ) ) / ( java.lang.Math.max ( android.webkit.WebView.ZOOM_OUT_WIDTH , mContentWidth ) ) ; } setNewZoomScale ( mActualScale , true ) ; }

Target:
public android.webkit.WebView.DragTracker getDragTracker ( ) { return mDragTracker ; }
Source:
public android.os.Bundle hasFeatures ( android.accounts.AccountAuthenticatorResponse r , android.accounts.Account account , java.lang.String [ ] strings ) throws android.accounts.NetworkErrorException { android.util.Log.d ( com.android.bluetooth.pbapclient.Authenticator.TAG , "got call" , new java.lang.Exception ( ) ) ; final android.os.Bundle result = new android.os.Bundle ( ) ; result.putBoolean ( AccountManager.KEY_BOOLEAN_RESULT , false ) ; return result ; }

Target:
public android.os.Bundle hasFeatures ( android.accounts.AccountAuthenticatorResponse r , android.accounts.Account account , java.lang.String [ ] strings ) throws android.accounts.NetworkErrorException { if ( com.android.bluetooth.pbapclient.Authenticator.DBG ) android.util.Log.d ( com.android.bluetooth.pbapclient.Authenticator.TAG , "got call" , new java.lang.Exception ( ) ) ; final android.os.Bundle result = new android.os.Bundle ( ) ; result.putBoolean ( AccountManager.KEY_BOOLEAN_RESULT , false ) ; return result ; }
Source:
public java.lang.String getAttributeName ( int i ) { if ( mZeroAttributeIsPadding ) { if ( i == 0 ) { return com.android.ide.eclipse.adt.internal.editors.layout.UiElementPullParser.ATTR_PADDING ; } else { i -- ; } } org.w3c.dom.Node attribute = getAttribute ( i ) ; if ( attribute != null ) { return attribute.getLocalName ( ) ; } return null ; }

Target:
public java.lang.String getAttributeName ( int i ) { if ( mZeroAttributeIsPadding ) { if ( i == 0 ) { return com.android.ide.common.layout.LayoutConstants.ATTR_PADDING ; } else { i -- ; } } org.w3c.dom.Node attribute = getAttribute ( i ) ; if ( attribute != null ) { return attribute.getLocalName ( ) ; } return null ; }
Source:
public void testDebugContextI ( ) { setupDebugContext ( ) ; Soob.invoke_write_i ( 7 , 1 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Soob.invoke_write_i ( 9 , 0 ) ; mRS.finish ( ) ; } Soob.invoke_send_msg ( ) ; waitForMessage ( ) ; Soob.destroy ( ) ; assertTrue ( mRanErrorHandler ) ; checkForErrors ( ) ; }

Target:
public void dontTestDebugContextI ( ) { setupDebugContext ( ) ; Soob.invoke_write_i ( 7 , 1 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Soob.invoke_write_i ( 9 , 0 ) ; mRS.finish ( ) ; } Soob.invoke_send_msg ( ) ; waitForMessage ( ) ; Soob.destroy ( ) ; assertTrue ( mRanErrorHandler ) ; checkForErrors ( ) ; }
Source:
public void testSubjectAltNameAndCn ( ) { assertFalse ( verifier.verify ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "a.y.com" ) ) ) ; assertFalse ( verifier.verify ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=imap.g.com" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "a.y.com" ) ) ) ; assertTrue ( verifier.verify ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "imap.g.com" ) ) ) ; }

Target:
public void testSubjectAltNameAndCn ( ) { assertFalse ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "a.y.com" ) ) ) ; assertFalse ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "cn=imap.g.com" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "a.y.com" ) ) ) ; assertTrue ( verifyWithServerCertificate ( "imap.g.com" , new libcore.javax.net.ssl.DefaultHostnameVerifierTest.StubX509Certificate ( "" ) . addSubjectAlternativeName ( libcore.javax.net.ssl.DefaultHostnameVerifierTest.ALT_DNS_NAME , "imap.g.com" ) ) ) ; }
Source:
private void processNode ( org.xml.sax.Attributes attributes , java.lang.String superClassName ) { java.lang.String serviceName = getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_NAME , true ) ; if ( serviceName != null ) { serviceName = com.android.sdklib.xml.AndroidManifest.combinePackageAndClassName ( mManifestData.mPackage , serviceName ) ; if ( ( mErrorHandler ) != null ) { mErrorHandler.checkClass ( mLocator , serviceName , superClassName , false ) ; } } java.lang.String processName = getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_PROCESS , true ) ; if ( processName != null ) { mManifestData.addProcessName ( processName ) ; } }

Target:
private void processSupportsScreensNode ( org.xml.sax.Attributes attributes ) { mManifestData.mSupportsScreens = new com.android.sdklib.xml.ManifestData.SupportsScreens ( ) ; mManifestData.mSupportsScreens.mResizeable = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_RESIZABLE , true ) ) ; mManifestData.mSupportsScreens.mAnyDensity = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_ANYDENSITY , true ) ) ; mManifestData.mSupportsScreens.mSmallScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_SMALLSCREENS , true ) ) ; mManifestData.mSupportsScreens.mNormalScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_NORMALSCREENS , true ) ) ; mManifestData.mSupportsScreens.mLargeScreens = java.lang.Boolean.valueOf ( getAttributeValue ( attributes , AndroidManifest.ATTRIBUTE_LARGESCREENS , true ) ) ; }
Source:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0003.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JAnnotation jAnnotation = ( ( com.android.jack.ir.ast.JAnnotation ) ( node ) ) ; retentionPolicy = jAnnotation.getRetentionPolicy ( ) ; annotationType = com.android.jack.jayce.v0003.io.ImportHelper.getSignatureName ( jAnnotation.getType ( ) ) ; elements = loader.load ( com.android.jack.jayce.v0003.nodes.NNameValuePair.class , jAnnotation.getNameValuePairs ( ) ) ; sourceInfo = loader.load ( jAnnotation.getSourceInfo ( ) ) ; }

Target:
public void importFromJast ( @ javax.annotation.Nonnull com.android.jack.jayce.v0003.io.ImportHelper loader , @ javax.annotation.Nonnull java.lang.Object node ) { com.android.jack.ir.ast.JAnnotation jAnnotation = ( ( com.android.jack.ir.ast.JAnnotation ) ( node ) ) ; retentionPolicy = jAnnotation.getRetentionPolicy ( ) ; annotationType = com.android.jack.jayce.v0003.io.ImportHelper.getSignatureName ( jAnnotation.getType ( ) ) ; elements = loader.load ( com.android.jack.jayce.v0003.nodes.NNameValuePair.class , jAnnotation.getNameValuePairs ( ) ) ; sourceInfo = loader.load ( jAnnotation.getSourceInfo ( ) ) ; markers = loader.load ( com.android.jack.jayce.v0003.nodes.NMarker.class , jAnnotation.getAllMarkers ( ) ) ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } com.android.jack.statistics.BinaryOperationWithCst.visitor.accept ( method ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( this . getClass ( ) , method ) ) ) ) { return ; } visitor.accept ( method ) ; }
Source:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg , java.lang.Object [ ] params ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.lang.Throwable thrown , java.util.function.Supplier < java.lang.String > msgSupplier ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msgSupplier.get ( ) ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }
Source:
public void remove ( android.icu.impl.ICUResource.Key key ) { if ( ( names ) != null ) { android.icu.impl.NameType type = android.icu.impl.TimeZoneNamesImpl.ZNamesLoader.nameTypeFromKey ( key ) ; if ( ( type != null ) && ( ( type.ordinal ( ) ) < ( numNames ) ) ) { names [ type.ordinal ( ) ] = null ; } } }

Target:
public void putNoFallback ( android.icu.impl.ICUResource.Key key ) { if ( ( names ) == null ) { names = new java.lang.String [ numNames ] ; } android.icu.impl.NameType type = android.icu.impl.TimeZoneNamesImpl.ZNamesLoader.nameTypeFromKey ( key ) ; if ( ( ( type != null ) && ( ( type.ordinal ( ) ) < ( numNames ) ) ) && ( ( names [ type.ordinal ( ) ] ) == null ) ) { names [ type.ordinal ( ) ] = android.icu.impl.TimeZoneNamesImpl.ZNamesLoader.NO_NAME ; } }
Source:
public void testInstall_withBadlyFormedBundleVersion ( ) throws java.lang.Exception { java.lang.String invalidBundleVersion = "A01.001" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( invalidBundleVersion , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.BundleVersion validBundleVersion = new libcore.tzdata.update2.BundleVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRulesVersionBytes = validBundleVersion.toBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_STRUCTURE , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public android.app.Dialog onCreateDialog ( final android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.i ( "SmsBottomSheetFragment.onCreateDialog" , null ) ; android.app.Dialog dialog = super . onCreateDialog ( savedInstanceState ) ; dialog.getWindow ( ) . addFlags ( WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED ) ; return dialog ; }

Target:
public android.app.Dialog onCreateDialog ( final android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.i ( "SmsBottomSheetFragment.onCreateDialog" , null ) ; android.app.Dialog dialog = super . onCreateDialog ( savedInstanceState ) ; dialog.getWindow ( ) . addFlags ( WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED ) ; inCallUiLock = com.android.dialer.common.FragmentUtils.getParentUnsafe ( this , com.android.incallui.answer.impl.SmsBottomSheetFragment.SmsSheetHolder.class ) . acquireInCallUiLock ( "SmsBottomSheetFragment" ) ; return dialog ; }
Source:
public void onQueueChanged ( java.util.List < android.media.session.MediaSession.QueueItem > queue ) { if ( queue == null ) { android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , "onQueueChanged: received null queue" ) ; return ; } android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "onQueueChanged: NowPlaying list changed, Queue Size = " + ( queue.size ( ) ) ) ) ; mAddressedMediaPlayer.updateNowPlayingList ( queue ) ; if ( ! ( registerNotificationRspNowPlayingChangedNative ( AvrcpConstants.NOTIFICATION_TYPE_CHANGED ) ) ) { android.util.Log.e ( com.android.bluetooth.avrcp.Avrcp.TAG , "onQueueChanged-registerNotificationRspNowPlayingChangedNative failed" ) ; } }

Target:
public synchronized void onPlaybackStateChanged ( android.media.session.PlaybackState state ) { if ( com.android.bluetooth.avrcp.Avrcp.DEBUG ) android.util.Log.v ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "onPlaybackStateChanged: state " + ( state.toString ( ) ) ) ) ; updatePlaybackState ( state ) ; byte stateBytes = ( ( byte ) ( convertPlayStateToBytes ( state.getState ( ) ) ) ) ; com.android.bluetooth.avrcp.MediaPlayerInfo player = getAddressedPlayerInfo ( ) ; if ( player != null ) { player.setPlayStatus ( stateBytes ) ; } else { android.util.Log.w ( com.android.bluetooth.avrcp.Avrcp.TAG , ( "onPlaybackStateChanged: no addressed player id=" + ( mCurrAddrPlayerID ) ) ) ; } }
Source:
private static sun.misc.Unsafe getUnsafe ( ) throws java.lang.Exception { java.lang.Class < ? > unsafeClass = java.lang.Class.forName ( "sun.misc.Unsafe" ) ; java.lang.reflect.Field f = unsafeClass.getDeclaredField ( "theUnsafe" ) ; f.setAccessible ( true ) ; return ( ( sun.misc.Unsafe ) ( f.get ( null ) ) ) ; }

Target:
private static sun.misc.Unsafe getUnsafe ( ) throws java.lang.Exception { java.lang.Class < ? > unsafeClass = sun.misc.Unsafe.class ; java.lang.reflect.Field f = unsafeClass.getDeclaredField ( "theUnsafe" ) ; f.setAccessible ( true ) ; return ( ( sun.misc.Unsafe ) ( f.get ( null ) ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mActivity = getActivity ( ) ; new android.cts.util.PollingCheck ( ) { @ java.lang.Override protected boolean check ( ) { return mActivity.hasWindowFocus ( ) ; } } . run ( ) ; mInstrumentation = getInstrumentation ( ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mActivity = getActivity ( ) ; new android.cts.util.PollingCheck ( ) { @ java.lang.Override protected boolean check ( ) { return mActivity.hasWindowFocus ( ) ; } } . run ( ) ; mInstrumentation = getInstrumentation ( ) ; mKeyEventUtil = new android.cts.util.KeyEventUtil ( mInstrumentation ) ; }
Source:
private com.android.jack.ir.ast.JMethodId getNewInstanceId ( com.android.jack.ir.ast.JClassOrInterface reflectArrayType ) { if ( ( newInstance ) == null ) { java.util.List < com.android.jack.ir.ast.JType > argsType = new java.util.ArrayList < com.android.jack.ir.ast.JType > ( 2 ) ; argsType.add ( jlc ) ; argsType.add ( getIntArrayType ( ) ) ; newInstance = reflectArrayType.getOrCreateMethodId ( "newInstance" , argsType , MethodKind.STATIC ) ; } assert ( newInstance ) != null ; return newInstance ; }

Target:
private com.android.jack.ir.ast.JMethodId getNewInstanceId ( com.android.jack.ir.ast.JClassOrInterface reflectArrayType ) { if ( ( newInstance ) == null ) { java.util.List < com.android.jack.ir.ast.JType > argsType = new java.util.ArrayList < com.android.jack.ir.ast.JType > ( 2 ) ; argsType.add ( jlc ) ; argsType.add ( intArrayType ) ; newInstance = reflectArrayType.getOrCreateMethodId ( "newInstance" , argsType , MethodKind.STATIC ) ; } assert ( newInstance ) != null ; return newInstance ; }
Source:
private void onInitiateDataPathResponseSuccessLocal ( android.os.Message command , int ndpId ) { if ( com.android.server.wifi.nan.WifiNanStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.nan.WifiNanStateManager.TAG , ( ( ( "onInitiateDataPathResponseSuccessLocal: command=" + command ) + ", ndpId=" ) + ndpId ) ) ; } mDataPathMgr.onDataPathInitiateSuccess ( ( ( java.lang.String ) ( command.obj ) ) , ndpId ) ; }

Target:
private void onInitiateDataPathResponseSuccessLocal ( android.os.Message command , int ndpId ) { if ( com.android.server.wifi.aware.WifiAwareStateManager.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareStateManager.TAG , ( ( ( "onInitiateDataPathResponseSuccessLocal: command=" + command ) + ", ndpId=" ) + ndpId ) ) ; } mDataPathMgr.onDataPathInitiateSuccess ( ( ( java.lang.String ) ( command.obj ) ) , ndpId ) ; }
Source:
private com.android.bluetooth.hid.HidService getService ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hid.HidService.TAG , "InputDevice call not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } android.util.Log.w ( com.android.bluetooth.hid.HidService.TAG , "Service is null" ) ; return null ; }

Target:
private com.android.bluetooth.hid.HidHostService getService ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.hid.HidHostService.TAG , "InputDevice call not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } android.util.Log.w ( com.android.bluetooth.hid.HidHostService.TAG , "Service is null" ) ; return null ; }
Source:
public void setGsmBroadcastActivation ( boolean activate , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GSM_BROADCAST_ACTIVATION , response ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeInt ( ( activate ? 0 : 1 ) ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void sendEnvelope ( java.lang.String contents , android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeString ( contents ) ; send ( rr ) ; }
Source:
private void acquireLock ( android.content.Intent intent ) throws java.io.IOException { android.cts.FileChannelInterProcessLockTest.LockType lockType = ( ( android.cts.FileChannelInterProcessLockTest.LockType ) ( intent.getSerializableExtra ( android.cts.LockHoldingService.LOCK_TYPE_KEY ) ) ) ; this . fileLock = android.cts.FileChannelInterProcessLockTest.acquire ( lockType ) ; android.content.Intent responseIntent = new android.content.Intent ( ) . putExtra ( android.cts.LockHoldingService.NOTIFICATION_KEY , android.cts.LockHoldingService.NOTIFICATION_LOCK_HELD ) . setAction ( android.cts.LockHoldingService.ACTION_TYPE_FOR_INTENT_COMMUNICATION ) ; sendBroadcast ( responseIntent ) ; }

Target:
private void acquireLock ( android.content.Intent intent ) throws java.io.IOException { android.cts.FileChannelInterProcessLockTest.LockType lockType = ( ( android.cts.FileChannelInterProcessLockTest.LockType ) ( intent.getSerializableExtra ( android.cts.LockHoldingService.LOCK_TYPE_KEY ) ) ) ; this . fileLock = android.cts.FileChannelInterProcessLockTest.acquire ( lockType ) ; android.content.Intent responseIntent = new android.content.Intent ( ) . setPackage ( "android.libcorefileio.cts" ) . putExtra ( android.cts.LockHoldingService.NOTIFICATION_KEY , android.cts.LockHoldingService.NOTIFICATION_LOCK_HELD ) . setAction ( android.cts.LockHoldingService.ACTION_TYPE_FOR_INTENT_COMMUNICATION ) ; sendBroadcast ( responseIntent ) ; }
Source:
public final void line ( ) throws org.jf.smali.RecognitionException { int integral_literal90 = 0 ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_LINE , org.jf.smali.smaliTreeWalker.FOLLOW_I_LINE_in_line1481 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_integral_literal_in_line1483 ) ; integral_literal90 = integral_literal ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; method_stack.peek ( ) . methodBuilder.addLineNumber ( integral_literal90 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } }

Target:
public final void line ( ) throws org.jf.smali.RecognitionException { int integral_literal90 = 0 ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_LINE , org.jf.smali.smaliTreeWalker.FOLLOW_I_LINE_in_line1483 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_integral_literal_in_line1485 ) ; integral_literal90 = integral_literal ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; method_stack.peek ( ) . methodBuilder.addLineNumber ( integral_literal90 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } }
Source:
private void writeStandardProjectResources ( com.android.sdklib.internal.build.SignedJarBuilder jarBuilder , org.eclipse.jdt.core.IJavaProject javaProject , org.eclipse.core.resources.IWorkspaceRoot wsRoot , java.util.ArrayList < java.lang.String > list ) throws java.io.IOException { java.util.ArrayList < org.eclipse.core.runtime.IPath > sourceFolders = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getSourceClasspaths ( javaProject ) ; for ( org.eclipse.core.runtime.IPath sourcePath : sourceFolders ) { org.eclipse.core.resources.IResource sourceResource = wsRoot.findMember ( sourcePath ) ; if ( ( sourceResource != null ) && ( ( sourceResource.getType ( ) ) == ( org.eclipse.core.resources.IResource.FOLDER ) ) ) { writeStandardSourceFolderResources ( jarBuilder , sourcePath , ( ( org.eclipse.core.resources.IFolder ) ( sourceResource ) ) , list ) ; } } }

Target:
private void writeStandardProjectResources ( com.android.sdklib.build.ApkBuilder apkBuilder , org.eclipse.jdt.core.IJavaProject javaProject , org.eclipse.core.resources.IWorkspaceRoot wsRoot , java.util.ArrayList < java.lang.String > list ) throws com.android.sdklib.build.ApkBuilder.ApkCreationException , com.android.sdklib.build.ApkBuilder.DuplicateFileException , com.android.sdklib.build.ApkBuilder.SealedApkException { java.util.ArrayList < org.eclipse.core.runtime.IPath > sourceFolders = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.getSourceClasspaths ( javaProject ) ; for ( org.eclipse.core.runtime.IPath sourcePath : sourceFolders ) { org.eclipse.core.resources.IResource sourceResource = wsRoot.findMember ( sourcePath ) ; if ( ( sourceResource != null ) && ( ( sourceResource.getType ( ) ) == ( org.eclipse.core.resources.IResource.FOLDER ) ) ) { apkBuilder.addSourceFolder ( sourceResource.getLocation ( ) . toFile ( ) ) ; } } }
Source:
public void TestLineMonkey ( ) { int loopCount = 500 ; int seed = 1 ; if ( ( params.inclusion ) >= 9 ) { loopCount = 10000 ; } logln ( "Line Break Monkey Test" ) ; android.icu.dev.test.rbbi.RBBITestMonkey.RBBILineMonkey m = new android.icu.dev.test.rbbi.RBBITestMonkey.RBBILineMonkey ( ) ; android.icu.text.BreakIterator bi = android.icu.text.BreakIterator.getLineInstance ( java.util.Locale.US ) ; if ( ( params ) == null ) { loopCount = 50 ; } RunMonkey ( bi , m , "line" , seed , loopCount ) ; }

Target:
public void TestCharMonkey ( ) { int loopCount = 500 ; int seed = 1 ; if ( ( android.icu.dev.test.TestFmwk.getExhaustiveness ( ) ) >= 9 ) { loopCount = 10000 ; } android.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey m = new android.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey ( ) ; android.icu.text.BreakIterator bi = android.icu.text.BreakIterator.getCharacterInstance ( java.util.Locale.US ) ; RunMonkey ( bi , m , "char" , seed , loopCount ) ; }
Source:
android.server.cts.ActivityManagerState.ActivityTask getRecentsTask ( ) { android.server.cts.ActivityManagerState.ActivityStack recentsStack = getStackById ( android.server.cts.ActivityManagerTestBase.RECENTS_STACK_ID ) ; if ( recentsStack != null ) { for ( android.server.cts.ActivityManagerState.ActivityTask task : recentsStack.mTasks ) { if ( ( task.mTaskType ) == ( android.server.cts.ActivityManagerState.RECENTS_ACTIVITY_TYPE ) ) { return task ; } } return null ; } return null ; }

Target:
android.server.cts.ActivityManagerState.ActivityTask getHomeTask ( ) { android.server.cts.ActivityManagerState.ActivityStack homeStack = getStackById ( android.server.cts.HOME_STACK_ID ) ; if ( homeStack != null ) { for ( android.server.cts.ActivityManagerState.ActivityTask task : homeStack.mTasks ) { if ( ( task.mTaskType ) == ( android.server.cts.ActivityManagerState.HOME_ACTIVITY_TYPE ) ) { return task ; } } return null ; } return null ; }
Source:
public java.nio.CharBuffer put ( java.nio.CharBuffer src ) { if ( src == ( this ) ) { throw new java.lang.IllegalArgumentException ( ) ; } if ( ( src.remaining ( ) ) > ( remaining ( ) ) ) { throw new java.nio.BufferOverflowException ( ) ; } char [ ] contents = new char [ src.remaining ( ) ] ; src.get ( contents ) ; put ( contents ) ; return this ; }

Target:
public java.nio.CharBuffer put ( java.nio.CharBuffer src ) { if ( src == ( this ) ) { throw new java.lang.IllegalArgumentException ( "src == this" ) ; } if ( ( src.remaining ( ) ) > ( remaining ( ) ) ) { throw new java.nio.BufferOverflowException ( ) ; } char [ ] contents = new char [ src.remaining ( ) ] ; src.get ( contents ) ; put ( contents ) ; return this ; }
Source:
public static android.icu.util.VTimeZone create ( java.lang.String tzid ) { android.icu.util.VTimeZone vtz = new android.icu.util.VTimeZone ( tzid ) ; vtz.tz = ( ( android.icu.util.BasicTimeZone ) ( android.icu.util.TimeZone.getTimeZone ( tzid , TimeZone.TIMEZONE_ICU ) ) ) ; vtz.olsonzid = vtz.tz.getID ( ) ; return vtz ; }

Target:
public static android.icu.util.VTimeZone create ( java.lang.String tzid ) { android.icu.util.BasicTimeZone basicTimeZone = android.icu.util.TimeZone.getFrozenICUTimeZone ( tzid , true ) ; if ( basicTimeZone == null ) { return null ; } android.icu.util.VTimeZone vtz = new android.icu.util.VTimeZone ( tzid ) ; vtz.tz = ( ( android.icu.util.BasicTimeZone ) ( basicTimeZone.cloneAsThawed ( ) ) ) ; vtz.olsonzid = vtz.tz.getID ( ) ; return vtz ; }
Source:
public void test_parkFor_2 ( ) { tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; }

Target:
public void test_parkFor_2 ( ) { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , false , 1000 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 300 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 300 ) ; }
Source:
private void addDeviceCategory ( android.preference.PreferenceGroup preferenceGroup , int titleId , com.android.settingslib.bluetooth.BluetoothDeviceFilter.Filter filter , boolean addCachedDevices ) { preferenceGroup.setTitle ( titleId ) ; getPreferenceScreen ( ) . addPreference ( preferenceGroup ) ; setFilter ( filter ) ; setDeviceListGroup ( preferenceGroup ) ; if ( addCachedDevices ) { addCachedDevices ( ) ; } preferenceGroup.setEnabled ( true ) ; }

Target:
private void startScanning ( ) { if ( isUiRestricted ( ) ) { return ; } if ( ! ( mAvailableDevicesCategoryIsPresent ) ) { getPreferenceScreen ( ) . addPreference ( mAvailableDevicesCategory ) ; mAvailableDevicesCategoryIsPresent = true ; } if ( ( mAvailableDevicesCategory ) != null ) { setDeviceListGroup ( mAvailableDevicesCategory ) ; removeAllDevices ( ) ; } mLocalManager.getCachedDeviceManager ( ) . clearNonBondedDevices ( ) ; mAvailableDevicesCategory.removeAll ( ) ; mInitialScanStarted = true ; mLocalAdapter.startScanning ( true ) ; }
Source:
public static void initDebugBridge ( java.lang.String adbLocation ) { if ( ( com.android.hierarchyviewerlib.device.DeviceBridge.bridge ) == null ) { com.android.ddmlib.AndroidDebugBridge.init ( false ) ; } if ( ( ( com.android.hierarchyviewerlib.device.DeviceBridge.bridge ) == null ) || ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.bridge.isConnected ( ) ) ) ) { com.android.hierarchyviewerlib.device.DeviceBridge.bridge = com.android.ddmlib.AndroidDebugBridge.createBridge ( adbLocation , true ) ; } }

Target:
public static void initDebugBridge ( java.lang.String adbLocation ) { if ( ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge ) == null ) { com.android.ddmlib.AndroidDebugBridge.init ( false ) ; } if ( ( ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge ) == null ) || ( ! ( com.android.hierarchyviewerlib.device.DeviceBridge.sBridge.isConnected ( ) ) ) ) { com.android.hierarchyviewerlib.device.DeviceBridge.sBridge = com.android.ddmlib.AndroidDebugBridge.createBridge ( adbLocation , true ) ; } }
Source:
private void updateFullscreenAndGreenScreenMode ( int callState , @ com.android.incallui.videotech.utils.SessionModificationState int sessionModificationState ) { if ( ( videoCallScreen ) != null ) { boolean shouldShowFullscreen = com.android.incallui.InCallPresenter.getInstance ( ) . isFullscreen ( ) ; boolean shouldShowGreenScreen = ( ( ( callState == ( com.android.incallui.call.DialerCall.State.DIALING ) ) || ( callState == ( com.android.incallui.call.DialerCall.State.CONNECTING ) ) ) || ( callState == ( com.android.incallui.call.DialerCall.State.INCOMING ) ) ) || ( com.android.incallui.VideoCallPresenter.isVideoUpgrade ( sessionModificationState ) ) ; videoCallScreen.updateFullscreenAndGreenScreenMode ( shouldShowFullscreen , shouldShowGreenScreen ) ; } }

Target:
private void updateFullscreenAndGreenScreenMode ( int callState , @ com.android.incallui.videotech.utils.SessionModificationState int sessionModificationState ) { if ( ( videoCallScreen ) != null ) { boolean shouldShowFullscreen = com.android.incallui.InCallPresenter.getInstance ( ) . isFullscreen ( ) ; boolean shouldShowGreenScreen = ( ( ( callState == ( com.android.incallui.call.state.DialerCallState.DIALING ) ) || ( callState == ( com.android.incallui.call.state.DialerCallState.CONNECTING ) ) ) || ( callState == ( com.android.incallui.call.state.DialerCallState.INCOMING ) ) ) || ( com.android.incallui.VideoCallPresenter.isVideoUpgrade ( sessionModificationState ) ) ; videoCallScreen.updateFullscreenAndGreenScreenMode ( shouldShowFullscreen , shouldShowGreenScreen ) ; } }
Source:
public void testConfigurationUpdatesWhenRotatingToSideFromDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsMultiWindowMode ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; rotateAndCheckSizes ( initialSizes , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }

Target:
public void testConfigurationUpdatesWhenRotatingToSideFromDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; rotateAndCheckSizes ( initialSizes , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.String cmdOut = getDevice ( ) . executeShellCommand ( "dumpsys meminfo" ) ; long uptime = ( java.lang.Long.parseLong ( cmdOut.substring ( ( ( cmdOut.indexOf ( "Uptime: " ) ) + 8 ) , ( ( cmdOut.indexOf ( "Realtime: " ) ) - 1 ) ) ) ) / 1000 ; kernelStartTime = ( ( java.lang.System.currentTimeMillis ( ) ) / 1000 ) - uptime ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.String uptime = getDevice ( ) . executeShellCommand ( "cat /proc/uptime" ) ; kernelStartTime = ( ( java.lang.System.currentTimeMillis ( ) ) / 1000 ) - ( java.lang.Integer.parseInt ( uptime.substring ( 0 , uptime.indexOf ( '.' ) ) ) ) ; }
Source:
protected void handleRemoveRequest ( android.net.NetworkRequest request ) { if ( ( ( mExpectations ) != null ) && ( mExpectingAdditions ) ) { fail ( "Can't remove requests while expecting requests to be added" ) ; } super . handleRemoveRequest ( request ) ; if ( ! ( mExpectingAdditions ) ) { assertTrue ( "Removed more requests than expected" , ( ( mExpectations.getCount ( ) ) > 0 ) ) ; mExpectations.countDown ( ) ; } }

Target:
protected void handleRemoveRequest ( android.net.NetworkRequest request ) { if ( ( ( mExpectations ) != null ) && ( mExpectingAdditions ) ) { org.junit.Assert.fail ( "Can't remove requests while expecting requests to be added" ) ; } super . handleRemoveRequest ( request ) ; if ( ! ( mExpectingAdditions ) ) { org.junit.Assert.assertTrue ( "Removed more requests than expected" , ( ( mExpectations.getCount ( ) ) > 0 ) ) ; mExpectations.countDown ( ) ; } }
Source:
private int performDexOptLI ( android.content.pm.PackageParser.Package pkg , boolean forceDex , boolean defer , boolean inclDependencies ) { java.util.HashSet < java.lang.String > done ; boolean performed = false ; if ( inclDependencies && ( ( ( pkg.usesLibraries ) != null ) || ( ( pkg.usesOptionalLibraries ) != null ) ) ) { done = new java.util.HashSet < java.lang.String > ( ) ; done.add ( pkg.packageName ) ; } else { done = null ; } return performDexOptLI ( pkg , forceDex , defer , done ) ; }

Target:
public boolean performDexOpt ( java.lang.String packageName ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can request dexopt be performed" ) ; android.content.pm.PackageParser.Package p ; synchronized ( mPackages ) { p = mPackages.get ( packageName ) ; if ( p == null ) { return false ; } p.mLastPackageUsageTimeInMills = java.lang.System.currentTimeMillis ( ) ; mPackageUsage.write ( ) ; if ( ! ( p.mDexOptNeeded ) ) { return false ; } } synchronized ( mInstallLock ) { return ( performDexOptLI ( p , false , false , true ) ) == ( com.android.server.pm.PackageManagerService.DEX_OPT_PERFORMED ) ; } }
Source:
public void addFooterView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mFooterViewInfos.add ( info ) ; if ( ( mDataSetObserver ) != null ) { mDataSetObserver.onChanged ( ) ; } }

Target:
public void addFooterView ( android.view.View v , java.lang.Object data , boolean isSelectable ) { android.widget.ListView.FixedViewInfo info = new android.widget.ListView.FixedViewInfo ( ) ; info.view = v ; info.data = data ; info.isSelectable = isSelectable ; mFooterViewInfos.add ( info ) ; if ( ( ( mAdapter ) != null ) && ( ( mDataSetObserver ) != null ) ) { mDataSetObserver.onChanged ( ) ; } }
Source:
private int convertToAdapterState ( int state ) { switch ( state ) { case android.bluetooth.BluetoothProfile.STATE_DISCONNECTED : return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; case android.bluetooth.BluetoothProfile.STATE_DISCONNECTING : return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTING ; case android.bluetooth.BluetoothProfile.STATE_CONNECTED : return android.bluetooth.BluetoothAdapter.STATE_CONNECTED ; case android.bluetooth.BluetoothProfile.STATE_CONNECTING : return android.bluetooth.BluetoothAdapter.STATE_CONNECTING ; } android.util.Log.e ( com.android.bluetooth.btservice.AdapterProperties.TAG , "Error in convertToAdapterState" ) ; return - 1 ; }

Target:
private static int convertToAdapterState ( int state ) { switch ( state ) { case android.bluetooth.BluetoothProfile.STATE_DISCONNECTED : return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED ; case android.bluetooth.BluetoothProfile.STATE_DISCONNECTING : return android.bluetooth.BluetoothAdapter.STATE_DISCONNECTING ; case android.bluetooth.BluetoothProfile.STATE_CONNECTED : return android.bluetooth.BluetoothAdapter.STATE_CONNECTED ; case android.bluetooth.BluetoothProfile.STATE_CONNECTING : return android.bluetooth.BluetoothAdapter.STATE_CONNECTING ; } android.util.Log.e ( com.android.bluetooth.btservice.AdapterProperties.TAG , ( "convertToAdapterState, unknow state " + state ) ) ; return - 1 ; }