auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void testExplicitSizeBottomRightGravity ( ) { doLayoutParamTest ( ( android.view.WindowManager.LayoutParams params ) -> { params.width = 200 ; params.height = 200 ; params.gravity = ( android.view.Gravity.BOTTOM ) | ( android.view.Gravity.RIGHT ) ; } ) ; }

Target:
private void testExplicitSizeBottomRightGravity ( ) { doLayoutParamTest ( ( android.view.WindowManager.LayoutParams params ) -> { params.width = ( 200 - ( mOutsets.left ) ) - ( mOutsets.right ) ; params.height = ( 200 - ( mOutsets.bottom ) ) - ( mOutsets.top ) ; params.gravity = ( android.view.Gravity.BOTTOM ) | ( android.view.Gravity.RIGHT ) ; } ) ; }
Source:
private void doConnect ( android.net.wifi.WifiManager wifiManager ) { int networkId = wifiManager.addNetwork ( mCurrentWifiConfiguration ) ; if ( networkId < 0 ) { showFailToast ( ) ; } else { wifiManager.connect ( networkId , new android.net.wifi.WifiManager.ActionListener ( ) { @ java.lang.Override public void onSuccess ( ) { android.widget.Toast.makeText ( com.android.nfc.ConfirmConnectToWifiNetworkActivity.this , R.string.status_wifi_connected , Toast.LENGTH_SHORT ) . show ( ) ; } @ java.lang.Override public void onFailure ( int reason ) { showFailToast ( ) ; } } ) ; } finish ( ) ; }

Target:
private void doConnect ( android.net.wifi.WifiManager wifiManager ) { mCurrentWifiConfiguration.hiddenSSID = true ; int networkId = wifiManager.addNetwork ( mCurrentWifiConfiguration ) ; if ( networkId < 0 ) { showFailToast ( ) ; } else { wifiManager.connect ( networkId , new android.net.wifi.WifiManager.ActionListener ( ) { @ java.lang.Override public void onSuccess ( ) { android.widget.Toast.makeText ( com.android.nfc.ConfirmConnectToWifiNetworkActivity.this , R.string.status_wifi_connected , Toast.LENGTH_SHORT ) . show ( ) ; } @ java.lang.Override public void onFailure ( int reason ) { showFailToast ( ) ; } } ) ; } finish ( ) ; }
Source:
private com.android.bluetooth.gatt.ScanManager.BatchScanParams getBatchScanParams ( ) { if ( mBatchClients.isEmpty ( ) ) { return null ; } com.android.bluetooth.gatt.ScanManager.BatchScanParams params = new com.android.bluetooth.gatt.ScanManager.BatchScanParams ( ) ; for ( com.android.bluetooth.gatt.ScanClient client : mBatchClients ) { params.scanMode = java.lang.Math.max ( params.scanMode , client.settings.getScanMode ( ) ) ; if ( ( client.settings.getScanResultType ( ) ) == ( android.bluetooth.le.ScanSettings.SCAN_RESULT_TYPE_FULL ) ) { params.fullScanClientIf = client.clientIf ; } else { params.truncatedScanClientIf = client.clientIf ; } } return params ; }

Target:
private com.android.bluetooth.gatt.ScanManager.BatchScanParams getBatchScanParams ( ) { if ( mBatchClients.isEmpty ( ) ) { return null ; } com.android.bluetooth.gatt.ScanManager.BatchScanParams params = new com.android.bluetooth.gatt.ScanManager.BatchScanParams ( ) ; for ( com.android.bluetooth.gatt.ScanClient client : mBatchClients ) { params.scanMode = java.lang.Math.max ( params.scanMode , client.settings.getScanMode ( ) ) ; if ( ( client.settings.getScanResultType ( ) ) == ( android.bluetooth.le.ScanSettings.SCAN_RESULT_TYPE_FULL ) ) { params.fullScanscannerId = client.scannerId ; } else { params.truncatedScanscannerId = client.scannerId ; } } return params ; }
Source:
public static boolean isXmlFile ( @ com.android.annotations.NonNull java.io.File file ) { java.lang.String string = file.getName ( ) ; return string.regionMatches ( true , ( ( string.length ( ) ) - ( com.android.SdkConstants.DOT_XML.length ( ) ) ) , com.android.SdkConstants.DOT_XML , 0 , com.android.SdkConstants.DOT_XML.length ( ) ) ; }

Target:
public static boolean isBitmapFile ( @ com.android.annotations.NonNull java.io.File file ) { java.lang.String path = file.getPath ( ) ; return ( ( ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_PNG ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_JPG ) ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_GIF ) ) ) || ( com.android.tools.lint.detector.api.LintUtils.endsWith ( path , com.android.SdkConstants.DOT_JPEG ) ) ; }
Source:
private static java.lang.String findValidPath ( java.lang.String ... names ) { for ( java.lang.String name : names ) { java.lang.String path ; if ( ( name.indexOf ( '.' ) ) != ( - 1 ) ) { path = java.lang.System.getProperty ( name ) ; } else { path = java.lang.System.getenv ( name ) ; } if ( path != null ) { java.io.File f = new java.io.File ( path ) ; if ( f.isDirectory ( ) ) { return path ; } } } return null ; }

Target:
private static java.lang.String findValidPath ( com.android.prefs.AndroidLocation.EnvVar ... vars ) { for ( com.android.prefs.AndroidLocation.EnvVar var : vars ) { java.lang.String path ; if ( var.mIsSysProp ) { path = com.android.prefs.AndroidLocation.checkPath ( java.lang.System.getProperty ( var.mName ) ) ; if ( path != null ) { return path ; } } if ( var.mIsEnvVar ) { path = com.android.prefs.AndroidLocation.checkPath ( java.lang.System.getenv ( var.mName ) ) ; if ( path != null ) { return path ; } } } return null ; }
Source:
public int hashCode ( ) { return java.lang.System.identityHashCode ( this ) ; }

