auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.Object getMinSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { try { return com.android.xml.AndroidManifest.getMinSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } return 1 ; }

Target:
public synchronized java.lang.Object getMinSdkVersion ( @ com.android.annotations.NonNull java.io.File manifestFile ) { if ( ( mMinSdkVersion ) == null ) { try { mMinSdkVersion = com.google.common.base.Optional.fromNullable ( com.android.xml.AndroidManifest.getMinSdkVersion ( new com.android.io.FileWrapper ( manifestFile ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( e ) ; } catch ( com.android.io.StreamException e ) { throw new java.lang.RuntimeException ( e ) ; } } return mMinSdkVersion.or ( 1 ) ; }
Source:
private static void testOomeLarge ( ) { java.lang.System.out.println ( "testOomeLarge beginning" ) ; final int SIXTEEN_MB = ( ( 16 * 1024 ) * 1024 ) - 32 ; java.lang.Boolean sawEx = false ; byte [ ] a ; try { a = new byte [ SIXTEEN_MB ] ; } catch ( java.lang.OutOfMemoryError oom ) { sawEx = true ; } if ( ! sawEx ) { throw new java.lang.RuntimeException ( ( "Test failed: " + "OutOfMemoryError not thrown" ) ) ; } java.lang.System.out.println ( "testOomeLarge succeeded" ) ; }

Target:
private static void testOomeLarge ( ) { java.lang.System.out.println ( "testOomeLarge beginning" ) ; java.lang.Boolean sawEx = false ; byte [ ] a ; try { a = new byte [ ( ( int ) ( java.lang.Runtime.getRuntime ( ) . maxMemory ( ) ) ) - 32 ] ; } catch ( java.lang.OutOfMemoryError oom ) { sawEx = true ; } if ( ! sawEx ) { throw new java.lang.RuntimeException ( ( "Test failed: " + "OutOfMemoryError not thrown" ) ) ; } java.lang.System.out.println ( "testOomeLarge succeeded" ) ; }
Source:
private void startTimeOut ( ) { cancelTimeOut ( ) ; int dialogDuration = com.android.stk.StkApp.calculateDurationInMilis ( mTextMsg.duration ) ; if ( dialogDuration == 0 ) { dialogDuration = StkApp.UI_TIMEOUT ; } mTimeoutHandler.sendMessageDelayed ( mTimeoutHandler.obtainMessage ( com.android.stk.StkDialogActivity.MSG_ID_TIMEOUT ) , dialogDuration ) ; }

Target:
private void startTimeOut ( boolean waitForUserToClear ) { cancelTimeOut ( ) ; int dialogDuration = com.android.stk.StkApp.calculateDurationInMilis ( mTextMsg.duration ) ; if ( dialogDuration == 0 ) { if ( waitForUserToClear ) { dialogDuration = StkApp.DISP_TEXT_WAIT_FOR_USER_TIMEOUT ; } else { dialogDuration = StkApp.DISP_TEXT_CLEAR_AFTER_DELAY_TIMEOUT ; } } mTimeoutHandler.sendMessageDelayed ( mTimeoutHandler.obtainMessage ( com.android.stk.StkDialogActivity.MSG_ID_TIMEOUT ) , dialogDuration ) ; }
Source:
private void addNewConfiguration ( com.google.gct.testing.CloudTestConfigurationImpl newConfiguration ) { newConfiguration.setIcon ( CloudTestConfigurationProviderImpl.DEFAULT_ICON ) ; int addIndex = ( ( selectedConfiguration ) == null ) ? editableConfigurations.size ( ) : ( editableConfigurations.indexOf ( selectedConfiguration ) ) + 1 ; editableConfigurations.add ( addIndex , newConfiguration ) ; addConfigurationToTree ( addIndex , newConfiguration , true ) ; selectedConfiguration = newConfiguration ; updateConfigurationTree ( ) ; }

Target:
private void doAdd ( ) { addNewConfiguration ( new com.google.gct.testing.CloudConfigurationImpl ( facet , configurationKind ) ) ; }
Source:
public void startsOutAvailable ( ) { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , android.net.ConnectivityManager.TETHERING_BLUETOOTH , mSharedLog , mNMService , mStatsService , mTetherHelper , mIPv6TetheringInterfaceServices ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mTetherHelper , mNMService , mStatsService ) ; }

Target:
public void startsOutAvailable ( ) { mTestedSm = new com.android.server.connectivity.tethering.TetherInterfaceStateMachine ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mLooper.getLooper ( ) , android.net.ConnectivityManager.TETHERING_BLUETOOTH , mSharedLog , mNMService , mStatsService , mTetherHelper , mIPv6TetheringInterfaceServices ) ; mTestedSm.start ( ) ; mLooper.dispatchAll ( ) ; org.mockito.Mockito.verify ( mTetherHelper ) . updateInterfaceState ( mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR ) ; org.mockito.Mockito.verify ( mTetherHelper ) . updateLinkProperties ( org.mockito.Matchers.eq ( mTestedSm ) , org.mockito.Matchers.any ( android.net.LinkProperties.class ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mTetherHelper , mNMService , mStatsService ) ; }
Source:
private boolean isPermissionEnforcedLocked ( java.lang.String permission ) { if ( android.Manifest.permission.READ_EXTERNAL_STORAGE.equals ( permission ) ) { if ( ( mSettings.mReadExternalStorageEnforced ) != null ) { return mSettings.mReadExternalStorageEnforced ; } else { return ( android.provider.Settings.Secure.getInt ( mContext.getContentResolver ( ) , Secure.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT , 0 ) ) != 0 ; } } else { return true ; } }

Target:
private boolean isPermissionEnforcedLocked ( java.lang.String permission , boolean enforcedDefault ) { if ( android.Manifest.permission.READ_EXTERNAL_STORAGE.equals ( permission ) ) { if ( ( mSettings.mReadExternalStorageEnforced ) != null ) { return mSettings.mReadExternalStorageEnforced ; } else { return enforcedDefault ; } } else { return true ; } }
Source:
private void startContactInfoSearch ( ) { com.android.incallui.call.DialerCall dialerCall = com.android.incallui.call.CallList.getInstance ( ) . getActiveOrBackgroundCall ( ) ; if ( dialerCall != null ) { contactInfoCache.findInfo ( dialerCall , false , new com.android.incallui.NewReturnToCallController.ReturnToCallContactInfoCacheCallback ( this ) ) ; } }

Target:
private void startContactInfoSearch ( ) { com.android.incallui.call.DialerCall dialerCall = com.android.incallui.call.CallList.getInstance ( ) . getIncomingCall ( ) ; if ( dialerCall == null ) { dialerCall = com.android.incallui.call.CallList.getInstance ( ) . getOutgoingCall ( ) ; } if ( dialerCall == null ) { dialerCall = com.android.incallui.call.CallList.getInstance ( ) . getActiveOrBackgroundCall ( ) ; } if ( dialerCall != null ) { contactInfoCache.findInfo ( dialerCall , false , new com.android.incallui.NewReturnToCallController.ReturnToCallContactInfoCacheCallback ( this ) ) ; } }
Source:
protected void tearDown ( ) throws java.lang.Exception { super . tearDown ( ) ; if ( ( ! ( supportsDragAndDrop ( ) ) ) || ( ! ( supportsMultiWindowMode ( ) ) ) ) { return ; } mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mSourcePackageName ) ) ) ; mDevice.executeShellCommand ( ( ( android.wm.cts.CrossAppDragAndDropTests.AM_FORCE_STOP ) + ( mTargetPackageName ) ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mDevice = getDevice ( ) ; if ( ! ( supportsDragAndDrop ( ) ) ) { return ; } mSourcePackageName = android.wm.cts.CrossAppDragAndDropTests.SOURCE_PACKAGE_NAME ; mTargetPackageName = android.wm.cts.CrossAppDragAndDropTests.TARGET_PACKAGE_NAME ; }
Source:
public void onRequestPermissionsResult ( int requestCode , java.lang.String [ ] permissions , int [ ] grantResults ) { if ( requestCode == ( com.android.dialer.contactsfragment.ContactsFragment.READ_CONTACTS_PERMISSION_REQUEST_CODE ) ) { if ( ( ( grantResults.length ) >= 1 ) && ( ( android.content.pm.PackageManager.PERMISSION_GRANTED ) == ( grantResults [ 0 ] ) ) ) { emptyContentView.setVisibility ( View.GONE ) ; getLoaderManager ( ) . initLoader ( 0 , null , this ) ; } } }

Target:
public void onRequestPermissionsResult ( int requestCode , java.lang.String [ ] permissions , int [ ] grantResults ) { if ( requestCode == ( com.android.dialer.contactsfragment.ContactsFragment.READ_CONTACTS_PERMISSION_REQUEST_CODE ) ) { if ( ( ( grantResults.length ) >= 1 ) && ( ( android.content.pm.PackageManager.PERMISSION_GRANTED ) == ( grantResults [ 0 ] ) ) ) { com.android.dialer.util.PermissionsUtil.notifyPermissionGranted ( getContext ( ) , permissions [ 0 ] ) ; } } }
Source:
public void testScrollWithinScroll ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.double_scroll ) ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ; }

Target:
public void scrollWithinScroll ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( org.hamcrest.Matchers.is ( R.id.double_scroll ) ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( org.hamcrest.Matchers.not ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) ) . check ( android.support.test.espresso.assertion.ViewAssertions.matches ( android.support.test.espresso.matcher.ViewMatchers.isDisplayed ( ) ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; assertNotNull ( mBuildInfo ) ; mPrimaryUserId = getPrimaryUserId ( ) ; switchUser ( mPrimaryUserId ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; assertNotNull ( mBuildInfo ) ; mSupportsMultiUser = ( getDevice ( ) . getMaxNumberOfUsersSupported ( ) ) > 1 ; mIsSplitSystemUser = checkIfSplitSystemUser ( ) ; mPrimaryUserId = getDevice ( ) . getPrimaryUserId ( ) ; mFixedUsers = new java.util.ArrayList ( ) ; mFixedUsers.add ( mPrimaryUserId ) ; if ( ( mPrimaryUserId ) != ( android.host.multiuser.BaseMultiUserTest.USER_SYSTEM ) ) { mFixedUsers.add ( android.host.multiuser.BaseMultiUserTest.USER_SYSTEM ) ; } getDevice ( ) . switchUser ( mPrimaryUserId ) ; removeTestUsers ( ) ; }
Source:
public java.lang.String getVoiceMailNumber ( ) { return getVoiceMailNumber ( android.telephony.TelephonyManager.getDefaultSubscription ( ) ) ; }

Target:
public void setCarrierInfoForImsiEncryption ( android.telephony.ImsiEncryptionInfo imsiEncryptionInfo ) { try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return ; info.setCarrierInfoForImsiEncryption ( mSubId , mContext.getOpPackageName ( ) , imsiEncryptionInfo ) ; } catch ( java.lang.NullPointerException ex ) { return ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setCarrierInfoForImsiEncryption RemoteException" , ex ) ; return ; } }
Source:
public long beforeHandshake ( long c ) throws javax.net.ssl.SSLException { long s = super . beforeHandshake ( c ) ; if ( ( privateKey ) != null ) { org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , privateKey.getPkeyContext ( ) ) ; } if ( ( certificates ) != null ) { org.conscrypt.NativeCrypto.SSL_use_certificate ( s , certificates ) ; } if ( channelIdEnabled ) { org.conscrypt.NativeCrypto.SSL_enable_tls_channel_id ( s ) ; } return s ; }

Target:
public long beforeHandshake ( long c ) throws javax.net.ssl.SSLException { long s = super . beforeHandshake ( c ) ; if ( ( privateKey ) != null ) { org.conscrypt.NativeCrypto.SSL_use_PrivateKey ( s , privateKey.getPkeyContext ( ) ) ; } if ( ( certificates ) != null ) { org.conscrypt.NativeCrypto.SSL_use_certificate ( s , certificates ) ; } if ( channelIdEnabled ) { org.conscrypt.NativeCrypto.SSL_enable_tls_channel_id ( s ) ; } org.conscrypt.NativeCrypto.SSL_set_verify ( s , NativeCrypto.SSL_VERIFY_NONE ) ; return s ; }
Source:
public com.android.ahat.DocString appendThumbnail ( java.net.URI uri , java.lang.String alt ) { mStringBuilder.append ( "<img height=\"16\" alt=\"" ) ; mStringBuilder.append ( com.google.common.html.HtmlEscapers.htmlEscaper ( ) . escape ( alt ) ) ; mStringBuilder.append ( "\" src=\"" ) ; mStringBuilder.append ( uri.toASCIIString ( ) ) ; mStringBuilder.append ( "\" />" ) ; return this ; }

Target:
public com.android.ahat.DocString appendThumbnail ( java.net.URI uri , java.lang.String alt ) { mStringBuilder.append ( "<img height=\"16\" alt=\"" ) ; mStringBuilder.append ( com.android.ahat.HtmlEscaper.escape ( alt ) ) ; mStringBuilder.append ( "\" src=\"" ) ; mStringBuilder.append ( uri.toASCIIString ( ) ) ; mStringBuilder.append ( "\" />" ) ; return this ; }
Source:
public java.io.File doCall ( java.lang.Object it ) { return scope.getGlobalScope ( ) . getProject ( ) . file ( ( ( ( ( ( java.lang.String.valueOf ( scope.getGlobalScope ( ) . getBuildDir ( ) ) ) + "/" ) + ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES ) ) + "/dependency-cache/" ) + ( scope.getVariantData ( ) . getVariantConfiguration ( ) . getDirName ( ) ) ) ) ; }

Target:
public java.io.File doCall ( java.lang.Object it ) { return scope.getJavaDependencyCache ( ) ; }
Source:
public boolean apply ( @ com.android.annotations.Nullable java.io.File file ) { return ( file != null ) && ( ! ( file.isDirectory ( ) ) ) ; }

Target:
private static void addAllFiles ( com.android.build.gradle.integration.common.fixture.app.AndroidTestApp app , java.io.File projectDir ) { for ( java.lang.String filePath : com.android.build.gradle.integration.common.utils.FileHelper.listFiles ( projectDir ) ) { java.io.File file = new java.io.File ( filePath ) ; try { app.addFile ( new com.android.build.gradle.integration.common.fixture.app.TestSourceFile ( file.getParent ( ) , file.getName ( ) , com.google.common.io.Files.toByteArray ( new java.io.File ( projectDir , filePath ) ) ) ) ; } catch ( java.io.IOException e ) { org.junit.Assert.fail ( e.toString ( ) ) ; } } }
Source:
public static void main ( java.lang.String [ ] args ) { Main.BadFinalizer bf = new Main.BadFinalizer ( ) ; java.lang.System.out.println ( "About to null reference and request GC." ) ; bf = null ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; for ( int i = 0 ; i < 8 ; i ++ ) { Main.snooze ( 4000 ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; } java.lang.System.out.println ( "UNREACHABLE" ) ; java.lang.System.exit ( 0 ) ; }

Target:
private static void createBadFinalizer ( java.util.concurrent.CountDownLatch finalizerWait ) { Main.BadFinalizer bf = new Main.BadFinalizer ( finalizerWait ) ; java.lang.System.out.println ( "About to null reference." ) ; bf = null ; }
Source:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { scrollable.scrollIntoView ( new android.support.test.uiautomator.UiSelector ( ) . text ( "Settings" ) ) ; return scrollable.getChild ( new android.support.test.uiautomator.UiSelector ( ) . text ( "Settings" ) ) . exists ( ) ; }

Target:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { int swipes = 0 ; while ( ( ! ( settingsLink.exists ( ) ) ) && ( swipes < 20 ) ) { scrollable.flingForward ( ) ; swipes ++ ; } return settingsLink.exists ( ) ; }
Source:
public final void testPkgTypeExtra ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_EXTRAS ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeExtra ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_EXTRAS ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasVendor ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
public void testBitstreamsConformance ( ) throws com.android.tradefed.device.DeviceNotAvailableException , java.io.IOException { testBitstreamsConformance ( mPrefix ) ; }

Target:
public void testBitstreamsConformance ( ) { if ( ! ( android.media.cts.bitstreams.MediaBitstreamsTest.mResults.containsKey ( mPath ) ) ) { try { testBitstreamsConformance ( mPrefix ) ; } catch ( com.android.tradefed.device.DeviceNotAvailableException | java.io.IOException e ) { java.lang.String curMethod = getCurrentMethod ( ) ; addConformanceEntry ( curMethod , mPath , MediaBitstreams.K_UNAVAILABLE , e.toString ( ) ) ; } } }
Source:
private static java.lang.Class < ? > findExpectedType ( java.lang.Class < ? > fromClass ) { for ( java.lang.Class < ? > c = fromClass ; c != ( java.lang.Object.class ) ; c = c.getSuperclass ( ) ) { for ( java.lang.reflect.Method method : c.getDeclaredMethods ( ) ) { if ( org.hamcrest.TypeSafeMatcher.isMatchesSafelyMethod ( method ) ) { return method.getParameterTypes ( ) [ 0 ] ; } } } throw new java.lang.Error ( "Cannot determine correct type for matchesSafely() method." ) ; }

Target:
protected abstract boolean matchesSafely ( T item ) ;
Source:
private void updateEmergencyAffordanceNeeded ( ) { synchronized ( mLock ) { mEmergencyAffordanceNeeded = ( mSimNeedsEmergencyAffordance ) || ( mNetworkNeedsEmergencyAffordance ) ; Settings.Global.putInt ( mContext.getContentResolver ( ) , Settings.Global.EMERGENCY_AFFORDANCE_NEEDED , ( mEmergencyAffordanceNeeded ? 1 : 0 ) ) ; if ( mEmergencyAffordanceNeeded ) { stopScanning ( ) ; } } }

Target:
private void updateEmergencyAffordanceNeeded ( ) { synchronized ( mLock ) { mEmergencyAffordanceNeeded = ( mVoiceCapable ) && ( ( mSimNeedsEmergencyAffordance ) || ( mNetworkNeedsEmergencyAffordance ) ) ; Settings.Global.putInt ( mContext.getContentResolver ( ) , Settings.Global.EMERGENCY_AFFORDANCE_NEEDED , ( mEmergencyAffordanceNeeded ? 1 : 0 ) ) ; if ( mEmergencyAffordanceNeeded ) { stopScanning ( ) ; } } }
Source:
public static int getDeviceIdLabel ( com.android.internal.telephony.Phone phone ) { if ( ( phone.getPhoneType ( ) ) == ( PhoneConstants.PHONE_TYPE_GSM ) ) { return com.android.internal.R.string.imei ; } else if ( ( phone.getPhoneType ( ) ) == ( PhoneConstants.PHONE_TYPE_CDMA ) ) { return com.android.internal.R.string.meid ; } else { android.util.Log.w ( com.android.internal.telephony.TelephonyCapabilities.LOG_TAG , ( "getDeviceIdLabel: no known label for phone " + ( phone.getPhoneName ( ) ) ) ) ; return 0 ; } }

Target:
public static int getDeviceIdLabel ( com.android.internal.telephony.Phone phone ) { if ( ( phone.getPhoneType ( ) ) == ( PhoneConstants.PHONE_TYPE_GSM ) ) { return com.android.internal.R.string.imei ; } else if ( ( phone.getPhoneType ( ) ) == ( PhoneConstants.PHONE_TYPE_CDMA ) ) { return com.android.internal.R.string.meid ; } else { android.telephony.Rlog.w ( com.android.internal.telephony.TelephonyCapabilities.LOG_TAG , ( "getDeviceIdLabel: no known label for phone " + ( phone.getPhoneName ( ) ) ) ) ; return 0 ; } }
Source:
public sun.security.util.DerValue [ ] getSet ( int startLen , boolean implicit ) throws java.io.IOException { tag = ( ( byte ) ( buffer.read ( ) ) ) ; if ( ! implicit ) { if ( ( tag ) != ( sun.security.util.DerValue.tag_Set ) ) { throw new java.io.IOException ( "Set tag error" ) ; } } return readVector ( startLen ) ; }

Target:
public sun.security.util.DerValue [ ] getSet ( int startLen , boolean implicit , boolean originalEncodedFormRetained ) throws java.io.IOException { tag = ( ( byte ) ( buffer.read ( ) ) ) ; if ( ! implicit ) { if ( ( tag ) != ( sun.security.util.DerValue.tag_Set ) ) { throw new java.io.IOException ( "Set tag error" ) ; } } return readVector ( startLen , originalEncodedFormRetained ) ; }
Source:
public boolean deleteMessageFromIcc ( int messageIndex ) { boolean success = false ; byte [ ] pdu = new byte [ ( com.android.internal.telephony.uicc.IccConstants.SMS_RECORD_LENGTH ) - 1 ] ; java.util.Arrays.fill ( pdu , ( ( byte ) ( 255 ) ) ) ; try { com.android.internal.telephony.ISms iccISms = android.telephony.SmsManager.getISmsService ( ) ; if ( iccISms != null ) { success = iccISms.updateMessageOnIccEfForSubscriber ( getSubscriptionId ( ) , android.app.ActivityThread.currentPackageName ( ) , messageIndex , android.telephony.SmsManager.STATUS_ON_ICC_FREE , pdu ) ; } } catch ( android.os.RemoteException ex ) { } return success ; }

Target:
public boolean deleteMessageFromIcc ( int messageIndex ) { boolean success = false ; byte [ ] pdu = new byte [ ( android.telephony.SmsManager.SMS_RECORD_LENGTH ) - 1 ] ; java.util.Arrays.fill ( pdu , ( ( byte ) ( 255 ) ) ) ; try { com.android.internal.telephony.ISms iccISms = android.telephony.SmsManager.getISmsService ( ) ; if ( iccISms != null ) { success = iccISms.updateMessageOnIccEfForSubscriber ( getSubscriptionId ( ) , android.app.ActivityThread.currentPackageName ( ) , messageIndex , android.telephony.SmsManager.STATUS_ON_ICC_FREE , pdu ) ; } } catch ( android.os.RemoteException ex ) { } return success ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; mTelecomManager = ( ( android.telecom.TelecomManager ) ( mContext.getSystemService ( Context.TELECOM_SERVICE ) ) ) ; mShouldTestTelecom = android.telecom.cts.TestUtils.shouldTestTelecom ( mContext ) ; if ( mShouldTestTelecom ) { mPreviousDefaultDialer = android.telecom.cts.TestUtils.getDefaultDialer ( getInstrumentation ( ) ) ; android.telecom.cts.TestUtils.setDefaultDialer ( getInstrumentation ( ) , android.telecom.cts.TestUtils.PACKAGE ) ; setupCallbacks ( ) ; } }

Target:
public void run ( ) { mPhoneStateListener = new android.telecom.cts.BaseTelecomTestWithMockServices.TestPhoneStateListener ( ) ; mTelephonyManager.listen ( mPhoneStateListener , PhoneStateListener.LISTEN_CALL_STATE ) ; registeredLatch.countDown ( ) ; }
Source:
public void onPrepareOptionsMenu ( android.view.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; if ( android.os.SystemProperties.getBoolean ( "persist.radio.imsregrequired" , false ) ) { menu.findItem ( R.id.vpn_lockdown ) . setVisible ( false ) ; } }

Target:
public void onPrepareOptionsMenu ( android.view.Menu menu ) { super . onPrepareOptionsMenu ( menu ) ; for ( int i = 0 ; i < ( menu.size ( ) ) ; i ++ ) { menu.getItem ( i ) . setEnabled ( ( ! ( mUnavailable ) ) ) ; } if ( android.os.SystemProperties.getBoolean ( "persist.radio.imsregrequired" , false ) ) { menu.findItem ( R.id.vpn_lockdown ) . setVisible ( false ) ; } }
Source:
public static long getChecksum ( java.io.File file , java.util.zip.Checksum checksum ) throws java.io.IOException { return com.google.common.io.ByteStreams.getChecksum ( com.google.common.io.Files.newInputStreamSupplier ( file ) , checksum ) ; }

Target:
public static java.util.List < java.lang.String > readLines ( java.io.File file , java.nio.charset.Charset charset ) throws java.io.IOException { return com.google.common.io.Files.readLines ( file , 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 int getNumericCode ( ) { int result = 0 ; try { android.icu.util.UResourceBundle bundle = android.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , "currencyNumericCodes" , ICUResourceBundle.ICU_DATA_CLASS_LOADER ) ; android.icu.util.UResourceBundle codeMap = bundle.get ( "codeMap" ) ; android.icu.util.UResourceBundle numCode = codeMap.get ( subType ) ; result = numCode.getInt ( ) ; } catch ( java.util.MissingResourceException e ) { } return result ; }

Target:
public int getNumericCode ( ) { int result = 0 ; try { android.icu.util.UResourceBundle bundle = android.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , "currencyNumericCodes" , ICUResourceBundle.ICU_DATA_CLASS_LOADER ) ; android.icu.util.UResourceBundle codeMap = bundle.get ( "codeMap" ) ; android.icu.util.UResourceBundle numCode = codeMap.get ( subType ) ; result = numCode.getInt ( ) ; } catch ( java.util.MissingResourceException e ) { } return result ; }
Source:
private static com.android.jack.dx.rop.type.Type putIntern ( com.android.jack.dx.rop.type.Type type ) { synchronized ( com.android.jack.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.getDescriptor ( ) ; com.android.jack.dx.rop.type.Type already = com.android.jack.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.jack.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }

Target:
private static com.android.jack.dx.rop.type.Type putIntern ( com.android.jack.dx.rop.type.Type type ) { synchronized ( com.android.jack.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.getDescriptor ( ) . getString ( ) ; com.android.jack.dx.rop.type.Type already = com.android.jack.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.jack.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }
Source:
private void decrementWaiters ( com.google.common.util.concurrent.Monitor.Guard guard ) { int waiters = -- ( guard.waiterCount ) ; if ( waiters == 0 ) { activeGuards.remove ( guard ) ; } }

Target:
private void endWaitingFor ( com.google.common.util.concurrent.Monitor.Guard guard ) { int waiters = -- ( guard.waiterCount ) ; if ( waiters == 0 ) { for ( com.google.common.util.concurrent.Monitor.Guard p = activeGuards , pred = null ; ; pred = p , p = p.next ) { if ( p == guard ) { if ( pred == null ) { activeGuards = p.next ; } else { pred.next = p.next ; } p.next = null ; break ; } } } }
Source:
public void testGetCnsWithUtf8 ( ) { assertCns ( "cn=Lu\\C4\\8Di\\C4\\87" , "Lučić" ) ; }

Target:
public void testGetCnsWithUtf8 ( ) { assertCns ( "cn=\"Lu\\C4\\8Di\\C4\\87\"" , "Lučić" ) ; assertCns ( "cn=Lu\\C4\\8Di\\C4\\87" , "Lučić" ) ; assertCns ( "cn=Lu\\C4\\8di\\c4\\87" , "Lučić" ) ; assertCns ( "cn=\"Lu\\C4\\8di\\c4\\87\"" , "Lučić" ) ; assertCns ( "cn=Lučić" , "Lučić" ) ; expectExceptionInPrincipal ( "\\63n=ab" ) ; expectExceptionInPrincipal ( "cn=\\a" ) ; }
Source:
private int grabProcessOutput ( final java.lang.Process process ) throws java.lang.InterruptedException { return com.android.sdklib.util.GrabProcessOutput.grabProcessOutput ( process , Wait.WAIT_FOR_READERS , new com.android.sdklib.util.GrabProcessOutput.IProcessOutput ( ) { @ java.lang.Override public void out ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.info ( line ) ; } } @ java.lang.Override public void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.error ( null , line ) ; } } } ) ; }

