auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testHasDataDoesMatch ( ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) . addCategory ( "category" ) . setDataAndType ( uri , Context.ACTIVITY_SERVICE ) . putExtra ( "key1" , "value1" ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasData ( "https://www.google.com/search?q=NotMatcher" ) . matches ( intent ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasData ( android.net.Uri.parse ( "https://www.google.com/search?q=NotMatcher" ) ) . matches ( intent ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasData ( org.hamcrest.Matchers.equalTo ( android.net.Uri.parse ( "https://www.google.com/search?q=NotMatcher" ) ) ) . matches ( intent ) ) ; }

Target:
public void hasDataDoesMatch ( ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) . addCategory ( "category" ) . setDataAndType ( uri , Context.ACTIVITY_SERVICE ) . putExtra ( "key1" , "value1" ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasData ( "https://www.google.com/search?q=NotMatcher" ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasData ( android.net.Uri.parse ( "https://www.google.com/search?q=NotMatcher" ) ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasData ( org.hamcrest.Matchers.equalTo ( android.net.Uri.parse ( "https://www.google.com/search?q=NotMatcher" ) ) ) . matches ( intent ) ) ; }
Source:
com.android.jack.ir.ast.cfg.ExceptionHandlingContext getOrCreate ( @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.cfg.JCatchBasicBlock > catchBlocks ) { if ( catchBlocks.isEmpty ( ) ) { return com.android.jack.ir.ast.cfg.ExceptionHandlingContext.EMPTY ; } com.android.jack.ir.ast.cfg.ExceptionHandlingContext context = com.android.jack.ir.ast.cfg.ExceptionHandlingContext.create ( catchBlocks ) ; com.android.jack.ir.ast.cfg.ExceptionHandlingContext existing = pool.get ( context ) ; if ( existing == null ) { existing = context ; pool.put ( context , context ) ; } return existing ; }

Target:
com.android.jack.ir.ast.cfg.ExceptionHandlingContext getOrCreate ( @ javax.annotation.Nonnull java.util.List < com.android.jack.ir.ast.cfg.JCatchBasicBlock > catchBlocks ) { com.android.jack.ir.ast.cfg.ExceptionHandlingContext ehc = pool.get ( catchBlocks ) ; if ( ehc == null ) { ehc = com.android.jack.ir.ast.cfg.ExceptionHandlingContext.create ( catchBlocks ) ; pool.put ( catchBlocks , ehc ) ; } return ehc ; }
Source:
private android.graphics.drawable.Drawable getCallProviderIcon ( com.android.incallui.Call call ) { android.telecom.PhoneAccount account = getAccountForCall ( call ) ; if ( ( account != null ) && ( getTelecomManager ( ) . hasMultipleCallCapableAccounts ( ) ) ) { return account.getIcon ( mContext ) ; } return null ; }

Target:
private android.graphics.drawable.Drawable getConnectionIcon ( ) { android.telecom.StatusHints statusHints = mPrimary.getTelecommCall ( ) . getDetails ( ) . getStatusHints ( ) ; if ( ( statusHints != null ) && ( ( statusHints.getIconResId ( ) ) != 0 ) ) { android.graphics.drawable.Drawable icon = statusHints.getIcon ( mContext ) ; if ( icon != null ) { return icon ; } } return null ; }
Source:
public static java.util.TimeZone makeTimeZone ( java.lang.String id ) throws java.io.IOException { int index = java.util.Arrays.binarySearch ( libcore.util.ZoneInfoDB.ids , id ) ; if ( index < 0 ) { return null ; } libcore.io.BufferIterator it = libcore.util.ZoneInfoDB.TZDATA.bigEndianIterator ( ) ; it.skip ( libcore.util.ZoneInfoDB.byteOffsets [ index ] ) ; return libcore.util.ZoneInfo.makeTimeZone ( id , it ) ; }

Target:
private boolean loadData ( java.lang.String path ) { try { mappedFile = libcore.io.MemoryMappedFile.mmapRO ( path ) ; } catch ( libcore.io.ErrnoException errnoException ) { return false ; } try { readHeader ( ) ; return true ; } catch ( java.lang.Exception ex ) { java.lang.System.logE ( ( ( "tzdata file \"" + path ) + "\" was present but invalid!" ) , ex ) ; return false ; } }
Source:
public boolean matches ( java.lang.Object obj ) { android.hardware.camera2.TotalCaptureResult result = ( ( android.hardware.camera2.TotalCaptureResult ) ( obj ) ) ; java.lang.Long timeStamp = result.get ( CaptureResult.SENSOR_TIMESTAMP ) ; if ( ( timeStamp != null ) && ( ( timeStamp.longValue ( ) ) > 0L ) ) { return true ; } return false ; }

Target:
public boolean matchesObject ( java.lang.Object obj ) { android.hardware.camera2.TotalCaptureResult result = ( ( android.hardware.camera2.TotalCaptureResult ) ( obj ) ) ; java.lang.Long timeStamp = result.get ( CaptureResult.SENSOR_TIMESTAMP ) ; if ( ( timeStamp != null ) && ( ( timeStamp.longValue ( ) ) > 0L ) ) { return true ; } return false ; }
Source:
public void dumpDisplayListForCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Dump displaylist" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( selectedNode.viewNode.window.getDevice ( ) ) ; hvDevice.outputDisplayList ( selectedNode.viewNode ) ; } } ) ; } }

Target:
public void relayoutCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Request layout" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( selectedNode.viewNode.window.getDevice ( ) ) ; hvDevice.requestLayout ( selectedNode.viewNode ) ; } } ) ; } }
Source:
private void init ( ) { mSendReceiver.reset ( ) ; mDeliveryReceiver.reset ( ) ; mDataSmsReceiver.reset ( ) ; android.telephony.cts.SmsManagerTest.mReceivedDataSms = false ; mSentIntent = android.app.PendingIntent.getBroadcast ( getContext ( ) , 0 , mSendIntent , PendingIntent.FLAG_ONE_SHOT ) ; mDeliveredIntent = android.app.PendingIntent.getBroadcast ( getContext ( ) , 0 , mDeliveryIntent , PendingIntent.FLAG_ONE_SHOT ) ; }

Target:
private void init ( ) { mSendReceiver.reset ( ) ; mDeliveryReceiver.reset ( ) ; mDataSmsReceiver.reset ( ) ; mSmsDeliverReceiver.reset ( ) ; mSmsReceivedReceiver.reset ( ) ; android.telephony.cts.SmsManagerTest.mReceivedDataSms = false ; mSentIntent = android.app.PendingIntent.getBroadcast ( getContext ( ) , 0 , mSendIntent , PendingIntent.FLAG_ONE_SHOT ) ; mDeliveredIntent = android.app.PendingIntent.getBroadcast ( getContext ( ) , 0 , mDeliveryIntent , PendingIntent.FLAG_ONE_SHOT ) ; }
Source:
public java.lang.String guessZoneIdByNitzCountry ( com.android.internal.telephony.NitzData nitzData , java.lang.String isoCountryCode ) { return guessZoneIdByInstantOffsetDstCountry ( nitzData.getCurrentTimeInMillis ( ) , nitzData.getLocalOffsetMillis ( ) , nitzData.isDst ( ) , isoCountryCode ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } com.android.internal.telephony.TimeZoneLookupHelper.OffsetResult result = ( ( com.android.internal.telephony.TimeZoneLookupHelper.OffsetResult ) ( o ) ) ; if ( ( isOnlyMatch ) != ( result.isOnlyMatch ) ) { return false ; } return zoneId.equals ( result.zoneId ) ; }
Source:
public boolean trackBssid ( java.lang.String bssid , boolean enable ) { localLog ( ( ( "trackBssid: " + ( enable ? "enable " : "disable " ) ) + bssid ) ) ; boolean ret = mNetworkSelector.enableBssidForNetworkSelection ( bssid , enable ) ; if ( ret && ( ! enable ) ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } return ret ; }

Target:
public boolean trackBssid ( java.lang.String bssid , boolean enable , int reasonCode ) { localLog ( ( ( ( ( "trackBssid: " + ( enable ? "enable " : "disable " ) ) + bssid ) + " reason code " ) + reasonCode ) ) ; boolean ret = mNetworkSelector.enableBssidForNetworkSelection ( bssid , enable , reasonCode ) ; if ( ret && ( ! enable ) ) { startConnectivityScan ( com.android.server.wifi.WifiConnectivityManager.SCAN_IMMEDIATELY ) ; } return ret ; }
Source:
private boolean hasRestrictedNetworkPermission ( android.content.pm.PackageInfo app ) { int flags = ( ( app.applicationInfo ) != null ) ? app.applicationInfo.flags : 0 ; if ( ( ( flags & ( android.content.pm.ApplicationInfo.FLAG_SYSTEM ) ) != 0 ) || ( ( flags & ( android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP ) ) != 0 ) ) { return true ; } return ( hasPermission ( app , android.Manifest.permission.CONNECTIVITY_INTERNAL ) ) || ( hasPermission ( app , android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS ) ) ; }

Target:
private boolean hasRestrictedNetworkPermission ( android.content.pm.PackageInfo app ) { if ( isPreinstalledSystemApp ( app ) ) return true ; return ( hasPermission ( app , android.Manifest.permission.CONNECTIVITY_INTERNAL ) ) || ( hasPermission ( app , android.Manifest.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS ) ) ; }
Source:
public void cdmaInfoRec ( int indicationType , com.android.internal.telephony.V1_0.CdmaInformationRecords var2 ) { }

Target:
public void restrictedStateChanged ( int indicationType , int state ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLogvRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RESTRICTED_STATE_CHANGED , state ) ; if ( ( mRil.mRestrictedStateRegistrant ) != null ) { mRil.mRestrictedStateRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , state , null ) ) ; } }
Source:
private java.security.cert.X509Certificate getCertificateFromResources ( java.lang.String resourceName ) throws java.lang.Exception { try ( java.io.InputStream in = getClass ( ) . getResourceAsStream ( resourceName ) ) { if ( in == null ) { throw new java.lang.IllegalArgumentException ( ( "Resource not found: " + resourceName ) ) ; } return ( ( java.security.cert.X509Certificate ) ( java.security.cert.CertificateFactory.getInstance ( "X.509" ) . generateCertificate ( in ) ) ) ; } }