Target:
public int hashCode ( ) { int lockWord = shadow$_monitor_ ; final int lockWordMask = - 1073741824 ; final int lockWordStateHash = - 2147483648 ; if ( ( lockWord & lockWordMask ) == lockWordStateHash ) { return lockWord & ( ~ lockWordMask ) ; } return java.lang.System.identityHashCode ( this ) ; }
Source:
public java.util.List < java.lang.Class < ? extends lombok.ast.Node > > getApplicableNodeTypes ( ) { java.util.List < java.lang.Class < ? extends lombok.ast.Node > > types = new java.util.ArrayList < java.lang.Class < ? extends lombok.ast.Node > > ( 3 ) ; types.add ( lombok.ast.MethodDeclaration.class ) ; types.add ( lombok.ast.ConstructorInvocation.class ) ; return types ; }

Target:
public java.util.List < java.lang.Class < ? extends com.intellij.psi.PsiElement > > getApplicablePsiTypes ( ) { java.util.List < java.lang.Class < ? extends com.intellij.psi.PsiElement > > types = new java.util.ArrayList < java.lang.Class < ? extends com.intellij.psi.PsiElement > > ( 2 ) ; types.add ( com.intellij.psi.PsiNewExpression.class ) ; types.add ( com.intellij.psi.PsiMethod.class ) ; return types ; }
Source:
public void setUp ( int repoXsdLevel ) throws java.lang.Exception { mRepoXsdLevel = repoXsdLevel ; mLog = new com.android.sdklib.mock.MockLog ( ) ; makeFakeAndroidHome ( ) ; makeFakeSdk ( ) ; mSdkManager = com.android.sdklib.SdkManager.createManager ( mFakeSdk.getAbsolutePath ( ) , mLog ) ; assertNotNull ( "SdkManager location was invalid" , mSdkManager ) ; mAvdManager = com.android.sdklib.internal.avd.AvdManager.getInstance ( mSdkManager.getLocalSdk ( ) , mLog ) ; }

Target:
public void setUp ( int repoXsdLevel ) throws java.lang.Exception { mRepoXsdLevel = repoXsdLevel ; mLog = new com.android.sdklib.mock.MockLog ( ) ; makeFakeAndroidHome ( ) ; makeFakeSdk ( ) ; createSdkAvdManagers ( ) ; }
Source:
public void testAesCbcHmacSha1Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; 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_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }

Target:
public void testCryptUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , null , true , 1 , true ) ; }
Source:
public java.lang.String getInstrumentationRunner ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( mType.isForTesting ( ) ) { config = getTestedConfig ( ) ; com.google.common.base.Preconditions.checkState ( ( config != null ) ) ; } java.lang.String runner = config.mMergedFlavor.getTestInstrumentationRunner ( ) ; return runner != null ? runner : com.android.builder.core.VariantConfiguration.DEFAULT_TEST_RUNNER ; }

Target:
public java.lang.Boolean getFunctionalTest ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( mType.isForTesting ( ) ) { config = getTestedConfig ( ) ; com.google.common.base.Preconditions.checkState ( ( config != null ) ) ; } java.lang.Boolean functionalTest = config.mMergedFlavor.getTestFunctionalTest ( ) ; return functionalTest != null ? functionalTest : com.android.builder.core.VariantConfiguration.DEFAULT_FUNCTIONAL_TEST ; }
Source:
public boolean setPhonebookAccessPermission ( int value ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return false ; } try { return android.bluetooth.BluetoothDevice.sService.setPhonebookAccessPermission ( this , value ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean setSimAccessPermission ( int value ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return false ; } try { return service.setSimAccessPermission ( this , value ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public final java.nio.ByteBuffer get ( byte [ ] dst , int dstOffset , int byteCount ) { checkGetBounds ( 1 , dst.length , dstOffset , byteCount ) ; this . block.peekByteArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , byteCount ) ; position += byteCount ; return this ; }

Target:
final void get ( char [ ] dst , int dstOffset , int charCount ) { int byteCount = checkGetBounds ( SizeOf.CHAR , dst.length , dstOffset , charCount ) ; this . block.peekCharArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , charCount , order.needsSwap ) ; position += byteCount ; }
Source:
public void testAssertNoOverlaps ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.length ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.isRoot ( ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noOverlaps ( ) ) ; } catch ( junit.framework.AssertionFailedError expected ) { return ; } fail ( "Overlaps are not detected" ) ; }

Target:
public void assertNoOverlapsViewNotFound ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.length ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; expectedException.expect ( android.support.test.espresso.NoMatchingViewException.class ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withText ( "nonexistent" ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noOverlaps ( ) ) ; }
Source:
public void testDismissKeyguard_fromShowWhenLocked_notAllowed ( ) throws java.lang.Exception { if ( ! ( supportsKeyguard ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY } ) ; mAmWmState.assertVisibility ( android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY , true ) ; executeShellCommand ( "am broadcast -a trigger_broadcast --ez dismissKeyguard true" ) ; enterAndConfirmLockCredential ( ) ; assertShowingAndOccluded ( ) ; mAmWmState.assertVisibility ( android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY , true ) ; }

Target:
public void testDismissKeyguard_fromShowWhenLocked_notAllowed ( ) throws java.lang.Exception { if ( ! ( isHandheld ( ) ) ) { return ; } gotoKeyguard ( ) ; mAmWmState.waitForKeyguardShowingAndNotOccluded ( mDevice ) ; assertShowingAndNotOccluded ( ) ; launchActivity ( android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY } ) ; mAmWmState.assertVisibility ( android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY , true ) ; executeShellCommand ( "am broadcast -a trigger_broadcast --ez dismissKeyguard true" ) ; enterAndConfirmLockCredential ( ) ; assertShowingAndOccluded ( ) ; mAmWmState.assertVisibility ( android.server.cts.KeyguardLockedTests.SHOW_WHEN_LOCKED_ACTIVITY , true ) ; }
Source:
private void appendAttribute ( java.lang.StringBuilder out , com.android.manifmerger.XmlNode.NodeName attributeName , com.android.manifmerger.ActionRecorder.ActionType actionType , java.lang.String docString , int lineNumber ) { out.append ( "\t" ) . append ( attributeName.toString ( ) ) . append ( "\t\t" ) . append ( actionType.toString ( ) ) . append ( " from " ) . append ( getClass ( ) . getSimpleName ( ) ) . append ( '#' ) . append ( docString ) . append ( ":" ) . append ( lineNumber ) . append ( "\n" ) ; }