Target:
private int grabProcessOutput ( final java.lang.Process process ) throws java.lang.InterruptedException { com.android.builder.internal.CommandLineRunner.OutputGrabber grabber = new com.android.builder.internal.CommandLineRunner.OutputGrabber ( ) ; int exitCode = com.android.sdklib.util.GrabProcessOutput.grabProcessOutput ( process , GrabProcessOutput.Wait.WAIT_FOR_READERS , grabber ) ; if ( ( exitCode == 0 ) && ( grabber.foundError ( ) ) ) { mLogger.error ( null , ( "Process output to error stream but exitCode is " + exitCode ) ) ; exitCode = - 42 ; } return exitCode ; }
Source:
public void requestIsimAuthentication ( java.lang.String nonce , android.os.Message response ) { unimplemented ( response ) ; }

Target:
public void setRadioPower ( boolean on , android.os.Message result ) { if ( mIsRadioPowerFailResponse ) { resultFail ( result , null , new java.lang.RuntimeException ( "setRadioPower failed!" ) ) ; return ; } if ( on ) { setRadioState ( RadioState.RADIO_ON ) ; } else { setRadioState ( RadioState.RADIO_OFF ) ; } resultSuccess ( result , null ) ; }
Source:
public void testHasWindowFocus ( ) { android.view.View view = new android.view.View ( mActivity ) ; assertFalse ( view.hasWindowFocus ( ) ) ; view = mActivity.findViewById ( R.id.fit_windows ) ; assertTrue ( view.hasWindowFocus ( ) ) ; }