Target:
public void testV1OneSignerSHA224withDSAAcceptedWithKeysTooLongForDigest ( ) throws java.lang.Exception { java.security.PublicKey publicKey = com.android.apksig.internal.util.Resources.toCertificate ( getClass ( ) , "dsa-2048.x509.pem" ) . getPublicKey ( ) ; java.security.Signature s = java.security.Signature.getInstance ( "SHA224withDSA" ) ; try { s.initVerify ( publicKey ) ; } catch ( java.security.InvalidKeyException e ) { org.junit.Assume.assumeNoException ( e ) ; } assertVerifiedForEach ( "v1-only-with-dsa-sha224-1.2.840.10040.4.1-%s.apk" , com.android.apksig.ApkVerifierTest.DSA_KEY_NAMES_2048_AND_LARGER ) ; assertVerifiedForEach ( "v1-only-with-dsa-sha224-2.16.840.1.101.3.4.3.1-%s.apk" , com.android.apksig.ApkVerifierTest.DSA_KEY_NAMES_2048_AND_LARGER ) ; }
Source:
public boolean onKeyUp ( final int keyCode , final android.view.KeyEvent event ) { 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 onKeyUp ( keyCode , event ) ; } } ) ; return ret ; } return mAwContents.onKeyUp ( keyCode , event ) ; }

Target:
public void onWindowFocusChanged ( final boolean hasWindowFocus ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onWindowFocusChanged ( hasWindowFocus ) ; } } ) ; return ; } mAwContents.onWindowFocusChanged ( hasWindowFocus ) ; }
Source:
public boolean open ( ) { createContents ( ) ; postCreate ( ) ; mShell.open ( ) ; mShell.layout ( ) ; org.eclipse.swt.widgets.Display display = getParent ( ) . getDisplay ( ) ; while ( ! ( mShell.isDisposed ( ) ) ) { if ( ! ( display.readAndDispatch ( ) ) ) { display.sleep ( ) ; } } return mChanged ; }