Target:
private void appendAttribute ( java.lang.StringBuilder out , com.android.manifmerger.XmlNode.NodeName attributeName , com.android.manifmerger.Actions.ActionType actionType , java.lang.String docString , int lineNumber ) { out.append ( "\t" ) . append ( attributeName.toString ( ) ) . append ( "\t\t" ) . append ( actionType.toString ( ) ) . append ( " from " ) . append ( getClass ( ) . getSimpleName ( ) ) . append ( '#' ) . append ( docString ) . append ( ":" ) . append ( lineNumber ) . append ( "\n" ) ; }
Source:
public void notifyActivityDrawn ( android.os.IBinder token ) { if ( DEBUG_VISIBILITY ) android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG_VISIBILITY , ( "notifyActivityDrawn: token=" + token ) ) ; synchronized ( this ) { com.android.server.am.ActivityRecord r = mStackSupervisor.isInAnyStackLocked ( token ) ; if ( r != null ) { r.task.stack.notifyActivityDrawnLocked ( r ) ; } } }

Target:
public void notifyActivityDrawn ( android.os.IBinder token ) { if ( com.android.server.am.ActivityManagerDebugConfig.DEBUG_VISIBILITY ) android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG_VISIBILITY , ( "notifyActivityDrawn: token=" + token ) ) ; synchronized ( this ) { com.android.server.am.ActivityRecord r = mStackSupervisor.isInAnyStackLocked ( token ) ; if ( r != null ) { r.task.stack.notifyActivityDrawnLocked ( r ) ; } } }
Source:
private java.lang.String getReportName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd_HH.mm.ss" , java.util.Locale.ENGLISH ) ; com.android.cts.verifier.dae2d9 Revert ; am : java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; HEAD ( 6549.0F ) ; }

Target:
private java.lang.String getReportBaseName ( ) { java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat ( "yyyy.MM.dd-HH.mm.ss" , java.util.Locale.ENGLISH ) ; java.lang.String date = dateFormat.format ( new java.util.Date ( ) ) ; return ( ( ( ( ( ( ( ( ( "ctsVerifierReport" + "-" ) + date ) + "-" ) + ( android.os.Build.MANUFACTURER ) ) + "-" ) + ( android.os.Build.PRODUCT ) ) + "-" ) + ( android.os.Build.DEVICE ) ) + "-" ) + ( android.os.Build.ID ) ; }
Source:
public org.objectweb.asm.MethodVisitor visitMethod ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.String [ ] exceptions ) { org.objectweb.asm.MethodVisitor visitor = super . cv.visitMethod ( access , name , desc , signature , exceptions ) ; return ( visitor == null ) || ( com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXT_CLASS_INTERNAL_NAMES.contains ( name ) ) ? visitor : new com.google.devtools.build.android.desugar.TryWithResourcesRewriter.TryWithResourceVisitor ( visitor , classLoader ) ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { super . visit ( version , access , name , signature , superName , interfaces ) ; shouldCurrentClassBeIgnored = com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXT_CLASS_INTERNAL_NAMES.contains ( name ) ; }
Source:
static org.bouncycastle.asn1.DERObjectIdentifier getAlgorithmOID ( java.lang.String algorithmName ) { algorithmName = org.bouncycastle.util.Strings.toUpperCase ( algorithmName ) ; if ( org.bouncycastle.x509.X509Util.algorithms.containsKey ( algorithmName ) ) { return ( ( org.bouncycastle.asn1.DERObjectIdentifier ) ( org.bouncycastle.x509.X509Util.algorithms.get ( algorithmName ) ) ) ; } return new org.bouncycastle.asn1.DERObjectIdentifier ( algorithmName ) ; }

Target:
static org.bouncycastle.asn1.ASN1ObjectIdentifier getAlgorithmOID ( java.lang.String algorithmName ) { algorithmName = org.bouncycastle.util.Strings.toUpperCase ( algorithmName ) ; if ( org.bouncycastle.x509.X509Util.algorithms.containsKey ( algorithmName ) ) { return ( ( org.bouncycastle.asn1.ASN1ObjectIdentifier ) ( org.bouncycastle.x509.X509Util.algorithms.get ( algorithmName ) ) ) ; } return new org.bouncycastle.asn1.ASN1ObjectIdentifier ( algorithmName ) ; }
Source:
public void tearDown ( ) throws java.lang.Exception { for ( java.io.File file : mPolicyDir.listFiles ( ) ) { file.delete ( ) ; } mServiceContext = null ; mPolicyDir = null ; mActivityManager = null ; mStatsService = null ; mTime = null ; mService = null ; removeLocalServiceMocks ( ) ; com.android.server.LocalServices.removeServiceForTest ( com.android.server.net.NetworkPolicyManagerInternal.class ) ; super . tearDown ( ) ; }

Target:
public void unregisterLocalServices ( ) throws java.lang.Exception { com.android.server.LocalServices.removeServiceForTest ( com.android.server.net.NetworkPolicyManagerInternal.class ) ; }
Source:
public java.lang.String getTestDownloadUrl ( ) { return ( getBaseUri ( ) ) + ( android.webkit.cts.CtsTestServer.TEST_DOWNLOAD_PATH ) ; }

Target:
public java.lang.String getTestDownloadUrl ( java.lang.String downloadId , int numBytes ) { return android.net.Uri.parse ( getBaseUri ( ) ) . buildUpon ( ) . path ( android.webkit.cts.CtsTestServer.TEST_DOWNLOAD_PATH ) . appendQueryParameter ( android.webkit.cts.CtsTestServer.DOWNLOAD_ID_PARAMETER , downloadId ) . appendQueryParameter ( android.webkit.cts.CtsTestServer.NUM_BYTES_PARAMETER , java.lang.Integer.toString ( numBytes ) ) . build ( ) . toString ( ) ; }
Source:
private android.net.RecommendationResult verifyAndCaptureResult ( com.android.networkrecommendation.DefaultNetworkRecommendationService.DefaultNetworkRecommendationProvider provider , android.net.RecommendationRequest request ) { provider.doOnRequestRecommendation ( request , mCallback ) ; org.mockito.ArgumentCaptor < android.net.RecommendationResult > resultCaptor = org.mockito.ArgumentCaptor.forClass ( android.net.RecommendationResult.class ) ; org.mockito.Mockito.verify ( mCallback ) . onResult ( resultCaptor.capture ( ) ) ; return resultCaptor.getValue ( ) ; }

Target:
private android.net.RecommendationResult verifyAndCaptureResult ( android.net.RecommendationRequest request ) { mProvider.doOnRequestRecommendation ( request , mCallback ) ; org.mockito.ArgumentCaptor < android.net.RecommendationResult > resultCaptor = org.mockito.ArgumentCaptor.forClass ( android.net.RecommendationResult.class ) ; org.mockito.Mockito.verify ( mCallback ) . onResult ( resultCaptor.capture ( ) ) ; return resultCaptor.getValue ( ) ; }
Source:
public void seek ( long offset ) throws java.io.IOException { if ( offset < 0 ) { throw new java.io.IOException ( ( "offset < 0: " + offset ) ) ; } try { Libcore.os.lseek ( fd , offset , java.io.SEEK_SET ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } }

Target:
public void seek ( long offset ) throws java.io.IOException { if ( offset < 0 ) { throw new java.io.IOException ( ( "offset < 0: " + offset ) ) ; } try { Libcore.os.lseek ( fd , offset , java.io.SEEK_SET ) ; ioTracker.reset ( ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } }
Source:
public android.content.Intent getIntent ( android.content.Context context ) { return new android.content.Intent ( android.content.Intent.ACTION_VIEW , new android.net.Uri.Builder ( ) . scheme ( "https" ) . authority ( "play.google.com" ) . appendEncodedPath ( "store/apps/details" ) . appendQueryParameter ( "id" , DuoConstants.PACKAGE_NAME ) . appendQueryParameter ( "referrer" , "utm_source=dialer&utm_medium=text&utm_campaign=product" ) . build ( ) ) ; }

Target:
public android.content.Intent getIntent ( android.content.Context context ) { return com.android.dialer.duo.DuoComponent.get ( context ) . getDuo ( ) . getInstallDuoIntent ( ) . orNull ( ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( "transactionType: " + ( getTransactionType ( ) ) ) + " uri: " ) + ( getUri ( ) ) ) + " pushData: " ) + ( com.android.internal.telephony.IccUtils.bytesToHexString ( getPushData ( ) ) ) ) + " mmscUrl: " ) + ( getMmscUrl ( ) ) ) + " proxyAddress: " ) + ( getProxyAddress ( ) ) ) + " proxyPort: " ) + ( getProxyPort ( ) ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( "transactionType: " + ( getTransactionType ( ) ) ) + " uri: " ) + ( getUri ( ) ) ) + " pushData: " ) + ( com.android.internal.telephony.uicc.IccUtils.bytesToHexString ( getPushData ( ) ) ) ) + " mmscUrl: " ) + ( getMmscUrl ( ) ) ) + " proxyAddress: " ) + ( getProxyAddress ( ) ) ) + " proxyPort: " ) + ( getProxyPort ( ) ) ; }
Source:
public boolean zoomIn ( ) { switchOutDrawHistory ( ) ; return zoomWithPreview ( ( ( mActualScale ) * 1.25F ) ) ; }

