auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.getPropertyName ( ) , java.lang.String.valueOf ( true ) ) ; return outputVDir.createOutputVFile ( new com.android.sched.vfs.VPath ( ( ( typePath.getPathAsString ( '/' ) ) + ( fileType.getFileExtension ( ) ) ) , '/' ) ) ; }

Target:
public com.android.sched.vfs.OutputVFile createFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.sched.util.file.CannotCreateFileException { putProperty ( fileType.getPropertyName ( ) , java.lang.String.valueOf ( true ) ) ; addFileType ( fileType ) ; typePath.addSuffix ( fileType.getFileExtension ( ) ) ; return outputVDir.createOutputVFile ( typePath ) ; }
Source:
public void testIsLegalReplacement ( ) { try { encoder.isLegalReplacement ( null ) ; fail ( "should throw null pointer exception" ) ; } catch ( java.lang.NullPointerException e ) { } assertTrue ( encoder.isLegalReplacement ( specifiedReplacement ) ) ; assertTrue ( encoder.isLegalReplacement ( new byte [ 200 ] ) ) ; byte [ ] ba = getIllegalByteArray ( ) ; if ( ba != null ) { assertFalse ( encoder.isLegalReplacement ( ba ) ) ; } }

Target:
public void test_isLegalReplacement_good ( ) { assertTrue ( encoder.isLegalReplacement ( specifiedReplacement ) ) ; }
Source:
public void registerRemoteVolumeObserverForRcc ( int rccId , android.media.IRemoteVolumeObserver rvo ) { mMediaFocusControl.registerRemoteVolumeObserverForRcc ( rccId , rvo ) ; }

Target:
public void onComplete ( int status ) { if ( ( mHdmiManager ) != null ) { synchronized ( mHdmiManager ) { mHdmiCecSink = status != ( android.hardware.hdmi.HdmiControlManager.POWER_STATUS_UNKNOWN ) ; if ( ( isPlatformTelevision ( ) ) && ( ! ( mHdmiCecSink ) ) ) { mFixedVolumeDevices &= ~ ( AudioSystem.DEVICE_OUT_HDMI ) ; } checkAllFixedVolumeDevices ( ) ; } } }
Source:
public static android.os.ParcelFileDescriptor fromFd ( int fd ) throws java.io.IOException { final java.io.FileDescriptor original = new java.io.FileDescriptor ( ) ; original.setInt$ ( fd ) ; try { final java.io.FileDescriptor dup = Libcore.os.dup ( original ) ; return new android.os.ParcelFileDescriptor ( dup ) ; } catch ( libcore.io.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }

Target:
public static android.os.ParcelFileDescriptor fromFd ( int fd ) throws java.io.IOException { final java.io.FileDescriptor original = new java.io.FileDescriptor ( ) ; original.setInt$ ( fd ) ; try { final java.io.FileDescriptor dup = android.system.Os.dup ( original ) ; return new android.os.ParcelFileDescriptor ( dup ) ; } catch ( android.system.ErrnoException e ) { throw e.rethrowAsIOException ( ) ; } }
Source:
public void onAttached ( android.net.wifi.nan.WifiNanSession session ) { synchronized ( mLock ) { mSessions.put ( mSessionId , session ) ; } android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mResults.putLong ( "timestampMs" , java.lang.System.currentTimeMillis ( ) ) ; mEventFacade.postEvent ( "WifiNanOnAttached" , mResults ) ; }

Target:
public void onAttached ( android.net.wifi.aware.WifiAwareSession session ) { synchronized ( mLock ) { mSessions.put ( mSessionId , session ) ; } android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "sessionId" , mSessionId ) ; mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( mCreateTimestampMs ) ) ) ; mResults.putLong ( "timestampMs" , java.lang.System.currentTimeMillis ( ) ) ; mEventFacade.postEvent ( "WifiAwareOnAttached" , mResults ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.i ( com.android.server.am.ActivityManagerService.TAG , "Shutting down activity manager..." ) ; shutdown ( 10000 ) ; android.util.Log.i ( com.android.server.am.ActivityManagerService.TAG , "Shutdown complete, restarting!" ) ; java.lang.Process.killProcess ( java.lang.Process.myPid ( ) ) ; java.lang.System.exit ( 10 ) ; }

Target:
public void binderDied ( ) { synchronized ( this ) { notifyAll ( ) ; } }
Source:
public void testGetPath_PathAndApiResourceSet ( ) { initializePsiClass ( "\"res\"" , "\"\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"boo\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.RestSignatureInspection inspection = new com.google.gct.intellij.endpoints.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "boo" , path ) ; }

Target:
public void testGetPath_PathAndApiResourceSet ( ) { initializePsiClass ( "\"res\"" , "\"\"" ) ; initializePsiMethod ( "foo" , "\"\"" , "\"boo\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.RestSignatureInspection inspection = new com.google.gct.idea.appengine.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "boo" , path ) ; }
Source:
public void testGetPath_SpecifiedPath ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "\"\"" , "\"\"" , "\"abc\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.intellij.endpoints.validation.RestSignatureInspection inspection = new com.google.gct.intellij.endpoints.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "abc" , path ) ; }

Target:
public void testGetPath_SpecifiedPath ( ) { initializePsiClass ( "\"\"" , "\"\"" ) ; initializePsiMethod ( "\"\"" , "\"\"" , "\"abc\"" ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; com.google.gct.idea.appengine.validation.RestSignatureInspection inspection = new com.google.gct.idea.appengine.validation.RestSignatureInspection ( ) ; java.lang.String path = inspection.getPath ( mockPsiMethod ) ; junit.framework.Assert.assertEquals ( "abc" , path ) ; }
Source:
public static void checkClientTrusted ( javax.net.ssl.X509TrustManager tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , org.conscrypt.OpenSSLSocketImpl socket ) throws java.security.cert.CertificateException { if ( ( ! ( org.conscrypt.Platform.checkTrusted ( "checkClientTrusted" , tm , chain , authType , java.net.Socket.class , socket ) ) ) && ( ! ( org.conscrypt.Platform.checkTrusted ( "checkClientTrusted" , tm , chain , authType , java.lang.String.class , socket.getHandshakeSession ( ) . getPeerHost ( ) ) ) ) ) { tm.checkClientTrusted ( chain , authType ) ; } }

Target:
public static void checkClientTrusted ( javax.net.ssl.X509TrustManager tm , java.security.cert.X509Certificate [ ] chain , java.lang.String authType , org.conscrypt.AbstractConscryptSocket socket ) throws java.security.cert.CertificateException { if ( ( ! ( org.conscrypt.Platform.checkTrusted ( "checkClientTrusted" , tm , chain , authType , java.net.Socket.class , socket ) ) ) && ( ! ( org.conscrypt.Platform.checkTrusted ( "checkClientTrusted" , tm , chain , authType , java.lang.String.class , socket.getHandshakeSession ( ) . getPeerHost ( ) ) ) ) ) { tm.checkClientTrusted ( chain , authType ) ; } }
Source:
public static long copy ( com.google.common.io.InputSupplier < ? extends java.io.InputStream > from , java.io.OutputStream to ) throws java.io.IOException { boolean threw = true ; java.io.InputStream in = from.getInput ( ) ; try { long count = com.google.common.io.ByteStreams.copy ( in , to ) ; threw = false ; return count ; } finally { com.google.common.io.Closeables.close ( in , threw ) ; } }

Target:
void writeTo ( byte [ ] b , int off ) { java.lang.System.arraycopy ( buf , 0 , b , off , count ) ; }
Source:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { if ( ( mFileAttributes ) == null ) { mFileAttributes = new java.util.ArrayList < org.w3c.dom.Attr > ( ) ; } mFileAttributes.add ( attribute ) ; }

Target:
public void visitAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { if ( context.getDriver ( ) . isSuppressed ( com.android.tools.lint.checks.AlwaysShowActionDetector.ISSUE , attribute ) ) { mIgnoreFile = true ; return ; } if ( ( mFileAttributes ) == null ) { mFileAttributes = new java.util.ArrayList < org.w3c.dom.Attr > ( ) ; } mFileAttributes.add ( attribute ) ; }
Source:
public java.lang.String getTestedApplicationId ( ) { if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { assert ( mTestedConfig ) != null ; if ( ( mTestedConfig.mType ) == ( com.android.builder.core.VariantConfiguration.Type.LIBRARY ) ) { return getApplicationId ( ) ; } else { return mTestedConfig.getApplicationId ( ) ; } } return null ; }

Target:
public java.lang.String getTestedApplicationId ( ) { if ( mType.isForTesting ( ) ) { com.google.common.base.Preconditions.checkState ( ( ( mTestedConfig ) != null ) ) ; if ( ( mTestedConfig.mType ) == ( com.android.builder.core.VariantConfiguration.Type.LIBRARY ) ) { return getApplicationId ( ) ; } else { return mTestedConfig.getApplicationId ( ) ; } } return null ; }
Source:
private static void getTilesForAction ( android.content.Context context , android.os.UserHandle user , java.lang.String action , java.util.Map < android.util.Pair < java.lang.String , java.lang.String > , com.android.settingslib.drawer.Tile > addedCache , java.lang.String defaultCategory , java.util.ArrayList < com.android.settingslib.drawer.Tile > outTiles , boolean requireSettings ) { android.content.Intent intent = new android.content.Intent ( action ) ; if ( requireSettings ) { intent.setPackage ( com.android.settingslib.drawer.TileUtils.SETTING_PKG ) ; } com.android.settingslib.drawer.TileUtils.getTilesForIntent ( context , user , intent , addedCache , defaultCategory , outTiles , requireSettings , true ) ; }

Target:
private static void getTilesForAction ( android.content.Context context , android.os.UserHandle user , java.lang.String action , java.util.Map < android.util.Pair < java.lang.String , java.lang.String > , com.android.settingslib.drawer.Tile > addedCache , java.lang.String defaultCategory , java.util.ArrayList < com.android.settingslib.drawer.Tile > outTiles , boolean requireSettings , boolean usePriority ) { android.content.Intent intent = new android.content.Intent ( action ) ; if ( requireSettings ) { intent.setPackage ( com.android.settingslib.drawer.TileUtils.SETTING_PKG ) ; } com.android.settingslib.drawer.TileUtils.getTilesForIntent ( context , user , intent , addedCache , defaultCategory , outTiles , usePriority , true ) ; }
Source:
private static void assertUtc ( java.lang.String [ ] row ) { assertEquals ( java.util.Arrays.toString ( row ) , "UTC" , row [ 2 ] ) ; assertEquals ( java.util.Arrays.toString ( row ) , "UTC" , row [ 4 ] ) ; }

Target:
private static void assertUtc ( java.util.Locale locale ) { java.util.HashSet < java.lang.String > utcZones = new java.util.HashSet < > ( java.util.Arrays.asList ( libcore.java.text.DateFormatSymbolsTest.UTC_ZONE_IDS ) ) ; for ( java.lang.String [ ] row : java.text.DateFormatSymbols.getInstance ( locale ) . getZoneStrings ( ) ) { if ( utcZones.contains ( row [ 0 ] ) ) { assertFalse ( java.util.Arrays.toString ( row ) , row [ 1 ] . startsWith ( "GMT" ) ) ; assertEquals ( java.util.Arrays.toString ( row ) , "UTC" , row [ 2 ] ) ; } } }
Source:
private void propagateVarRef ( com.android.jack.ir.ast.JSsaVariableRef lhs , com.android.jack.ir.ast.JSsaVariableRef rhs , com.android.jack.transformations.request.TransformationRequest tr ) { com.android.jack.ir.ast.JSsaVariableRef def = rhs.getDef ( ) ; for ( com.android.jack.ir.ast.JSsaVariableRef oldUse : lhs.getUses ( ) ) { com.android.jack.ir.ast.JSsaVariableRef newUse = def.makeRef ( oldUse.getSourceInfo ( ) ) ; newUse.addAllMarkers ( oldUse.getAllMarkers ( ) ) ; tr.append ( new com.android.jack.transformations.request.Replace ( oldUse , newUse ) ) ; } }

Target:
private void propagateVarRef ( com.android.jack.ir.ast.JSsaVariableDefRef lhs , com.android.jack.ir.ast.JSsaVariableUseRef rhs , com.android.jack.transformations.request.TransformationRequest tr ) { com.android.jack.ir.ast.JSsaVariableDefRef def = rhs.getDef ( ) ; for ( com.android.jack.ir.ast.JSsaVariableRef oldUse : lhs.getUses ( ) ) { com.android.jack.ir.ast.JSsaVariableRef newUse = def.makeRef ( oldUse.getSourceInfo ( ) ) ; newUse.addAllMarkers ( oldUse.getAllMarkers ( ) ) ; tr.append ( new com.android.jack.transformations.request.Replace ( oldUse , newUse ) ) ; } }
Source:
public void sendSingleScanBandRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( WifiScanner.WIFI_BAND_BOTH_WITH_DFS , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , true , 2400 , 5150 , 5175 ) ) ; }

Target:
public void sendSingleScanBandRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( WifiScanner.WIFI_BAND_BOTH_WITH_DFS , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , com.android.server.wifi.ScanTestUtil.computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , true , 2400 , 5150 , 5175 ) ) ; }
Source:
public static com.intellij.execution.ui.ConsoleView createConsole ( @ org.jetbrains.annotations.NotNull final java.lang.String testFrameworkName , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.CommandLineState commandLineState , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.ModuleRunConfiguration config , @ org.jetbrains.annotations.NotNull final com.intellij.execution.Executor executor ) throws com.intellij.execution.ExecutionException { final com.intellij.execution.testframework.TestConsoleProperties consoleProperties = new com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties ( config , testFrameworkName , executor ) ; return com.google.gct.testing.results.GoogleCloudTestResultsConnectionUtil.createConsole ( testFrameworkName , consoleProperties , commandLineState.getEnvironment ( ) ) ; }

Target:
public static com.intellij.execution.ui.ConsoleView createConsole ( @ org.jetbrains.annotations.NotNull final java.lang.String testFrameworkName , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.CommandLineState commandLineState , @ org.jetbrains.annotations.NotNull final com.intellij.execution.configurations.ModuleRunConfiguration config , @ org.jetbrains.annotations.NotNull final com.intellij.execution.Executor executor , @ org.jetbrains.annotations.NotNull final com.google.gct.testing.CloudMatrixExecutionCancellator matrixExecutionCancellator ) throws com.intellij.execution.ExecutionException { final com.intellij.execution.testframework.TestConsoleProperties consoleProperties = new com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties ( config , testFrameworkName , executor ) ; return com.google.gct.testing.results.GoogleCloudTestResultsConnectionUtil.createConsole ( testFrameworkName , consoleProperties , commandLineState.getEnvironment ( ) , matrixExecutionCancellator ) ; }
Source:
public boolean getEnableAutoJoinWhenAssociated ( ) { return mWifiConfigManager.getEnableAutoJoinWhenAssociated ( ) ; }

Target:
private boolean setUserSelectNetwork ( int netId , int uid ) { if ( ! ( mWifiConfigManager.enableNetwork ( netId , true , uid ) ) ) { loge ( ( ( ( "connectToUserSelectNetwork uid " + uid ) + " did not have the permissions to enable=" ) + netId ) ) ; return false ; } if ( ( mWifiConnectivityManager ) != null ) { mWifiConnectivityManager.connectToUserSelectNetwork ( netId , true ) ; } return true ; }
Source:
public void dumpDbInfo ( java.io.FileDescriptor fd , java.lang.String [ ] args ) { java.io.PrintWriter pw = new java.io.PrintWriter ( new java.io.FileOutputStream ( fd ) ) ; android.util.PrintWriterPrinter printer = new android.util.PrintWriterPrinter ( pw ) ; android.database.sqlite.SQLiteDebug.dump ( printer , args ) ; pw.flush ( ) ; }

Target:
public void dumpDbInfo ( java.io.FileDescriptor fd , java.lang.String [ ] args ) { java.io.PrintWriter pw = new com.android.internal.util.FastPrintWriter ( new java.io.FileOutputStream ( fd ) ) ; android.util.PrintWriterPrinter printer = new android.util.PrintWriterPrinter ( pw ) ; android.database.sqlite.SQLiteDebug.dump ( printer , args ) ; pw.flush ( ) ; }
Source:
public void testInsertCarrierInfo ( ) { try { mContentResolver.insert ( CarrierIdProvider.CONTENT_URI , com.android.providers.telephony.CarrierIdProviderTest.createCarrierInfoInternal ( ) ) ; android.database.Cursor countCursor = mContentResolver.query ( CarrierIdProvider.CONTENT_URI , new java.lang.String [ ] { "count(*) AS count" } , null , null , null ) ; countCursor.moveToFirst ( ) ; assertEquals ( 1 , countCursor.getInt ( 0 ) ) ; assertTrue ( mContentObserver.changed ) ; } catch ( java.lang.Exception e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; } }

Target:
public void testInsertCarrierInfo ( ) { try { mContentResolver.insert ( CarrierIdentification.CONTENT_URI , com.android.providers.telephony.CarrierIdProviderTest.createCarrierInfoInternal ( ) ) ; android.database.Cursor countCursor = mContentResolver.query ( CarrierIdentification.CONTENT_URI , new java.lang.String [ ] { "count(*) AS count" } , null , null , null ) ; countCursor.moveToFirst ( ) ; assertEquals ( 1 , countCursor.getInt ( 0 ) ) ; assertTrue ( mContentObserver.changed ) ; } catch ( java.lang.Exception e ) { android.util.Log.d ( com.android.providers.telephony.CarrierIdProviderTest.TAG , ( "Error inserting carrier info:" + e ) ) ; } }
Source:
public void testNoBackupFolder ( ) throws java.lang.Exception { runDeviceTest ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , android.cts.backup.NoBackupFolderHostSideTest.DEVICE_TEST_CLASS_NAME , "createFiles" ) ; java.lang.String backupnowOutput = backupNow ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME ) ; assertBackupIsSuccessful ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , backupnowOutput ) ; runDeviceTest ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , android.cts.backup.NoBackupFolderHostSideTest.DEVICE_TEST_CLASS_NAME , "deleteFilesAfterBackup" ) ; java.lang.String restoreOutput = restore ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME ) ; assertRestoreIsSuccessful ( restoreOutput ) ; runDeviceTest ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , android.cts.backup.NoBackupFolderHostSideTest.DEVICE_TEST_CLASS_NAME , "checkRestoredFiles" ) ; }

Target:
public void testNoBackupFolder ( ) throws java.lang.Exception { if ( ! ( mIsBackupSupported ) ) { com.android.tradefed.log.LogUtil.CLog.i ( "android.software.backup feature is not supported on this device" ) ; return ; } runDeviceTest ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , android.cts.backup.NoBackupFolderHostSideTest.DEVICE_TEST_CLASS_NAME , "createFiles" ) ; java.lang.String backupnowOutput = backupNow ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME ) ; assertBackupIsSuccessful ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , backupnowOutput ) ; runDeviceTest ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , android.cts.backup.NoBackupFolderHostSideTest.DEVICE_TEST_CLASS_NAME , "deleteFilesAfterBackup" ) ; java.lang.String restoreOutput = restore ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME ) ; assertRestoreIsSuccessful ( restoreOutput ) ; runDeviceTest ( android.cts.backup.NoBackupFolderHostSideTest.TESTS_APP_NAME , android.cts.backup.NoBackupFolderHostSideTest.DEVICE_TEST_CLASS_NAME , "checkRestoredFiles" ) ; }
Source:
private static int getInt ( org.w3c.dom.Element element , java.lang.String attribute , int defaultValue ) { java.lang.String valueString = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , attribute ) ; if ( ( valueString != null ) && ( ( valueString.length ( ) ) > 0 ) ) { try { return java.lang.Integer.decode ( valueString ) ; } catch ( java.lang.NumberFormatException nufe ) { } } return defaultValue ; }

Target:
private static int getInt ( org.w3c.dom.Element element , java.lang.String attribute , int defaultValue ) { java.lang.String valueString = element.getAttributeNS ( com.android.SdkConstants.ANDROID_URI , attribute ) ; if ( ( valueString != null ) && ( ! ( valueString.isEmpty ( ) ) ) ) { try { return java.lang.Integer.decode ( valueString ) ; } catch ( java.lang.NumberFormatException nufe ) { } } return defaultValue ; }
Source:
public static org.eclipse.core.resources.IFile getManifest ( org.eclipse.core.resources.IProject project ) { org.eclipse.core.resources.IResource r = project.findMember ( ( ( com.android.ide.eclipse.adt.AndroidConstants.WS_SEP ) + ( com.android.sdklib.SdkConstants.FN_ANDROID_MANIFEST_XML ) ) ) ; if ( ( ( r == null ) || ( ( r.exists ( ) ) == false ) ) || ( ( r instanceof org.eclipse.core.resources.IFile ) == false ) ) { return null ; } return ( ( org.eclipse.core.resources.IFile ) ( r ) ) ; }

Target:
public static org.eclipse.core.resources.IFile getManifest ( org.eclipse.core.resources.IProject project ) { org.eclipse.core.resources.IResource r = project.findMember ( ( ( com.android.ide.eclipse.adt.AdtConstants.WS_SEP ) + ( com.android.sdklib.SdkConstants.FN_ANDROID_MANIFEST_XML ) ) ) ; if ( ( ( r == null ) || ( ( r.exists ( ) ) == false ) ) || ( ( r instanceof org.eclipse.core.resources.IFile ) == false ) ) { return null ; } return ( ( org.eclipse.core.resources.IFile ) ( r ) ) ; }
Source:
public void testGetMeid ( ) { java.lang.String meid = mTelephonyManager.getMeid ( ) ; if ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { if ( ! ( android.text.TextUtils.isEmpty ( meid ) ) ) { android.telephony.cts.TelephonyManagerTest.assertImei ( meid ) ; } else { org.junit.Assert.assertFalse ( android.text.TextUtils.isEmpty ( mTelephonyManager.getImei ( ) ) ) ; } } }

Target:
public void testGetMeid ( ) { java.lang.String meid = mTelephonyManager.getMeid ( ) ; if ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { if ( ! ( android.text.TextUtils.isEmpty ( meid ) ) ) { android.telephony.cts.TelephonyManagerTest.assertMeidEsn ( meid ) ; } else { org.junit.Assert.assertFalse ( android.text.TextUtils.isEmpty ( mTelephonyManager.getImei ( ) ) ) ; } } }
Source:
public void start ( ) { mRetryCounter = 0 ; mCurrentDelayMs = mStartDelayMs ; mHandler.removeCallbacks ( mRunnable ) ; mHandler.postDelayed ( mRunnable , mCurrentDelayMs ) ; }

Target:
public void notifyFailed ( ) { ( mRetryCounter ) ++ ; long temp = java.lang.Math.min ( mMaximumDelayMs , ( ( long ) ( ( mStartDelayMs ) * ( java.lang.Math.pow ( mMultiplier , mRetryCounter ) ) ) ) ) ; mCurrentDelayMs = ( ( long ) ( ( ( 1 + ( java.lang.Math.random ( ) ) ) / 2 ) * temp ) ) ; mHandlerAdapter.removeCallbacks ( mRunnable ) ; mHandlerAdapter.postDelayed ( mRunnable , mCurrentDelayMs ) ; }
Source:
public static java.lang.String [ ] getDefaultCipherSuites ( ) { return new java.lang.String [ ] { "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" , "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" , "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" , "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" , "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" , "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" , "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" , "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" , "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA" , "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA" , "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA" , "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA" , "TLS_RSA_WITH_AES_128_CBC_SHA" , "TLS_RSA_WITH_AES_256_CBC_SHA" , "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA" , "TLS_ECDHE_RSA_WITH_RC4_128_SHA" , "TLS_ECDH_ECDSA_WITH_RC4_128_SHA" , "TLS_ECDH_RSA_WITH_RC4_128_SHA" , "SSL_RSA_WITH_RC4_128_SHA" , "SSL_RSA_WITH_RC4_128_MD5" , "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA" , "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA" , "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA" , "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA" , "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA" , "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA" , "SSL_RSA_WITH_3DES_EDE_CBC_SHA" , org.conscrypt.NativeCrypto.TLS_EMPTY_RENEGOTIATION_INFO_SCSV } ; }

Target:
public static java.lang.String [ ] getDefaultCipherSuites ( ) { return new java.lang.String [ ] { "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" , "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" , "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" , "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" , "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" , "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" , "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" , "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" , "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" , "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" , "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" , "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" , "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" , "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" , "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA" , "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA" , "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA" , "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA" , "TLS_RSA_WITH_AES_128_GCM_SHA256" , "TLS_RSA_WITH_AES_256_GCM_SHA384" , "TLS_RSA_WITH_AES_128_CBC_SHA" , "TLS_RSA_WITH_AES_256_CBC_SHA" , "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA" , "TLS_ECDHE_RSA_WITH_RC4_128_SHA" , "TLS_ECDH_ECDSA_WITH_RC4_128_SHA" , "TLS_ECDH_RSA_WITH_RC4_128_SHA" , "SSL_RSA_WITH_RC4_128_SHA" , "SSL_RSA_WITH_RC4_128_MD5" , "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA" , "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA" , "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA" , "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA" , "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA" , "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA" , "SSL_RSA_WITH_3DES_EDE_CBC_SHA" , org.conscrypt.NativeCrypto.TLS_EMPTY_RENEGOTIATION_INFO_SCSV } ; }
Source:
public synchronized void prepare ( ) throws android.os.RemoteException { if ( ( mDexoptPackages ) != null ) { throw new java.lang.IllegalStateException ( "already called prepare()" ) ; } synchronized ( mPackageManagerService.mPackages ) { mDexoptPackages = com.android.server.pm.PackageManagerServiceUtils.getPackagesForDexopt ( mPackageManagerService.mPackages.values ( ) , mPackageManagerService ) ; } completeSize = mDexoptPackages.size ( ) ; }

Target:
public synchronized void prepare ( ) throws android.os.RemoteException { if ( ( mDexoptPackages ) != null ) { throw new java.lang.IllegalStateException ( "already called prepare()" ) ; } synchronized ( mPackageManagerService.mPackages ) { mDexoptPackages = com.android.server.pm.PackageManagerServiceUtils.getPackagesForDexopt ( mPackageManagerService.mPackages.values ( ) , mPackageManagerService ) ; } completeSize = mDexoptPackages.size ( ) ; mCommandsForCurrentPackage = null ; }
Source:
java.io.OutputStream createOutputResultStream ( java.io.File reportDir ) throws java.io.IOException { java.io.File reportFile = java.io.File.createTempFile ( com.android.ddmlib.testrunner.XmlTestRunListener.TEST_RESULT_FILE_PREFIX , com.android.ddmlib.testrunner.XmlTestRunListener.TEST_RESULT_FILE_SUFFIX , reportDir ) ; com.android.ddmlib.Log.i ( com.android.ddmlib.testrunner.XmlTestRunListener.LOG_TAG , java.lang.String.format ( "Created xml report file at %s" , reportFile.getAbsolutePath ( ) ) ) ; mReportPath = reportFile.getAbsolutePath ( ) ; return new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( reportFile ) ) ; }

Target:
java.io.OutputStream createOutputResultStream ( java.io.File reportDir ) throws java.io.IOException { java.io.File reportFile = getResultFile ( reportDir ) ; mReportPath = reportFile.getAbsolutePath ( ) ; return new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( reportFile ) ) ; }
Source:
public void connectWithCaptivePortal ( java.lang.String redirectUrl ) { mWrappedNetworkMonitor.gen204ProbeResult = 200 ; mWrappedNetworkMonitor.gen204ProbeRedirectUrl = redirectUrl ; connect ( false ) ; com.android.server.ConnectivityServiceTest.waitFor ( new com.android.server.ConnectivityServiceTest.Criteria ( ) { public boolean get ( ) { android.net.NetworkCapabilities.NetworkCapabilities caps = mCm.getNetworkCapabilities ( getNetwork ( ) ) ; return ( caps != null ) && ( caps.hasCapability ( com.android.server.NET_CAPABILITY_CAPTIVE_PORTAL ) ) ; } } ) ; mWrappedNetworkMonitor.gen204ProbeResult = 500 ; mWrappedNetworkMonitor.gen204ProbeRedirectUrl = null ; }

Target:
protected void preventAutomaticReconnect ( ) { mPreventReconnectReceived.open ( ) ; }
Source:
public void test_wrap_ByteBuffer_ByteBuffer_04 ( ) { java.lang.String host = "new host" ; int port = 8080 ; java.nio.ByteBuffer bbs = java.nio.ByteBuffer.allocate ( 10 ) ; java.nio.ByteBuffer bbd = java.nio.ByteBuffer.allocate ( 10 ) ; javax.net.ssl.SSLEngine sse = getEngine ( host , port ) ; try { sse.wrap ( bbs , bbd ) ; fail ( "IllegalStateException wasn't thrown" ) ; } catch ( java.lang.IllegalStateException iobe ) { } catch ( java.lang.Exception e ) { fail ( ( e + " was thrown instead of IllegalStateException" ) ) ; } }

Target:
public void test_wrap_ByteBuffer_ByteBuffer_04 ( ) throws java.lang.Exception { java.lang.String host = "new host" ; int port = 8080 ; java.nio.ByteBuffer bbs = java.nio.ByteBuffer.allocate ( 10 ) ; java.nio.ByteBuffer bbd = java.nio.ByteBuffer.allocate ( 10 ) ; javax.net.ssl.SSLEngine sse = getEngine ( host , port ) ; try { javax.net.ssl.SSLEngineResult result = sse.wrap ( bbs , bbd ) ; } catch ( java.lang.IllegalStateException expected ) { } }
Source:
public void testGetValues006_Long ( ) { org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( "breakpointLong" , StackTrace002Debuggee.LONG_METHOD_SIGNAL ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointLong" ) ; methodInfo.addVariable ( "param" , new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.LONG_PARAM_VALUE ) ) ; runStackFrameTest ( tester ) ; }

Target:
public void testGetValues005_Int ( ) { org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester tester = new org.apache.harmony.jpda.tests.jdwp.StackFrame.StackFrameTester ( StackTrace002Debuggee.INT_SIGNAL ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value oldValue = new org.apache.harmony.jpda.tests.framework.jdwp.Value ( StackTrace002Debuggee.INT_PARAM_VALUE ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo suspensionMethodInfo = tester.addTestMethod ( "breakpointInt" ) ; suspensionMethodInfo.addVariable ( "param" , oldValue ) ; org.apache.harmony.jpda.tests.jdwp.StackFrame.MethodInfo methodInfo = tester.addTestMethod ( "runBreakpointInt" ) ; methodInfo.addVariable ( "param" , oldValue ) ; runStackFrameTest ( tester , suspensionMethodInfo ) ; }
Source:
public void testRunEnded ( long elapsedTime , java.util.Map < java.lang.String , java.lang.String > metrics ) { mCurrentModuleResult.addRuntime ( elapsedTime ) ; mCurrentModuleResult.setDone ( ( ( mCurrentTestNum ) >= ( mTotalTestsInModule ) ) ) ; if ( isShardResultReporter ( ) ) { mMasterResultReporter.mergeModuleResult ( mCurrentModuleResult ) ; } }

Target:
public void testRunEnded ( long elapsedTime , java.util.Map < java.lang.String , java.lang.String > metrics ) { mCurrentModuleResult.addRuntime ( elapsedTime ) ; mCurrentModuleResult.setDone ( ( ( mCurrentTestNum ) >= ( mTotalTestsInModule ) ) ) ; mCurrentModuleResult.setNotExecuted ( java.lang.Math.max ( ( ( mTotalTestsInModule ) - ( mCurrentTestNum ) ) , 0 ) ) ; if ( isShardResultReporter ( ) ) { mMasterResultReporter.mergeModuleResult ( mCurrentModuleResult ) ; } }
Source:
public void config ( java.lang.String msg ) { if ( ( java.util.logging.Level.CONFIG.intValue ( ) ) < ( levelValue ) ) { return ; } log ( java.util.logging.Level.CONFIG , msg ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.util.ResourceBundle bundle , java.lang.String msg , java.lang.Throwable thrown ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setThrown ( thrown ) ; doLog ( lr , bundle ) ; }
Source:
private void dumpPosition ( java.lang.StringBuilder stringBuilder , com.android.utils.PositionXmlParser.Position position ) { stringBuilder.append ( "(" ) . append ( position.getLine ( ) ) . append ( "," ) . append ( position.getColumn ( ) ) . append ( ") " ) . append ( mOwnerElement.getDocument ( ) . getSourceLocation ( ) . print ( true ) ) . append ( ":" ) . append ( position.getLine ( ) ) ; }

Target:
void addMessage ( com.android.manifmerger.MergingReport.Builder report , com.android.manifmerger.MergingReport.Record.Severity severity , java.lang.String message ) { report.addMessage ( getOwnerElement ( ) . getDocument ( ) . getSourceLocation ( ) , getLine ( ) , getColumn ( ) , severity , message ) ; }
Source:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , long [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
native void rsnScriptForEachClipped ( long con , long incCon , long id , int slot , long ain , long aout , int xstart , int xend , int ystart , int yend , int zstart , int zend , boolean mUseInc ) ;
Source:
static com.android.builder.model.ProductFlavorContainer createProductFlavorContainer ( @ com.android.annotations.NonNull com.android.build.gradle.internal.ProductFlavorData productFlavorData , @ com.android.annotations.NonNull java.util.Collection < com.android.builder.model.SourceProviderContainer > sourceProviderContainers ) { java.util.List < com.android.builder.model.SourceProviderContainer > clonedContainer = com.android.build.gradle.internal.model.SourceProviderContainerImpl.cloneCollection ( sourceProviderContainers ) ; com.android.builder.model.SourceProviderContainer testASP = com.android.build.gradle.internal.model.SourceProviderContainerImpl.create ( com.android.builder.model.AndroidProject.ARTIFACT_ANDROID_TEST , productFlavorData.getTestSourceSet ( VariantConfiguration.Type.ANDROID_TEST ) ) ; clonedContainer.add ( testASP ) ; return new com.android.build.gradle.internal.model.ProductFlavorContainerImpl ( com.android.build.gradle.internal.model.ProductFlavorImpl.cloneFlavor ( productFlavorData.getProductFlavor ( ) , null , null ) , com.android.build.gradle.internal.model.SourceProviderImpl.cloneProvider ( productFlavorData.getSourceSet ( ) ) , clonedContainer ) ; }

Target:
static com.android.builder.model.ProductFlavorContainer createProductFlavorContainer ( @ com.android.annotations.NonNull com.android.build.gradle.internal.ProductFlavorData productFlavorData , @ com.android.annotations.NonNull java.util.Collection < com.android.builder.model.SourceProviderContainer > sourceProviderContainers ) { java.util.List < com.android.builder.model.SourceProviderContainer > clonedContainer = com.android.build.gradle.internal.model.SourceProviderContainerImpl.cloneCollection ( sourceProviderContainers ) ; com.android.builder.model.SourceProviderContainer testASP = com.android.build.gradle.internal.model.SourceProviderContainerImpl.create ( com.android.builder.model.AndroidProject.ARTIFACT_ANDROID_TEST , productFlavorData.getTestSourceSet ( VariantType.ANDROID_TEST ) ) ; clonedContainer.add ( testASP ) ; return new com.android.build.gradle.internal.model.ProductFlavorContainerImpl ( com.android.build.gradle.internal.model.ProductFlavorImpl.cloneFlavor ( productFlavorData.getProductFlavor ( ) , null , null ) , com.android.build.gradle.internal.model.SourceProviderImpl.cloneProvider ( productFlavorData.getSourceSet ( ) ) , clonedContainer ) ; }
Source:
public java.nio.ByteBuffer putDouble ( int index , double value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.DOUBLE ) ; this . block.pokeLong ( ( ( offset ) + index ) , java.lang.Double.doubleToRawLongBits ( value ) , order ) ; return this ; }

Target:
public java.nio.ByteBuffer putDouble ( int index , double value ) { checkNotFreed ( ) ; if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } checkIndex ( index , SizeOf.DOUBLE ) ; this . block.pokeLong ( ( ( offset ) + index ) , java.lang.Double.doubleToRawLongBits ( value ) , order ) ; return this ; }
Source:
public boolean onKeyDown ( int keyCode , android.view.KeyEvent event ) { switch ( keyCode ) { case android.view.KeyEvent.KEYCODE_BACK : com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , "onKeyDown - KEYCODE_BACK" ) ; cancelTimeOut ( ) ; sendResponse ( StkAppService.RES_ID_BACKWARD ) ; finish ( ) ; break ; } return false ; }

Target:
public void onSaveInstanceState ( android.os.Bundle outState ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , "onSaveInstanceState" ) ; super . onSaveInstanceState ( outState ) ; outState.putParcelable ( com.android.stk.StkDialogActivity.TEXT_KEY , mTextMsg ) ; outState.putParcelable ( com.android.stk.StkDialogActivity.TIMEOUT_INTENT_KEY , mTimeoutIntent ) ; outState.putInt ( com.android.stk.StkDialogActivity.SLOT_ID_KEY , mSlotId ) ; }
Source:
private java.lang.CharSequence createQueryCallBarringResultMessage ( int serviceClass ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( mContext.getText ( com.android.internal.R.string.serviceEnabledFor ) ) ; for ( int classMask = 1 ; classMask <= ( SERVICE_CLASS_MAX ) ; classMask <<= 1 ) { if ( ( classMask & serviceClass ) != 0 ) { sb.append ( "\n" ) ; sb.append ( serviceClassToCFString ( ( classMask & serviceClass ) ) ) ; } } return sb ; }

Target:
private java.lang.CharSequence createQueryCallWaitingResultMessage ( int serviceClass ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( mContext.getText ( com.android.internal.R.string.serviceEnabledFor ) ) ; for ( int classMask = 1 ; classMask <= ( com.android.internal.telephony.CommandsInterface.SERVICE_CLASS_MAX ) ; classMask <<= 1 ) { if ( ( classMask & serviceClass ) != 0 ) { sb.append ( "\n" ) ; sb.append ( serviceClassToCFString ( ( classMask & serviceClass ) ) ) ; } } return sb ; }
Source:
public void testStageInstallWithErrorCode_badSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneDistroInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneDistroInstaller ( "TimeZoneDistroInstallerTest" , doesNotExist , testInstallDir ) ; com.android.timezone.distro.TimeZoneDistro tzData = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; try { brokenSystemInstaller.stageInstallWithErrorCode ( tzData.getBytes ( ) ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_badSystemFile ( ) throws java.lang.Exception { java.io.File doesNotExist = new java.io.File ( testSystemTzDataDir , "doesNotExist" ) ; libcore.tzdata.update2.TimeZoneDistroInstaller brokenSystemInstaller = new libcore.tzdata.update2.TimeZoneDistroInstaller ( "TimeZoneDistroInstallerTest" , doesNotExist , testInstallDir ) ; com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; try { brokenSystemInstaller.stageInstallWithErrorCode ( distro ) ; fail ( ) ; } catch ( java.io.IOException expected ) { } assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
public org.chromium.android_webview.InterceptedRequestData shouldInterceptRequest ( java.lang.String url ) { org.chromium.content.common.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "shouldInterceptRequest=" + url ) ) ; android.webkit.WebResourceResponse response = mWebViewClient.shouldInterceptRequest ( mWebView , url ) ; org.chromium.content.common.TraceEvent.end ( ) ; if ( response == null ) return null ; return new org.chromium.android_webview.InterceptedRequestData ( response.getMimeType ( ) , response.getEncoding ( ) , response.getData ( ) ) ; }

Target:
public org.chromium.android_webview.InterceptedRequestData shouldInterceptRequest ( java.lang.String url ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "shouldInterceptRequest=" + url ) ) ; android.webkit.WebResourceResponse response = mWebViewClient.shouldInterceptRequest ( mWebView , url ) ; org.chromium.base.TraceEvent.end ( ) ; if ( response == null ) return null ; return new org.chromium.android_webview.InterceptedRequestData ( response.getMimeType ( ) , response.getEncoding ( ) , response.getData ( ) ) ; }
Source:
public void testCannotAccessScanResults_NoInteractAcrossUsersFullPermission ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }

Target:
public void testCannotAccessScanResults_NoInteractAcrossUsersFullPermission ( ) throws java.lang.Exception { boolean output = true ; mThrowSecurityException = false ; mUid = com.android.server.wifi.util.WifiPermissionsUtilTest.MANAGED_PROFILE_UID ; mPermissionsList.put ( mMacAddressPermission , mUid ) ; mWifiScanAllowApps = android.app.AppOpsManager.MODE_ALLOWED ; setupTestCase ( ) ; com.android.server.wifi.util.WifiPermissionsUtil codeUnderTest = new com.android.server.wifi.util.WifiPermissionsUtil ( mMockPermissionsWrapper , mMockContext , mMockWifiSettingsStore , mMockUserManager , mNetworkScorerAppManager ) ; try { output = codeUnderTest.canAccessScanResults ( com.android.server.wifi.util.WifiPermissionsUtilTest.TEST_PACKAGE_NAME , mUid , mTargetVersion ) ; } catch ( java.lang.SecurityException e ) { throw e ; } org.junit.Assert.assertEquals ( output , false ) ; }
Source:
private boolean isPackageInstalled ( java.lang.String pkgName ) { android.content.pm.PackageManager pm = mContext.getPackageManager ( ) ; try { pm.getPackageInfo ( pkgName , PackageManager.GET_ACTIVITIES ) ; if ( com.android.internal.telephony.uicc.UiccCard.DBG ) log ( ( pkgName + " is installed." ) ) ; return true ; } catch ( android.content.pm.PackageManager e ) { if ( com.android.internal.telephony.uicc.UiccCard.DBG ) log ( ( pkgName + " is not installed." ) ) ; return false ; } }

Target:
public void dump ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { pw.println ( "UiccCard:" ) ; pw.println ( ( " mCi=" + ( mCi ) ) ) ; pw.println ( ( " mCardState=" + ( mCardState ) ) ) ; pw.println ( ) ; if ( ( mUiccProfile ) != null ) { mUiccProfile.dump ( fd , pw , args ) ; } }
Source:
private static void initCharFromDirProps ( ) { final android.icu.util.VersionInfo ucd401 = android.icu.util.VersionInfo.getInstance ( 4 , 0 , 1 , 0 ) ; android.icu.util.VersionInfo ucdVersion = android.icu.util.VersionInfo.getInstance ( 0 , 0 , 0 , 0 ) ; if ( ( ucdVersion.getMajor ( ) ) > 0 ) { return ; } ucdVersion = android.icu.lang.UCharacter.getUnicodeVersion ( ) ; if ( ( ucdVersion.compareTo ( ucd401 ) ) >= 0 ) { android.icu.dev.test.bidi.BidiTest.charFromDirProp [ TestData.ES ] = 43 ; } }

Target:
private static void initCharFromDirProps ( ) { final android.icu.util.VersionInfo ucd401 = android.icu.util.VersionInfo.getInstance ( 4 , 0 , 1 , 0 ) ; android.icu.util.VersionInfo ucdVersion = android.icu.util.VersionInfo.getInstance ( 0 , 0 , 0 , 0 ) ; if ( ( ucdVersion.getMajor ( ) ) > 0 ) { return ; } ucdVersion = android.icu.lang.UCharacter.getUnicodeVersion ( ) ; if ( ( ucdVersion.compareTo ( ucd401 ) ) >= 0 ) { android.icu.dev.test.bidi.BidiFmwk.charFromDirProp [ TestData.ES ] = 43 ; } }
Source:
private static java.lang.String getVersion ( ) throws java.io.IOException { java.lang.String version = "Unknown (no ressource file)" ; java.io.InputStream is = com.android.jill.Main.class . getClassLoader ( ) . getResourceAsStream ( "jill.properties" ) ; if ( is != null ) { java.util.Properties prop = new java.util.Properties ( ) ; prop.load ( is ) ; version = prop.getProperty ( "jill.version" , "Unknown (no jill.version entry)" ) ; } return version ; }

Target:
private static java.lang.String getVersion ( ) throws java.io.IOException { java.lang.String version = "Unknown (no ressource file)" ; java.io.InputStream is = com.android.jill.Main.class . getClassLoader ( ) . getResourceAsStream ( "jill.properties" ) ; if ( is != null ) { java.util.Properties prop = new java.util.Properties ( ) ; prop.load ( is ) ; version = prop.getProperty ( "jill.version" , "Unknown (no jill.version entry)" ) ; java.lang.String codeBase = prop.getProperty ( "jill.version.codebase" ) ; if ( codeBase != null ) { version += ( " (" + codeBase ) + ")" ; } } return version ; }