auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
java.util.List < android.bluetooth.BluetoothDevice > getDevices ( ) { return new java.util.ArrayList < > ( ) ; }

Target:
java.util.List < android.bluetooth.BluetoothDevice > getDevices ( ) { java.util.List < android.bluetooth.BluetoothDevice > devices = new java.util.ArrayList < > ( ) ; synchronized ( mStateMachines ) { for ( com.android.bluetooth.hearingaid.HearingAidStateMachine sm : mStateMachines.values ( ) ) { devices.add ( sm.getDevice ( ) ) ; } return devices ; } }
Source:
public void schedule ( java.util.TimerTask task , java.util.Date when , long period ) { if ( ( period <= 0 ) || ( ( when.getTime ( ) ) < 0 ) ) { throw new java.lang.IllegalArgumentException ( ) ; } long delay = ( when.getTime ( ) ) - ( java.lang.System.currentTimeMillis ( ) ) ; scheduleImpl ( task , ( delay < 0 ? 0 : delay ) , period , false ) ; }

Target:
public void schedule ( java.util.TimerTask task , long delay , long period ) { validateScheduling ( task , java.util.Timer.VALID_DATE , delay , period ) ; doSchedule ( task , ( ( java.lang.System.currentTimeMillis ( ) ) + delay ) , period ) ; }
Source:
public void copyFrom ( byte [ ] d ) { mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } }

Target:
public void copyFrom ( short [ ] d ) { validateIsInt16 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
public void testAesCbcHmacSha1Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha1Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , android.net.cts.IpSecManagerTest.getKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
char [ ] getDigitsLocal ( ) { if ( ( digits ) != null ) { return digits ; } else { char [ ] digitArray = new char [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) { digitArray [ i ] = ( ( char ) ( ( zeroDigit ) + i ) ) ; } return digitArray ; } }

Target:
public void setZeroDigit ( char zeroDigit ) { this . zeroDigit = zeroDigit ; digitStrings = digitStrings.clone ( ) ; digits = digits.clone ( ) ; digitStrings [ 0 ] = java.lang.String.valueOf ( zeroDigit ) ; digits [ 0 ] = zeroDigit ; for ( int i = 1 ; i < 10 ; i ++ ) { char d = ( ( char ) ( zeroDigit + i ) ) ; digitStrings [ i ] = java.lang.String.valueOf ( d ) ; digits [ i ] = d ; } }
Source:
public java.io.File call ( ) { if ( ( variantData.dexTask ) != null ) { return variantData.dexTask.getOutputFolder ( ) ; } if ( ( variantData.javaCompileTask ) != null ) { return variantData.javaCompileTask.getDestinationDir ( ) ; } return null ; }

Target:
public java.io.File call ( ) { if ( ( scope.getVariantScope ( ) . getDexTask ( ) ) != null ) { return scope.getVariantScope ( ) . getDexOutputFolder ( ) ; } if ( ( scope.getVariantScope ( ) . getJavaCompileTask ( ) ) != null ) { return scope.getVariantScope ( ) . getJavaOutputDir ( ) ; } if ( ( variantData.javaCompileTask ) != null ) { return variantData.javaCompileTask.getDestinationDir ( ) ; } return null ; }
Source:
private boolean IsFreeSpaceAvailable ( ) { java.io.File dataDir = android.os.Environment.getDataDirectory ( ) ; @ java.lang.SuppressWarnings ( value = "deprecation" ) long lowThreshold = android.os.storage.StorageManager.from ( mContext ) . getStorageLowBytes ( dataDir ) ; if ( lowThreshold == 0 ) { throw new java.lang.IllegalStateException ( "Invalid low memory threshold" ) ; } long usableSpace = dataDir.getUsableSpace ( ) ; return usableSpace >= lowThreshold ; }

Target:
private long getAvailableSpace ( ) { long lowThreshold = getMainLowSpaceThreshold ( ) ; java.io.File dataDir = android.os.Environment.getDataDirectory ( ) ; long usableSpace = dataDir.getUsableSpace ( ) ; return usableSpace - lowThreshold ; }
Source:
public void testGetOutputAfterGetInputStreamFails ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; connection.setDoOutput ( true ) ; try { connection.getInputStream ( ) ; connection.getOutputStream ( ) ; fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }

Target:
public void testGetOutputStreamOnGetFails ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; try { connection.getOutputStream ( ) ; org.junit.Assert.fail ( ) ; } catch ( java.net.ProtocolException expected ) { } }
Source:
public < T extends com.android.jack.ir.ast.JNode > void accept ( @ javax.annotation.Nonnull java.util.List < T > list ) { int i = 0 ; try { for ( int c = list.size ( ) ; i < c ; ++ i ) { list.get ( i ) . traverse ( this ) ; } } catch ( java.lang.Throwable e ) { throw com.android.jack.ir.ast.JVisitor.translateException ( list.get ( i ) , e ) ; } }

Target:
public < T extends com.android.jack.ir.ast.JNode > void accept ( @ javax.annotation.Nonnull java.util.Collection < T > collection ) { for ( T element : collection ) { try { element.traverse ( this ) ; } catch ( java.lang.Throwable e ) { throw com.android.jack.ir.ast.JVisitor.translateException ( element , e ) ; } } }
Source:
public void testCompatRevoked22 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatRevoked_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.AssertionError expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatRevoked_part2" ) ; }

Target:
public void testCompatRevoked22 ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_22 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatRevoked_part1" ) ; fail ( "App must be killed on a permission revoke" ) ; } catch ( java.lang.AssertionError expected ) { } runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest22" , "testCompatRevoked_part2" ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { if ( ( ( Main.arrayAccess ( ) ) + ( Main.intDiv ( 10 ) ) ) != ( - 35 ) ) { java.lang.System.out.println ( "FAIL" ) ; } }

Target:
public static void main ( java.lang.String [ ] args ) { Main.testVecSetScalars ( ) ; Main.testVecReplicateScalar ( ) ; if ( ( ( Main.arrayAccess ( ) ) + ( Main.intDiv ( 10 ) ) ) != ( - 35 ) ) { java.lang.System.out.println ( "FAIL" ) ; } }
Source:
public static boolean isEnhancedCallBlockingEnabledByPlatform ( android.content.Context context ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( context.getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; android.os.PersistableBundle carrierConfig = configManager.getConfig ( ) ; if ( carrierConfig == null ) { carrierConfig = configManager.getDefaultConfig ( ) ; } return carrierConfig.getBoolean ( CarrierConfigManager.KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL ) ; }

Target:
public static boolean isEnhancedCallBlockingEnabledByPlatform ( android.content.Context context ) { android.telephony.CarrierConfigManager configManager = ( ( android.telephony.CarrierConfigManager ) ( context.getSystemService ( Context.CARRIER_CONFIG_SERVICE ) ) ) ; android.os.PersistableBundle carrierConfig = configManager.getConfig ( ) ; if ( carrierConfig == null ) { carrierConfig = configManager.getDefaultConfig ( ) ; } return ( carrierConfig.getBoolean ( CarrierConfigManager.KEY_SUPPORT_ENHANCED_CALL_BLOCKING_BOOL ) ) || ( new com.android.server.telecom.SystemSettingsUtil ( ) . isEnhancedCallBlockingEnabled ( context ) ) ; }
Source:
public void validateCertPath ( java.security.cert.CertPath path ) { java.util.List < ? extends java.security.cert.Certificate > certificates = path.getCertificates ( ) ; java.security.cert.Certificate certificate = certificates.get ( 0 ) ; assertEquals ( "unexpected certificate type" , "X.509" , certificate.getType ( ) ) ; java.security.cert.X509Certificate x509Certificate = ( ( java.security.cert.X509Certificate ) ( certificate ) ) ; javax.security.auth.x500.X500Principal subjectX500Principal = x509Certificate.getSubjectX500Principal ( ) ; javax.security.auth.x500.X500Principal expectedPrincipal = new javax.security.auth.x500.X500Principal ( ( "CN=Android CTS, " + "OU=Android, O=Android, L=Android, ST=Android, C=AN" ) ) ; assertEquals ( "unexpected principal" , expectedPrincipal , subjectX500Principal ) ; }

Target:
public void validateCertPath ( java.security.cert.CertPath path ) { java.util.List < ? extends java.security.cert.Certificate > certificates = path.getCertificates ( ) ; assertEquals ( 2 , certificates.size ( ) ) ; java.security.cert.Certificate endEntityCert = certificates.get ( 0 ) ; assertEquals ( "Certificate must be of X.509 type" , "X.509" , endEntityCert.getType ( ) ) ; java.security.cert.X509Certificate endEntityX509Cert = ( ( java.security.cert.X509Certificate ) ( endEntityCert ) ) ; javax.security.auth.x500.X500Principal endEntityPrincipal = endEntityX509Cert.getSubjectX500Principal ( ) ; javax.security.auth.x500.X500Principal expectedPrincipal = new javax.security.auth.x500.X500Principal ( "emailAddress=test@user" ) ; assertEquals ( expectedPrincipal , endEntityPrincipal ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { mMockRunUtil = org.easymock.EasyMock.createMock ( com.android.tradefed.util.IRunUtil.class ) ; mPreparer = new com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer ( ) { @ java.lang.Override com.android.tradefed.util.IRunUtil getRunUtil ( ) { return mMockRunUtil ; } } ; mPreparer.mDepModules.add ( "enum" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mMockRunUtil = org.easymock.EasyMock.createMock ( com.android.tradefed.util.IRunUtil.class ) ; mPreparer = new com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer ( ) { @ java.lang.Override com.android.tradefed.util.IRunUtil getRunUtil ( ) { return mMockRunUtil ; } } ; mPreparer.mVenvDir = new java.io.File ( "" ) ; mPreparer.mDepModules.add ( "enum" ) ; }
Source:
private void addLocalDefaultLocale ( ) { if ( ( com.google.gct.testing.dimension.LanguageDimension.localDefaultLanguage ) != null ) { supportedLanguages.remove ( com.google.gct.testing.dimension.LanguageDimension.localDefaultLanguage ) ; supportedLanguages.add ( 0 , com.google.gct.testing.dimension.LanguageDimension.localDefaultLanguage ) ; } }

Target:
private void addLocalDefaultLocale ( ) { com.google.gct.testing.dimension.LanguageDimension.Language userLanguage = com.google.gct.testing.dimension.LanguageDimension.getLanguage ( java.lang.System.getProperty ( "user.language" ) ) ; if ( userLanguage != null ) { com.google.gct.testing.dimension.LanguageDimension.Language localDefaultLanguage = new com.google.gct.testing.dimension.LanguageDimension.Language ( userLanguage , true ) ; supportedLanguages.remove ( localDefaultLanguage ) ; supportedLanguages.add ( 0 , localDefaultLanguage ) ; } }
Source:
private static double getDoubleAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name , double defaultValue ) { java.lang.Object value = annotation.getValue ( name ) ; if ( value instanceof java.lang.Number ) { return ( ( java.lang.Number ) ( value ) ) . doubleValue ( ) ; } return defaultValue ; }

Target:
static boolean getBoolean ( @ com.android.annotations.NonNull com.intellij.psi.PsiAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name , boolean defaultValue ) { java.lang.Boolean value = com.android.tools.lint.checks.PermissionRequirement.getAnnotationBooleanValue ( annotation , name ) ; if ( value != null ) { return value ; } return defaultValue ; }
Source:
public void update ( ) { updateAll ( ) ; }

Target:
private void updateAll ( boolean forceUpdate ) { if ( ( mTimeShiftManager.isAvailable ( ) ) && ( ! ( mTvView.isScreenBlocked ( ) ) ) ) { setEnabled ( true ) ; initializeTimeline ( ) ; mBackgroundView.setEnabled ( true ) ; setTextIfNeeded ( mBackgroundView , null ) ; } else { setEnabled ( false ) ; mBackgroundView.setEnabled ( false ) ; setTextIfNeeded ( mBackgroundView , mUnavailableMessage ) ; } updateControls ( forceUpdate ) ; }
Source:
boolean disableNetwork ( android.net.wifi.WifiConfiguration config ) { if ( config == null ) { return false ; } if ( mVerboseLoggingEnabled ) localLog ( ( "disableNetwork: " + ( config.networkId ) ) ) ; if ( ! ( mWifiNative.disableNetwork ( config.networkId ) ) ) { loge ( ( "Disable network in wpa_supplicant failed on " + ( config.networkId ) ) ) ; return false ; } return true ; }

Target:
public boolean setConfiguredNetworkBSSID ( java.lang.String bssid ) { if ( mVerboseLoggingEnabled ) localLog ( ( "setConfiguredNetworkBSSID: " + ( mSupplicantNetworkId ) ) ) ; if ( ! ( mWifiNative.setNetworkVariable ( mSupplicantNetworkId , WifiConfiguration.bssidVarName , bssid ) ) ) { loge ( ( "Set BSSID of network in wpa_supplicant failed on " + ( mSupplicantNetworkId ) ) ) ; return false ; } return true ; }
Source:
public boolean shouldDelayChildPressedState ( ) { 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 shouldDelayChildPressedState ( ) ; } } ) ; return ret ; } return true ; }

Target:
public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { android.view.accessibility.AccessibilityNodeProvider ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.view.accessibility.AccessibilityNodeProvider > ( ) { @ java.lang.Override public android.view.accessibility.AccessibilityNodeProvider call ( ) { return getAccessibilityNodeProvider ( ) ; } } ) ; return ret ; } return mAwContents.getAccessibilityNodeProvider ( ) ; }
Source:
public com.android.server.wifi.WifiNative.RingBufferStatus [ ] getRingBufferStatus ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getRingBufferStatusNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } }

Target:
public com.android.server.wifi.WifiNative.RingBufferStatus [ ] getRingBufferStatus ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getRingBufferStatus ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getRingBufferStatusNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } } }
Source:
private byte [ ] getResourceContents ( java.lang.String resourceName ) throws java.io.IOException { try ( java.io.InputStream in = getClass ( ) . getResourceAsStream ( resourceName ) ) { if ( in == null ) { throw new java.lang.IllegalArgumentException ( ( "Resource not found: " + resourceName ) ) ; } return com.android.apksig.ApkVerifierTest.toByteArray ( in ) ; } }

Target:
private ApkVerifier.Result verify ( java.lang.String apkFilenameInResources , java.lang.Integer minSdkVersionOverride ) throws com.android.apksig.apk.ApkFormatException , java.io.IOException , java.security.NoSuchAlgorithmException { byte [ ] apkBytes = com.android.apksig.internal.util.Resources.toByteArray ( getClass ( ) , apkFilenameInResources ) ; com.android.apksig.ApkVerifier.Builder builder = new com.android.apksig.ApkVerifier.Builder ( com.android.apksig.util.DataSources.asDataSource ( java.nio.ByteBuffer.wrap ( apkBytes ) ) ) ; if ( minSdkVersionOverride != null ) { builder.setMinCheckedPlatformVersion ( minSdkVersionOverride ) ; } return builder.build ( ) . verify ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.String name = java.lang.System.getProperty ( "java.vm.name" ) ; if ( ! ( "Dalvik" . equals ( name ) ) ) { java.lang.System.out.println ( ( "This test is not supported on " + name ) ) ; return ; } Main.testMethodTracing ( ) ; Main.testCountInstances ( ) ; Main.testRuntimeStat ( ) ; Main.testRuntimeStats ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { java.lang.String name = java.lang.System.getProperty ( "java.vm.name" ) ; if ( ! ( "Dalvik" . equals ( name ) ) ) { java.lang.System.out.println ( ( "This test is not supported on " + name ) ) ; return ; } Main.testMethodTracing ( ) ; Main.testCountInstances ( ) ; Main.testGetInstances ( ) ; Main.testRuntimeStat ( ) ; Main.testRuntimeStats ( ) ; }
Source:
public int hashCode ( ) { int result = mBuildConfigFields.hashCode ( ) ; result = ( 31 * result ) + ( mResValues.hashCode ( ) ) ; result = ( 31 * result ) + ( mProguardFiles.hashCode ( ) ) ; result = ( 31 * result ) + ( mConsumerProguardFiles.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { int result = mBuildConfigFields.hashCode ( ) ; result = ( 31 * result ) + ( mResValues.hashCode ( ) ) ; result = ( 31 * result ) + ( mProguardFiles.hashCode ( ) ) ; result = ( 31 * result ) + ( mConsumerProguardFiles.hashCode ( ) ) ; result = ( 31 * result ) + ( mManifestPlaceholders.hashCode ( ) ) ; return result ; }
Source:
public void setPackageStoppedState ( java.lang.String packageName , boolean stopped ) { final int uid = android.os.Binder.getCallingUid ( ) ; final int permission = mContext.checkCallingOrSelfPermission ( android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE ) ; final boolean allowedByPermission = permission == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; synchronized ( mPackages ) { if ( mSettings.setPackageStoppedStateLPw ( packageName , stopped , allowedByPermission , uid ) ) { scheduleWriteStoppedPackagesLocked ( ) ; } } }

Target:
public int getComponentEnabledSetting ( android.content.ComponentName componentName , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ; int uid = android.os.Binder.getCallingUid ( ) ; checkValidCaller ( uid , userId ) ; synchronized ( mPackages ) { return mSettings.getComponentEnabledSettingLPr ( componentName , userId ) ; } }
Source:
public void enter ( ) { android.util.Log.d ( com.android.bluetooth.pbapclient.PbapClientStateMachine.TAG , ( "Enter Connected: " + ( getCurrentMessage ( ) . what ) ) ) ; onConnectionStateChanged ( mCurrentDevice , mMostRecentState , BluetoothProfile.STATE_CONNECTED ) ; mMostRecentState = android.bluetooth.BluetoothProfile.STATE_CONNECTED ; if ( mUserManager.isUserUnlocked ( ) ) { mConnectionHandler.obtainMessage ( PbapClientConnectionHandler.MSG_DOWNLOAD ) . sendToTarget ( ) ; } }

Target:
public void enter ( ) { if ( com.android.bluetooth.pbapclient.PbapClientStateMachine.DBG ) android.util.Log.d ( com.android.bluetooth.pbapclient.PbapClientStateMachine.TAG , ( "Enter Connected: " + ( getCurrentMessage ( ) . what ) ) ) ; onConnectionStateChanged ( mCurrentDevice , mMostRecentState , BluetoothProfile.STATE_CONNECTED ) ; mMostRecentState = android.bluetooth.BluetoothProfile.STATE_CONNECTED ; if ( mUserManager.isUserUnlocked ( ) ) { mConnectionHandler.obtainMessage ( PbapClientConnectionHandler.MSG_DOWNLOAD ) . sendToTarget ( ) ; } }
Source:
public void checkClass ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.ClassContext context , @ com.android.annotations.NonNull org.objectweb.asm.tree.ClassNode classNode ) { if ( ( ( classNode.name.indexOf ( '$' ) ) != ( - 1 ) ) && ( ( ( classNode.access ) & ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) == 0 ) ) { return ; } if ( ( ( classNode.access ) & ( org.objectweb.asm.Opcodes.ACC_ABSTRACT ) ) != 0 ) { return ; } if ( com.android.tools.lint.checks.ViewConstructorDetector.isViewClass ( context , classNode ) ) { com.android.tools.lint.checks.ViewConstructorDetector.checkConstructors ( context , classNode ) ; } }

Target:
public lombok.ast.AstVisitor createJavaVisitor ( @ com.android.annotations.NonNull final com.android.tools.lint.detector.api.JavaContext context ) { return new com.android.tools.lint.checks.ViewConstructorDetector.ViewConstructorVisitor ( context ) ; }
Source:
public void testCloseBehavior ( ) throws java.io.IOException { java.io.InputStream is = loadResource ( ) ; try { java.io.InputStream ncis = new com.android.io.NonClosingInputStream ( is ) ; assertEquals ( '1' , parseAndClose ( ncis ) ) ; try { assertEquals ( '2' , parse ( ncis ) ) ; fail ( "Expected: IOException 'stream closed'; Actual: no error." ) ; } catch ( java.io.IOException e ) { assertEquals ( "Stream closed" , e.getMessage ( ) ) ; } } finally { is.close ( ) ; } }

Target:
public void testFailure ( ) throws java.io.IOException { java.io.InputStream is = loadResource ( ) ; try { assertEquals ( '1' , parseAndClose ( is ) ) ; try { assertEquals ( '2' , parse ( is ) ) ; fail ( "Expected: IOException 'stream closed'; Actual: no error." ) ; } catch ( java.io.IOException e ) { assertEquals ( "Stream closed" , e.getMessage ( ) ) ; } } finally { if ( is != null ) { is.close ( ) ; } } }
Source:
public void fetchVoicemailStatus ( ) { java.lang.StringBuilder where = new java.lang.StringBuilder ( ) ; java.util.List < java.lang.String > selectionArgs = new java.util.ArrayList < > ( ) ; com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . appendOmtpVoicemailStatusSelectionClause ( context , where , selectionArgs ) ; if ( com.android.dialer.telecom.TelecomUtil.hasReadWriteVoicemailPermissions ( context ) ) { startQuery ( com.android.dialer.database.CallLogQueryHandler.QUERY_VOICEMAIL_STATUS_TOKEN , null , Status.CONTENT_URI , com.android.dialer.database.VoicemailStatusQuery.getProjection ( ) , where.toString ( ) , selectionArgs.toArray ( new java.lang.String [ selectionArgs.size ( ) ] ) , null ) ; } }

Target:
public void fetchVoicemailStatus ( ) { java.lang.StringBuilder where = new java.lang.StringBuilder ( ) ; java.util.List < java.lang.String > selectionArgs = new java.util.ArrayList < > ( ) ; com.android.voicemail.VoicemailComponent.get ( context ) . getVoicemailClient ( ) . appendOmtpVoicemailStatusSelectionClause ( context , where , selectionArgs ) ; if ( com.android.dialer.telecom.TelecomUtil.hasReadWriteVoicemailPermissions ( context ) ) { startQuery ( com.android.dialer.database.CallLogQueryHandler.QUERY_VOICEMAIL_STATUS_TOKEN , null , Status.CONTENT_URI , com.android.dialer.voicemailstatus.VoicemailStatusQuery.getProjection ( ) , where.toString ( ) , selectionArgs.toArray ( new java.lang.String [ selectionArgs.size ( ) ] ) , null ) ; } }
Source:
public int getScreenResolution ( ) { long display = sun.awt.X11.XToolkit.getDisplay ( ) ; sun.awt.SunToolkit.awtLock ( ) ; HEAD ( 763 ) ; sun.awt.X11.b2a Merge ; }

Target:
public int getScreenResolution ( ) { long display = sun.awt.X11.XToolkit.getDisplay ( ) ; sun.awt.SunToolkit.awtLock ( ) ; try { long displayWidthMM = sun.awt.X11.XlibWrapper.DisplayWidthMM ( display , sun.awt.X11.XlibWrapper.DefaultScreen ( display ) ) ; if ( displayWidthMM <= 0 ) return sun.awt.X11.XToolkit.DEFAULT_SCREEN_RESOLUTION ; return ( ( int ) ( ( ( sun.awt.X11.XlibWrapper.DisplayWidth ( display , sun.awt.X11.XlibWrapper.DefaultScreen ( display ) ) ) * 25.4 ) / displayWidthMM ) ) ; } finally { sun.awt.SunToolkit.awtUnlock ( ) ; } }
Source:
public static int getCodePoint ( char lead , char trail ) { if ( ( android.icu.text.UTF16.isLeadSurrogate ( lead ) ) && ( android.icu.text.UTF16.isTrailSurrogate ( trail ) ) ) { return android.icu.impl.UCharacterProperty.getRawSupplementary ( lead , trail ) ; } throw new java.lang.IllegalArgumentException ( "Illegal surrogate characters" ) ; }

Target:
public static int getCodePoint ( char lead , char trail ) { if ( java.lang.Character.isSurrogatePair ( lead , trail ) ) { return java.lang.Character.toCodePoint ( lead , trail ) ; } throw new java.lang.IllegalArgumentException ( "Illegal surrogate characters" ) ; }
Source:
public static void begin ( java.lang.String name ) { if ( org.chromium.base.TraceEvent.sEnabled ) org.chromium.base.TraceEvent.nativeBegin ( name , null ) ; }

Target:
public static void setEnabled ( boolean enabled ) { if ( enabled ) org.chromium.base.EarlyTraceEvent.disable ( ) ; if ( ( org.chromium.base.TraceEvent.sEnabled ) != enabled ) { org.chromium.base.TraceEvent.sEnabled = enabled ; if ( org.chromium.base.TraceEvent.sATraceEnabled ) return ; org.chromium.base.ThreadUtils.getUiThreadLooper ( ) . setMessageLogging ( ( enabled ? org.chromium.base.TraceEvent.LooperMonitorHolder.sInstance : null ) ) ; } }
Source:
public void copy3DRangeFrom ( int xoff , int yoff , int zoff , int w , int h , int d , android.support.v8.renderscript.Allocation data , int dataXoff , int dataYoff , int dataZoff ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data.getID ( mRS ) , dataXoff , dataYoff , dataZoff , data.mSelectedLOD ) ; }

Target:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , int [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }
Source:
private static java.lang.String [ ] getDhcpRanges ( android.content.Context ctx ) { final java.lang.String [ ] fromResource = ctx.getResources ( ) . getStringArray ( com.android.internal.R.array.config_tether_dhcp_range ) ; if ( ( ( fromResource.length ) > 0 ) && ( ( ( fromResource.length ) % 2 ) == 0 ) ) { return fromResource ; } return com.android.server.connectivity.tethering.TetheringConfiguration.copy ( com.android.server.connectivity.tethering.TetheringConfiguration.DHCP_DEFAULT_RANGE ) ; }

Target:
private static java.lang.String [ ] getDhcpRanges ( android.content.Context ctx ) { final java.lang.String [ ] fromResource = com.android.server.connectivity.tethering.TetheringConfiguration.getResourceStringArray ( ctx , com.android.internal.R.array.config_tether_dhcp_range ) ; if ( ( ( fromResource.length ) > 0 ) && ( ( ( fromResource.length ) % 2 ) == 0 ) ) { return fromResource ; } return com.android.server.connectivity.tethering.TetheringConfiguration.copy ( com.android.server.connectivity.tethering.TetheringConfiguration.DHCP_DEFAULT_RANGE ) ; }
Source:
public void testMissingRequiredBundleFile ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle installedConfigBundle = createValidTzDataBundle ( "2030a" ) ; assertTrue ( install ( installedConfigBundle ) ) ; assertTzDataInstalled ( installedConfigBundle ) ; libcore.tzdata.update2.ConfigBundle incompleteUpdate = createValidTzDataBundleBuilder ( "2030b" ) . clearBionicTzData ( ) . buildUnvalidated ( ) ; assertFalse ( install ( incompleteUpdate ) ) ; assertTzDataInstalled ( installedConfigBundle ) ; }

Target:
public void testSuccessfulFirstUpdate ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle tzData = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertTrue ( installer.install ( tzData.getBundleBytes ( ) ) ) ; assertTzDataInstalled ( tzData ) ; }
Source:
private com.android.bluetooth.pbapclient.PbapClientService getService ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "PbapClient call not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } return null ; }

Target:
private com.android.bluetooth.pbapclient.PbapClientService getService ( ) { if ( ! ( com.android.bluetooth.pbapclient.com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "PbapClient call not allowed for non-active user" ) ; return null ; } if ( ( ( mService ) != null ) && ( mService.isAvailable ( ) ) ) { return mService ; } return null ; }
Source:
public int getJayceCount ( ) { int size = 0 ; java.util.Iterator < com.android.sched.vfs.InputVFile > jayceIter = getJayceIterator ( ) ; while ( jayceIter.hasNext ( ) ) { size ++ ; jayceIter.next ( ) ; } return size ; }

Target:
public int getJayceCount ( ) throws com.android.jack.library.LibraryIOException { int size = 0 ; com.android.jack.library.InputJackLibrary compilerStateLib = null ; try { compilerStateLib = com.android.jack.test.toolchain.AbstractTestTools.getInputJackLibraryFromDir ( compilerStateFolder ) ; java.util.Iterator < com.android.sched.vfs.InputVFile > jayceIter = compilerStateLib.iterator ( FileType.JAYCE ) ; while ( jayceIter.hasNext ( ) ) { size ++ ; jayceIter.next ( ) ; } } finally { if ( compilerStateLib != null ) { compilerStateLib.close ( ) ; } } return size ; }
Source:
public static int waitpid ( int pid , android.util.MutableInt status , int options ) throws android.system.ErrnoException { if ( status == null ) { return Libcore.os.waitpid ( pid , null , options ) ; } else { android.util.MutableInt internalStatus = new android.util.MutableInt ( status.value ) ; try { return Libcore.os.waitpid ( pid , internalStatus , options ) ; } finally { status.value = internalStatus.value ; } } }

Target:
public static void setgroups ( int [ ] gids ) throws android.system.ErrnoException { Libcore.os.setgroups ( gids ) ; }
Source:
static boolean containsKeyImpl ( java.util.Map < ? , ? > map , @ javax.annotation.Nullable java.lang.Object key ) { for ( java.util.Map.Entry < ? , ? > entry : map.entrySet ( ) ) { if ( com.google.common.base.Objects.equal ( entry.getKey ( ) , key ) ) { return true ; } } return false ; }

Target:
static boolean containsValueImpl ( java.util.Map < ? , ? > map , @ javax.annotation.Nullable java.lang.Object value ) { return com.google.common.collect.Iterators.contains ( com.google.common.collect.Maps.valueIterator ( map.entrySet ( ) . iterator ( ) ) , value ) ; }
Source:
public void testReadTimeZone_badMagic ( ) throws java.lang.Exception { libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder builder = new libcore.util.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) ; builder.initializeToValid ( ) ; builder.setMagic ( - 559038737 ) ; try { createZoneInfo ( getName ( ) , java.lang.System.currentTimeMillis ( ) , builder.build ( ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } }

Target:
public void testReadTimeZone_badMagic ( ) throws java.lang.Exception { libcore.tzdata.testing.ZoneInfoTestHelper.ZoneInfoDataBuilder builder = new libcore.tzdata.testing.ZoneInfoTestHelper.ZoneInfoDataBuilder ( ) ; builder.initializeToValid ( ) ; builder.setMagic ( - 559038737 ) ; try { createZoneInfo ( getName ( ) , java.lang.System.currentTimeMillis ( ) , builder.build ( ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } }
Source:
public void handleDataPathTimeout ( java.lang.String networkSpecifier ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "handleDataPathTimeout: networkSpecifier=" + networkSpecifier ) ) ; com.android.server.wifi.aware.WifiAwareDataPathStateManager.AwareNetworkRequestInformation nnri = mNetworkRequestsCache.remove ( networkSpecifier ) ; if ( nnri == null ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.DBG ) { android.util.Log.d ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "handleDataPathTimeout: network request not found for networkSpecifier=" + networkSpecifier ) ) ; } return ; } mMgr.endDataPath ( nnri.ndpId ) ; }

Target:
public void handleDataPathTimeout ( android.net.NetworkSpecifier networkSpecifier ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "handleDataPathTimeout: networkSpecifier=" + networkSpecifier ) ) ; com.android.server.wifi.aware.WifiAwareDataPathStateManager.AwareNetworkRequestInformation nnri = mNetworkRequestsCache.remove ( networkSpecifier ) ; if ( nnri == null ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.DBG ) { android.util.Log.d ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "handleDataPathTimeout: network request not found for networkSpecifier=" + networkSpecifier ) ) ; } return ; } mMgr.endDataPath ( nnri.ndpId ) ; }
Source:
public void connectionForPatchWithBodyRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.PatchWithBody request = new com.android.volley.mock.TestRequest.PatchWithBody ( ) ; assertEquals ( request.getMethod ( ) , Method.PATCH ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "PATCH" , mMockConnection.getRequestMethod ( ) ) ; assertTrue ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void executeRequestClosesConnection_invalidResponseCode ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockConnection.getResponseCode ( ) ) . thenReturn ( ( - 1 ) ) ; try { mHurlStack.executeRequest ( new com.android.volley.mock.TestRequest.Get ( ) , java.util.Collections.< java.lang.String , java.lang.String > emptyMap ( ) ) ; org.junit.Assert.fail ( "Should have thrown exception" ) ; } catch ( java.io.IOException e ) { org.mockito.Mockito.verify ( mMockConnection ) . disconnect ( ) ; } }
Source:
public void onAnimationEnd ( android.view.animation.Animation animation ) { if ( ! ( ( mainActivity.isFinishing ( ) ) || ( mainActivity.isDestroyed ( ) ) ) ) { mainActivity.getFragmentManager ( ) . beginTransaction ( ) . remove ( dialpadFragment ) . commit ( ) ; } }

Target:
public void onAnimationEnd ( android.view.animation.Animation animation ) { if ( ! ( ( mainActivity.isFinishing ( ) ) || ( mainActivity.isDestroyed ( ) ) ) ) { mainActivity.getFragmentManager ( ) . beginTransaction ( ) . hide ( dialpadFragment ) . commit ( ) ; } }
Source:
public static void start ( @ com.android.annotations.NonNull org.eclipse.ui.IWorkbenchWindow window ) { assert ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.sSingleton ) == null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator coordinator = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator ( window ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.sSingleton = coordinator ; org.eclipse.ui.IPartService service = window.getPartService ( ) ; if ( service != null ) { service.addPartListener ( coordinator ) ; } }

Target:
public static com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator get ( @ com.android.annotations.NonNull org.eclipse.ui.IWorkbenchWindow window , boolean create ) { synchronized ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.class ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator coordinator = com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.sCoordinators.get ( window ) ; if ( ( coordinator == null ) && create ) { coordinator = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator ( window ) ; org.eclipse.ui.IPartService service = window.getPartService ( ) ; if ( service != null ) { service.addPartListener ( coordinator ) ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutWindowCoordinator.sCoordinators.put ( window , coordinator ) ; } return coordinator ; } }
Source:
public static com.android.sdklib.repository.descriptors.IPkgDesc newSource ( @ com.android.annotations.NonNull final com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull final com.android.sdklib.repository.MajorRevision revision ) { return new com.android.sdklib.repository.descriptors.PkgDesc ( ) { @ java.lang.Override public com.android.sdklib.repository.descriptors.PkgType getType ( ) { return PkgType.PKG_SOURCES ; } @ java.lang.Override public com.android.sdklib.repository.MajorRevision getMajorRevision ( ) { return revision ; } @ java.lang.Override public com.android.sdklib.AndroidVersion getAndroidVersion ( ) { return version ; } @ java.lang.Override public boolean isUpdateFor ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.IPkgDesc existingDesc ) { return isGenericUpdateFor ( existingDesc ) ; } } ; }

Target:
public static com.android.sdklib.repository.descriptors.PkgDesc.Builder newSource ( @ com.android.annotations.NonNull com.android.sdklib.AndroidVersion version , @ com.android.annotations.NonNull com.android.sdklib.repository.MajorRevision revision ) { com.android.sdklib.repository.descriptors.PkgDesc.Builder p = new com.android.sdklib.repository.descriptors.PkgDesc.Builder ( PkgType.PKG_SOURCES ) ; p.mAndroidVersion = version ; p.mMajorRevision = revision ; return p ; }
Source:
public void testLongHandDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( ( ( ( ( ( "" + "build.gradle:9: Warning: A newer version of com.android.support:support-v4 than 19.0 is available: " ) + ( com.android.sdklib.SdkVersionInfo.HIGHEST_KNOWN_STABLE_API ) ) + ".0.2 [GradleDependency]\n" ) + " compile group: \'com.android.support\', name: \'support-v4\', version: \'19.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) , lintProject ( "gradle/DependenciesProps.gradle=>build.gradle" ) ) ; }

Target:
public void testLongHandDependencies ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( com.android.tools.lint.checks.GradleDetector.DEPENDENCY ) ; assertEquals ( ( "" + ( ( ( "build.gradle:9: Warning: A newer version of com.android.support:support-v4 than 19.0 is available: 21.0.2 [GradleDependency]\n" + " compile group: \'com.android.support\', name: \'support-v4\', version: \'19.0\'\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 1 warnings\n" ) ) , lintProject ( "gradle/DependenciesProps.gradle=>build.gradle" ) ) ; }
Source:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "pattern" , pattern ) . add ( "pattern.flags" , java.lang.Integer.toHexString ( pattern.flags ( ) ) ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.String patternString = com.google.common.base.Objects.toStringHelper ( pattern ) . add ( "pattern" , pattern.pattern ( ) ) . add ( "pattern.flags" , pattern.flags ( ) ) . toString ( ) ; return ( "Predicates.contains(" + patternString ) + ")" ; }
Source:
public void updatePackageTable ( ) { }

Target:
protected void postCreate ( ) { com.android.sdkuilib.internal.tasks.ProgressViewFactory factory = new com.android.sdkuilib.internal.tasks.ProgressViewFactory ( ) ; factory.setProgressView ( new com.android.sdkuilib.internal.tasks.ProgressView ( mStatusText , mProgressBar , null , mUpdaterData.getSdkLog ( ) ) ) ; mUpdaterData.setTaskFactory ( factory ) ; setupSources ( ) ; initializeSettings ( ) ; if ( mUpdaterData.checkIfInitFailed ( ) ) { close ( ) ; return ; } mUpdaterData.broadcastOnSdkLoaded ( ) ; mPackageMananger = new com.android.sdkuilib.internal.repository.PackageLoader ( mUpdaterData ) ; }
Source:
void startProfileServices ( ) { debugLog ( "startCoreServices()" ) ; java.lang.Class [ ] supportedProfileServices = com.android.bluetooth.btservice.Config.getSupportedProfiles ( ) ; if ( ( ( supportedProfileServices.length ) == 1 ) && ( com.android.bluetooth.gatt.GattService.class . getSimpleName ( ) . equals ( supportedProfileServices [ 0 ] . getSimpleName ( ) ) ) ) { updateUuids ( ) ; setBluetoothClassFromConfig ( ) ; mAdapterStateMachine.sendMessage ( AdapterState.BREDR_STARTED ) ; } else { setAllProfileServiceStates ( supportedProfileServices , BluetoothAdapter.STATE_ON ) ; } }

Target:
void startProfileServices ( ) { debugLog ( "startCoreServices()" ) ; java.lang.Class [ ] supportedProfileServices = com.android.bluetooth.btservice.Config.getSupportedProfiles ( ) ; if ( ( ( supportedProfileServices.length ) == 1 ) && ( com.android.bluetooth.gatt.GattService.class . getSimpleName ( ) . equals ( supportedProfileServices [ 0 ] . getSimpleName ( ) ) ) ) { mAdapterProperties.onBluetoothReady ( ) ; updateUuids ( ) ; setBluetoothClassFromConfig ( ) ; mAdapterStateMachine.sendMessage ( AdapterState.BREDR_STARTED ) ; } else { setAllProfileServiceStates ( supportedProfileServices , BluetoothAdapter.STATE_ON ) ; } }
Source:
public static android.hardware.cts.helpers.sensoroperations.TestSensorOperation createFlushOperation ( android.hardware.cts.helpers.TestSensorEnvironment environment , final long duration , final java.util.concurrent.TimeUnit timeUnit ) { android.hardware.cts.helpers.sensoroperations.TestSensorOperation.Executor executor = new android.hardware.cts.helpers.sensoroperations.TestSensorOperation.Executor ( ) { @ java.lang.Override public void execute ( android.hardware.cts.helpers.TestSensorManager sensorManager , android.hardware.cts.helpers.TestSensorEventListener listener ) throws java.lang.InterruptedException { try { sensorManager.registerListener ( listener ) ; android.hardware.cts.helpers.SensorCtsHelper.sleep ( duration , timeUnit ) ; java.util.concurrent.CountDownLatch latch = sensorManager.requestFlush ( ) ; listener.waitForFlushComplete ( latch , true ) ; } finally { sensorManager.unregisterListener ( ) ; } } } ; return new android.hardware.cts.helpers.sensoroperations.TestSensorOperation ( environment , executor ) ; }

Target:
public static android.hardware.cts.helpers.sensoroperations.TestSensorOperation createFlushOperation ( android.hardware.cts.helpers.TestSensorEnvironment environment , final long duration , final java.util.concurrent.TimeUnit timeUnit ) { return android.hardware.cts.helpers.sensoroperations.TestSensorOperation.createFlushOperation ( environment , new int [ ] { ( ( int ) ( timeUnit.toMillis ( duration ) ) ) } , 0 ) ; }
Source:
private synchronized void msgPassThru ( int cmd ) { android.util.Log.d ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , ( "msgPassThru " + cmd ) ) ; if ( ( mA2dpDevice ) == null ) { android.util.Log.e ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , "Already disconnected ignoring." ) ; return ; } mAvrcpCtrlSrvc.sendPassThroughCmd ( mA2dpDevice , cmd , AvrcpControllerService.KEY_STATE_PRESSED ) ; mAvrcpCtrlSrvc.sendPassThroughCmd ( mA2dpDevice , cmd , AvrcpControllerService.KEY_STATE_RELEASED ) ; }

Target:
private synchronized void msgPassThru ( int cmd ) { if ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.DBG ) android.util.Log.d ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , ( "msgPassThru " + cmd ) ) ; if ( ( mA2dpDevice ) == null ) { android.util.Log.w ( com.android.bluetooth.a2dpsink.mbs.A2dpMediaBrowserService.TAG , "Already disconnected ignoring." ) ; return ; } mAvrcpCtrlSrvc.sendPassThroughCmd ( mA2dpDevice , cmd , AvrcpControllerService.KEY_STATE_PRESSED ) ; mAvrcpCtrlSrvc.sendPassThroughCmd ( mA2dpDevice , cmd , AvrcpControllerService.KEY_STATE_RELEASED ) ; }
Source:
public byte [ ] convert ( ) { try { byte [ ] ret ; ret = convert0 ( ) ; if ( com.android.dx.dex.file.DebugInfoEncoder.DEBUG ) { for ( int i = 0 ; i < ( ret.length ) ; i ++ ) { java.lang.System.err.printf ( "byte %02x\n" , ( 255 & ( ret [ i ] ) ) ) ; } } return ret ; } catch ( java.io.IOException ex ) { throw com.android.dx.util.ExceptionWithContext.withContext ( ex , "...while encoding debug info" ) ; } }

Target:
public byte [ ] convert ( ) { try { byte [ ] ret ; ret = convert0 ( ) ; if ( com.android.dx.dex.file.DebugInfoEncoder.DEBUG ) { for ( int i = 0 ; i < ( ret.length ) ; i ++ ) { java.lang.System.err.printf ( "byte %02x\n" , ( 255 & ( ret [ i ] ) ) ) ; } } return ret ; } catch ( java.io.IOException ex ) { throw com.android.dex.util.ExceptionWithContext.withContext ( ex , "...while encoding debug info" ) ; } }
Source:
public static java.io.File getDynamicConfigFile ( com.android.tradefed.build.IBuildInfo info , java.lang.String moduleName ) { for ( com.android.tradefed.build.VersionedFile vFile : info.getFiles ( ) ) { if ( vFile.getVersion ( ) . equals ( ( ( com.android.compatibility.common.util.DynamicConfigHostSide.CONFIG_PATH_PREFIX ) + moduleName ) ) ) { return vFile.getFile ( ) ; } } return null ; }

Target:
public static java.io.File getDynamicConfigFile ( com.android.tradefed.build.IBuildInfo info , java.lang.String moduleName ) { java.lang.String path = info.getBuildAttributes ( ) . get ( ( ( com.android.compatibility.common.util.DynamicConfigHostSide.CONFIG_PATH_PREFIX ) + moduleName ) ) ; if ( ( path != null ) && ( ! ( path.isEmpty ( ) ) ) ) { return new java.io.File ( path ) ; } return null ; }
Source:
public static float distance ( float x , float y , float sx , float sy ) { float dx = x - sx ; float dy = y - sy ; return ( ( float ) ( java.lang.Math.sqrt ( ( ( dx * dx ) + ( dy * dy ) ) ) ) ) ; }

Target:
public static float distance ( float x , float y , float sx , float sy ) { float dx = x - sx ; float dy = y - sy ; return ( ( float ) ( java.lang.Math.hypot ( dx , dy ) ) ) ; }
Source:
public void test_RSA_public_decrypt_null_key_Failure ( ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.RSA_public_decrypt ( 0 , new byte [ 0 ] , new byte [ 0 ] , 0 , 0 ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } }

Target:
public void test_get_RSA_private_params ( ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.get_RSA_private_params ( org.conscrypt.NativeCryptoTest.NULL_EVP_PKEY ) ; } catch ( java.lang.NullPointerException expected ) { } try { org.conscrypt.NativeCrypto.get_RSA_private_params ( org.conscrypt.NativeCryptoTest.NULL_EVP_PKEY ) ; } catch ( java.lang.NullPointerException expected ) { } final byte [ ] seed = new byte [ 20 ] ; long group = org.conscrypt.NativeCrypto.EC_GROUP_new_by_curve_name ( "prime256v1" ) ; org.conscrypt.NativeRef.EVP_PKEY ctx = new org.conscrypt.NativeRef.EVP_PKEY ( org.conscrypt.NativeCrypto.EC_KEY_generate_key ( group ) ) ; try { org.conscrypt.NativeCrypto.get_RSA_private_params ( ctx ) ; fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } }