auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void computeMin ( android.renderscript.cts.TestMin.ArgumentsUintUintUint args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( int ) ( java.lang.StrictMath.min ( ( ( long ) ( ( args.inV1 ) & 4294967295L ) ) , ( ( long ) ( ( args.inV2 ) & 4294967295L ) ) ) ) ) ; }

Target:
public static void computeConvert ( android.renderscript.cts.TestConvert.ArgumentsCharUchar args ) { args.out = android.renderscript.cts.CoreMathVerifier.convertCharToUchar ( args.inV ) ; }
Source:
protected void openDevice ( java.lang.String cameraId ) throws java.lang.Exception { mCamera = android.hardware.camera2.cts.CameraTestUtils.CameraTestUtils.openCamera ( mCameraManager , cameraId , mCameraListener , mHandler ) ; mCollector.setCameraId ( cameraId ) ; mStaticInfo = new android.hardware.camera2.cts.helpers.StaticMetadata ( mCameraManager.getCameraCharacteristics ( cameraId ) , android.hardware.camera2.cts.helpers.StaticMetadata.CheckLevel.ASSERT , null ) ; mOrderedPreviewSizes = getSupportedPreviewSizes ( cameraId , mCameraManager , android.hardware.camera2.cts.testcases.PREVIEW_SIZE_BOUND ) ; mOrderedVideoSizes = getSupportedVideoSizes ( cameraId , mCameraManager , android.hardware.camera2.cts.testcases.PREVIEW_SIZE_BOUND ) ; mOrderedStillSizes = getSupportedStillSizes ( cameraId , mCameraManager , null ) ; mMinPreviewFrameDurationMap = mStaticInfo.getAvailableMinFrameDurationsForFormatChecked ( ImageFormat.YUV_420_888 ) ; }

Target:
protected void openDevice ( java.lang.String cameraId ) throws java.lang.Exception { mCamera = android.hardware.camera2.cts.CameraTestUtils.CameraTestUtils.openCamera ( mCameraManager , cameraId , mCameraListener , mHandler ) ; mCollector.setCameraId ( cameraId ) ; mStaticInfo = new android.hardware.camera2.cts.helpers.StaticMetadata ( mCameraManager.getCameraCharacteristics ( cameraId ) , android.hardware.camera2.cts.helpers.StaticMetadata.CheckLevel.ASSERT , null ) ; mOrderedPreviewSizes = getSupportedPreviewSizes ( cameraId , mCameraManager , getPreviewSizeBound ( mWindowManager , android.hardware.camera2.cts.testcases.PREVIEW_SIZE_BOUND ) ) ; mOrderedVideoSizes = getSupportedVideoSizes ( cameraId , mCameraManager , android.hardware.camera2.cts.testcases.PREVIEW_SIZE_BOUND ) ; mOrderedStillSizes = getSupportedStillSizes ( cameraId , mCameraManager , null ) ; mMinPreviewFrameDurationMap = mStaticInfo.getAvailableMinFrameDurationsForFormatChecked ( ImageFormat.YUV_420_888 ) ; }
Source:
public static java.io.File getDynamicConfigFile ( com.android.tradefed.build.IBuildInfo info , java.lang.String moduleName ) { java.lang.String path = info.getBuildAttributes ( ) . get ( ( ( com.android.compatibility.common.util.DynamicConfigHostSide.CONFIG_PATH_PREFIX ) + moduleName ) ) ; if ( ( path != null ) && ( ! ( path.isEmpty ( ) ) ) ) { return new java.io.File ( path ) ; } return null ; }

Target:
public static java.io.File getDynamicConfigFile ( com.android.tradefed.build.IBuildInfo info , java.lang.String moduleName ) { for ( com.android.tradefed.build.VersionedFile vFile : info.getFiles ( ) ) { if ( vFile.getVersion ( ) . equals ( ( ( com.android.compatibility.common.util.DynamicConfigHostSide.CONFIG_PATH_PREFIX ) + moduleName ) ) ) { return vFile.getFile ( ) ; } } return null ; }
Source:
native void socketListen ( int count ) throws java.io.IOException ;

Target:
void socketListen ( int count ) throws java.io.IOException { if ( ( ( fd ) == null ) || ( ! ( fd.valid ( ) ) ) ) { throw new java.net.SocketException ( "Socket closed" ) ; } try { Libcore.os.listen ( fd , count ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
public void unbind ( ) throws android.os.RemoteException { synchronized ( mLock ) { mBackoff.stop ( ) ; if ( ( ( mImsServiceConnection ) == null ) || ( ( mImsDeathRecipient ) == null ) ) { return ; } changeImsServiceFeatures ( new java.util.HashSet < > ( ) ) ; removeImsServiceFeatureListener ( ) ; mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; android.util.Log.i ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( "Unbinding ImsService: " + ( mComponentName ) ) ) ; mContext.unbindService ( mImsServiceConnection ) ; cleanUpService ( ) ; } }

Target:
public void unbind ( ) throws android.os.RemoteException { synchronized ( mLock ) { mBackoff.stop ( ) ; if ( ( ( mImsServiceConnection ) == null ) || ( ( mImsDeathRecipient ) == null ) ) { return ; } changeImsServiceFeatures ( new java.util.HashSet < > ( ) ) ; removeImsServiceFeatureCallbacks ( ) ; mImsServiceControllerBinder.unlinkToDeath ( mImsDeathRecipient , 0 ) ; android.util.Log.i ( com.android.internal.telephony.ims.ImsServiceController.LOG_TAG , ( "Unbinding ImsService: " + ( mComponentName ) ) ) ; mContext.unbindService ( mImsServiceConnection ) ; cleanUpService ( ) ; } }
Source:
private static void addEngine ( java.lang.String name , boolean sp , java.lang.String paramName ) { java.security.Provider.EngineDescription ed = new java.security.Provider.EngineDescription ( name , sp , paramName ) ; java.security.Provider.knownEngines.put ( name , ed ) ; }

Target:
private static void addEngine ( java.lang.String name , boolean sp , java.lang.String paramName ) { java.security.Provider.EngineDescription ed = new java.security.Provider.EngineDescription ( name , sp , paramName ) ; java.security.Provider.knownEngines.put ( name.toLowerCase ( java.util.Locale.ENGLISH ) , ed ) ; java.security.Provider.knownEngines.put ( name , ed ) ; }
Source:
public final short getENibble ( ) { int e = getE ( ) ; if ( ( e & ( ~ 15 ) ) != 0 ) { throw new com.android.jack.dx.util.DexException ( ( "Register E out of range: " + ( com.android.jack.dx.util.Hex.u8 ( e ) ) ) ) ; } return ( ( short ) ( e ) ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction withIndex ( int newFirstIndex ) { return withIndex ( newFirstIndex , 0 ) ; }
Source:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "name" , mName ) . add ( "minSdkVersion" , mMinSdkVersion ) . add ( "targetSdkVersion" , mTargetSdkVersion ) . add ( "versionCode" , mVersionCode ) . add ( "versionName" , mVersionName ) . add ( "packageName" , mPackageName ) . add ( "testPackageName" , mTestPackageName ) . add ( "testInstrumentationRunner" , mTestInstrumentationRunner ) . add ( "keystore" , mSigningConfig ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { return com.google.common.base.Objects.toStringHelper ( this ) . add ( "name" , mName ) . add ( "minSdkVersion" , mMinSdkVersion ) . add ( "targetSdkVersion" , mTargetSdkVersion ) . add ( "versionCode" , mVersionCode ) . add ( "versionName" , mVersionName ) . add ( "packageName" , mPackageName ) . add ( "testPackageName" , mTestPackageName ) . add ( "testInstrumentationRunner" , mTestInstrumentationRunner ) . add ( "signingConfig" , mSigningConfig ) . toString ( ) ; }
Source:
public final void dumpSizes ( ) { for ( com.android.tools.perflib.heap.Heap heap : mHeaps.values ( ) ) { java.lang.System.out.println ( ( "+------------------ sizes for heap: " + ( heap.mName ) ) ) ; heap.dumpSizes ( ) ; } }

Target:
public final com.android.tools.perflib.heap.ClassObj findClass ( java.lang.String name ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.ClassObj theClass = mHeaps.get ( i ) . getClass ( name ) ; if ( theClass != null ) { return theClass ; } } return null ; }
Source:
public void delegatePostPageChange ( int newPageIndex ) { super . delegatePostPageChange ( newPageIndex ) ; org.eclipse.ui.forms.editor.IFormPage page = getEditor ( ) . getActivePageInstance ( ) ; updateOutline ( page ) ; }

Target:
public void delegatePostPageChange ( int newPageIndex ) { super . delegatePostPageChange ( newPageIndex ) ; if ( ( mGraphicalEditor ) != null ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutCanvas canvas = mGraphicalEditor.getCanvasControl ( ) ; if ( canvas != null ) { org.eclipse.ui.IActionBars bars = getEditor ( ) . getEditorSite ( ) . getActionBars ( ) ; if ( bars != null ) { canvas.updateGlobalActions ( bars ) ; } } } org.eclipse.ui.forms.editor.IFormPage page = getEditor ( ) . getActivePageInstance ( ) ; updateOutline ( page ) ; }
Source:
private void mergeClass ( org.w3c.dom.Element item , java.lang.String containingClass ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo cls = createClass ( containingClass ) ; java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = createAnnotations ( item ) ; if ( ( cls.annotations ) == null ) { cls.annotations = com.google.common.collect.Lists.newArrayListWithExpectedSize ( annotations.size ( ) ) ; } cls.annotations.addAll ( annotations ) ; }

Target:
private void mergeClass ( org.w3c.dom.Element item , java.lang.String containingClass ) { com.android.tools.lint.ExternalAnnotationRepository.ClassInfo cls = createClass ( containingClass ) ; java.util.List < com.intellij.psi.PsiAnnotation > annotations = createAnnotations ( item ) ; if ( ( cls.psiAnnotations ) == null ) { cls.psiAnnotations = com.google.common.collect.Lists.newArrayListWithExpectedSize ( annotations.size ( ) ) ; } cls.psiAnnotations.addAll ( annotations ) ; }
Source:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg , java.lang.Throwable thrown ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr ) ; }

Target:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg , java.lang.Object [ ] params ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr ) ; }
Source:
public void performTest ( ) throws java.lang.Exception { for ( int i = 0 ; i != ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests.length ) ; i += 4 ) { testECB ( java.lang.Integer.parseInt ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ i ] ) , org.bouncycastle.util.encoders.Hex.decode ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ ( i + 1 ) ] ) , org.bouncycastle.util.encoders.Hex.decode ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ ( i + 2 ) ] ) , org.bouncycastle.util.encoders.Hex.decode ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ ( i + 3 ) ] ) ) ; } }

Target:
public void performTest ( ) throws java.lang.Exception { for ( int i = 0 ; i != ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests.length ) ; i += 4 ) { testECB ( java.lang.Integer.parseInt ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ i ] ) , org.bouncycastle.util.encoders.Hex.decode ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ ( i + 1 ) ] ) , org.bouncycastle.util.encoders.Hex.decode ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ ( i + 2 ) ] ) , org.bouncycastle.util.encoders.Hex.decode ( org.bouncycastle.jce.provider.test.Shacal2Test.cipherTests [ ( i + 3 ) ] ) ) ; } blockTest ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { android.telecom.Log.setTag ( com.android.server.telecom.tests.TelecomTestCase.TESTING_TAG ) ; mMockitoHelper.setUp ( getContext ( ) , getClass ( ) ) ; mComponentContextFixture = new com.android.server.telecom.tests.ComponentContextFixture ( ) ; android.telecom.Log.setSessionContext ( mComponentContextFixture.getTestDouble ( ) . getApplicationContext ( ) ) ; android.telecom.Log.getSessionManager ( ) . mCleanStaleSessions = null ; org.mockito.MockitoAnnotations.initMocks ( this ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { android.telecom.Log.setTag ( com.android.server.telecom.tests.TelecomTestCase.TESTING_TAG ) ; mMockitoHelper.setUp ( android.support.test.InstrumentationRegistry.getContext ( ) , getClass ( ) ) ; mComponentContextFixture = new com.android.server.telecom.tests.ComponentContextFixture ( ) ; mContext = mComponentContextFixture.getTestDouble ( ) . getApplicationContext ( ) ; android.telecom.Log.setSessionContext ( mComponentContextFixture.getTestDouble ( ) . getApplicationContext ( ) ) ; android.telecom.Log.getSessionManager ( ) . mCleanStaleSessions = null ; org.mockito.MockitoAnnotations.initMocks ( this ) ; }
Source:
public void logError ( java.lang.String log ) { synchronized ( mLogText ) { mLogText.append ( "=> " ) . append ( log ) ; } }

Target:
public void setDescription ( final java.lang.String description ) { syncExec ( mLabel , new java.lang.Runnable ( ) { public void run ( ) { mLabel.setText ( description ) ; } } ) ; if ( acceptLog ( description ) ) { if ( ( mLog ) != null ) { mLog.printf ( "%1$s" , description ) ; } else { synchronized ( mLogText ) { mLogText.append ( description ) ; } } } }
Source:
public void testGrant_Generated_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }

Target:
public void testGrant_Generated_Success ( ) throws java.lang.Exception { assertTrue ( "Password should work for keystore" , mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ) ; assertTrue ( "Should be able to generate key for testcase" , mKeyStore.generate ( android.security.KeyStoreTest.TEST_KEYNAME , KeyStore.UID_SELF , NativeCrypto.EVP_PKEY_RSA , 1024 , KeyStore.FLAG_ENCRYPTED , null ) ) ; assertTrue ( "Should be able to grant key to other user" , mKeyStore.grant ( android.security.KeyStoreTest.TEST_KEYNAME , 0 ) ) ; }
Source:
protected void registerBroadcastReceiver ( common.src.android.voicesettings.common.Utils.TestcaseType testCaseType ) throws java.lang.Exception { mTestCaseType = testCaseType ; mLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; if ( ( mActivityDoneReceiver ) != null ) { mContext.unregisterReceiver ( mActivityDoneReceiver ) ; } mActivityDoneReceiver = new android.voicesettings.cts.VoiceSettingsTestBase.ActivityDoneReceiver ( ) ; mContext.registerReceiver ( mActivityDoneReceiver , new android.content.IntentFilter ( ( ( common.src.android.voicesettings.common.Utils.BROADCAST_INTENT ) + ( testCaseType.toString ( ) ) ) ) ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( ( mActivityDoneReceiver ) != null ) { try { mContext.unregisterReceiver ( mActivityDoneReceiver ) ; } catch ( java.lang.IllegalArgumentException e ) { } mActivityDoneReceiver = null ; } super . tearDown ( ) ; }
Source:
public boolean enableCellBroadcastRange ( int startMessageId , int endMessageId ) { boolean success = false ; try { com.android.internal.telephony.ISms iccISms = ISms.Stub.asInterface ( android.os.ServiceManager.getService ( "isms" ) ) ; if ( iccISms != null ) { success = iccISms.enableCellBroadcastRange ( startMessageId , endMessageId ) ; } } catch ( android.os.RemoteException ex ) { } return success ; }

Target:
public boolean enableCellBroadcastRange ( int startMessageId , int endMessageId ) { boolean success = false ; if ( endMessageId < startMessageId ) { throw new java.lang.IllegalArgumentException ( "endMessageId < startMessageId" ) ; } try { com.android.internal.telephony.ISms iccISms = ISms.Stub.asInterface ( android.os.ServiceManager.getService ( "isms" ) ) ; if ( iccISms != null ) { success = iccISms.enableCellBroadcastRange ( startMessageId , endMessageId ) ; } } catch ( android.os.RemoteException ex ) { } return success ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; if ( ! ( android.telecom.cts.TestUtils.TestUtils.shouldTestTelecom ( mContext ) ) ) { return ; } mTelecomManager = ( ( android.telecom.TelecomManager ) ( mContext.getSystemService ( Context.TELECOM_SERVICE ) ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mContext = getInstrumentation ( ) . getContext ( ) ; if ( ! ( android.telecom.cts.TestUtils.TestUtils.shouldTestTelecom ( mContext ) ) ) { return ; } mTelecomManager = ( ( android.telecom.TelecomManager ) ( mContext.getSystemService ( Context.TELECOM_SERVICE ) ) ) ; mPhoneAccountRegisteredLatch = new android.telecom.cts.TestUtils.TestUtils.InvokeCounter ( "registerPhoneAcct" ) ; mPhoneAccountUnRegisteredLatch = new android.telecom.cts.TestUtils.TestUtils.InvokeCounter ( "unRegisterPhoneAcct" ) ; }
Source:
private java.lang.String getSubscriberId ( int networkIndex ) { int networkType = android.app.usage.cts.NetworkUsageStatsTest.sNetworkInterfacesToTest [ networkIndex ] . getNetworkType ( ) ; if ( ( android.net.ConnectivityManager.TYPE_MOBILE ) == networkType ) { android.telephony.TelephonyManager tm = ( ( android.telephony.TelephonyManager ) ( getInstrumentation ( ) . getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; return tm.getSubscriberId ( ) ; } return "" ; }

Target:
private java.lang.String getSubscriberId ( int networkIndex ) { int networkType = mNetworkInterfacesToTest [ networkIndex ] . getNetworkType ( ) ; if ( ( android.net.ConnectivityManager.TYPE_MOBILE ) == networkType ) { android.telephony.TelephonyManager tm = ( ( android.telephony.TelephonyManager ) ( getInstrumentation ( ) . getContext ( ) . getSystemService ( Context.TELEPHONY_SERVICE ) ) ) ; return tm.getSubscriberId ( ) ; } return "" ; }
Source:
private void createPatch ( ) throws com.intellij.updater.OperationCancelledException , java.io.IOException { com.intellij.updater.PatchFileCreator.create ( myOlderDir , myNewerDir , myFile , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , java.util.Collections.< java.lang.String > emptyList ( ) , com.intellij.updater.TEST_UI ) ; assertTrue ( myFile.exists ( ) ) ; }

Target:
public void testApplyWhenCommonFileChangesStrict ( ) throws java.lang.Exception { myPatchSpec.setStrict ( true ) ; com.intellij.updater.PatchFileCreator.create ( myPatchSpec , myFile , com.intellij.updater.TEST_UI ) ; com.intellij.openapi.util.io.FileUtil.copy ( new java.io.File ( myOlderDir , "/lib/bootstrap.jar" ) , new java.io.File ( myOlderDir , "/lib/boot.jar" ) ) ; com.intellij.updater.PatchFileCreator.PreparationResult preparationResult = com.intellij.updater.PatchFileCreator.prepareAndValidate ( myFile , myOlderDir , com.intellij.updater.TEST_UI ) ; assertEquals ( 1 , preparationResult.validationResults.size ( ) ) ; assertEquals ( new com.intellij.updater.ValidationResult ( ValidationResult.Kind.ERROR , "lib/boot.jar" , ValidationResult.Action.VALIDATE , ValidationResult.MODIFIED_MESSAGE , ValidationResult.Option.NONE ) , preparationResult.validationResults.get ( 0 ) ) ; }
Source:
public void testTable1 ( ) { com.android.utils.HtmlBuilder builder = new com.android.utils.HtmlBuilder ( ) ; builder.beginTable ( ) . addTableRow ( true , "Header1" , "Header2" ) . addTableRow ( "Data1" , "Data2" ) . endTable ( ) ; assertEquals ( "<table><tr><th>Header1</th><th>Header2</th></tr><tr><td>Data1</td><td>Data2</td></tr></table>" , builder.getHtml ( ) ) ; }

Target:
public void testAddTable ( ) { com.android.utils.HtmlBuilder builder = new com.android.utils.HtmlBuilder ( ) ; builder.beginTable ( ) . addTableRow ( true , "Header1" , "Header2" ) . addTableRow ( "Data1" , "Data2" ) . endTable ( ) ; assertEquals ( "<table><tr><th>Header1</th><th>Header2</th></tr><tr><td>Data1</td><td>Data2</td></tr></table>" , builder.getHtml ( ) ) ; }
Source:
public void setWarnIfHeld ( java.lang.Object warnIfHeld ) { throw new java.lang.IllegalStateException ( "Should not reach here" ) ; }

Target:
public void dexopt ( java.lang.String apkPath , int uid , @ android.annotation.Nullable java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , @ android.annotation.Nullable java.lang.String outputPath , int dexFlags , java.lang.String compilerFilter , @ android.annotation.Nullable java.lang.String volumeUuid , @ android.annotation.Nullable java.lang.String sharedLibraries ) throws com.android.internal.os.InstallerConnection.InstallerException { commands.add ( com.android.server.pm.OtaDexoptService.buildCommand ( "dexopt" , apkPath , uid , pkgName , instructionSet , dexoptNeeded , outputPath , dexFlags , compilerFilter , volumeUuid , sharedLibraries ) ) ; }
Source:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 150 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectCallback ( com.android.server.ConnectivityServiceTest.CallbackState.AVAILABLE , mWiFiNetworkAgent , timeoutMs ) ; networkCallback.assertNoCallback ( ) ; }
Source:
private static int maybeThrowAfterSendto ( boolean isDatagram , android.system.ErrnoException errnoException ) throws java.io.IOException { if ( isDatagram ) { if ( ( errnoException.errno ) == ( ECONNREFUSED ) ) { throw new java.net.PortUnreachableException ( "ICMP Port Unreachable" ) ; } } else { if ( ( errnoException.errno ) == ( EAGAIN ) ) { return 0 ; } } throw errnoException.rethrowAsIOException ( ) ; }

Target:
private static int maybeThrowAfterSendto ( boolean isDatagram , android.system.ErrnoException errnoException ) throws java.net.SocketException { if ( isDatagram ) { if ( ( ( errnoException.errno ) == ( ECONNRESET ) ) || ( ( errnoException.errno ) == ( ECONNREFUSED ) ) ) { return 0 ; } } else { if ( ( errnoException.errno ) == ( EAGAIN ) ) { return 0 ; } } throw errnoException.rethrowAsSocketException ( ) ; }
Source:
public boolean hasIccCard ( int slotId ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return false ; return telephony.hasIccCardUsingSlotId ( slotId ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }

Target:
public boolean hasIccCard ( int slotIndex ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return false ; return telephony.hasIccCardUsingSlotIndex ( slotIndex ) ; } catch ( android.os.RemoteException ex ) { return false ; } catch ( java.lang.NullPointerException ex ) { return false ; } }
Source:
public com.android.ide.common.layout.relative.DependencyGraph.ViewData getView ( com.android.ide.common.api.IDragElement element ) { com.android.ide.common.api.IDragElement.IDragAttribute attribute = element.getAttribute ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ID ) ; if ( attribute != null ) { java.lang.String id = attribute.getValue ( ) ; id = com.android.ide.common.layout.BaseLayoutRule.stripIdPrefix ( id ) ; return getView ( id ) ; } return null ; }

Target:
public com.android.ide.common.layout.relative.DependencyGraph.ViewData getView ( com.android.ide.common.api.IDragElement element ) { com.android.ide.common.api.IDragElement.IDragAttribute attribute = element.getAttribute ( com.android.util.XmlUtils.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_ID ) ; if ( attribute != null ) { java.lang.String id = attribute.getValue ( ) ; id = com.android.ide.common.layout.BaseLayoutRule.stripIdPrefix ( id ) ; return getView ( id ) ; } return null ; }
Source:
public void onInterfaceCreated ( java.lang.String interfaceName ) { if ( com.android.server.wifi.nan.WifiNanDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.nan.WifiNanDataPathStateManager.TAG , ( "onInterfaceCreated: interfaceName=" + interfaceName ) ) ; if ( mInterfaces.contains ( interfaceName ) ) { android.util.Log.w ( com.android.server.wifi.nan.WifiNanDataPathStateManager.TAG , ( "onInterfaceCreated: already contains interface -- " + interfaceName ) ) ; } mInterfaces.add ( interfaceName ) ; }

Target:
public void onInterfaceCreated ( java.lang.String interfaceName ) { if ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.VDBG ) android.util.Log.v ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "onInterfaceCreated: interfaceName=" + interfaceName ) ) ; if ( mInterfaces.contains ( interfaceName ) ) { android.util.Log.w ( com.android.server.wifi.aware.WifiAwareDataPathStateManager.TAG , ( "onInterfaceCreated: already contains interface -- " + interfaceName ) ) ; } mInterfaces.add ( interfaceName ) ; }
Source:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; java.lang.String correct = ( java.lang.Character.toLowerCase ( tag.charAt ( 0 ) ) ) + ( tag.substring ( 1 ) ) ; context.report ( com.android.tools.lint.checks.WrongCaseDetector.WRONGCASE , element , context.getLocation ( element ) , java.lang.String.format ( "Invalid tag <%1$s>; should be <%2$s>" , tag , correct ) , null ) ; }

Target:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; java.lang.String correct = ( java.lang.Character.toLowerCase ( tag.charAt ( 0 ) ) ) + ( tag.substring ( 1 ) ) ; context.report ( com.android.tools.lint.checks.WrongCaseDetector.WRONG_CASE , element , context.getLocation ( element ) , java.lang.String.format ( "Invalid tag <%1$s>; should be <%2$s>" , tag , correct ) , null ) ; }
Source:
public void testListeners ( ) throws java.lang.Exception { com.android.server.telecom.SystemStateProvider systemStateProvider = new com.android.server.telecom.SystemStateProvider ( mContext ) ; assertFalse ( systemStateProvider.removeListener ( mSystemStateListener ) ) ; systemStateProvider.addListener ( mSystemStateListener ) ; assertTrue ( systemStateProvider.removeListener ( mSystemStateListener ) ) ; assertFalse ( systemStateProvider.removeListener ( mSystemStateListener ) ) ; }

Target:
public void testListeners ( ) throws java.lang.Exception { com.android.server.telecom.SystemStateProvider systemStateProvider = new com.android.server.telecom.SystemStateProvider ( mContext ) ; org.junit.Assert.assertFalse ( systemStateProvider.removeListener ( mSystemStateListener ) ) ; systemStateProvider.addListener ( mSystemStateListener ) ; org.junit.Assert.assertTrue ( systemStateProvider.removeListener ( mSystemStateListener ) ) ; org.junit.Assert.assertFalse ( systemStateProvider.removeListener ( mSystemStateListener ) ) ; }
Source:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = getResourceRepository ( ) ; verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "id/item_id" , "integer/integer" ) ; }

Target:
public void testMergedResourcesByName ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceRepository repo = com.android.ide.common.res2.ResourceRepositoryTest.getResourceRepository ( ) ; com.android.ide.common.res2.ResourceRepositoryTest.verifyResourceExists ( repo , "drawable/icon" , "drawable?ldpi-v4/icon" , "drawable/icon2" , "drawable/patch" , "drawable/color_drawable" , "drawable/drawable_ref" , "raw/foo" , "layout/main" , "layout/layout_ref" , "layout/alias_replaced_by_file" , "layout/file_replaced_by_alias" , "color/color" , "string/basic_string" , "string/xliff_string" , "string/styled_string" , "style/style" , "array/string_array" , "attr/dimen_attr" , "attr/string_attr" , "attr/enum_attr" , "attr/flag_attr" , "attr/blah" , "attr/blah2" , "attr/flagAttr" , "declare-styleable/declare_styleable" , "dimen/dimen" , "dimen?sw600dp-v13/offset" , "id/item_id" , "integer/integer" ) ; }
Source:
public void getDefaultSmdpAddress ( java.lang.String cardId , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.String > callback ) { try { getIEuiccCardController ( ) . getDefaultSmdpAddress ( mContext.getOpPackageName ( ) , cardId , new com.android.internal.telephony.euicc.IGetDefaultSmdpAddressCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , java.lang.String address ) { callback.onComplete ( resultCode , address ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getDefaultSmdpAddress" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void resetMemory ( java.lang.String cardId , @ android.telephony.euicc.EuiccCardManager.ResetOption int options , java.util.concurrent.Executor executor , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . resetMemory ( mContext.getOpPackageName ( ) , cardId , options , new com.android.internal.telephony.euicc.IResetMemoryCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { executor.execute ( ( ) -> callback.onComplete ( resultCode , null ) ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling resetMemory" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } libcore.util.CountryTimeZones.TimeZoneMapping that = ( ( libcore.util.CountryTimeZones.TimeZoneMapping ) ( o ) ) ; return ( ( showInPicker ) == ( that.showInPicker ) ) && ( java.util.Objects.equals ( timeZoneId , that.timeZoneId ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } libcore.util.CountryTimeZones.TimeZoneMapping that = ( ( libcore.util.CountryTimeZones.TimeZoneMapping ) ( o ) ) ; return ( ( ( showInPicker ) == ( that.showInPicker ) ) && ( java.util.Objects.equals ( timeZoneId , that.timeZoneId ) ) ) && ( java.util.Objects.equals ( notUsedAfter , that.notUsedAfter ) ) ; }
Source:
public void test_EVP_get_digestbyname ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( ( ( org.conscrypt.NativeCrypto.EVP_get_digestbyname ( "sha256" ) ) != ( org.conscrypt.NativeCryptoTest.NULL ) ) ) ; try { org.conscrypt.NativeCrypto.EVP_get_digestbyname ( null ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { org.conscrypt.NativeCrypto.EVP_get_digestbyname ( "" ) ; org.conscrypt.NativeCrypto.EVP_get_digestbyname ( "foobar" ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.RuntimeException expected ) { } }

Target:
public void test_EVP_get_digestbyname_NullArgument ( ) throws java.lang.Exception { org.conscrypt.NativeCrypto.EVP_get_digestbyname ( null ) ; }
Source:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { java.util.List < android.bluetooth.BluetoothDevice > devices = new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; synchronized ( this ) { if ( ( ( mState ) == ( android.bluetooth.BluetoothMap.STATE_CONNECTED ) ) && ( ( com.android.bluetooth.map.BluetoothMapService.mRemoteDevice ) != null ) ) { devices.add ( com.android.bluetooth.map.BluetoothMapService.mRemoteDevice ) ; } } return devices ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { java.util.List < android.bluetooth.BluetoothDevice > devices = new java.util.ArrayList < android.bluetooth.BluetoothDevice > ( ) ; synchronized ( this ) { if ( ( ( mState ) == ( android.bluetooth.BluetoothMap.STATE_CONNECTED ) ) && ( ( com.android.bluetooth.map.BluetoothMapService.sRemoteDevice ) != null ) ) { devices.add ( com.android.bluetooth.map.BluetoothMapService.sRemoteDevice ) ; } } return devices ; }
Source:
public com.android.jack.cfg.ControlFlowGraph getCfg ( ) { com.android.sched.util.log.Event optEvent = tracer.start ( JackEventType.REMOVE_DEAD_CODE ) ; try { com.android.jack.cfg.CfgBuilder.removeUnaccessibleNode ( blocks , entryBlock , exitBlock , basicBlockId ) ; } finally { optEvent.end ( ) ; } return new com.android.jack.cfg.ControlFlowGraph ( method , basicBlockId , entryBlock , exitBlock , blocks ) ; }

Target:
public com.android.jack.cfg.ControlFlowGraph getCfg ( ) { try ( com.android.sched.util.log.Event optEvent = tracer.open ( JackEventType.REMOVE_DEAD_CODE ) ) { com.android.jack.cfg.CfgBuilder.removeUnaccessibleNode ( blocks , entryBlock , exitBlock , basicBlockId ) ; } return new com.android.jack.cfg.ControlFlowGraph ( method , basicBlockId , entryBlock , exitBlock , blocks ) ; }
Source:
public void updateSeriesRecording ( com.android.tv.dvr.SeriesRecording ... seriesRecordings ) { for ( com.android.tv.dvr.SeriesRecording r : seriesRecordings ) { long id = r.getId ( ) ; if ( mSeriesRecordings.containsKey ( id ) ) { mSeriesRecordings.put ( id , r ) ; } else { throw new java.lang.IllegalArgumentException ( ( "Recording not found:" + r ) ) ; } } notifySeriesRecordingChanged ( seriesRecordings ) ; }

Target:
public void updateSeriesRecording ( com.android.tv.dvr.data.SeriesRecording ... seriesRecordings ) { for ( com.android.tv.dvr.data.SeriesRecording r : seriesRecordings ) { long id = r.getId ( ) ; if ( mSeriesRecordings.containsKey ( id ) ) { mSeriesRecordings.put ( id , r ) ; } else { throw new java.lang.IllegalArgumentException ( ( "Recording not found:" + r ) ) ; } } notifySeriesRecordingChanged ( seriesRecordings ) ; }
Source:
private void assertDomainOne ( java.lang.String domain , java.lang.String executable ) throws java.io.FileNotFoundException { java.util.List < android.security.cts.SELinuxDomainTest.ProcessDetails > procs = android.security.cts.SELinuxDomainTest.ProcessDetails.getProcessMap ( ) . get ( domain ) ; assertNotNull ( procs ) ; assertEquals ( 1 , procs.size ( ) ) ; assertEquals ( executable , procs.get ( 0 ) . procTitle ) ; }

Target:
private void assertDomainEmpty ( java.lang.String domain ) throws java.io.FileNotFoundException { java.util.List < android.security.cts.SELinuxDomainTest.ProcessDetails > procs = android.security.cts.SELinuxDomainTest.ProcessDetails.getProcessMap ( ) . get ( domain ) ; java.lang.String msg = ( ( ( ( "Expected no processes in SELinux domain \"" + domain ) + "\"" ) + " Found: \"" ) + procs ) + "\"" ; assertNull ( msg , procs ) ; }
Source:
public void onFeatureRemoved ( ) { mContext.unregisterReceiver ( mReceiver ) ; try { mCompatFeature.endSession ( mSessionId ) ; mCompatFeature.removeRegistrationListener ( mListener ) ; if ( ( mRegCompatAdapter ) != null ) { mCompatFeature.removeRegistrationListener ( mRegCompatAdapter.getRegistrationListener ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.w ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( "onFeatureRemoved: Couldn't end session: " + ( e.getMessage ( ) ) ) ) ; } }

Target:
public com.android.ims.internal.IImsCallSession createCallSessionInterface ( android.telephony.ims.ImsCallProfile profile ) throws android.os.RemoteException { return mCompatFeature.createCallSession ( mSessionId , profile ) ; }
Source:
private boolean isHiddenRow ( @ android.support.annotation.Nullable java.lang.String number , long rowId ) { if ( ( number != null ) && ( android.telephony.PhoneNumberUtils.isEmergencyNumber ( number ) ) ) { return true ; } if ( hiddenRowIds.contains ( rowId ) ) { return true ; } return false ; }

Target:
private boolean isHiddenRow ( @ android.support.annotation.Nullable java.lang.String number , long rowId ) { if ( isHideableEmergencyNumberRow ( number ) ) { return true ; } if ( hiddenRowIds.contains ( rowId ) ) { return true ; } return false ; }
Source:
public void onDispose ( ) { super . onDispose ( ) ; }

Target:
public void addChoices ( java.util.List < java.lang.String > titles , java.util.List < java.net.URL > iconUrls , java.util.List < java.lang.String > ids ) { com.android.ide.common.api.IAttributeInfo info = first.getAttributeInfo ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_GRAVITY ) ; if ( info != null ) { assert IAttributeInfo.Format.FLAG.in ( info.getFormats ( ) ) ; for ( java.lang.String name : info.getFlagValues ( ) ) { titles.add ( prettyName ( name ) ) ; ids.add ( name ) ; } } }
Source:
public int getPhonebookAccessPermission ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; } try { return android.bluetooth.BluetoothDevice.sService.getPhonebookAccessPermission ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; }

Target:
public boolean setPairingConfirmation ( boolean confirm ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot set pairing confirmation" ) ; return false ; } try { return service.setPairingConfirmation ( this , confirm ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
private void disableBluetooth ( ) { mDisablingDialog.show ( ) ; mToggleButton.setEnabled ( false ) ; if ( ! ( mBluetoothAdapter.disable ( ) ) ) { mDisablingDialog.hide ( ) ; mToggleButton.setEnabled ( true ) ; new android.app.AlertDialog.Builder ( this ) . setIcon ( android.R.drawable.ic_dialog_alert ) . setMessage ( R.string.bt_disabling_error ) . setPositiveButton ( android.R.string.ok , null ) . show ( ) ; } }

Target:
private void disableBluetooth ( ) { mDisablingDialog.show ( ) ; mToggleButton.setEnabled ( false ) ; if ( ! ( mBluetoothAdapter.disable ( ) ) ) { mDisablingDialog.dismiss ( ) ; mToggleButton.setEnabled ( true ) ; new android.app.AlertDialog.Builder ( this ) . setIcon ( android.R.drawable.ic_dialog_alert ) . setMessage ( R.string.bt_disabling_error ) . setPositiveButton ( android.R.string.ok , null ) . show ( ) ; } }
Source:
public void unregisterService ( android.net.nsd.NsdManager.RegistrationListener listener ) { int id = getListenerKey ( listener ) ; mAsyncChannel.sendMessage ( android.net.nsd.NsdManager.UNREGISTER_SERVICE , 0 , id ) ; }

Target:
public void unregisterService ( android.net.nsd.NsdManager.RegistrationListener listener ) { int id = getListenerKey ( listener ) ; if ( id == ( android.net.nsd.NsdManager.INVALID_LISTENER_KEY ) ) { throw new java.lang.IllegalArgumentException ( "listener not registered" ) ; } if ( listener == null ) { throw new java.lang.IllegalArgumentException ( "listener cannot be null" ) ; } mAsyncChannel.sendMessage ( android.net.nsd.NsdManager.UNREGISTER_SERVICE , 0 , id ) ; }
Source:
private void updateDeviceNumberRow ( ) { if ( ( deviceNumberTextView ) == null ) { return ; } if ( ( isInMultiWindowMode ) || ( android.text.TextUtils.isEmpty ( primaryCallState.callbackNumber ) ) ) { deviceNumberTextView.setVisibility ( View.GONE ) ; deviceNumberDivider.setVisibility ( View.GONE ) ; return ; } deviceNumberTextView.setText ( context.getString ( R.string.contact_grid_callback_number , primaryCallState.callbackNumber ) ) ; deviceNumberTextView.setVisibility ( View.VISIBLE ) ; if ( primaryInfo.shouldShowLocation ( ) ) { deviceNumberDivider.setVisibility ( View.VISIBLE ) ; } }

Target:
private void updateDeviceNumberRow ( ) { if ( ( deviceNumberTextView ) == null ) { return ; } if ( ( isInMultiWindowMode ) || ( android.text.TextUtils.isEmpty ( primaryCallState.callbackNumber ( ) ) ) ) { deviceNumberTextView.setVisibility ( View.GONE ) ; deviceNumberDivider.setVisibility ( View.GONE ) ; return ; } deviceNumberTextView.setText ( context.getString ( R.string.contact_grid_callback_number , primaryCallState.callbackNumber ( ) ) ) ; deviceNumberTextView.setVisibility ( View.VISIBLE ) ; if ( primaryInfo.shouldShowLocation ( ) ) { deviceNumberDivider.setVisibility ( View.VISIBLE ) ; } }
Source:
public static org.w3c.dom.Document parse ( @ com.android.annotations.NonNull java.lang.String xml ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { xml = com.android.utils.XmlUtils.stripBom ( xml ) ; return com.android.utils.PositionXmlParser.parse ( xml , new org.xml.sax.InputSource ( new java.io.StringReader ( xml ) ) , true ) ; }

Target:
public static org.w3c.dom.Document parse ( @ com.android.annotations.NonNull byte [ ] data , boolean checkDtd ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { java.lang.String xml = com.android.utils.PositionXmlParser.getXmlString ( data ) ; xml = com.android.utils.XmlUtils.stripBom ( xml ) ; return com.android.utils.PositionXmlParser.parse ( xml , new org.xml.sax.InputSource ( new java.io.StringReader ( xml ) ) , true , checkDtd ) ; }
Source:
void dumpUnsafe ( android.util.Printer printer , boolean verbose ) { printer.println ( ( ( "Connection #" + ( mConnectionId ) ) + ":" ) ) ; if ( verbose ) { printer.println ( ( " connectionPtr: 0x" + ( java.lang.Integer.toHexString ( mConnectionPtr ) ) ) ) ; } printer.println ( ( " isPrimaryConnection: " + ( mIsPrimaryConnection ) ) ) ; printer.println ( ( " onlyAllowReadOnlyOperations: " + ( mOnlyAllowReadOnlyOperations ) ) ) ; mRecentOperations.dump ( printer , verbose ) ; if ( verbose ) { mPreparedStatementCache.dump ( printer ) ; } }

Target:
void dumpUnsafe ( android.util.Printer printer , boolean verbose ) { printer.println ( ( ( "Connection #" + ( mConnectionId ) ) + ":" ) ) ; if ( verbose ) { printer.println ( ( " connectionPtr: 0x" + ( java.lang.Long.toHexString ( mConnectionPtr ) ) ) ) ; } printer.println ( ( " isPrimaryConnection: " + ( mIsPrimaryConnection ) ) ) ; printer.println ( ( " onlyAllowReadOnlyOperations: " + ( mOnlyAllowReadOnlyOperations ) ) ) ; mRecentOperations.dump ( printer , verbose ) ; if ( verbose ) { mPreparedStatementCache.dump ( printer ) ; } }
Source:
com.android.sched.vfs.DirectFS.DirectVDir getVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.DirectFS.DirectVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotDirectoryException { assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.READ ) ) != 0 ; java.io.File file = new java.io.File ( parent.getNativePath ( ) , name ) ; com.android.sched.util.file.Directory.check ( file , new com.android.sched.util.location.DirectoryLocation ( file ) ) ; return new com.android.sched.vfs.DirectFS.DirectNonRootVDir ( this , parent , name ) ; }

Target:
com.android.sched.vfs.ParentVFile getVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotFileException { assert ! ( isClosed ( ) ) ; assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.READ ) ) != 0 ; java.io.File path = getNativeFile ( parent.getPath ( ) , name ) ; com.android.sched.util.file.AbstractStreamFile.check ( path , new com.android.sched.util.location.FileLocation ( path ) ) ; return new com.android.sched.vfs.ParentVFile ( this , parent , name ) ; }
Source:
public boolean installCaCert ( @ android.annotation.Nullable android.content.ComponentName admin , byte [ ] certBuffer ) { throwIfParentInstance ( "installCaCert" ) ; if ( ( mService ) != null ) { try { return mService.installCaCert ( admin , certBuffer ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }

Target:
public boolean resetPasswordWithToken ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String password , byte [ ] token , int flags ) { throwIfParentInstance ( "resetPassword" ) ; if ( ( mService ) != null ) { try { return mService.resetPasswordWithToken ( admin , password , token , flags ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } return false ; }
Source:
public static boolean SmaliBooleanNot ( boolean x ) throws java.lang.Exception { java.lang.Class < ? > c = java.lang.Class.forName ( "BooleanNotSmali" ) ; java.lang.reflect.Method method = c.getMethod ( "BooleanNot" , boolean . class ) ; java.lang.Object retValue = method.invoke ( null , new java.lang.Object [ ] { java.lang.Boolean.valueOf ( x ) } ) ; return ( ( java.lang.Boolean ) ( retValue ) ) . booleanValue ( ) ; }

Target:
public static boolean BooleanNot ( boolean x ) { return ! x ; }
Source:
private int regCodeToServiceState ( int code ) { switch ( code ) { case 0 : case 2 : case 3 : case 4 : case 10 : case 12 : case 13 : case 14 : return android.telephony.ServiceState.STATE_OUT_OF_SERVICE ; case 1 : case 5 : return android.telephony.ServiceState.STATE_IN_SERVICE ; default : loge ( ( "regCodeToServiceState: unexpected service state " + code ) ) ; return android.telephony.ServiceState.STATE_OUT_OF_SERVICE ; } }

Target:
private int selectResourceForRejectCode ( int rejCode ) { int rejResourceId = 0 ; switch ( rejCode ) { case 1 : rejResourceId = com.android.internal.R.string.mmcc_authentication_reject ; break ; case 2 : rejResourceId = com.android.internal.R.string.mmcc_imsi_unknown_in_hlr ; break ; case 3 : rejResourceId = com.android.internal.R.string.mmcc_illegal_ms ; break ; case 6 : rejResourceId = com.android.internal.R.string.mmcc_illegal_me ; break ; default : break ; } return rejResourceId ; }