Target:
public void testHasWindowFocus ( ) { android.view.View view = new android.view.View ( mActivity ) ; assertFalse ( view.hasWindowFocus ( ) ) ; final android.view.View view2 = mActivity.findViewById ( R.id.fit_windows ) ; new android.view.animation.cts.DelayedCheck ( android.view.cts.ViewTest.TIMEOUT_DELTA ) { @ java.lang.Override protected boolean check ( ) { return view2.hasWindowFocus ( ) ; } } . run ( ) ; }
Source:
public void copy ( org.eclipse.swt.dnd.Clipboard clipboard ) { copySelectionToClipboard ( clipboard ) ; }

Target:
public void widgetDefaultSelected ( org.eclipse.swt.events.SelectionEvent arg0 ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > selectedMessages = getSelectedLogCatMessages ( ) ; if ( ( selectedMessages.size ( ) ) == 0 ) { return ; } for ( com.android.ddmuilib.logcat.ILogCatMessageSelectionListener l : mMessageSelectionListeners ) { l.messageDoubleClicked ( selectedMessages.get ( 0 ) ) ; } }
Source:
public void create ( int sockType ) throws java.io.IOException { if ( ( fd ) == null ) { int osType ; switch ( sockType ) { case LocalSocket.SOCKET_DGRAM : osType = libcore.io.OsConstants.SOCK_DGRAM ; break ; case LocalSocket.SOCKET_STREAM : osType = libcore.io.OsConstants.SOCK_STREAM ; break ; case LocalSocket.SOCKET_SEQPACKET : osType = libcore.io.OsConstants.SOCK_SEQPACKET ; break ; default : throw new java.lang.IllegalStateException ( "unknown sockType" ) ; } try { fd = Libcore.os.socket ( OsConstants.AF_UNIX , osType , 0 ) ; mFdCreatedInternally = true ; } catch ( libcore.io.ErrnoException e ) { e.rethrowAsIOException ( ) ; } } }

Target:
public void create ( int sockType ) throws java.io.IOException { if ( ( fd ) == null ) { int osType ; switch ( sockType ) { case LocalSocket.SOCKET_DGRAM : osType = android.system.OsConstants.SOCK_DGRAM ; break ; case LocalSocket.SOCKET_STREAM : osType = android.system.OsConstants.SOCK_STREAM ; break ; case LocalSocket.SOCKET_SEQPACKET : osType = android.system.OsConstants.SOCK_SEQPACKET ; break ; default : throw new java.lang.IllegalStateException ( "unknown sockType" ) ; } try { fd = android.system.Os.socket ( OsConstants.AF_UNIX , osType , 0 ) ; mFdCreatedInternally = true ; } catch ( android.system.ErrnoException e ) { e.rethrowAsIOException ( ) ; } } }
Source:
public boolean sdpSearch ( android.os.ParcelUuid uuid ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot query remote device sdp records" ) ; return false ; } try { return android.bluetooth.BluetoothDevice.sService.sdpSearch ( this , uuid ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean fetchUuidsWithSdp ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ! ( isBluetoothEnabled ( ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot fetchUuidsWithSdp" ) ; return false ; } try { return service.fetchRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
private static void testUnloadClass ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { java.lang.ref.WeakReference < java.lang.Class > klass = Main.setUpUnloadClass ( constructor ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.ref.WeakReference < java.lang.Class > klass2 = Main.setUpUnloadClass ( constructor ) ; java.lang.Runtime.getRuntime ( ) . gc ( ) ; java.lang.System.out.println ( klass.get ( ) ) ; java.lang.System.out.println ( klass2.get ( ) ) ; }

Target:
private static java.lang.ref.WeakReference < java.lang.Class > setUpUnloadClassWeak ( java.lang.reflect.Constructor constructor ) throws java.lang.Exception { return new java.lang.ref.WeakReference < java.lang.Class > ( Main.setUpUnloadClass ( constructor ) ) ; }
Source:
public void TestPreceding ( ) { android.icu.text.RuleBasedBreakIterator rbbi = new android.icu.text.RuleBasedBreakIterator ( "" ) ; rbbi.setText ( ( ( java.text.CharacterIterator ) ( null ) ) ) ; if ( ( rbbi.preceding ( ( - 1 ) ) ) != ( android.icu.text.BreakIterator.DONE ) ) { errln ( ( "RuleBasedBreakIterator.preceding(-1) was suppose to return " + "0 when the object has a fText of null." ) ) ; } rbbi.setText ( "dummy" ) ; if ( ( rbbi.preceding ( ( - 1 ) ) ) != 0 ) { errln ( ( "RuleBasedBreakIterator.preceding(-1) was suppose to return " + "0 when the object has a fText of dummy." ) ) ; } }

Target:
public void TestPreceding ( ) { android.icu.text.RuleBasedBreakIterator rbbi = new android.icu.text.RuleBasedBreakIterator ( ".;" ) ; rbbi.setText ( ( ( java.text.CharacterIterator ) ( null ) ) ) ; if ( ( rbbi.preceding ( ( - 1 ) ) ) != ( android.icu.text.BreakIterator.DONE ) ) { errln ( ( "RuleBasedBreakIterator.preceding(-1) was suppose to return " + "0 when the object has a fText of null." ) ) ; } rbbi.setText ( "dummy" ) ; if ( ( rbbi.preceding ( ( - 1 ) ) ) != 0 ) { errln ( ( "RuleBasedBreakIterator.preceding(-1) was suppose to return " + "0 when the object has a fText of dummy." ) ) ; } }
Source:
private void keepMethodName ( proguard.obfuscate.Clazz clazz , proguard.obfuscate.Method method ) { java.lang.String name = method.getName ( clazz ) ; if ( ( ! ( name.equals ( ClassConstants.INTERNAL_METHOD_NAME_CLINIT ) ) ) && ( ! ( name.equals ( ClassConstants.INTERNAL_METHOD_NAME_INIT ) ) ) ) { proguard.obfuscate.MemberObfuscator.setFixedNewMemberName ( method , method.getName ( clazz ) ) ; } }

Target:
private void keepMethodName ( proguard.obfuscate.Clazz clazz , proguard.obfuscate.Method method ) { java.lang.String name = method.getName ( clazz ) ; if ( ! ( proguard.obfuscate.ClassUtil.isInitializer ( name ) ) ) { proguard.obfuscate.MemberObfuscator.setFixedNewMemberName ( method , name ) ; } }
Source:
public void testAddAll2 ( ) { java.util.concurrent.CopyOnWriteArraySet full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; java.util.Vector v = new java.util.Vector ( ) ; v.add ( three ) ; v.add ( four ) ; v.add ( one ) ; full.addAll ( v ) ; assertEquals ( 5 , full.size ( ) ) ; }

Target:
public void testAddAll2 ( ) { java.util.Set full = jsr166.CopyOnWriteArraySetTest.populatedSet ( 3 ) ; assertTrue ( full.addAll ( java.util.Arrays.asList ( three , four , one ) ) ) ; assertEquals ( 5 , full.size ( ) ) ; assertFalse ( full.addAll ( java.util.Arrays.asList ( three , four , one ) ) ) ; assertEquals ( 5 , full.size ( ) ) ; }
Source:
com.google.common.hash.HashCode makeHash ( com.google.common.hash.Hasher [ ] hashers ) { byte [ ] bytes = new byte [ ( bits ) / 8 ] ; java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap ( bytes ) ; for ( com.google.common.hash.Hasher hasher : hashers ) { buffer.put ( hasher.hash ( ) . asBytes ( ) ) ; } return com.google.common.hash.HashCodes.fromBytesNoCopy ( bytes ) ; }

Target:
com.google.common.hash.HashCode makeHash ( com.google.common.hash.Hasher [ ] hashers ) { byte [ ] bytes = new byte [ ( bits ) / 8 ] ; int i = 0 ; for ( com.google.common.hash.Hasher hasher : hashers ) { com.google.common.hash.HashCode newHash = hasher.hash ( ) ; i += newHash.writeBytesTo ( bytes , i , ( ( newHash.bits ( ) ) / 8 ) ) ; } return com.google.common.hash.HashCode.fromBytesNoCopy ( bytes ) ; }
Source:
public static void assertArrayEquals ( java.lang.String message , java.lang.Object [ ] expecteds , java.lang.Object [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }

Target:
public static void assertArrayEquals ( java.lang.String message , java.lang.Object [ ] expecteds , java.lang.Object [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { org.junit.Assert.fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }
Source:
public static org.w3c.dom.Document parse ( @ com.android.annotations.NonNull java.io.InputStream input ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buf = new byte [ 1024 ] ; while ( true ) { int r = input.read ( buf ) ; if ( r == ( - 1 ) ) { break ; } out.write ( buf , 0 , r ) ; } input.close ( ) ; return com.android.utils.PositionXmlParser.parse ( out.toByteArray ( ) ) ; }

Target:
public static org.w3c.dom.Document parse ( @ com.android.annotations.NonNull java.io.InputStream input , boolean checkDtd ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream ( ) ; byte [ ] buf = new byte [ 1024 ] ; while ( true ) { int r = input.read ( buf ) ; if ( r == ( - 1 ) ) { break ; } out.write ( buf , 0 , r ) ; } input.close ( ) ; return com.android.utils.PositionXmlParser.parse ( out.toByteArray ( ) , checkDtd ) ; }
Source:
private static void startTimer ( ) { synchronized ( com.android.jack.server.Server.lockTimer ) { if ( ( com.android.jack.server.Server.timer ) != null ) { com.android.jack.server.Server.cancelTimer ( ) ; } com.android.jack.server.Server.logger.log ( java.util.logging.Level.INFO , "Start timer" ) ; com.android.jack.server.Server.timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( com.android.jack.server.Server.timer ) != null ; com.android.jack.server.Server.timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { com.android.jack.server.Server.shutdownFifo ( ) ; com.android.jack.server.Server.cancelTimer ( ) ; } } , com.android.jack.server.Server.timeout ) ; } }

Target:
private static void startTimer ( ) { synchronized ( com.android.jack.server.Server.lockTimer ) { if ( ( com.android.jack.server.Server.timer ) != null ) { com.android.jack.server.Server.cancelTimer ( ) ; } com.android.jack.server.Server.logger.log ( java.util.logging.Level.FINE , "Start timer" ) ; com.android.jack.server.Server.timer = new java.util.Timer ( "jack-server-timeout" ) ; assert ( com.android.jack.server.Server.timer ) != null ; com.android.jack.server.Server.timer.schedule ( new java.util.TimerTask ( ) { @ java.lang.Override public void run ( ) { com.android.jack.server.Server.shutdownFifo ( ) ; com.android.jack.server.Server.cancelTimer ( ) ; } } , com.android.jack.server.Server.timeout ) ; } }
Source:
private void setSupportedResolution ( android.hardware.Camera camera ) { android.hardware.Camera.Parameters parameters = camera.getParameters ( ) ; java.util.List < android.hardware.Camera.Size > previewSizes = parameters.getSupportedPreviewSizes ( ) ; for ( android.hardware.Camera.Size size : previewSizes ) { if ( ( ( size.width ) == ( android.media.cts.MediaRecorderTest.VIDEO_WIDTH ) ) && ( ( size.height ) == ( android.media.cts.MediaRecorderTest.VIDEO_HEIGHT ) ) ) { android.media.cts.MediaRecorderTest.mVideoWidth = android.media.cts.MediaRecorderTest.VIDEO_WIDTH ; android.media.cts.MediaRecorderTest.mVideoHeight = android.media.cts.MediaRecorderTest.VIDEO_HEIGHT ; return ; } } android.media.cts.MediaRecorderTest.mVideoWidth = previewSizes.get ( 0 ) . width ; android.media.cts.MediaRecorderTest.mVideoHeight = previewSizes.get ( 0 ) . height ; }

Target:
private void setSupportedResolution ( android.hardware.Camera camera ) { android.hardware.Camera.Parameters parameters = camera.getParameters ( ) ; java.util.List < android.hardware.Camera.Size > videoSizes = parameters.getSupportedVideoSizes ( ) ; for ( android.hardware.Camera.Size size : videoSizes ) { if ( ( ( size.width ) == ( android.media.cts.MediaRecorderTest.VIDEO_WIDTH ) ) && ( ( size.height ) == ( android.media.cts.MediaRecorderTest.VIDEO_HEIGHT ) ) ) { android.media.cts.MediaRecorderTest.mVideoWidth = android.media.cts.MediaRecorderTest.VIDEO_WIDTH ; android.media.cts.MediaRecorderTest.mVideoHeight = android.media.cts.MediaRecorderTest.VIDEO_HEIGHT ; return ; } } android.media.cts.MediaRecorderTest.mVideoWidth = videoSizes.get ( 0 ) . width ; android.media.cts.MediaRecorderTest.mVideoHeight = videoSizes.get ( 0 ) . height ; }
Source:
private void expectAdvisePersistThreshold ( ) throws java.lang.Exception { mStatsService.advisePersistThreshold ( org.easymock.EasyMock.anyLong ( ) ) ; org.easymock.EasyMock.expectLastCall ( ) . anyTimes ( ) ; }

Target:
private void removeLocalServiceMocks ( ) { for ( java.lang.Class < ? > clazz : mLocalServices ) { android.util.Log.d ( com.android.server.NetworkPolicyManagerServiceTest.TAG , ( "removeLocalServiceMock(): " + ( clazz.getName ( ) ) ) ) ; com.android.server.LocalServices.removeServiceForTest ( clazz ) ; } mLocalServices.clear ( ) ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }
Source:
private void setBtStatus ( ) { android.bluetooth.BluetoothAdapter bluetooth = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) ; if ( ( bluetooth != null ) && ( ( mBtAddress ) != null ) ) { java.lang.String address = ( bluetooth.isEnabled ( ) ) ? bluetooth.getAddress ( ) : null ; if ( ! ( android.text.TextUtils.isEmpty ( address ) ) ) { mBtAddress.setSummary ( address.toLowerCase ( ) ) ; } else { mBtAddress.setSummary ( mUnavailable ) ; } } }

Target:
private void setIpAddressStatus ( ) { java.lang.String ipAddress = com.android.settings.Utils.getDefaultIpAddresses ( this . mCM ) ; if ( ipAddress != null ) { mIpAddress.setSummary ( ipAddress ) ; } else { mIpAddress.setSummary ( mUnavailable ) ; } }
Source:
public void getProfile ( java.lang.String iccid , android.telephony.euicc.EuiccCardManager.ResultCallback < android.service.euicc.EuiccProfileInfo > callback ) { try { getIEuiccCardController ( ) . getProfile ( mContext.getOpPackageName ( ) , iccid , new com.android.internal.telephony.euicc.IGetProfileCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , android.service.euicc.EuiccProfileInfo profile ) { callback.onComplete ( resultCode , profile ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getProfile" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void getProfile ( java.lang.String cardId , java.lang.String iccid , android.telephony.euicc.EuiccCardManager.ResultCallback < android.service.euicc.EuiccProfileInfo > callback ) { try { getIEuiccCardController ( ) . getProfile ( mContext.getOpPackageName ( ) , cardId , iccid , new com.android.internal.telephony.euicc.IGetProfileCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , android.service.euicc.EuiccProfileInfo profile ) { callback.onComplete ( resultCode , profile ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getProfile" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public boolean overlayHorizontalScrollbar ( ) { 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 overlayHorizontalScrollbar ( ) ; } } ) ; return ret ; } return mAwContents.overlayHorizontalScrollbar ( ) ; }

Target:
public void computeScroll ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { computeScroll ( ) ; } } ) ; return ; } mAwContents.computeScroll ( ) ; }
Source:
public final boolean requestFocusFromTouch ( ) { if ( isInTouchMode ( ) ) { android.view.View root = getRootView ( ) ; if ( root != null ) { android.view.ViewRoot viewRoot = ( ( android.view.ViewRoot ) ( root.getParent ( ) ) ) ; if ( viewRoot != null ) { viewRoot.ensureTouchMode ( false ) ; } } } return requestFocus ( android.view.View.FOCUS_DOWN ) ; }

Target:
android.view.ViewRootImpl getViewRootImpl ( ) { android.view.View root = getRootView ( ) ; return root != null ? ( ( android.view.ViewRootImpl ) ( root.getParent ( ) ) ) : null ; }
Source:
public boolean apply ( java.util.Map.Entry < K , java.util.Collection < V > > entry ) { return ! ( c.contains ( entry ) ) ; }

Target:
private static < K , V > com.google.common.collect.SetMultimap < K , V > filterFiltered ( com.google.common.collect.FilteredSetMultimap < K , V > multimap , com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > entryPredicate ) { com.google.common.base.Predicate < java.util.Map.Entry < K , V > > predicate = com.google.common.base.Predicates.and ( multimap.entryPredicate ( ) , entryPredicate ) ; return new com.google.common.collect.FilteredEntrySetMultimap < K , V > ( multimap.unfiltered ( ) , predicate ) ; }
Source:
public void testTranslationWithCompleteRegions ( ) throws java.lang.Exception { TranslationDetector.COMPLETE_REGIONS = true ; assertEquals ( ( "values-de-rDE/strings.xml:11: Warning: \"continue_skip_label\" is translated here but not found in default locale\n" + ( ( ( ( "values/strings.xml:19: Error: \"home_title\" is not translated in es-rUS\n" + "values/strings.xml:20: Error: \"show_all_apps\" is not translated in es-rUS, nl-rNL\n" ) + "values/strings.xml:23: Error: \"menu_wallpaper\" is not translated in es-rUS, nl-rNL\n" ) + "values/strings.xml:25: Error: \"menu_settings\" is not translated in cs, de-rDE, es-rUS, nl-rNL\n" ) + "values/strings.xml:29: Error: \"wallpaper_instructions\" is not translated in es-rUS" ) ) , lintProject ( "res/values/strings.xml" , "res/values-cs/strings.xml" , "res/values-de-rDE/strings.xml" , "res/values-es-rUS/strings.xml" , "res/values-land/strings.xml" , "res/values-nl-rNL/strings.xml" ) ) ; }

Target:
public void testTranslationWithCompleteRegions ( ) throws java.lang.Exception { TranslationDetector.COMPLETE_REGIONS = true ; assertEquals ( ( "values-de-rDE/strings.xml:11: Error: \"continue_skip_label\" is translated here but not found in default locale\n" + ( ( ( ( "values/strings.xml:19: Error: \"home_title\" is not translated in es-rUS\n" + "values/strings.xml:20: Error: \"show_all_apps\" is not translated in es-rUS, nl-rNL\n" ) + "values/strings.xml:23: Error: \"menu_wallpaper\" is not translated in es-rUS, nl-rNL\n" ) + "values/strings.xml:25: Error: \"menu_settings\" is not translated in cs, de-rDE, es-rUS, nl-rNL\n" ) + "values/strings.xml:29: Error: \"wallpaper_instructions\" is not translated in es-rUS" ) ) , lintProject ( "res/values/strings.xml" , "res/values-cs/strings.xml" , "res/values-de-rDE/strings.xml" , "res/values-es-rUS/strings.xml" , "res/values-land/strings.xml" , "res/values-nl-rNL/strings.xml" ) ) ; }