Target:
public boolean open ( ) { createContents ( ) ; positionShell ( ) ; postCreate ( ) ; mShell.open ( ) ; mShell.layout ( ) ; org.eclipse.swt.widgets.Display display = getParent ( ) . getDisplay ( ) ; while ( ! ( mShell.isDisposed ( ) ) ) { if ( ! ( display.readAndDispatch ( ) ) ) { display.sleep ( ) ; } } return mChanged ; }
Source:
private boolean isEINPROGRESS ( java.io.IOException e ) { if ( isBlocking ( ) ) { return false ; } if ( e instanceof java.net.ConnectException ) { java.lang.Throwable cause = e.getCause ( ) ; if ( cause instanceof libcore.io.ErrnoException ) { return ( ( ( libcore.io.ErrnoException ) ( cause ) ) . errno ) == ( EINPROGRESS ) ; } } return false ; }

Target:
private boolean isEINPROGRESS ( java.io.IOException e ) { if ( isBlocking ( ) ) { return false ; } if ( e instanceof java.net.ConnectException ) { java.lang.Throwable cause = e.getCause ( ) ; if ( cause instanceof android.system.ErrnoException ) { return ( ( ( android.system.ErrnoException ) ( cause ) ) . errno ) == ( EINPROGRESS ) ; } } return false ; }
Source:
public java.lang.String getSysroot ( com.android.build.gradle.internal.core.Abi abi ) { return ( ( ( ( ndkDirectory ) + "/platforms/" ) + ( getCompileSdkVersion ( ) ) ) + "/arch-" ) + ( abi.getArchitecture ( ) ) ; }

Target:
public java.lang.String getSysroot ( com.android.build.gradle.internal.core.Abi abi ) { if ( ( getCompileSdkVersion ( ) ) == null ) { return "" ; } else { return ( ( ( ( ndkDirectory ) + "/platforms/" ) + ( getCompileSdkVersion ( ) ) ) + "/arch-" ) + ( abi.getArchitecture ( ) ) ; } }
Source:
public void writeToProto ( android.util.proto.ProtoOutputStream proto , long tag ) { final long start = proto.start ( tag ) ; proto.write ( NetworkIdentityProto.TYPE , mType ) ; if ( ( mSubscriberId ) != null ) { proto.write ( NetworkIdentityProto.SUBSCRIBER_ID , android.net.NetworkIdentity.scrubSubscriberId ( mSubscriberId ) ) ; } proto.write ( NetworkIdentityProto.NETWORK_ID , mNetworkId ) ; proto.write ( NetworkIdentityProto.ROAMING , mRoaming ) ; proto.write ( NetworkIdentityProto.METERED , mMetered ) ; proto.end ( start ) ; }