Target:
public boolean zoomIn ( ) { switchOutDrawHistory ( ) ; mInZoomOverview = false ; mZoomCenterX = ( getViewWidth ( ) ) * 0.5F ; mZoomCenterY = ( getViewHeight ( ) ) * 0.5F ; mAnchorX = viewToContentX ( ( ( ( int ) ( mZoomCenterX ) ) + ( mScrollX ) ) ) ; mAnchorY = viewToContentY ( ( ( ( int ) ( mZoomCenterY ) ) + ( mScrollY ) ) ) ; return zoomWithPreview ( ( ( mActualScale ) * 1.25F ) ) ; }
Source:
public void runTask ( @ com.android.annotations.NonNull com.android.builder.tasks.Job < com.android.builder.png.AaptProcess > job ) throws java.lang.Exception { job.runTask ( new com.android.builder.tasks.JobContext < com.android.builder.png.AaptProcess > ( mAaptProcesses.get ( java.lang.Thread.currentThread ( ) . getName ( ) ) ) ) ; }

Target:
public void runTask ( @ com.android.annotations.NonNull com.android.builder.tasks.Job < com.android.builder.png.AaptProcess > job ) throws java.lang.Exception { job.runTask ( new com.android.builder.tasks.JobContext < com.android.builder.png.AaptProcess > ( mAaptProcesses.get ( java.lang.Thread.currentThread ( ) . getName ( ) ) ) ) ; mOutstandingJobs.get ( ( ( com.android.builder.png.QueuedCruncher.QueuedJob ) ( job ) ) . key ) . remove ( job ) ; }
Source:
static com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata getAlternateFormatsForCountry ( int countryCallingCode ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.countryCodeSet.contains ( countryCallingCode ) ) ) { return null ; } synchronized ( com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap ) { if ( ! ( com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap.containsKey ( countryCallingCode ) ) ) { com.google.i18n.phonenumbers.MetadataManager.loadAlternateFormatsMetadataFromFile ( countryCallingCode ) ; } } return com.google.i18n.phonenumbers.MetadataManager.callingCodeToAlternateFormatsMap.get ( countryCallingCode ) ; }

Target:
static java.util.Set < java.lang.String > getSupportedShortNumberRegions ( ) { return java.util.Collections.unmodifiableSet ( com.google.i18n.phonenumbers.MetadataManager.shortNumberMetadataRegionCodes ) ; }
Source:
boolean getProfileProxys ( ) { if ( ( mTransport ) == ( android.bluetooth.BluetoothDevice.TRANSPORT_LE ) ) { if ( ! ( mBluetoothAdapter.getProfileProxy ( mContext , this , BluetoothProfile.INPUT_DEVICE ) ) ) return false ; } else { if ( ! ( mBluetoothAdapter.getProfileProxy ( mContext , this , BluetoothProfile.HEADSET ) ) ) return false ; if ( ! ( mBluetoothAdapter.getProfileProxy ( mContext , this , BluetoothProfile.A2DP ) ) ) return false ; } return true ; }

