auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.util.Map < java.lang.String , java.io.File > getDynamicConfigFiles ( ) { java.util.Map < java.lang.String , java.io.File > configMap = new java.util.HashMap < > ( ) ; for ( java.lang.String key : mBuildInfo.getBuildAttributes ( ) . keySet ( ) ) { if ( key.startsWith ( DynamicConfigHostSide.CONFIG_PATH_PREFIX ) ) { configMap.put ( key.substring ( DynamicConfigHostSide.CONFIG_PATH_PREFIX.length ( ) ) , new java.io.File ( mBuildInfo.getBuildAttributes ( ) . get ( key ) ) ) ; } } return configMap ; }

Target:
public java.util.Map < java.lang.String , java.io.File > getDynamicConfigFiles ( ) { java.util.Map < java.lang.String , java.io.File > configMap = new java.util.HashMap < > ( ) ; for ( java.lang.String key : mBuildInfo.getBuildAttributes ( ) . keySet ( ) ) { if ( key.startsWith ( com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper.CONFIG_PATH_PREFIX ) ) { configMap.put ( key.substring ( com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper.CONFIG_PATH_PREFIX.length ( ) ) , new java.io.File ( mBuildInfo.getBuildAttributes ( ) . get ( key ) ) ) ; } } return configMap ; }
Source:
public boolean isVisibleOrBehindKeyguardLw ( ) { final com.android.server.WindowManagerService.AppWindowToken atoken = mAppToken ; return ( ( ( ( ( mSurface ) != null ) && ( ! ( mAttachedHidden ) ) ) && ( atoken == null ? mPolicyVisibility : ! ( atoken.hiddenRequested ) ) ) && ( ! ( mExiting ) ) ) && ( ! ( mDestroying ) ) ; }

Target:
public boolean isVisibleOrBehindKeyguardLw ( ) { final com.android.server.WindowManagerService.AppWindowToken atoken = mAppToken ; return ( ( ( ( ( ( mSurface ) != null ) && ( ! ( mAttachedHidden ) ) ) && ( atoken == null ? mPolicyVisibility : ! ( atoken.hiddenRequested ) ) ) && ( ( mOrientationChanging ) || ( ( ! ( mDrawPending ) ) && ( ! ( mCommitDrawPending ) ) ) ) ) && ( ! ( mExiting ) ) ) && ( ! ( mDestroying ) ) ; }
Source:
private void onConnectStateChanged ( byte [ ] address , int state , int error , int localRole , int remoteRole ) { if ( com.android.bluetooth.pan.PanService.DBG ) { log ( ( ( ( ( ( "onConnectStateChanged: " + state ) + ", local role:" ) + localRole ) + ", remoteRole: " ) + remoteRole ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.pan.PanService.MESSAGE_CONNECT_STATE_CHANGED ) ; msg.obj = new com.android.bluetooth.pan.PanService.ConnectState ( address , state , error , localRole , remoteRole ) ; mHandler.sendMessage ( msg ) ; }

Target:
private void onConnectStateChanged ( byte [ ] address , int state , int error , int localRole , int remoteRole ) { if ( com.android.bluetooth.pan.PanService.DBG ) { android.util.Log.d ( com.android.bluetooth.pan.PanService.TAG , ( ( ( ( ( "onConnectStateChanged: " + state ) + ", local role:" ) + localRole ) + ", remoteRole: " ) + remoteRole ) ) ; } android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.pan.PanService.MESSAGE_CONNECT_STATE_CHANGED ) ; msg.obj = new com.android.bluetooth.pan.PanService.ConnectState ( address , state , error , localRole , remoteRole ) ; mHandler.sendMessage ( msg ) ; }
Source:
public com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor getBaseViewDescriptor ( ) { if ( ( mBaseViewDescriptor ) == null ) { for ( com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor desc : mViewDescriptors ) { if ( desc instanceof com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor viewDesc = ( ( com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) ( desc ) ) ; if ( AndroidConstants.CLASS_VIEW.equals ( viewDesc.getFullClassName ( ) ) ) { mBaseViewDescriptor = viewDesc ; break ; } } } } return mBaseViewDescriptor ; }

Target:
public com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor getBaseViewDescriptor ( ) { if ( ( mBaseViewDescriptor ) == null ) { for ( com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor desc : mViewDescriptors ) { if ( desc instanceof com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) { com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor viewDesc = ( ( com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor ) ( desc ) ) ; if ( SdkConstants.CLASS_VIEW.equals ( viewDesc.getFullClassName ( ) ) ) { mBaseViewDescriptor = viewDesc ; break ; } } } } return mBaseViewDescriptor ; }
Source:
public void testResultReportingFastTests ( ) throws java.lang.Exception { mReporter.invocationStarted ( mBuildInfo ) ; mReporter.testRunStarted ( com.android.compatibility.common.tradefed.result.MetadataReporterTest.ID , 3 ) ; runFastTests ( ) ; java.util.Collection < com.android.compatibility.common.tradefed.result.MetadataReporter.TestMetadata > metadata = mReporter.getTestMetadata ( ) ; assertTrue ( metadata.isEmpty ( ) ) ; mReporter.testRunEnded ( 10 , new java.util.HashMap < java.lang.String , java.lang.String > ( ) ) ; mReporter.invocationEnded ( 10 ) ; }

Target:
public void testResultReportingFastTests ( ) throws java.lang.Exception { mReporter.invocationStarted ( mBuildInfo ) ; mReporter.testRunStarted ( com.android.compatibility.common.tradefed.result.MetadataReporterTest.ID , 3 ) ; runTests ( 0L ) ; java.util.Collection < com.android.compatibility.common.tradefed.result.MetadataReporter.TestMetadata > metadata = mReporter.getTestMetadata ( ) ; assertTrue ( metadata.isEmpty ( ) ) ; mReporter.testRunEnded ( 10 , new java.util.HashMap < java.lang.String , java.lang.String > ( ) ) ; mReporter.invocationEnded ( 10 ) ; }
Source:
public void destroyAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , long ceDataInode ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.destroyAppData ( uuid , packageName , userId , flags , ceDataInode ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void clearAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , long ceDataInode ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.clearAppData ( uuid , packageName , userId , flags , ceDataInode ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FQDN ; config.homeSp.friendlyName = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FRIENDLY_NAME ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.realm = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_REALM ; config.credential.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; config.credential.simCredential.imsi = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ; config.credential.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( new com.android.server.wifi.IMSIParameter ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ) ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addProvider ( config ) ) ; }

Target:
public void addProviderWithValidSimCredentialWithInvalidIMSI ( ) throws java.lang.Exception { android.net.wifi.hotspot2.PasspointConfiguration config = new android.net.wifi.hotspot2.PasspointConfiguration ( ) ; config.homeSp = new android.net.wifi.hotspot2.pps.HomeSP ( ) ; config.homeSp.fqdn = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FQDN ; config.homeSp.friendlyName = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_FRIENDLY_NAME ; config.credential = new android.net.wifi.hotspot2.pps.Credential ( ) ; config.credential.realm = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_REALM ; config.credential.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; config.credential.simCredential.imsi = com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ; config.credential.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; org.mockito.Mockito.when ( mSimAccessor.getMatchingImsis ( new com.android.server.wifi.IMSIParameter ( com.android.server.wifi.hotspot2.PasspointManagerTest.TEST_IMSI ) ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( mManager.addOrUpdateProvider ( config ) ) ; }
Source:
private boolean isViewDescendantOf ( android.view.View child , android.view.View parent ) { if ( child == parent ) { return true ; } final android.view.ViewParent theParent = child.getParent ( ) ; return ( theParent instanceof android.view.ViewGroup ) && ( isViewDescendantOf ( ( ( android.view.View ) ( theParent ) ) , parent ) ) ; }

Target:
private static boolean isViewDescendantOf ( android.view.View child , android.view.View parent ) { if ( child == parent ) { return true ; } final android.view.ViewParent theParent = child.getParent ( ) ; return ( theParent instanceof android.view.ViewGroup ) && ( android.widget.ScrollView.isViewDescendantOf ( ( ( android.view.View ) ( theParent ) ) , parent ) ) ; }
Source:
public void testGetNewCall ( ) throws java.lang.Exception { assertEquals ( "setSupportProgressBarVisibility" , com.android.tools.lint.checks.AppCompatCallDetector.getNewCall ( "Should use setSupportProgressBarVisibility instead of setProgressBarVisibility name" ) ) ; assertEquals ( "getSupportActionBar" , com.android.tools.lint.checks.AppCompatCallDetector.getNewCall ( "Should use getSupportActionBar instead of getActionBar name" ) ) ; assertNull ( com.android.tools.lint.checks.AppCompatCallDetector.getNewCall ( "No match" ) ) ; }

Target:
public void testGetOldCall ( ) throws java.lang.Exception { assertEquals ( "setProgressBarVisibility" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use setSupportProgressBarVisibility instead of setProgressBarVisibility name" , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertEquals ( "getActionBar" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use getSupportActionBar instead of getActionBar name" , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertNull ( com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "No match" , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertEquals ( "setProgressBarVisibility" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use `setSupportProgressBarVisibility` instead of `setProgressBarVisibility` name" , com.android.tools.lint.detector.api.TextFormat.RAW ) ) ; }
Source:
public void computeScroll ( ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { computeScroll ( ) ; } } ) ; return ; } mAwContents.computeScroll ( ) ; }

Target:
public void setBackgroundColor ( final int color ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { org.chromium.base.ThreadUtils.postOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setBackgroundColor ( color ) ; } } ) ; return ; } mAwContents.setBackgroundColor ( color ) ; }
Source:
private static java.lang.String getDownloadsDirectory ( ) { android.os.StrictMode.ThreadPolicy oldPolicy = android.os.StrictMode.allowThreadDiskReads ( ) ; java.lang.String downloadsPath ; try { long time = android.os.SystemClock.elapsedRealtime ( ) ; downloadsPath = android.os.Environment.getExternalStoragePublicDirectory ( Environment.DIRECTORY_DOWNLOADS ) . getPath ( ) ; org.chromium.base.metrics.RecordHistogram.recordTimesHistogram ( "Android.StrictMode.DownloadsDir" , ( ( android.os.SystemClock.elapsedRealtime ( ) ) - time ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } finally { android.os.StrictMode.setThreadPolicy ( oldPolicy ) ; } return downloadsPath ; }

Target:
private static java.lang.String getDownloadsDirectory ( android.content.Context appContext ) { android.os.StrictMode.ThreadPolicy oldPolicy = android.os.StrictMode.allowThreadDiskReads ( ) ; java.lang.String downloadsPath ; try { long time = android.os.SystemClock.elapsedRealtime ( ) ; downloadsPath = android.os.Environment.getExternalStoragePublicDirectory ( Environment.DIRECTORY_DOWNLOADS ) . getPath ( ) ; org.chromium.base.metrics.RecordHistogram.recordTimesHistogram ( "Android.StrictMode.DownloadsDir" , ( ( android.os.SystemClock.elapsedRealtime ( ) ) - time ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } finally { android.os.StrictMode.setThreadPolicy ( oldPolicy ) ; } return downloadsPath ; }
Source:
public static boolean deleteFolder ( final java.io.File folder ) { if ( ! ( folder.exists ( ) ) ) { return true ; } java.io.File [ ] files = folder.listFiles ( ) ; if ( files != null ) { for ( final java.io.File file : files ) { if ( file.isDirectory ( ) ) { com.android.utils.FileUtils.deleteFolder ( file ) ; } else { file.delete ( ) ; } } } return folder.delete ( ) ; }

Target:
public static void deleteFolder ( final java.io.File folder ) throws java.io.IOException { if ( ! ( folder.exists ( ) ) ) { return ; } java.io.File [ ] files = folder.listFiles ( ) ; if ( files != null ) { for ( final java.io.File file : files ) { com.android.utils.FileUtils.deleteFolder ( file ) ; } } if ( ! ( folder.delete ( ) ) ) { throw new java.io.IOException ( java.lang.String.format ( "Could not delete folder %s" , folder ) ) ; } }
Source:
private void checkReceiver ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Element element ) { if ( ( getExported ( element ) ) && ( isUnprotectedByPermission ( element ) ) ) { context.report ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_RECEIVER , element , context.getLocation ( element ) , "Exported receiver does not require permission" , null ) ; } }

Target:
private void checkReceiver ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Element element ) { if ( ( ( getExported ( element ) ) && ( isUnprotectedByPermission ( element ) ) ) && ( ! ( isStandardReceiver ( element ) ) ) ) { context.report ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_RECEIVER , element , context.getLocation ( element ) , "Exported receiver does not require permission" , null ) ; } }
Source:
java.lang.String validateInstrumentationRunner ( java.lang.String instrumentation ) { if ( ! ( mHasRunnerLibrary ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_NoTestLibMsg_s , AndroidConstants.LIBRARY_TEST_RUNNER ) ; } if ( ! ( instrumentation.equals ( SdkConstants.CLASS_INSTRUMENTATION_RUNNER ) ) ) { java.lang.String result = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.testClassForManifest ( mJavaProject , instrumentation , SdkConstants.CLASS_INSTRUMENTATION_RUNNER , true ) ; if ( result != ( com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.TEST_CLASS_OK ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_WrongRunnerTypeMsg_s , SdkConstants.CLASS_INSTRUMENTATION_RUNNER ) ; } } return com.android.ide.eclipse.adt.internal.launch.junit.InstrumentationRunnerValidator.INSTRUMENTATION_OK ; }

Target:
java.lang.String validateInstrumentationRunner ( java.lang.String instrumentation ) { if ( ! ( mHasRunnerLibrary ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_NoTestLibMsg_s , AdtConstants.LIBRARY_TEST_RUNNER ) ; } if ( ! ( instrumentation.equals ( SdkConstants.CLASS_INSTRUMENTATION_RUNNER ) ) ) { java.lang.String result = com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.testClassForManifest ( mJavaProject , instrumentation , SdkConstants.CLASS_INSTRUMENTATION_RUNNER , true ) ; if ( result != ( com.android.ide.eclipse.adt.internal.project.BaseProjectHelper.TEST_CLASS_OK ) ) { return java.lang.String.format ( LaunchMessages.InstrValidator_WrongRunnerTypeMsg_s , SdkConstants.CLASS_INSTRUMENTATION_RUNNER ) ; } } return com.android.ide.eclipse.adt.internal.launch.junit.InstrumentationRunnerValidator.INSTRUMENTATION_OK ; }
Source:
public void testWithExistingUserDirectories ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.DIR_ADDED.mkdirs ( ) ; org.conscrypt.TrustedCertificateStoreTest.DIR_DELETED.mkdirs ( ) ; org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; }

Target:
public void testWithExistingUserDirectories ( ) throws java.lang.Exception { dirAdded.mkdirs ( ) ; dirDeleted.mkdirs ( ) ; install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; }
Source:
public void cleanCodeCache ( dexfuzz.executors.Architecture architecture , java.lang.String testLocation , java.lang.String programName ) { java.lang.String command = ( "rm -f " + ( getCacheLocation ( architecture ) ) ) + ( getOatFileName ( testLocation , programName ) ) ; executeCommand ( command , false ) ; }

Target:
public void cleanCodeCache ( dexfuzz.executors.Architecture architecture , java.lang.String testLocation , java.lang.String programName ) { java.lang.String command = ( ( ( getExecutionPrefixWithAdb ( "shell" ) ) + "rm -f " ) + ( getCacheLocation ( architecture ) ) ) + ( getOatFileName ( testLocation , programName ) ) ; executeCommand ( command , false ) ; }
Source:
public java.util.Map < java.lang.String , java.io.File > getDynamicConfigFiles ( ) { java.util.Map < java.lang.String , java.io.File > configMap = new java.util.HashMap < > ( ) ; for ( com.android.tradefed.build.VersionedFile vFile : mBuildInfo.getFiles ( ) ) { if ( vFile.getVersion ( ) . startsWith ( com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper.CONFIG_PATH_PREFIX ) ) { configMap.put ( vFile.getVersion ( ) . substring ( com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper.CONFIG_PATH_PREFIX.length ( ) ) , vFile.getFile ( ) ) ; } } return configMap ; }

Target:
public java.util.Map < java.lang.String , java.io.File > getDynamicConfigFiles ( ) { java.util.Map < java.lang.String , java.io.File > configMap = new java.util.HashMap < > ( ) ; for ( java.lang.String key : mBuildInfo.getBuildAttributes ( ) . keySet ( ) ) { if ( key.startsWith ( DynamicConfigHostSide.CONFIG_PATH_PREFIX ) ) { configMap.put ( key.substring ( DynamicConfigHostSide.CONFIG_PATH_PREFIX.length ( ) ) , new java.io.File ( mBuildInfo.getBuildAttributes ( ) . get ( key ) ) ) ; } } return configMap ; }
Source:
private void stopDataStallAlarm ( ) { android.app.AlarmManager am = ( ( android.app.AlarmManager ) ( mPhone.getContext ( ) . getSystemService ( Context.ALARM_SERVICE ) ) ) ; if ( VDBG ) { log ( ( ( ( "stopDataStallAlarm: current tag=" + ( mDataStallAlarmTag ) ) + " mDataStallAlarmIntent=" ) + ( mDataStallAlarmIntent ) ) ) ; } mDataStallAlarmTag += 1 ; if ( ( mDataStallAlarmIntent ) != null ) { am.cancel ( mDataStallAlarmIntent ) ; mDataStallAlarmIntent = null ; } }

Target:
protected void onVoiceCallEnded ( ) { if ( DBG ) log ( "onVoiceCallEnded" ) ; if ( isConnected ( ) ) { if ( ! ( mPhone.getServiceStateTracker ( ) . isConcurrentVoiceAndDataAllowed ( ) ) ) { startNetStatPoll ( ) ; startDataStallAlarm ( com.android.internal.telephony.gsm.GsmDataConnectionTracker.DATA_STALL_NOT_SUSPECTED ) ; notifyDataConnection ( Phone.REASON_VOICE_CALL_ENDED ) ; } else { resetPollStats ( ) ; } } setupDataOnReadyApns ( Phone.REASON_VOICE_CALL_ENDED ) ; }
Source:
public void testE4 ( ) { dot.junit.opcodes.aput_object.d.T_aput_object_4 t = new dot.junit.opcodes.aput_object.d.T_aput_object_4 ( ) ; java.lang.String [ ] arr = new java.lang.String [ 2 ] ; try { t.run ( arr , 0 , t ) ; fail ( "expected ArrayStoreException" ) ; } catch ( java.lang.ArrayStoreException aie ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aput_object.d.T_aput_object_1" , java.lang.ArrayIndexOutOfBoundsException.class , new java.lang.String [ 2 ] , ( - 1 ) , "abc" ) ; }
Source:
protected void onPrintJobQueued ( android.printservice.PrintJob printJob ) { if ( com.android.bips.BuiltInPrintService.DEBUG ) android.util.Log.d ( com.android.bips.BuiltInPrintService.TAG , "onPrintJobQueued" ) ; if ( com.android.bips.util.WifiMonitor.isConnected ( this ) ) { mJobQueue.print ( new com.android.bips.LocalPrintJob ( this , mBackend , printJob ) ) ; } else { printJob.fail ( getString ( R.string.wifi_not_connected ) ) ; } }

Target:
public void onDestroy ( ) { if ( com.android.bips.BuiltInPrintService.DEBUG ) android.util.Log.d ( com.android.bips.BuiltInPrintService.TAG , "onDestroy()" ) ; mCapabilitiesCache.close ( ) ; mP2pMonitor.stopAll ( ) ; mBackend.close ( ) ; unlockWifi ( ) ; com.android.bips.BuiltInPrintService.sInstance = null ; mMainHandler.removeCallbacksAndMessages ( null ) ; super . onDestroy ( ) ; }
Source:
private static void generateTestManifest ( @ com.android.annotations.NonNull java.lang.String testPackageName , @ com.android.annotations.Nullable java.lang.String minSdkVersion , @ com.android.annotations.Nullable java.lang.String targetSdkVersion , @ com.android.annotations.NonNull java.lang.String testedPackageName , @ com.android.annotations.NonNull java.lang.String instrumentationRunner , @ com.android.annotations.NonNull java.lang.Boolean handleProfiling , @ com.android.annotations.NonNull java.lang.Boolean functionalTest , @ com.android.annotations.NonNull java.io.File outManifestLocation ) { com.android.builder.internal.TestManifestGenerator generator = new com.android.builder.internal.TestManifestGenerator ( outManifestLocation , testPackageName , minSdkVersion , targetSdkVersion , testedPackageName , instrumentationRunner , handleProfiling , functionalTest ) ; try { generator.generate ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
private static void generateTestManifest ( @ com.android.annotations.NonNull java.lang.String testApplicationId , @ com.android.annotations.Nullable java.lang.String minSdkVersion , @ com.android.annotations.Nullable java.lang.String targetSdkVersion , @ com.android.annotations.NonNull java.lang.String testedApplicationId , @ com.android.annotations.NonNull java.lang.String instrumentationRunner , @ com.android.annotations.NonNull java.lang.Boolean handleProfiling , @ com.android.annotations.NonNull java.lang.Boolean functionalTest , @ com.android.annotations.NonNull java.io.File outManifestLocation ) { com.android.builder.internal.TestManifestGenerator generator = new com.android.builder.internal.TestManifestGenerator ( outManifestLocation , testApplicationId , minSdkVersion , targetSdkVersion , testedApplicationId , instrumentationRunner , handleProfiling , functionalTest ) ; try { generator.generate ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public static void computeAcosh ( android.renderscript.cts.TestAcosh.ArgumentsFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 4 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.log ( ( x + ( java.lang.StrictMath.sqrt ( ( ( x * x ) - 1.0 ) ) ) ) ) ) ) ; }

Target:
public static void computeCospi ( android.renderscript.cts.TestCospi.ArgumentsFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.cos ( ( ( args.in ) * ( ( float ) ( java.lang.Math.PI ) ) ) ) , 4 , 128 ) ; }
Source:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) { assert ! ( isClosed ( ) ) ; return new com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir ( this , parent , name ) ; }

Target:
synchronized com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir createVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.CannotCreateFileException { assert ! ( isClosed ( ) ) ; try { return getVDir ( parent , name ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir dir = new com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir ( this , parent , name ) ; parent.putInCache ( name , dir ) ; return dir ; } catch ( com.android.sched.util.file.NotDirectoryException e ) { throw new com.android.sched.util.file.CannotCreateFileException ( getVDirLocation ( parent , name ) ) ; } }
Source:
private static com.android.jack.ir.ast.JMethodCall makeMethodCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodId methodId = targetMethod.getMethodId ( ) ; assert ( ( methodId.getKind ( ) ) == ( com.android.jack.ir.ast.MethodKind.STATIC ) ) || ( instance != null ) ; com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , methodId , targetMethod.getType ( ) , methodId.canBeVirtual ( ) ) ; return call ; }

Target:
private static com.android.jack.ir.ast.JMethodCall makeMethodCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodIdWide methodId = targetMethod.getMethodIdWide ( ) ; assert ( ( methodId.getKind ( ) ) == ( com.android.jack.ir.ast.MethodKind.STATIC ) ) || ( instance != null ) ; com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , methodId , targetMethod.getType ( ) , methodId.canBeVirtual ( ) ) ; return call ; }
Source:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 12 ; float floor = ( ( float ) ( java.lang.StrictMath.floor ( args.inV ) ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.min ( ( ( args.inV ) - floor ) , 0.99999994F ) ) ) ; }

Target:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloat args ) { float floor = android.renderscript.cts.CoreMathVerifier.floor ( args.inV ) ; args.out = new android.renderscript.cts.Floaty ( java.lang.Math.min ( ( ( args.inV ) - floor ) , 0.99999994F ) , 0 , 1 ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.System.out.println ( "access test" ) ; otherpackage.PublicAccess pa = new otherpackage.PublicAccess ( ) ; pa.main ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { java.lang.System.out.println ( "access test" ) ; otherpackage.PublicAccess pa = new otherpackage.PublicAccess ( ) ; pa.main ( ) ; java.lang.System.out.println ( Iface.X ) ; java.lang.System.out.println ( Iface2.Y ) ; java.lang.System.out.println ( Iface2.A ) ; java.lang.System.out.println ( Iface2.B ) ; }
Source:
public void addMatrix ( android.support.v8.renderscript.Matrix4f v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addMatrix ( new android.support.v8.renderscript.Matrix4f ( v.getArray ( ) ) ) ; return ; } for ( int i = 0 ; i < ( v.mMat.length ) ; i ++ ) { addF32 ( v.mMat [ i ] ) ; } }

Target:
public void addMatrix ( android.support.v8.renderscript.Matrix2f v ) { if ( android.support.v8.renderscript.RenderScript.shouldThunk ( ) ) { mN.addMatrix ( v ) ; return ; } for ( int i = 0 ; i < ( v.mMat.length ) ; i ++ ) { addF32 ( v.mMat [ i ] ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; initTestFiles ( ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( TestNotificationService.ACTION_OPERATION_RESULT ) ; context.registerReceiver ( mReceiver , filter ) ; context.sendBroadcast ( new android.content.Intent ( com.android.documentsui.services.TestNotificationService.ACTION_CHANGE_CANCEL_MODE ) ) ; mOperationExecuted = false ; mErrorReason = "No response from Notification" ; mCountDownLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putLong ( com.android.documentsui.StubProvider.EXTRA_SIZE , 500L ) ; mDocsHelper.configure ( null , bundle ) ; initTestFiles ( ) ; android.content.IntentFilter filter = new android.content.IntentFilter ( ) ; filter.addAction ( TestNotificationService.ACTION_OPERATION_RESULT ) ; context.registerReceiver ( mReceiver , filter ) ; context.sendBroadcast ( new android.content.Intent ( com.android.documentsui.services.TestNotificationService.ACTION_CHANGE_CANCEL_MODE ) ) ; mOperationExecuted = false ; mErrorReason = "No response from Notification" ; mCountDownLatch = new java.util.concurrent.CountDownLatch ( 1 ) ; }
Source:
private com.android.ide.eclipse.gltrace.state.IGLProperty getTextureImageProperty ( com.android.ide.eclipse.gltrace.state.IGLProperty state ) { if ( ( state.getType ( ) ) == ( com.android.ide.eclipse.gltrace.state.GLStateType.TEXTURE_IMAGE ) ) { return state ; } if ( ( state.getType ( ) ) != ( com.android.ide.eclipse.gltrace.state.GLStateType.PER_TEXTURE_LEVEL_STATE ) ) { state = state.getParent ( ) ; } if ( ( state != null ) && ( ( state.getType ( ) ) == ( com.android.ide.eclipse.gltrace.state.GLStateType.PER_TEXTURE_LEVEL_STATE ) ) ) { return ( ( com.android.ide.eclipse.gltrace.state.GLCompositeProperty ) ( state ) ) . getProperty ( GLStateType.TEXTURE_IMAGE ) ; } return null ; }

Target:
private com.android.ide.eclipse.gltrace.state.IGLProperty getTextureImageProperty ( com.android.ide.eclipse.gltrace.state.IGLProperty state ) { if ( ( state.getType ( ) ) == ( com.android.ide.eclipse.gltrace.state.GLStateType.TEXTURE_IMAGE ) ) { return state ; } com.android.ide.eclipse.gltrace.state.IGLProperty img = getImageFromPerTextureLevelState ( state ) ; if ( img != null ) { return img ; } return getFirstMipmapImage ( state ) ; }
Source:
private void putCharsets ( java.util.Map < java.nio.charset.Charset , java.lang.String > map ) { int num = com.ibm.icu.charset.UConverterAlias.countAvailable ( ) ; for ( int i = 0 ; i < num ; i ++ ) { java.lang.String name = com.ibm.icu.charset.UConverterAlias.getAvailableName ( i ) ; try { java.nio.charset.Charset cs = getCharset ( name ) ; map.put ( cs , com.ibm.icu.charset.CharsetProviderICU.getJavaCanonicalName ( name ) ) ; } catch ( java.nio.charset.UnsupportedCharsetException ex ) { } catch ( java.io.IOException e ) { } } }

Target:
public static final java.lang.String [ ] getAvailableNames ( ) { com.ibm.icu.charset.CharsetProviderICU.loadAvailableICUCharsets ( ) ; java.lang.String [ ] names = new java.lang.String [ com.ibm.icu.charset.CharsetProviderICU.icuCharsets.size ( ) ] ; int i = 0 ; for ( java.nio.charset.Charset cs : com.ibm.icu.charset.CharsetProviderICU.icuCharsets ) { names [ ( i ++ ) ] = cs.name ( ) ; } return names ; }
Source:
public void startVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) { for ( com.android.jack.ir.ast.JMethod sameEnclosingTypeMethod : type.getMethods ( ) ) { com.android.jack.ir.ast.JMethodIdWide id = sameEnclosingTypeMethod.getMethodId ( ) . getMethodIdWide ( ) ; if ( ( ! ( id.canBeVirtual ( ) ) ) && ( ! ( com.android.jack.shrob.obfuscation.Renamer.mustBeRenamed ( id ) ) ) ) { if ( com.android.jack.shrob.obfuscation.Renamer.getKey ( id ) . equals ( methodKey ) ) { hasFoundMethodId = true ; return ; } } } visit ( type ) ; visitSuperTypes ( type ) ; visitSubTypes ( type ) ; }

Target:
public void startVisit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) { for ( com.android.jack.ir.ast.JMethod sameEnclosingTypeMethod : type.getMethods ( ) ) { com.android.jack.ir.ast.JMethodIdWide id = sameEnclosingTypeMethod.getMethodId ( ) . getMethodIdWide ( ) ; if ( ( ! ( id.canBeVirtual ( ) ) ) && ( ! ( com.android.jack.shrob.obfuscation.Renamer.mustBeRenamed ( id ) ) ) ) { if ( com.android.jack.shrob.obfuscation.key.Key.getKey ( id ) . equals ( methodKey ) ) { hasFoundMethodId = true ; return ; } } } visit ( type ) ; visitSuperTypes ( type ) ; visitSubTypes ( type ) ; }
Source:
public void setZoom ( int value ) { synchronized ( this ) { if ( ( grid ) != null ) { grid.dispose ( ) ; grid = null ; zoom = value ; } } redraw ( ) ; }

Target:
public void mouseScrolled ( org.eclipse.swt.events.MouseEvent e ) { int newZoom = - 1 ; synchronized ( this ) { if ( ( ( image ) != null ) && ( ( crosshairLocation ) != null ) ) { if ( ( e.count ) > 0 ) { newZoom = ( zoom ) + 1 ; } else { newZoom = ( zoom ) - 1 ; } } } if ( newZoom != ( - 1 ) ) { model.setZoom ( newZoom ) ; } }
Source:
private boolean isSessionDiscoverable ( com.android.server.media.MediaSessionRecord record ) { return record.isActive ( ) ; }

Target:
private boolean isCurrentVolumeController ( int uid ) { if ( ( mAudioManagerInternal ) != null ) { final int vcuid = mAudioManagerInternal.getVolumeControllerUid ( ) ; if ( ( vcuid > 0 ) && ( uid == vcuid ) ) { return true ; } } return false ; }
Source:
public byte [ ] addCustomExtension ( int ext_type ) { return null ; }

Target:
public void afterHandshake ( long session , long ssl , long context , java.net.Socket socket , java.io.FileDescriptor fd , org.conscrypt.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { org.conscrypt.NativeCryptoTest.assertEqualByteArrays ( OCSP_TEST_DATA , org.conscrypt.NativeCrypto.SSL_get_ocsp_response ( ssl ) ) ; super . afterHandshake ( session , ssl , context , socket , fd , callback ) ; }
Source:
public void test_handshake_failsWithMissingSCT ( ) throws java.lang.Exception { org.conscrypt.OpenSSLSocketImplTest.TestConnection connection = new org.conscrypt.OpenSSLSocketImplTest.TestConnection ( new java.security.cert.X509Certificate [ ] { cert , ca } , certKey , true ) ; connection.clientHooks.ctVerificationEnabled = true ; try { connection.doHandshake ( ) ; fail ( "SSLHandshakeException not thrown" ) ; } catch ( java.util.concurrent.ExecutionException e ) { assertEquals ( javax.net.ssl.SSLHandshakeException.class , e.getCause ( ) . getClass ( ) ) ; assertEquals ( java.security.cert.CertificateException.class , e.getCause ( ) . getCause ( ) . getClass ( ) ) ; } }

Target:
private < T > T getOrThrowCause ( java.util.concurrent.Future < T > future , long timeout , java.util.concurrent.TimeUnit timeUnit ) throws java.lang.Exception { try { return future.get ( timeout , timeUnit ) ; } catch ( java.util.concurrent.ExecutionException e ) { if ( ( e.getCause ( ) ) instanceof java.lang.Exception ) { throw ( ( java.lang.Exception ) ( e.getCause ( ) ) ) ; } else { throw e ; } } }
Source:
private void grow ( int minCapacity ) { int oldCapacity = buf.length ; int newCapacity = oldCapacity << 1 ; if ( ( newCapacity - minCapacity ) < 0 ) newCapacity = minCapacity ; if ( newCapacity < 0 ) { if ( minCapacity < 0 ) throw new java.lang.OutOfMemoryError ( ) ; newCapacity = java.lang.Integer.MAX_VALUE ; } buf = java.util.Arrays.copyOf ( buf , newCapacity ) ; }

Target:
private void grow ( int minCapacity ) { int oldCapacity = buf.length ; int newCapacity = oldCapacity << 1 ; if ( ( newCapacity - minCapacity ) < 0 ) newCapacity = minCapacity ; if ( ( newCapacity - ( java.io.ByteArrayOutputStream.MAX_ARRAY_SIZE ) ) > 0 ) newCapacity = java.io.ByteArrayOutputStream.hugeCapacity ( minCapacity ) ; buf = java.util.Arrays.copyOf ( buf , newCapacity ) ; }
Source:
public static void logError ( java.lang.String message ) { com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , AdtPlugin.PLUGIN_ID , message ) ; }

Target:
public static boolean isManifestClassAttribute ( @ com.android.annotations.NonNull org.w3c.dom.Attr attribute ) { java.lang.String name = attribute.getLocalName ( ) ; if ( name == null ) { return false ; } if ( ( ( ( ( name.equals ( com.android.SdkConstants.ATTR_NAME ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_TARGET_ACTIVITY ) ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_MANAGE_SPACE_ACTIVITY ) ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_BACKUP_AGENT ) ) ) || ( name.equals ( com.android.xml.AndroidManifest.ATTRIBUTE_PARENT_ACTIVITY_NAME ) ) ) { return com.android.SdkConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ; } return false ; }
Source:
public int syncGetSupportedFeatures ( com.android.internal.util.AsyncChannel channel ) { android.os.Message resultMsg = channel.sendMessageSynchronously ( com.android.server.wifi.WifiStateMachine.CMD_GET_SUPPORTED_FEATURES ) ; int supportedFeatureSet = resultMsg.arg1 ; resultMsg.recycle ( ) ; return supportedFeatureSet ; }

Target:
public int syncGetSupportedFeatures ( com.android.internal.util.AsyncChannel channel ) { android.os.Message resultMsg = channel.sendMessageSynchronously ( com.android.server.wifi.WifiStateMachine.CMD_GET_SUPPORTED_FEATURES ) ; int supportedFeatureSet = resultMsg.arg1 ; resultMsg.recycle ( ) ; boolean disableRtt = mPropertyService.getBoolean ( "config.disable_rtt" , false ) ; if ( disableRtt ) { supportedFeatureSet &= ~ ( ( android.net.wifi.WifiManager.WIFI_FEATURE_D2D_RTT ) | ( android.net.wifi.WifiManager.WIFI_FEATURE_D2AP_RTT ) ) ; } return supportedFeatureSet ; }
Source:
public void doF32_2_relaxed ( long seed , int ulp ) { baseTestHelper ( android.renderscript.cts.RSBaseCompute.TEST_RELAXED_F32_2 , android.renderscript.Element.F32_2 ( mRS ) , android.renderscript.Element.F32_2 ( mRS ) , seed , 1 , 0 , 1 , 0 , 2 , 2 , 2 , 0 , ulp ) ; }

Target:
public void doF32_2_relaxed ( long seed , int ulp ) { baseTestHelper ( android.renderscript.cts.RSBaseCompute.TEST_RELAXED_F32_2 , android.renderscript.Element.F32_2 ( mRS ) , android.renderscript.Element.F32_2 ( mRS ) , seed , 0.0F , 1.0F , 1 , 0 , 2 , 2 , 2 , 0 , ulp ) ; }
Source:
static int blowup ( char [ ] [ ] holder , int size ) { int i = 0 ; try { for ( ; i < size ; i ++ ) holder [ i ] = new char [ 128 ] ; } catch ( java.lang.OutOfMemoryError oome ) { return i ; } return size ; }

Target:
static void blowup ( char [ ] [ ] holder ) { try { for ( int i = 0 ; i < ( holder.length ) ; ++ i ) { holder [ i ] = new char [ 128 * 1024 ] ; } } catch ( java.lang.OutOfMemoryError oome ) { Main.ArrayMemEater.sawOome = true ; } }
Source:
public void addPages ( ) { mWelcomePage = new com.android.ide.eclipse.adt.internal.welcome.WelcomeWizardPage ( ) ; addPage ( mWelcomePage ) ; if ( ! ( mStore.isPingOptIn ( ) ) ) { mUsagePage = new com.android.ide.eclipse.adt.internal.welcome.UsagePermissionPage ( ) ; addPage ( mUsagePage ) ; } }

Target:
public void addPages ( ) { if ( mShowWelcomePage ) { mWelcomePage = new com.android.ide.eclipse.adt.internal.welcome.WelcomeWizardPage ( ) ; addPage ( mWelcomePage ) ; } if ( ( mShowUsagePage ) && ( ! ( mStore.hasPingId ( ) ) ) ) { mUsagePage = new com.android.ide.eclipse.adt.internal.welcome.UsagePermissionPage ( ) ; addPage ( mUsagePage ) ; } }
Source:
public void putAll ( java.util.Map < ? , ? > attrib ) { if ( ( attrib == null ) || ( ! ( attrib instanceof java.util.jar.Attributes ) ) ) { throw new java.lang.ClassCastException ( ( ( attrib.getClass ( ) . getName ( ) ) + " not an Attributes" ) ) ; } this . map.putAll ( attrib ) ; }

Target:
public void putAll ( java.util.Map < ? , ? > attrib ) { if ( attrib == null ) { throw new java.lang.NullPointerException ( "attrib == null" ) ; } if ( ! ( attrib instanceof java.util.jar.Attributes ) ) { throw new java.lang.ClassCastException ( ( ( attrib.getClass ( ) . getName ( ) ) + " not an Attributes" ) ) ; } this . map.putAll ( attrib ) ; }
Source:
protected void runTest ( ) throws java.lang.Throwable { try { super . runTest ( ) ; } catch ( java.lang.RuntimeException e ) { if ( e.getMessage ( ) . startsWith ( "Test requires build-tools 22" ) ) { com.android.builder.png.NinePatchAsyncAaptProcessTest.sLogger.warning ( ( ( "Skipped " + ( this . getName ( ) ) ) + " as it requires build tools 22." ) ) ; } else { throw e ; } } }

Target:
public static void tearDownAndCheck ( ) throws java.io.IOException , java.util.zip.DataFormatException { com.android.builder.png.NinePatchAaptProcessorTestUtils.tearDownAndCheck ( com.android.builder.png.NinePatchAsyncAaptProcessTest.mSourceAndCrunchedFiles , com.android.builder.png.NinePatchAsyncAaptProcessTest.getCruncher ( ) , com.android.builder.png.NinePatchAsyncAaptProcessTest.classStartTime ) ; com.android.builder.png.NinePatchAsyncAaptProcessTest.mSourceAndCrunchedFiles = null ; }
Source:
public static void v ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.VERBOSE ) { android.util.Log.v ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } }

Target:
public static void v ( java.lang.String prefix , java.lang.String format , java.lang.Object ... args ) { if ( android.telecom.Log.sIsUserExtendedLoggingEnabled ) { android.telecom.Log.maybeDisableLogging ( ) ; android.util.Slog.i ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } else if ( android.telecom.Log.VERBOSE ) { android.util.Slog.v ( android.telecom.Log.TAG , android.telecom.Log.buildMessage ( prefix , format , args ) ) ; } }
Source:
public com.android.tools.lint.detector.api.Location.Handle createLocationHandle ( final com.android.tools.lint.detector.api.XmlContext context , final org.w3c.dom.Node node ) { org.eclipse.wst.sse.core.internal.provisional.IStructuredModel model = ( ( org.eclipse.wst.sse.core.internal.provisional.IStructuredModel ) ( context.getProperty ( com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.MODEL_PROPERTY ) ) ) ; return new com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.LazyLocation ( context.file , model.getStructuredDocument ( ) , ( ( org.eclipse.wst.sse.core.internal.provisional.IndexedRegion ) ( node ) ) ) ; }

Target:
public com.android.tools.lint.detector.api.Location getLocation ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Node node ) { org.eclipse.wst.sse.core.internal.provisional.IStructuredModel model = ( ( org.eclipse.wst.sse.core.internal.provisional.IStructuredModel ) ( context.getProperty ( com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.MODEL_PROPERTY ) ) ) ; return new com.android.ide.eclipse.adt.internal.lint.EclipseLintClient.LazyLocation ( context.file , model.getStructuredDocument ( ) , ( ( org.eclipse.wst.sse.core.internal.provisional.IndexedRegion ) ( node ) ) ) ; }
Source:
public android.bluetooth.BluetoothDevice getClient ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getClient = " + ( mService.getRemoteDevice ( ) ) ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return null ; } return service.getRemoteDevice ( ) ; }

Target:
public void disconnect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "disconnect" ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return ; } service.disconnect ( device ) ; }
Source:
public void test_getLocalSocketAddress_late_bind ( ) throws java.lang.Exception { java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( ( ( java.net.SocketAddress ) ( null ) ) ) ; assertNull ( theSocket.getLocalSocketAddress ( ) ) ; int portNumber = tests.support.Support_PortManager.getNextPortForUDP ( ) ; java.net.InetSocketAddress localAddress = new java.net.InetSocketAddress ( java.net.InetAddress.getLocalHost ( ) , portNumber ) ; theSocket.bind ( localAddress ) ; assertEquals ( localAddress , theSocket.getLocalSocketAddress ( ) ) ; theSocket.close ( ) ; }

Target:
public void test_getLocalSocketAddress_late_bind ( ) throws java.lang.Exception { java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( ( ( java.net.SocketAddress ) ( null ) ) ) ; assertNull ( theSocket.getLocalSocketAddress ( ) ) ; java.net.InetSocketAddress localAddress = new java.net.InetSocketAddress ( java.net.InetAddress.getLocalHost ( ) , 0 ) ; theSocket.bind ( localAddress ) ; assertEquals ( localAddress.getAddress ( ) , theSocket.getLocalAddress ( ) ) ; assertTrue ( ( ( theSocket.getLocalPort ( ) ) > 0 ) ) ; theSocket.close ( ) ; }
Source:
public void testListItem ( ) throws java.lang.Throwable { android.content.IntentFilter filter = new android.content.IntentFilter ( android.content.Intent.ACTION_MAIN ) ; filter.addCategory ( TestListActivity.CATEGORY_MANUAL_TEST ) ; android.app.Instrumentation.ActivityMonitor monitor = new android.app.Instrumentation.ActivityMonitor ( filter , null , false ) ; mInstrumentation.addMonitor ( monitor ) ; sendKeys ( KeyEvent.KEYCODE_ENTER ) ; android.app.Activity activity = mInstrumentation.waitForMonitorWithTimeout ( monitor , java.util.concurrent.TimeUnit.SECONDS.toMillis ( 10 ) ) ; assertNotNull ( activity ) ; activity.finish ( ) ; }

Target:
private void finishTestActivity ( android.app.Activity activity ) throws java.lang.Throwable { com.android.cts.verifier.TestResult.setPassedResult ( activity ) ; activity.finish ( ) ; mInstrumentation.waitForIdleSync ( ) ; android.content.ContentResolver resolver = mActivity.getContentResolver ( ) ; android.database.Cursor cursor = resolver.query ( TestResultsProvider.RESULTS_ALL_CONTENT_URI , TestResultsProvider.ALL_COLUMNS , null , null , null ) ; assertEquals ( 1 , cursor.getCount ( ) ) ; cursor.close ( ) ; }
Source:
public void testInstall_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.update2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertDistroInstalled ( distro ) ; }

Target:
public void testInstall_withWorkingDir ( ) throws java.lang.Exception { java.io.File workingDir = installer.getWorkingDir ( ) ; assertTrue ( workingDir.mkdir ( ) ) ; libcore.tzdata.update2.TimeZoneDistroInstallerTest.createFile ( new java.io.File ( workingDir , "myFile" ) , new byte [ ] { 'a' } ) ; libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.installWithErrorCode ( distro.getBytes ( ) ) ) ; assertDistroInstalled ( distro ) ; }