Target:
public void writeToProto ( android.util.proto.ProtoOutputStream proto , long tag ) { final long start = proto.start ( tag ) ; proto.write ( NetworkIdentityProto.TYPE , mType ) ; if ( ( mSubscriberId ) != null ) { proto.write ( NetworkIdentityProto.SUBSCRIBER_ID , android.net.NetworkIdentity.scrubSubscriberId ( mSubscriberId ) ) ; } proto.write ( NetworkIdentityProto.NETWORK_ID , mNetworkId ) ; proto.write ( NetworkIdentityProto.ROAMING , mRoaming ) ; proto.write ( NetworkIdentityProto.METERED , mMetered ) ; proto.write ( NetworkIdentityProto.DEFAULT_NETWORK , mDefaultNetwork ) ; proto.end ( start ) ; }
Source:
private com.android.builder.core.VariantConfiguration getVariant ( ) { com.android.builder.core.VariantConfiguration variant = new com.android.builder.core.VariantConfiguration ( mDefaultConfig , new com.android.builder.core.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.core.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.core.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }

Target:
private com.android.builder.core.VariantConfiguration getVariant ( com.android.builder.model.SigningConfig signingOverride ) { com.android.builder.core.VariantConfiguration variant = new com.android.builder.core.VariantConfiguration ( mDefaultConfig , new com.android.builder.core.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.core.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT , signingOverride ) ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.core.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }
Source:
private static final void checkNotMD5 ( java.security.cert.X509Certificate cert ) throws java.security.cert.CertificateException { java.lang.String oid = cert.getSigAlgOID ( ) ; for ( java.lang.String blacklisted : org.conscrypt.ChainStrengthAnalyzer.OID_BLACKLIST ) { if ( oid.equals ( blacklisted ) ) { throw new java.security.cert.CertificateException ( "Signature uses an insecure hash function" ) ; } } }

Target:
private static final void checkSignatureAlgorithm ( java.security.cert.X509Certificate cert ) throws java.security.cert.CertificateException { java.lang.String oid = cert.getSigAlgOID ( ) ; for ( java.lang.String blacklisted : org.conscrypt.ChainStrengthAnalyzer.SIGNATURE_ALGORITHM_OID_BLACKLIST ) { if ( oid.equals ( blacklisted ) ) { throw new java.security.cert.CertificateException ( ( "Signature uses an insecure hash function: " + oid ) ) ; } } }
Source:
public static com.google.common.io.InputSupplier < java.io.InputStream > newInputStreamSupplier ( final java.net.URL url ) { com.google.common.base.Preconditions.checkNotNull ( url ) ; return new com.google.common.io.InputSupplier < java.io.InputStream > ( ) { @ java.lang.Override public java.io.InputStream getInput ( ) throws java.io.IOException { return url.openStream ( ) ; } } ; }

Target:
public static java.util.List < java.lang.String > readLines ( java.net.URL url , java.nio.charset.Charset charset ) throws java.io.IOException { return com.google.common.io.Resources.readLines ( url , charset , new com.google.common.io.LineProcessor < java.util.List < java.lang.String > > ( ) { final java.util.List < java.lang.String > result = com.google.common.collect.Lists.newArrayList ( ) ; @ java.lang.Override public boolean processLine ( java.lang.String line ) { result.add ( line ) ; return true ; } @ java.lang.Override public java.util.List < java.lang.String > getResult ( ) { return result ; } } ) ; }
Source:
public void checkServerTrusted ( java.security.cert.X509Certificate [ ] chain , java.lang.String authType , javax.net.ssl.SSLEngine engine ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = engine.getHandshakeSession ( ) ; if ( session == null ) { throw new java.security.cert.CertificateException ( "Not in handshake; no session available" ) ; } checkTrusted ( chain , authType , session , engine.getSSLParameters ( ) , false ) ; }

Target:
public java.util.List < java.security.cert.X509Certificate > getTrustedChainForServer ( java.security.cert.X509Certificate [ ] certs , java.lang.String authType , javax.net.ssl.SSLEngine engine ) throws java.security.cert.CertificateException { javax.net.ssl.SSLSession session = engine.getHandshakeSession ( ) ; if ( session == null ) { throw new java.security.cert.CertificateException ( "Not in handshake; no session available" ) ; } return checkTrusted ( certs , authType , session , engine.getSSLParameters ( ) , false ) ; }
Source:
public void test_isAfter ( ) { org.testng.Assert.assertTrue ( TEST_2007_07_15.isAfter ( java.time.LocalDate.of ( 2007 , 7 , 14 ) ) ) ; org.testng.Assert.assertFalse ( TEST_2007_07_15.isAfter ( java.time.LocalDate.of ( 2007 , 7 , 16 ) ) ) ; org.testng.Assert.assertFalse ( TEST_2007_07_15.isAfter ( TEST_2007_07_15 ) ) ; }

Target:
public void test_isBefore ( ) { org.testng.Assert.assertTrue ( tck.java.time.TCKLocalDate.TEST_2007_07_15.isBefore ( java.time.LocalDate.of ( 2007 , 7 , 16 ) ) ) ; org.testng.Assert.assertFalse ( tck.java.time.TCKLocalDate.TEST_2007_07_15.isBefore ( java.time.LocalDate.of ( 2007 , 7 , 14 ) ) ) ; org.testng.Assert.assertFalse ( tck.java.time.TCKLocalDate.TEST_2007_07_15.isBefore ( tck.java.time.TCKLocalDate.TEST_2007_07_15 ) ) ; }
Source:
public final void testGetDevice ( ) { com.android.sdklib.devices.Device d1 = dm.getDevice ( "7in WSVGA (Tablet)" , "Generic" ) ; assertEquals ( "7\" WSVGA (Tablet)" , d1.toString ( ) ) ; com.android.sdklib.devices.Device d2 = dm.getDevice ( "Nexus One" , "Google" ) ; assertEquals ( "Nexus One" , d2.toString ( ) ) ; }

Target:
public final void testGetDevice ( ) { com.android.sdklib.devices.Device d1 = dm.getDevice ( "7in WSVGA (Tablet)" , "Generic" ) ; assertEquals ( "7\" WSVGA (Tablet)" , d1.toString ( ) ) ; assertEquals ( "" , log.toString ( ) ) ; com.android.sdklib.devices.Device d2 = dm.getDevice ( "Nexus One" , "Google" ) ; assertEquals ( "Nexus One" , d2.toString ( ) ) ; assertEquals ( "" , log.toString ( ) ) ; }
Source:
private int getNumCallsWithState ( int ... states ) { int count = 0 ; for ( int state : states ) { for ( com.android.server.telecom.Call call : mCalls ) { if ( ( ( call.getParentCall ( ) ) == null ) && ( ( call.getState ( ) ) == state ) ) { count ++ ; } } } return count ; }

Target:
private int getNumCallsWithState ( int ... states ) { int count = 0 ; for ( int state : states ) { for ( com.android.server.telecom.Call call : mCalls ) { if ( ( ( ( call.getParentCall ( ) ) == null ) && ( ( call.getState ( ) ) == state ) ) && ( ! ( call.isExternalCall ( ) ) ) ) { count ++ ; } } } return count ; }
Source:
private java.lang.StringBuffer subformat ( double number , java.lang.StringBuffer result , java.text.FieldPosition fieldPosition , boolean isNegative , boolean isInteger , boolean parseAttr , int maxIntDig ) { if ( ( currencySignCount ) == ( com.ibm.icu.text.DecimalFormat.CURRENCY_SIGN_COUNT_IN_PLURAL_FORMAT ) ) { return subformat ( currencyPluralInfo.select ( getFixedDecimal ( number ) ) , result , fieldPosition , isNegative , isInteger , parseAttr , maxIntDig ) ; } else { return subformat ( result , fieldPosition , isNegative , isInteger , parseAttr , maxIntDig ) ; } }

Target:
private java.lang.StringBuffer subformat ( java.lang.String pluralCount , java.lang.StringBuffer result , java.text.FieldPosition fieldPosition , boolean isNegative , boolean isInteger , boolean parseAttr ) { if ( ( style ) == ( NumberFormat.PLURALCURRENCYSTYLE ) ) { java.lang.String currencyPluralPattern = currencyPluralInfo.getCurrencyPluralPattern ( pluralCount ) ; if ( ( formatPattern.equals ( currencyPluralPattern ) ) == false ) { applyPatternWithoutExpandAffix ( currencyPluralPattern , false ) ; } } expandAffixAdjustWidth ( pluralCount ) ; return subformat ( result , fieldPosition , isNegative , isInteger , parseAttr ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { Main.intFloatTest ( ) ; Main.basicShortTest ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { java.nio.ByteBuffer buf = java.nio.ByteBuffer.allocateDirect ( 16 ) ; java.lang.System.out.println ( ( "Direct byte buffer has array: " + ( buf.hasArray ( ) ) ) ) ; Main.intFloatTest ( ) ; Main.basicShortTest ( ) ; Main.primTest ( ) ; }
Source:
private com.ibm.icu.text.DecimalFormat_ICU58 createDecimalFormat ( com.ibm.icu.dev.test.format.DataDrivenNumberFormatTestData tuple ) { com.ibm.icu.text.DecimalFormat_ICU58 fmt = new com.ibm.icu.text.DecimalFormat_ICU58 ( ( ( tuple.pattern ) == null ? "0" : tuple.pattern ) , new com.ibm.icu.text.DecimalFormatSymbols ( ( ( tuple.locale ) == null ? com.ibm.icu.dev.test.format.NumberFormatDataDrivenTest.EN : tuple.locale ) ) ) ; adjustDecimalFormat ( tuple , fmt ) ; return fmt ; }

Target:
private java.text.DecimalFormat createDecimalFormat ( com.ibm.icu.dev.test.format.DataDrivenNumberFormatTestData tuple ) { java.text.DecimalFormat fmt = new java.text.DecimalFormat ( ( ( tuple.pattern ) == null ? "0" : tuple.pattern ) , new java.text.DecimalFormatSymbols ( ( ( tuple.locale ) == null ? com.ibm.icu.dev.test.format.NumberFormatDataDrivenTest.EN : tuple.locale ) . toLocale ( ) ) ) ; adjustDecimalFormat ( tuple , fmt ) ; return fmt ; }
Source:
public void testIterator ( ) { java.util.concurrent.DelayQueue q = populatedQueue ( jsr166.SIZE ) ; int i = 0 ; java.util.Iterator it = q.iterator ( ) ; while ( it.hasNext ( ) ) { assertTrue ( q.contains ( it.next ( ) ) ) ; ++ i ; } assertEquals ( i , jsr166.SIZE ) ; }

Target:
public void testIterator ( ) { java.util.concurrent.DelayQueue q = populatedQueue ( jsr166.SIZE ) ; int i = 0 ; java.util.Iterator it = q.iterator ( ) ; while ( it.hasNext ( ) ) { assertTrue ( q.contains ( it.next ( ) ) ) ; ++ i ; } assertEquals ( i , jsr166.SIZE ) ; assertIteratorExhausted ( it ) ; }
Source:
public void testSize_class ( ) { com.android.test.runner.TestRequestBuilder b = new com.android.test.runner.TestRequestBuilder ( new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleTest.class . getName ( ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleClassSize.class . getName ( ) ) ; b.addTestSizeFilter ( "small" ) ; com.android.test.runner.TestRequest request = b.build ( mInstr ) ; org.junit.runner.JUnitCore testRunner = new org.junit.runner.JUnitCore ( ) ; org.junit.runner.Result result = testRunner.run ( request.getRequest ( ) ) ; org.junit.Assert.assertEquals ( 3 , result.getRunCount ( ) ) ; }

Target:
public void testSize_class ( ) { com.android.test.runner.TestRequestBuilder b = new com.android.test.runner.TestRequestBuilder ( new java.io.PrintStream ( new java.io.ByteArrayOutputStream ( ) ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleTest.class . getName ( ) ) ; b.addTestClass ( com.android.test.runner.TestRequestBuilderTest.SampleClassSize.class . getName ( ) ) ; b.addTestSizeFilter ( "small" ) ; com.android.test.runner.TestRequest request = b.build ( mInstr , mBundle ) ; org.junit.runner.JUnitCore testRunner = new org.junit.runner.JUnitCore ( ) ; org.junit.runner.Result result = testRunner.run ( request.getRequest ( ) ) ; org.junit.Assert.assertEquals ( 3 , result.getRunCount ( ) ) ; }
Source:
public boolean isTtySupported ( java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.iTS" ) ; if ( ! ( canReadPhoneState ( callingPackage , "isTtySupported" ) ) ) { throw new java.lang.SecurityException ( ( "Only default dialer or an app with" + "READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE can call this api" ) ) ; } synchronized ( mLock ) { return mCallsManager.isTtySupported ( ) ; } } finally { android.telecom.Log.endSession ( ) ; } }

Target:
public boolean isTtySupported ( java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.iTS" ) ; if ( ! ( isPrivilegedDialerCalling ( callingPackage ) ) ) { try { enforceModifyPermission ( "isTtySupported requires MODIFY_PHONE_STATE permission." ) ; } catch ( java.lang.SecurityException e ) { android.util.EventLog.writeEvent ( 1397638484 , "62347125" , ( "isTtySupported: " + callingPackage ) ) ; throw e ; } } synchronized ( mLock ) { return mCallsManager.isTtySupported ( ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public boolean isDataEnabled ( boolean checkUserDataEnabled ) { return mDataEnabledSettings.isDataEnabled ( checkUserDataEnabled ) ; }

Target:
public boolean getAnyDataEnabled ( ) { if ( ! ( mDataEnabledSettings.isDataEnabled ( ) ) ) return false ; com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason failureReason = new com.android.internal.telephony.dataconnection.DcTracker.DataAllowFailReason ( ) ; if ( ! ( isDataAllowed ( failureReason ) ) ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( failureReason.getDataAllowFailReason ( ) ) ; return false ; } for ( com.android.internal.telephony.dataconnection.ApnContext apnContext : mApnContexts.values ( ) ) { if ( isDataAllowedForApn ( apnContext ) ) { return true ; } } return false ; }
Source:
public boolean checkForCondition ( ) { boolean condition = false ; boolean hasPopup = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textMatches ( "(?i)ok(?-i)" ) ) . waitForExists ( java.util.concurrent.TimeUnit.MILLISECONDS.convert ( 30L , java.util.concurrent.TimeUnit.SECONDS ) ) ; try { if ( hasPopup ) { mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textMatches ( "(?i)ok(?-i)" ) ) . clickAndWaitForNewWindow ( ) ; condition = true ; } } catch ( android.support.test.uiautomator.UiObjectNotFoundException e ) { throw new java.lang.AssertionError ( "No network IO popup to disable" ) ; } return condition ; }

Target:
public boolean checkForCondition ( ) { boolean condition = false ; boolean hasPopup = mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textMatches ( "(?i)ok(?-i)" ) ) . waitForExists ( java.util.concurrent.TimeUnit.MILLISECONDS.convert ( 10L , java.util.concurrent.TimeUnit.SECONDS ) ) ; try { if ( hasPopup ) { mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . textMatches ( "(?i)ok(?-i)" ) ) . clickAndWaitForNewWindow ( ) ; condition = true ; } } catch ( android.support.test.uiautomator.UiObjectNotFoundException e ) { throw new java.lang.AssertionError ( "No network IO popup to disable" ) ; } return condition ; }
Source:
private com.google.common.collect.ListMultimap < com.android.dialer.rootcomponentgenerator.annotation.DialerVariant , javax.lang.model.element.TypeElement > generateComponentModuleMap ( ) { com.google.common.collect.ListMultimap < com.android.dialer.rootcomponentgenerator.annotation.DialerVariant , javax.lang.model.element.TypeElement > map = com.google.common.collect.ArrayListMultimap.create ( ) ; extractInfoFromMetadata ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class , ( annotatedElement ) -> { for ( com.android.dialer.rootcomponentgenerator.annotation.DialerVariant rootComponentName : annotatedElement.getAnnotation ( com.android.dialer.rootcomponentgenerator.annotation.InstallIn.class ) . variants ( ) ) { map.put ( rootComponentName , annotatedElement ) ; } } ) ; return map ; }

Target:
private com.google.common.collect.ListMultimap < com.android.dialer.inject.DialerVariant , javax.lang.model.element.TypeElement > generateComponentModuleMap ( ) { com.google.common.collect.ListMultimap < com.android.dialer.inject.DialerVariant , javax.lang.model.element.TypeElement > map = com.google.common.collect.ArrayListMultimap.create ( ) ; extractInfoFromMetadata ( com.android.dialer.inject.InstallIn.class , ( annotatedElement ) -> { for ( com.android.dialer.inject.DialerVariant rootComponentName : annotatedElement.getAnnotation ( com.android.dialer.inject.InstallIn.class ) . variants ( ) ) { map.put ( rootComponentName , annotatedElement ) ; } } ) ; return map ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( mCapabilitiesToEnable.size ( ) ) ; for ( android.telephony.ims.internal.feature.CapabilityChangeRequest.CapabilityPair pair : mCapabilitiesToEnable ) { dest.writeInt ( pair.getCapability ( ) ) ; dest.writeInt ( pair.getRadioTech ( ) ) ; } dest.writeInt ( mCapabilitiesToDisable.size ( ) ) ; for ( android.telephony.ims.internal.feature.CapabilityChangeRequest.CapabilityPair pair : mCapabilitiesToDisable ) { dest.writeInt ( pair.getCapability ( ) ) ; dest.writeInt ( pair.getRadioTech ( ) ) ; } }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeInt ( mCapabilitiesToEnable.size ( ) ) ; for ( android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair pair : mCapabilitiesToEnable ) { dest.writeInt ( pair.getCapability ( ) ) ; dest.writeInt ( pair.getRadioTech ( ) ) ; } dest.writeInt ( mCapabilitiesToDisable.size ( ) ) ; for ( android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair pair : mCapabilitiesToDisable ) { dest.writeInt ( pair.getCapability ( ) ) ; dest.writeInt ( pair.getRadioTech ( ) ) ; } }
Source:
private void launchCallMsg ( ) { com.android.internal.telephony.gsm.stk.TextMessage msg = mCurrentCmd.getCallSettings ( ) . callMsg ; if ( ( ( msg.text ) == null ) || ( ( msg.text.length ( ) ) == 0 ) ) { return ; } msg.title = lastSelectedItem ; android.widget.Toast toast = android.widget.Toast.makeText ( mContext.getApplicationContext ( ) , msg.text , Toast.LENGTH_LONG ) ; toast.setGravity ( Gravity.BOTTOM , 0 , 0 ) ; toast.show ( ) ; }

Target:
private void launchCallMsg ( ) { com.android.internal.telephony.cat.TextMessage msg = mCurrentCmd.getCallSettings ( ) . callMsg ; if ( ( ( msg.text ) == null ) || ( ( msg.text.length ( ) ) == 0 ) ) { return ; } msg.title = lastSelectedItem ; android.widget.Toast toast = android.widget.Toast.makeText ( mContext.getApplicationContext ( ) , msg.text , Toast.LENGTH_LONG ) ; toast.setGravity ( Gravity.BOTTOM , 0 , 0 ) ; toast.show ( ) ; }
Source:
public void onDataPathRequestNotification ( int pubSubId , byte [ ] mac , int ndpId , byte [ ] message ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_TYPE_NOTIFICATION ) ; msg.arg1 = com.android.server.wifi.nan.WifiNanStateManager.NOTIFICATION_TYPE_ON_DATA_PATH_REQUEST ; msg.arg2 = pubSubId ; msg.obj = ndpId ; msg.getData ( ) . putByteArray ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_BUNDLE_KEY_MAC_ADDRESS , mac ) ; msg.getData ( ) . putByteArray ( com.android.server.wifi.nan.WifiNanStateManager.MESSAGE_BUNDLE_KEY_MESSAGE_DATA , message ) ; mSm.sendMessage ( msg ) ; }

Target:
public void onDataPathRequestNotification ( int pubSubId , byte [ ] mac , int ndpId , byte [ ] message ) { android.os.Message msg = mSm.obtainMessage ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_TYPE_NOTIFICATION ) ; msg.arg1 = com.android.server.wifi.aware.WifiAwareStateManager.NOTIFICATION_TYPE_ON_DATA_PATH_REQUEST ; msg.arg2 = pubSubId ; msg.obj = ndpId ; msg.getData ( ) . putByteArray ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_MAC_ADDRESS , mac ) ; msg.getData ( ) . putByteArray ( com.android.server.wifi.aware.WifiAwareStateManager.MESSAGE_BUNDLE_KEY_MESSAGE_DATA , message ) ; mSm.sendMessage ( msg ) ; }
Source:
public static void addJavadocTag ( org.eclipse.jdt.core.dom.rewrite.ASTRewrite rewrite , org.eclipse.jdt.core.dom.BodyDeclaration node , java.lang.String tagText ) { org.eclipse.jdt.core.dom.Javadoc javadoc = node.getJavadoc ( ) ; if ( javadoc == null ) { org.eclipse.jdt.core.dom.AST ast = node.getAST ( ) ; javadoc = ( ( org.eclipse.jdt.core.dom.Javadoc ) ( ast.createInstance ( org.eclipse.jdt.core.dom.Javadoc.class ) ) ) ; rewrite.set ( node , node.getJavadocProperty ( ) , javadoc , null ) ; } com.google.currysrc.api.transform.JavadocUtils.addJavadocTag ( rewrite , javadoc , tagText ) ; }

Target:
public static void addJavadocTag ( org.eclipse.jdt.core.dom.rewrite.ASTRewrite rewrite , org.eclipse.jdt.core.dom.BodyDeclaration node , java.lang.String tagText ) { org.eclipse.jdt.core.dom.Javadoc javadoc = node.getJavadoc ( ) ; if ( javadoc == null ) { org.eclipse.jdt.core.dom.AST ast = node.getAST ( ) ; javadoc = ( ( org.eclipse.jdt.core.dom.Javadoc ) ( ast.createInstance ( org.eclipse.jdt.core.dom.Javadoc.class ) ) ) ; rewrite.set ( node , node.getJavadocProperty ( ) , javadoc , null ) ; } com.google.currysrc.api.process.JavadocUtils.addJavadocTag ( rewrite , javadoc , tagText ) ; }
Source:
private static java.io.File prepareAnnotations ( ) throws java.io.IOException , java.lang.Exception { java.io.File annotations = com.android.jack.TestTools.createTempDir ( "multidexAnnotations" , "" ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getFromAndroidTree ( "toolchain/jack/jack/src/com/android/jack/annotations/" ) , com.android.jack.TestTools.getDefaultBootclasspathString ( ) , annotations , false ) ; return annotations ; }

Target:
private static java.io.File prepareAnnotations ( ) throws java.io.IOException , java.lang.Exception { java.io.File annotations = com.android.jack.TestTools.createTempDir ( "multidexAnnotations" , "" ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , com.android.jack.TestTools.getFromAndroidTree ( "toolchain/jack/jack-tests/tests/com/android/jack/annotations/" ) , com.android.jack.TestTools.getDefaultBootclasspathString ( ) , annotations , false ) ; return annotations ; }
Source:
public boolean handlePinMmi ( java.lang.String dialString ) { com.android.internal.telephony.cdma.CdmaMmiCode mmi = com.android.internal.telephony.cdma.CdmaMmiCode.newFromDialString ( dialString , this ) ; if ( mmi == null ) { android.util.Log.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "Mmi is NULL!" ) ; return false ; } else if ( mmi.isPukCommand ( ) ) { mPendingMmis.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.processCode ( ) ; return true ; } android.util.Log.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "Unrecognized mmi!" ) ; return false ; }

Target:
public void setLine1Number ( java.lang.String alphaTag , java.lang.String number , android.os.Message onComplete ) { android.telephony.Rlog.e ( com.android.internal.telephony.cdma.CDMAPhone.LOG_TAG , "setLine1Number: not possible in CDMA" ) ; }
Source:
private void storeBackground ( java.io.File imageDir , org.eclipse.swt.graphics.RGB bg , org.eclipse.swt.graphics.RGB fg ) { mBackground = bg ; mForeground = fg ; java.io.File file = new java.io.File ( imageDir , com.android.ide.eclipse.adt.internal.editors.layout.gle2.PreviewIconFactory.PREVIEW_INFO_FILE ) ; java.lang.String colors = java.lang.String.format ( "background=#%02x%02x%02x\nforeground=#%02x%02x%02x\\n" , bg.red , bg.green , bg.blue , fg.red , fg.green , fg.blue ) ; com.android.ide.eclipse.adt.AdtPlugin.writeFile ( file , colors ) ; }

Target:
private void storeBackground ( java.io.File imageDir , org.eclipse.swt.graphics.RGB bg , org.eclipse.swt.graphics.RGB fg ) { mBackground = bg ; mForeground = fg ; java.io.File file = new java.io.File ( imageDir , com.android.ide.eclipse.adt.internal.editors.layout.gle2.PreviewIconFactory.PREVIEW_INFO_FILE ) ; java.lang.String colors = java.lang.String.format ( "background=#%02x%02x%02x\nforeground=#%02x%02x%02x\n" , bg.red , bg.green , bg.blue , fg.red , fg.green , fg.blue ) ; com.android.ide.eclipse.adt.AdtPlugin.writeFile ( file , colors ) ; }
Source:
public static com.google.common.primitives.UnsignedInteger valueOf ( java.math.BigInteger value ) { com.google.common.base.Preconditions.checkNotNull ( value ) ; com.google.common.base.Preconditions.checkArgument ( ( ( ( value.signum ( ) ) >= 0 ) && ( ( value.bitLength ( ) ) <= ( java.lang.Integer.SIZE ) ) ) , "value (%s) is outside the range for an unsigned integer value" , value ) ; return com.google.common.primitives.UnsignedInteger.asUnsigned ( value.intValue ( ) ) ; }

Target:
public static com.google.common.primitives.UnsignedInteger valueOf ( java.math.BigInteger value ) { com.google.common.base.Preconditions.checkNotNull ( value ) ; com.google.common.base.Preconditions.checkArgument ( ( ( ( value.signum ( ) ) >= 0 ) && ( ( value.bitLength ( ) ) <= ( java.lang.Integer.SIZE ) ) ) , "value (%s) is outside the range for an unsigned integer value" , value ) ; return com.google.common.primitives.UnsignedInteger.fromIntBits ( value.intValue ( ) ) ; }
Source:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( ( ( com.android.jack.java8.EcjLambdaTest.testWithApiUsage.contains ( description.getMethodName ( ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testWithOtherErrorMsg.contains ( description.getMethodName ( ) ) ) ) || ( EcjLambdaTestPostM.testForNewRuntime.contains ( description.getMethodName ( ) ) ) ) { return false ; } return true ; }

Target:
public boolean shouldRun ( org.junit.runner.Description description ) { if ( ( ( ( com.android.jack.java8.EcjLambdaTest.testWithApiUsage.contains ( description.getMethodName ( ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testWithOtherErrorMsg.contains ( description.getMethodName ( ) ) ) ) || ( EcjLambdaTestPostM.testForNewRuntime.contains ( description.getMethodName ( ) ) ) ) || ( com.android.jack.java8.EcjLambdaTest.testBugECJ.contains ( description.getMethodName ( ) ) ) ) { return false ; } return true ; }
Source:
boolean isAudioConnected ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mStateMachine.isAudioConnected ( device ) ; }

Target:
boolean disconnectAudio ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; if ( ( mStateMachine.getAudioState ( ) ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_CONNECTED ) ) { android.util.Log.w ( com.android.bluetooth.hfp.HeadsetService.TAG , "disconnectAudio, audio is not connected" ) ; return false ; } mStateMachine.sendMessage ( HeadsetStateMachine.DISCONNECT_AUDIO , mStateMachine.getCurrentDevice ( ) ) ; return true ; }
Source:
private void readToken ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.Token expected ) throws java.io.IOException { next ( ) ; if ( ( currentTokenId ) != expected ) { throw new com.android.jack.jayce.v0002.io.ParseException ( ( ( ( ( "Unexpected token " + ( currentTokenId ) ) + "while token " ) + expected ) + " was expected" ) ) ; } }

Target:
private void readToken ( @ javax.annotation.Nonnull com.android.jack.jayce.v0002.io.Token expected ) throws java.io.IOException { next ( ) ; if ( ( currentTokenId ) != expected ) { throw new com.android.jack.jayce.v0002.io.ParseException ( ( ( ( ( "Unexpected token " + ( java.lang.String.valueOf ( currentTokenId ) ) ) + " while token " ) + ( expected.toString ( ) ) ) + " was expected" ) ) ; } }
Source:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , instructionSet ) ; }

Target:
public int rmPackageDir ( java.lang.String packageDir ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "rmpackagedir" ) ; builder.append ( ' ' ) ; builder.append ( packageDir ) ; return mInstaller.execute ( builder.toString ( ) ) ; }
Source:
void whitelistOppDevice ( android.content.Context context , android.bluetooth.BluetoothDevice device ) { if ( com.android.nfc.beam.BeamManager.DBG ) android.util.Log.d ( com.android.nfc.beam.BeamManager.TAG , ( ( "Whitelisting " + device ) + " for BT OPP" ) ) ; android.content.Intent intent = new android.content.Intent ( com.android.nfc.beam.BeamManager.ACTION_WHITELIST_DEVICE ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; context.sendBroadcastAsUser ( intent , UserHandle.CURRENT ) ; }

Target:
void whitelistOppDevice ( android.content.Context context , android.bluetooth.BluetoothDevice device ) { if ( com.android.nfc.beam.BeamManager.DBG ) android.util.Log.d ( com.android.nfc.beam.BeamManager.TAG , ( ( "Whitelisting " + device ) + " for BT OPP" ) ) ; android.content.Intent intent = new android.content.Intent ( com.android.nfc.beam.BeamManager.ACTION_WHITELIST_DEVICE ) ; intent.setPackage ( com.android.nfc.beam.BeamManager.BLUETOOTH_PACKAGE ) ; intent.putExtra ( BluetoothDevice.EXTRA_DEVICE , device ) ; context.sendBroadcastAsUser ( intent , UserHandle.CURRENT ) ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.content.Intent i = getIntent ( ) ; java.lang.String action = i.getAction ( ) ; if ( action.equals ( BluetoothPbapService.AUTH_CHALL_ACTION ) ) { showPbapDialog ( com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH ) ; mCurrentDialog = com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH ; } else { android.util.Log.e ( com.android.bluetooth.pbap.BluetoothPbapActivity.TAG , ( "Error: this activity may be started only with intent " + "PBAP_ACCESS_REQUEST or PBAP_AUTH_CHALL " ) ) ; finish ( ) ; } registerReceiver ( mReceiver , new android.content.IntentFilter ( BluetoothPbapService.USER_CONFIRM_TIMEOUT_ACTION ) ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.content.Intent i = getIntent ( ) ; java.lang.String action = i.getAction ( ) ; mDevice = i.getParcelableExtra ( BluetoothPbapService.EXTRA_DEVICE ) ; if ( action.equals ( BluetoothPbapService.AUTH_CHALL_ACTION ) ) { showPbapDialog ( com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH ) ; mCurrentDialog = com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH ; } else { android.util.Log.e ( com.android.bluetooth.pbap.BluetoothPbapActivity.TAG , ( "Error: this activity may be started only with intent " + "PBAP_ACCESS_REQUEST or PBAP_AUTH_CHALL " ) ) ; finish ( ) ; } registerReceiver ( mReceiver , new android.content.IntentFilter ( BluetoothPbapService.USER_CONFIRM_TIMEOUT_ACTION ) ) ; }
Source:
protected void xmlModelChanged ( org.w3c.dom.Document xml_doc ) { initUiRootNode ( false ) ; mUiRootNode.loadFromXmlNode ( xml_doc ) ; super . xmlModelChanged ( xml_doc ) ; if ( ( mGraphicalEditor ) != null ) { mGraphicalEditor.onXmlModelChanged ( ) ; } if ( ( mOutline ) != null ) { mOutline.reloadModel ( ) ; } }

Target:
protected void xmlModelChanged ( org.w3c.dom.Document xml_doc ) { initUiRootNode ( false ) ; mUiRootNode.loadFromXmlNode ( xml_doc ) ; super . xmlModelChanged ( xml_doc ) ; if ( ( mGraphicalEditor ) != null ) { mGraphicalEditor.onXmlModelChanged ( ) ; } if ( ( mOutline1 ) != null ) { mOutline1.reloadModel ( ) ; } }
Source:
private void responseSignalStrength ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.SignalStrength sigStrength ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { android.telephony.SignalStrength ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalSignalStrength ( sigStrength ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseSms ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SendSmsResult sms ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.SmsResponse ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = new com.android.internal.telephony.SmsResponse ( sms.messageRef , sms.ackPDU , sms.errorCode ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
public void start ( org.osgi.framework.BundleContext context ) throws java.lang.Exception { super . start ( context ) ; com.android.ide.eclipse.hierarchyviewer.HierarchyViewerPlugin.plugin = this ; }

Target:
public void printLog ( com.android.ddmlib.Log.LogLevel logLevel , java.lang.String tag , java.lang.String message ) { if ( ( logLevel.getPriority ( ) ) >= ( LogLevel.ERROR.getPriority ( ) ) ) { com.android.ide.eclipse.hierarchyviewer.HierarchyViewerPlugin.printToStream ( errorConsoleStream , tag , message ) ; org.eclipse.ui.console.ConsolePlugin.getDefault ( ) . getConsoleManager ( ) . showConsoleView ( messageConsole ) ; } else { com.android.ide.eclipse.hierarchyviewer.HierarchyViewerPlugin.printToStream ( consoleStream , tag , message ) ; } }