Target:
boolean getProfileProxys ( ) { if ( ( mTransport ) == ( android.bluetooth.BluetoothDevice.TRANSPORT_LE ) ) { if ( ! ( mBluetoothAdapter.getProfileProxy ( mContext , this , BluetoothProfile.HID_HOST ) ) ) return false ; } else { if ( ! ( mBluetoothAdapter.getProfileProxy ( mContext , this , BluetoothProfile.HEADSET ) ) ) return false ; if ( ! ( mBluetoothAdapter.getProfileProxy ( mContext , this , BluetoothProfile.A2DP ) ) ) return false ; } return true ; }
Source:
public static < T > org.hamcrest.org.hamcrest.Matcher < java.lang.Iterable < T > > hasItem ( org.hamcrest.org.hamcrest.Matcher < ? extends T > elementMatcher ) { return org.hamcrest.collection.IsCollectionContaining.< org.hamcrest.T > hasItem ( elementMatcher ) ; }

Target:
public static < T > org.hamcrest.core.AnyOf < T > anyOf ( org.hamcrest.org.hamcrest.Matcher < T > first , org.hamcrest.org.hamcrest.Matcher < ? extends T > second , org.hamcrest.org.hamcrest.Matcher < ? extends T > third , org.hamcrest.org.hamcrest.Matcher < ? extends T > fourth , org.hamcrest.org.hamcrest.Matcher < ? extends T > fifth ) { return org.hamcrest.core.AnyOf.< org.hamcrest.T > anyOf ( first , second , third , fourth , fifth ) ; }
Source:
public void end ( ) throws com.android.ide.common.res2.ConsumerException { try { postWriteAction ( ) ; getExecutor ( ) . waitForTasks ( ) ; } catch ( java.lang.Throwable t ) { throw new com.android.ide.common.res2.ConsumerException ( t ) ; } }

Target:
public void end ( ) throws com.android.ide.common.res2.ConsumerException { try { postWriteAction ( ) ; getExecutor ( ) . waitForTasksWithQuickFail ( ) ; } catch ( java.lang.InterruptedException e ) { getExecutor ( ) . cancelAllTasks ( ) ; throw new com.android.ide.common.res2.ConsumerException ( e ) ; } catch ( java.util.concurrent.ExecutionException e ) { mExecutor.cancelAllTasks ( ) ; throw new com.android.ide.common.res2.ConsumerException ( e.getCause ( ) ) ; } }
Source:
public java.lang.String getBreadcrumbTrailDescription ( boolean include_root ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( getShortDescription ( ) ) ; for ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode ui_node = getUiParent ( ) ; ui_node != null ; ui_node = ui_node.getUiParent ( ) ) { if ( ( ! include_root ) && ( ( ui_node.getUiParent ( ) ) == null ) ) { break ; } sb.insert ( 0 , java.lang.String.format ( "%1$s > " , ui_node.getShortDescription ( ) ) ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String getBreadcrumbTrailDescription ( boolean includeRoot ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( getShortDescription ( ) ) ; for ( com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode uiNode = getUiParent ( ) ; uiNode != null ; uiNode = uiNode.getUiParent ( ) ) { if ( ( ! includeRoot ) && ( ( uiNode.getUiParent ( ) ) == null ) ) { break ; } sb.insert ( 0 , java.lang.String.format ( "%1$s > " , uiNode.getShortDescription ( ) ) ) ; } return sb.toString ( ) ; }
Source:
public java.io.File call ( ) { java.lang.String rootLocation = scope.getGlobalScope ( ) . getExtension ( ) . getTestOptions ( ) . getReportDir ( ) ; if ( rootLocation == null ) { rootLocation = ( ( ( ( scope.getGlobalScope ( ) . getBuildDir ( ) ) + "/" ) + ( FD_REPORTS ) ) + "/" ) + ( FD_ANDROID_TESTS ) ; } return scope.getGlobalScope ( ) . getProject ( ) . file ( ( rootLocation + subFolder ) ) ; }

Target:
public java.io.File call ( ) { java.lang.String rootLocation = scope.getGlobalScope ( ) . getExtension ( ) . getTestOptions ( ) . getReportDir ( ) ; if ( rootLocation == null ) { rootLocation = ( ( ( ( scope.getGlobalScope ( ) . getBuildDir ( ) ) + "/" ) + ( com.android.builder.core.BuilderConstants.FD_REPORTS ) ) + "/" ) + ( com.android.builder.core.BuilderConstants.FD_ANDROID_TESTS ) ; } return scope.getGlobalScope ( ) . getProject ( ) . file ( ( rootLocation + subFolder ) ) ; }
Source:
synchronized void nScriptForEach ( int id , int slot , int ain , int aout , byte [ ] params ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , id , slot , ain , aout ) ; } else { rsnScriptForEach ( mContext , id , slot , ain , aout , params ) ; } }

Target:
synchronized long nScriptKernelIDCreate ( long sid , int slot , int sig ) { validate ( ) ; return rsnScriptKernelIDCreate ( mContext , sid , slot , sig ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { mMockDevice = org.easymock.EasyMock.createNiceMock ( com.android.tradefed.device.ITestDevice.class ) ; mMockBuildInfo = org.easymock.EasyMock.createNiceMock ( com.android.tradefed.build.IBuildInfo.class ) ; mPreparer = new com.android.tradefed.targetprep.VtsTraceCollectPreparer ( ) ; com.android.tradefed.config.OptionSetter setter = new com.android.tradefed.config.OptionSetter ( mPreparer ) ; setter.setOptionValue ( "local-trace-dir" , com.android.tradefed.targetprep.VtsTraceCollectPreparerTest.TEST_TRACE_DIR ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mMockDevice = org.easymock.EasyMock.createNiceMock ( com.android.tradefed.device.ITestDevice.class ) ; mMockBuildInfo = org.easymock.EasyMock.createNiceMock ( com.android.tradefed.build.IBuildInfo.class ) ; mMockHelper = new com.android.compatibility.common.tradefed.build.VtsCompatibilityInvocationHelper ( ) ; mPreparer = new com.android.tradefed.targetprep.VtsTraceCollectPreparer ( ) { @ java.lang.Override com.android.compatibility.common.tradefed.build.VtsCompatibilityInvocationHelper createVtsHelper ( ) { return mMockHelper ; } } ; com.android.tradefed.config.OptionSetter setter = new com.android.tradefed.config.OptionSetter ( mPreparer ) ; setter.setOptionValue ( "local-trace-dir" , com.android.tradefed.targetprep.VtsTraceCollectPreparerTest.TEST_TRACE_DIR ) ; }
Source:
public void tearDown ( ) throws java.lang.Exception { if ( testSystemTzDataDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( testInstallDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( testInstallDir ) ; } if ( tempDir.exists ( ) ) { com.android.timezone.distro.FileUtils.deleteRecursive ( tempDir ) ; } super . tearDown ( ) ; }

Target:
public java.nio.file.FileVisitResult visitFile ( java.nio.file.Path filePath , java.nio.file.attribute.BasicFileAttributes attrs ) throws java.io.IOException { paths.add ( filePath ) ; return java.nio.file.FileVisitResult.CONTINUE ; }
Source:
public void testOpenLink_NoLinkFound ( ) { try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.spanned ) ) . perform ( android.support.test.espresso.action.ViewActions.scrollTo ( ) , android.support.test.espresso.action.ViewActions.openLinkWithText ( "bacon" ) ) ; fail ( "Expected previous call to fail" ) ; } catch ( android.support.test.espresso.PerformException expected ) { android.support.test.espresso.matcher.ViewMatchers.assertThat ( expected.getCause ( ) . getMessage ( ) , org.hamcrest.Matchers.containsString ( "bacon" ) ) ; } }

Target:
protected boolean matchesSafely ( java.lang.Throwable throwable ) { return throwable.getMessage ( ) . contains ( "bacon" ) ; }
Source:
static com.ibm.icu.impl.ICUResourceBundleReader getReader ( java.lang.String baseName , java.lang.String localeID , java.lang.ClassLoader root ) { com.ibm.icu.impl.ICUResourceBundleReader.ReaderInfo info = new com.ibm.icu.impl.ICUResourceBundleReader.ReaderInfo ( baseName , localeID , root ) ; com.ibm.icu.impl.ICUResourceBundleReader reader = com.ibm.icu.impl.ICUResourceBundleReader.CACHE.getInstance ( info , info ) ; if ( reader == ( com.ibm.icu.impl.ICUResourceBundleReader.NULL_READER ) ) { return null ; } return reader ; }

Target:
static com.ibm.icu.impl.ICUResourceBundleReader getReader ( java.lang.String baseName , java.lang.String localeID , java.lang.ClassLoader root ) { com.ibm.icu.impl.ICUResourceBundleReader.ReaderCacheKey info = new com.ibm.icu.impl.ICUResourceBundleReader.ReaderCacheKey ( baseName , localeID ) ; com.ibm.icu.impl.ICUResourceBundleReader reader = com.ibm.icu.impl.ICUResourceBundleReader.CACHE.getInstance ( info , root ) ; if ( reader == ( com.ibm.icu.impl.ICUResourceBundleReader.NULL_READER ) ) { return null ; } return reader ; }
Source:
private void splitFloat ( java.lang.String str , float [ ] output ) { if ( str == null ) return ; java.util.StringTokenizer tokenizer = new java.util.StringTokenizer ( str , "," ) ; int index = 0 ; while ( tokenizer.hasMoreElements ( ) ) { java.lang.String token = tokenizer.nextToken ( ) ; output [ ( index ++ ) ] = java.lang.Float.parseFloat ( token ) ; } }

Target:
private java.util.ArrayList < java.lang.String > split ( java.lang.String str ) { if ( str == null ) return null ; android.text.TextUtils.StringSplitter splitter = new android.text.TextUtils.SimpleStringSplitter ( ',' ) ; splitter.setString ( str ) ; java.util.ArrayList < java.lang.String > substrings = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String s : splitter ) { substrings.add ( s ) ; } return substrings ; }
Source:
public void testResultCallbackOnResult_runTwice_throwsException ( ) throws java.lang.Exception { final int sequence = 100 ; final android.net.NetworkRecommendationProvider.ResultCallback callback = new android.net.NetworkRecommendationProvider.ResultCallback ( mMockRemoteCallback , sequence ) ; final android.net.RecommendationResult result = new android.net.RecommendationResult ( null ) ; callback.onResult ( result ) ; try { callback.onResult ( result ) ; fail ( "Callback ran more than once." ) ; } catch ( java.lang.IllegalStateException e ) { } }

Target:
public void testResultCallbackOnResult_runTwice_throwsException ( ) throws java.lang.Exception { final int sequence = 100 ; final android.net.NetworkRecommendationProvider.ResultCallback callback = new android.net.NetworkRecommendationProvider.ResultCallback ( mMockRemoteCallback , sequence ) ; final android.net.RecommendationResult result = android.net.RecommendationResult.createDoNotConnectRecommendation ( ) ; callback.onResult ( result ) ; try { callback.onResult ( result ) ; fail ( "Callback ran more than once." ) ; } catch ( java.lang.IllegalStateException e ) { } }
Source:
void baseStop ( ) { if ( android.media.PlayerBase.DEBUG ) { android.util.Log.v ( android.media.PlayerBase.TAG , ( "baseStop() piid=" + ( mPlayerIId ) ) ) ; } try { synchronized ( mLock ) { mState = AudioPlaybackConfiguration.PLAYER_STATE_STOPPED ; android.media.PlayerBase.getService ( ) . playerEvent ( mPlayerIId , mState ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.PlayerBase.TAG , "Error talking to audio service, STOPPED state will not be tracked" , e ) ; } }

Target:
void baseStop ( ) { if ( android.media.PlayerBase.DEBUG ) { android.util.Log.v ( android.media.PlayerBase.TAG , ( "baseStop() piid=" + ( mPlayerIId ) ) ) ; } updateState ( AudioPlaybackConfiguration.PLAYER_STATE_STOPPED ) ; }
Source:
public void queryTTYMode ( android.os.Message response ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( RILConstants.RIL_REQUEST_QUERY_TTY_MODE , response ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void getRadioCapability ( android.os.Message response ) { android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( response ) ; if ( radioProxy != null ) { com.android.internal.telephony.RILRequest rr = obtainRequest ( com.android.internal.telephony.RIL_REQUEST_GET_RADIO_CAPABILITY , response , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) { riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; } try { radioProxy.getRadioCapability ( rr.mSerial ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "getRadioCapability" , e ) ; } } }
Source:
private synchronized void onIntrData ( byte reportId , byte [ ] data ) { com.android.bluetooth.hid.HidDeviceService service = com.android.bluetooth.hid.HidDeviceService.getHidDeviceService ( ) ; if ( service != null ) { service.onIntrDataFromNative ( reportId , data ) ; } else { android.util.Log.wtfStack ( com.android.bluetooth.hid.HidDeviceNativeInterface.TAG , ( "FATAL: onIntrData() " + "is called from the stack while service is not available." ) ) ; } }

Target:
private synchronized void onInterruptData ( byte reportId , byte [ ] data ) { com.android.bluetooth.hid.HidDeviceService service = com.android.bluetooth.hid.HidDeviceService.getHidDeviceService ( ) ; if ( service != null ) { service.onInterruptDataFromNative ( reportId , data ) ; } else { android.util.Log.wtfStack ( com.android.bluetooth.hid.HidDeviceNativeInterface.TAG , ( "FATAL: onInterruptData() " + "is called from the stack while service is not available." ) ) ; } }
Source:
public void test1 ( ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration testConfig = getConfiguration ( "mcc310" , "mnc435" , "en" , "rUS" , "normal" , "notlong" , ScreenOrientation.LANDSCAPE.getValue ( ) , "mdpi" , TouchScreen.FINGER.getValue ( ) , KeyboardState.EXPOSED.getValue ( ) , Keyboard.QWERTY.getValue ( ) , Navigation.DPAD.getValue ( ) , "480x320" , "v3" ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile result = mResources.getMatchingFile ( com.android.ide.eclipse.adt.internal.editors.resources.manager.ConfigMatchTest.SEARCHED_FILENAME , ResourceFolderType.LAYOUT , testConfig ) ; boolean bresult = result.getFolder ( ) . getConfiguration ( ) . equals ( config3 ) ; assertEquals ( bresult , true ) ; }

Target:
public void test1 ( ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration testConfig = getConfiguration ( "mcc310" , "mnc435" , "en" , "rUS" , "normal" , "notlong" , ScreenOrientation.LANDSCAPE.getResourceValue ( ) , "mdpi" , TouchScreen.FINGER.getResourceValue ( ) , KeyboardState.EXPOSED.getResourceValue ( ) , Keyboard.QWERTY.getResourceValue ( ) , Navigation.DPAD.getResourceValue ( ) , "480x320" , "v3" ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile result = mResources.getMatchingFile ( com.android.ide.eclipse.adt.internal.editors.resources.manager.ConfigMatchTest.SEARCHED_FILENAME , ResourceFolderType.LAYOUT , testConfig ) ; boolean bresult = result.getFolder ( ) . getConfiguration ( ) . equals ( config3 ) ; assertEquals ( bresult , true ) ; }
Source:
public final int startActivity ( android.app.IApplicationThread caller , android.content.Intent intent , java.lang.String resolvedType , android.net.Uri [ ] grantedUriPermissions , int grantedMode , android.os.IBinder resultTo , java.lang.String resultWho , int requestCode , boolean onlyIfNeeded , boolean debug ) { return startActivityMayWait ( caller , intent , resolvedType , grantedUriPermissions , grantedMode , resultTo , resultWho , requestCode , onlyIfNeeded , debug , null , null ) ; }

Target:
public final int startActivity ( android.app.IApplicationThread caller , android.content.Intent intent , java.lang.String resolvedType , android.net.Uri [ ] grantedUriPermissions , int grantedMode , android.os.IBinder resultTo , java.lang.String resultWho , int requestCode , boolean onlyIfNeeded , boolean debug ) { return mMainStack.startActivityMayWait ( caller , intent , resolvedType , grantedUriPermissions , grantedMode , resultTo , resultWho , requestCode , onlyIfNeeded , debug , null , null ) ; }
Source:
public java.lang.String isValid ( java.lang.String newText ) { try { return filter.validate ( newText ) ; } catch ( java.lang.Exception e ) { logError ( "Custom validator failed: %s" , e.toString ( ) ) ; return "" ; } }

Target:
private com.android.ide.common.api.IViewRule initializeRule ( com.android.ide.common.api.IViewRule rule , java.lang.String targetFqcn ) { try { if ( rule.onInitialize ( targetFqcn , new com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine.ClientRulesEngineImpl ( targetFqcn ) ) ) { mRulesCache.put ( targetFqcn , rule ) ; return rule ; } else { rule.onDispose ( ) ; } } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onInit() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } return null ; }
Source:
private static java.lang.String dumpPowerState ( int state ) { return ( ( ( ( state & ( com.android.server.PowerManagerService.KEYBOARD_BRIGHT_BIT ) ) != 0 ? "KEYBOARD_BRIGHT_BIT " : "" ) + ( ( state & ( com.android.server.PowerManagerService.SCREEN_BRIGHT_BIT ) ) != 0 ? "SCREEN_BRIGHT_BIT " : "" ) ) + ( ( state & ( com.android.server.PowerManagerService.SCREEN_ON_BIT ) ) != 0 ? "SCREEN_ON_BIT " : "" ) ) + ( ( state & ( com.android.server.PowerManagerService.BATTERY_LOW_BIT ) ) != 0 ? "BATTERY_LOW_BIT " : "" ) ; }

Target:
private static java.lang.String dumpPowerState ( int state ) { return ( ( ( ( ( state & ( com.android.server.PowerManagerService.KEYBOARD_BRIGHT_BIT ) ) != 0 ? "KEYBOARD_BRIGHT_BIT " : "" ) + ( ( state & ( com.android.server.PowerManagerService.SCREEN_BRIGHT_BIT ) ) != 0 ? "SCREEN_BRIGHT_BIT " : "" ) ) + ( ( state & ( com.android.server.PowerManagerService.SCREEN_ON_BIT ) ) != 0 ? "SCREEN_ON_BIT " : "" ) ) + ( ( state & ( com.android.server.PowerManagerService.BUTTON_BRIGHT_BIT ) ) != 0 ? "BUTTON_BRIGHT_BIT " : "" ) ) + ( ( state & ( com.android.server.PowerManagerService.BATTERY_LOW_BIT ) ) != 0 ? "BATTERY_LOW_BIT " : "" ) ; }
Source:
private void setConnectionType ( org.apache.http.util.CharArrayBuffer buffer , int pos ) { if ( android.net.http.CharArrayBuffers.containsIgnoreCaseTrimmed ( buffer , pos , HTTP.CONN_CLOSE ) ) { connectionType = android.net.http.Headers.CONN_CLOSE ; } else if ( android.net.http.CharArrayBuffers.containsIgnoreCaseTrimmed ( buffer , pos , HTTP.CONN_KEEP_ALIVE ) ) { connectionType = android.net.http.Headers.CONN_KEEP_ALIVE ; } }

Target:
private void setConnectionType ( org.apache.http.util.CharArrayBuffer buffer , int pos ) { if ( android.net.http.Headers.containsIgnoreCaseTrimmed ( buffer , pos , HTTP.CONN_CLOSE ) ) { connectionType = android.net.http.Headers.CONN_CLOSE ; } else if ( android.net.http.Headers.containsIgnoreCaseTrimmed ( buffer , pos , HTTP.CONN_KEEP_ALIVE ) ) { connectionType = android.net.http.Headers.CONN_KEEP_ALIVE ; } }
Source:
public void testDefaultPhoneAccountHandleEmptyGroup ( ) throws java.lang.Exception { com.android.server.telecom.PhoneAccountRegistrar.DefaultPhoneAccountHandle input = new com.android.server.telecom.PhoneAccountRegistrar.DefaultPhoneAccountHandle ( java.lang.Process.myUserHandle ( ) , com.android.server.telecom.tests.PhoneAccountRegistrarTest.makeQuickAccountHandle ( "i1" ) , "" ) ; com.android.server.telecom.PhoneAccountRegistrar.DefaultPhoneAccountHandle result = roundTripXml ( this , input , PhoneAccountRegistrar.sDefaultPhoneAcountHandleXml , mContext ) ; com.android.server.telecom.tests.PhoneAccountRegistrarTest.assertDefaultPhoneAccountHandleEquals ( input , result ) ; }

Target:
public void testDefaultPhoneAccountHandleEmptyGroup ( ) throws java.lang.Exception { com.android.server.telecom.PhoneAccountRegistrar.DefaultPhoneAccountHandle input = new com.android.server.telecom.PhoneAccountRegistrar.DefaultPhoneAccountHandle ( java.lang.Process.myUserHandle ( ) , com.android.server.telecom.tests.PhoneAccountRegistrarTest.makeQuickAccountHandle ( "i1" ) , "" ) ; org.mockito.Mockito.when ( android.os.UserManager.get ( mContext ) . getSerialNumberForUser ( input.userHandle ) ) . thenReturn ( 0L ) ; org.mockito.Mockito.when ( android.os.UserManager.get ( mContext ) . getUserForSerialNumber ( 0L ) ) . thenReturn ( input.userHandle ) ; com.android.server.telecom.PhoneAccountRegistrar.DefaultPhoneAccountHandle result = roundTripXml ( this , input , PhoneAccountRegistrar.sDefaultPhoneAcountHandleXml , mContext ) ; com.android.server.telecom.tests.PhoneAccountRegistrarTest.assertDefaultPhoneAccountHandleEquals ( input , result ) ; }
Source:
static int getPropertyInt ( @ com.android.annotations.Nullable java.util.Properties props , @ com.android.annotations.NonNull java.lang.String propKey , int defaultValue ) { java.lang.String s = ( props != null ) ? props.getProperty ( propKey , null ) : null ; if ( s != null ) { try { return java.lang.Integer.parseInt ( s ) ; } catch ( java.lang.Exception ignore ) { } } return defaultValue ; }

Target:
static int getPropertyInt ( @ com.android.annotations.Nullable java.util.Properties props , @ com.android.annotations.NonNull java.lang.String propKey , int defaultValue ) { return com.android.sdklib.internal.repository.packages.PackageParserUtils.getPropertyInt ( props , propKey , defaultValue ) ; }
Source:
private void assertPasswordSucceeds ( java.lang.String password , java.lang.String restriction ) { boolean passwordResetResult = dpm.resetPassword ( password , 0 ) ; assertTrue ( ( ( ( "Password '" + password ) + "' failed on " ) + restriction ) , passwordResetResult ) ; assertTrue ( dpm.isActivePasswordSufficient ( ) ) ; }

Target:
private void assertPasswordSucceeds ( java.lang.String password , java.lang.String restriction ) { boolean passwordResetResult = dpm.resetPassword ( password , 0 ) ; assertTrue ( ( ( ( "Password '" + password ) + "' failed on " ) + restriction ) , passwordResetResult ) ; assertPasswordSufficiency ( true ) ; }
Source:
public void getProperty_badResponse ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; injectShellResponse ( mockDevice , "blargh" ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertNull ( fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; }

Target:
public void getProperty_badResponse ( ) throws java.lang.Exception { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; com.android.ddmlib.DeviceTest.injectShellResponse ( mockDevice , "blargh" ) ; org.easymock.EasyMock.replay ( mockDevice ) ; com.android.ddmlib.PropertyFetcher fetcher = new com.android.ddmlib.PropertyFetcher ( mockDevice ) ; org.junit.Assert.assertNull ( fetcher.getProperty ( "dev.bootcomplete" ) . get ( ) ) ; }
Source:
public void restoreconAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , int appId , java.lang.String seInfo ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.restoreconAppData ( uuid , packageName , userId , flags , appId , seInfo ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void migrateAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.migrateAppData ( uuid , packageName , userId , flags ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }