auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.lang.String doUninstall ( com.android.ddmlib.IDevice device , com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo launchInfo ) throws java.io.IOException { try { return device.uninstallPackage ( launchInfo.getPackageName ( ) ) ; } catch ( java.io.IOException e ) { java.lang.String msg = java.lang.String.format ( "Failed to uninstall %1$s: %2$s" , launchInfo.getPackageName ( ) , e.getMessage ( ) ) ; com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , msg ) ; throw e ; } }

Target:
private java.lang.String doUninstall ( com.android.ddmlib.IDevice device , com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo launchInfo ) throws com.android.ddmlib.InstallException { try { return device.uninstallPackage ( launchInfo.getPackageName ( ) ) ; } catch ( com.android.ddmlib.InstallException e ) { java.lang.String msg = java.lang.String.format ( "Failed to uninstall %1$s: %2$s" , launchInfo.getPackageName ( ) , e.getMessage ( ) ) ; com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , msg ) ; throw e ; } }
Source:
protected boolean isModified ( java.io.File toFile ) throws java.io.IOException { return ( myChecksum ) != ( com.intellij.updater.Digester.digestRegularFile ( toFile ) ) ; }

Target:
protected com.intellij.updater.ValidationResult doValidate ( java.io.File toFile ) throws java.io.IOException { com.intellij.updater.ValidationResult result = doValidateAccess ( toFile , ValidationResult.Action.DELETE ) ; if ( result != null ) return result ; if ( ( toFile.exists ( ) ) && ( isModified ( toFile ) ) ) { com.intellij.updater.ValidationResult [ ] options = ( myPatch.isStrict ( ) ) ? new com.intellij.updater.ValidationResult.Option [ ] { ValidationResult.Option.DELETE } : new com.intellij.updater.ValidationResult.Option [ ] { ValidationResult.Option.DELETE , ValidationResult.Option.KEEP } ; return new com.intellij.updater.ValidationResult ( ValidationResult.Kind.CONFLICT , myPath , ValidationResult.Action.DELETE , "Modified" , options ) ; } return null ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; myProjectSettings = new org.jetbrains.plugins.gradle.settings.GradleProjectSettings ( ) ; org.jetbrains.plugins.gradle.settings.GradleSettings.getInstance ( myProject ) . setGradleVmOptions ( "-Xmx64m -XX:MaxPermSize=64m" ) ; java.lang.System.setProperty ( ExternalSystemExecutionSettings.REMOTE_PROCESS_IDLE_TTL_IN_MS_KEY , java.lang.String.valueOf ( org.jetbrains.plugins.gradle.importing.GradleImportingTestCase.GRADLE_DAEMON_TTL_MS ) ) ; configureWrapper ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; org.junit.Assume.assumeThat ( gradleVersion , versionMatcherRule.getMatcher ( ) ) ; myProjectSettings = new org.jetbrains.plugins.gradle.settings.GradleProjectSettings ( ) ; org.jetbrains.plugins.gradle.settings.GradleSettings.getInstance ( myProject ) . setGradleVmOptions ( "-Xmx64m -XX:MaxPermSize=64m" ) ; java.lang.System.setProperty ( ExternalSystemExecutionSettings.REMOTE_PROCESS_IDLE_TTL_IN_MS_KEY , java.lang.String.valueOf ( org.jetbrains.plugins.gradle.importing.GradleImportingTestCase.GRADLE_DAEMON_TTL_MS ) ) ; configureWrapper ( ) ; }
Source:
private static android.net.wifi.hotspot2.pps.UpdateParameter createSubscriptionUpdate ( ) { android.net.wifi.hotspot2.pps.UpdateParameter subUpdate = new android.net.wifi.hotspot2.pps.UpdateParameter ( ) ; subUpdate.updateIntervalInMinutes = 9021 ; subUpdate.updateMethod = android.net.wifi.hotspot2.pps.UpdateParameter.UPDATE_METHOD_SSP ; subUpdate.restriction = android.net.wifi.hotspot2.pps.UpdateParameter.UPDATE_RESTRICTION_ROAMING_PARTNER ; subUpdate.serverUri = "subscription.update.com" ; subUpdate.username = "subUsername" ; subUpdate.base64EncodedPassword = android.util.Base64.encodeToString ( "subPassword" . getBytes ( ) , Base64.DEFAULT ) ; subUpdate.trustRootCertUrl = "subscription.trust.cert.com" ; subUpdate.trustRootCertSha256Fingerprint = new byte [ android.net.wifi.hotspot2.PasspointConfigurationTest.CERTIFICATE_FINGERPRINT_BYTES ] ; return subUpdate ; }

Target:
private static android.net.wifi.hotspot2.pps.UpdateParameter createSubscriptionUpdate ( ) { android.net.wifi.hotspot2.pps.UpdateParameter subUpdate = new android.net.wifi.hotspot2.pps.UpdateParameter ( ) ; subUpdate.setUpdateIntervalInMinutes ( 9021 ) ; subUpdate.setUpdateMethod ( UpdateParameter.UPDATE_METHOD_SSP ) ; subUpdate.setRestriction ( UpdateParameter.UPDATE_RESTRICTION_ROAMING_PARTNER ) ; subUpdate.setServerUri ( "subscription.update.com" ) ; subUpdate.setUsername ( "subUsername" ) ; subUpdate.setBase64EncodedPassword ( android.util.Base64.encodeToString ( "subPassword" . getBytes ( ) , Base64.DEFAULT ) ) ; subUpdate.setTrustRootCertUrl ( "subscription.trust.cert.com" ) ; subUpdate.setTrustRootCertSha256Fingerprint ( new byte [ android.net.wifi.hotspot2.PasspointConfigurationTest.CERTIFICATE_FINGERPRINT_BYTES ] ) ; return subUpdate ; }
Source:
public boolean isOutboundDone ( ) { if ( ( sslNativePointer ) == 0 ) { synchronized ( stateLock ) { return ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED ) ) || ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED_OUTBOUND ) ) ; } } return ( ( org.conscrypt.NativeCrypto.SSL_get_shutdown ( sslNativePointer ) ) & ( NativeCrypto.SSL_SENT_SHUTDOWN ) ) != 0 ; }

Target:
public boolean isOutboundDone ( ) { if ( ( sslNativePointer ) == 0 ) { synchronized ( stateLock ) { return ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED ) ) || ( ( engineState ) == ( org.conscrypt.OpenSSLEngineImpl.EngineState.CLOSED_OUTBOUND ) ) ; } } return ( ( org.conscrypt.NativeCrypto.SSL_get_shutdown ( sslNativePointer ) ) & ( NativeConstants.SSL_SENT_SHUTDOWN ) ) != 0 ; }
Source:
public void loadViewTreeData ( final com.android.hierarchyviewerlib.device.Window window ) { executeInBackground ( new java.lang.Runnable ( ) { public void run ( ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( window ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileData ( window , viewNode ) ; com.android.hierarchyviewerlib.ComponentRegistry.getTreeViewModel ( ) . setData ( window , viewNode ) ; } } } ) ; }

Target:
public void loadViewTreeData ( final com.android.hierarchyviewerlib.device.Window window ) { executeInBackground ( "Loading view hierarchy" , new java.lang.Runnable ( ) { public void run ( ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( window ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.device.DeviceBridge.loadProfileData ( window , viewNode ) ; viewNode.setViewCount ( ) ; com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . setData ( window , viewNode ) ; } } } ) ; }
Source:
private static com.android.build.gradle.internal.model.Collection < java.lang.String > findUnresolvedDependencies ( com.android.build.gradle.internal.model.Collection < com.android.builder.model.SyncIssue > syncIssues ) { com.android.build.gradle.internal.model.List < java.lang.String > unresolvedDependencies = com.google.common.collect.Lists.newArrayList ( ) ; for ( com.android.builder.model.SyncIssue issue : syncIssues ) { if ( ( issue.getType ( ) ) == ( com.android.builder.model.SyncIssue.TYPE_UNRESOLVED_DEPENDENCY ) ) { unresolvedDependencies.add ( issue.getData ( ) ) ; } } return unresolvedDependencies ; }

Target:
private static java.util.Collection < java.lang.String > findUnresolvedDependencies ( @ com.android.annotations.NonNull java.util.Collection < com.android.builder.model.SyncIssue > syncIssues ) { java.util.List < java.lang.String > unresolvedDependencies = com.google.common.collect.Lists.newArrayList ( ) ; for ( com.android.builder.model.SyncIssue issue : syncIssues ) { if ( ( issue.getType ( ) ) == ( com.android.builder.model.SyncIssue.TYPE_UNRESOLVED_DEPENDENCY ) ) { unresolvedDependencies.add ( issue.getData ( ) ) ; } } return unresolvedDependencies ; }
Source:
public void testCompileNonConflictingSourceAndImport ( ) throws java.lang.Exception { java.io.File jackOut = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.srcToLib ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , jackOut , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.fibonacci.test001.jack" ) ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addStaticLibs ( jackOut ) ; toolchain.srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.threeaddress.test001.jack" ) ) ; }

Target:
public void testCompileNonConflictingSourceAndImport ( ) throws java.lang.Exception { java.io.File jackOut = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToLib ( jackOut , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.fibonacci.test001.jack" ) ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addStaticLibs ( jackOut ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.threeaddress.test001.jack" ) ) ; }
Source:
public boolean p2pServiceAdd ( android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { for ( java.lang.String s : servInfo.getSupplicantQueryList ( ) ) { java.lang.String command = "P2P_SERVICE_ADD" ; command += " " + s ; if ( ! ( doBooleanCommand ( command ) ) ) { return false ; } } } return true ; }

Target:
public boolean p2pServiceAdd ( android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.serviceAdd ( servInfo ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { for ( java.lang.String s : servInfo.getSupplicantQueryList ( ) ) { java.lang.String command = "P2P_SERVICE_ADD" ; command += " " + s ; if ( ! ( doBooleanCommand ( command ) ) ) { return false ; } } } return true ; } }
Source:
public static int forkAndSpecialize ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , int mountExternal , java.lang.String seInfo , java.lang.String niceName , int [ ] fdsToClose , java.lang.String instructionSet ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; int pid = com.android.internal.os.Zygote.nativeForkAndSpecialize ( uid , gid , gids , debugFlags , rlimits , mountExternal , seInfo , niceName , fdsToClose , instructionSet ) ; com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }

Target:
public static int forkAndSpecialize ( int uid , int gid , int [ ] gids , int debugFlags , int [ ] [ ] rlimits , int mountExternal , java.lang.String seInfo , java.lang.String niceName , int [ ] fdsToClose , java.lang.String instructionSet , java.lang.String appDataDir ) { com.android.internal.os.Zygote.VM_HOOKS.preFork ( ) ; int pid = com.android.internal.os.Zygote.nativeForkAndSpecialize ( uid , gid , gids , debugFlags , rlimits , mountExternal , seInfo , niceName , fdsToClose , instructionSet , appDataDir ) ; com.android.internal.os.Zygote.VM_HOOKS.postForkCommon ( ) ; return pid ; }
Source:
public void run ( ) { try { java.lang.System.err.println ( "sleep..." ) ; java.lang.Thread.sleep ( 2000 ) ; java.lang.System.err.println ( "close..." ) ; s.getClass ( ) . getMethod ( "close" ) . invoke ( s ) ; } catch ( java.lang.Exception ex ) { ex.printStackTrace ( ) ; } }

Target:
public void run ( ) { try { java.lang.System.err.println ( "sleep..." ) ; java.lang.Thread.sleep ( 2000 ) ; java.lang.System.err.println ( "close..." ) ; s.close ( ) ; } catch ( java.lang.Exception ex ) { ex.printStackTrace ( ) ; } }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/AddJavascriptInterfaceTest.java:16: Warning: WebView.addJavascriptInterface should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application [AddJavascriptInterface]\n" + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/AddJavascriptInterfaceTest.java:23: Warning: WebView.addJavascriptInterface should not be called with minSdkVersion < 17 for security reasons: JavaScript can use reflection to manipulate application [AddJavascriptInterface]\n" ) + " webView.addJavascriptInterface(object, string);\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( "bytecode/.classpath=>.classpath" , "bytecode/AndroidManifest.xml=>AndroidManifest.xml" , "bytecode/AddJavascriptInterfaceTest.java.txt=>src/test/pkg/AddJavascriptInterfaceTest.java" , "bytecode/AddJavascriptInterfaceTest.class.data=>bin/classes/test/pkg/AddJavascriptInterfaceTest.class" , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$WebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$WebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnWebViewChild.class" ) , ( "bytecode/AddJavascriptInterfaceTest$NonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$NonWebView.class" ) , ( "bytecode/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class.data=>" + "bin/classes/test/pkg/AddJavascriptInterfaceTest$CallAddJavascriptInterfaceOnNonWebView.class" ) ) ) ; }

Target:
public void testNoWarningWhenMinSdkAt17 ( ) throws java.lang.Exception { assertEquals ( "No warnings." , lintProject ( manifest ( ) . minSdk ( 17 ) , mTestFile ) ) ; }
Source:
public void run ( ) { com.android.ide.eclipse.adt.internal.launch.DeviceChooserDialog dialog = new com.android.ide.eclipse.adt.internal.launch.DeviceChooserDialog ( com.android.ide.eclipse.adt.AdtPlugin.getDisplay ( ) . getActiveShell ( ) , response , manifestData.getPackage ( ) , projectTarget ) ; if ( ( dialog.open ( ) ) == ( org.eclipse.jface.dialogs.Dialog.OK ) ) { continueLaunch [ 0 ] = true ; } }

Target:
public void run ( ) { com.android.ide.eclipse.adt.internal.launch.DeviceChooserDialog dialog = new com.android.ide.eclipse.adt.internal.launch.DeviceChooserDialog ( com.android.ide.eclipse.adt.AdtPlugin.getDisplay ( ) . getActiveShell ( ) , response , manifestData.getPackage ( ) , projectTarget ) ; if ( ( dialog.open ( ) ) == ( org.eclipse.jface.dialogs.Dialog.OK ) ) { com.android.ide.eclipse.adt.internal.launch.DeviceChoiceCache.put ( configName , response ) ; continueLaunch [ 0 ] = true ; } }
Source:
public void test_checkedSortedMapSerializationCompatability ( ) throws java.lang.Exception { java.util.SortedMap < java.lang.String , java.lang.String > c = new java.util.TreeMap < java.lang.String , java.lang.String > ( ) ; c = java.util.Collections.checkedSortedMap ( c , java.lang.String.class , java.lang.String.class ) ; tests.util.SerializationTester.assertCompabilityEquals ( c , "serialization/java/util/Collections_CheckedSortedMap.golden.ser" ) ; }

Target:
public void test_checkedSortedMapSerializationCompatability ( ) throws java.lang.Exception { java.util.SortedMap < java.lang.String , java.lang.String > c = new java.util.TreeMap < java.lang.String , java.lang.String > ( ) ; c = java.util.Collections.checkedSortedMap ( c , java.lang.String.class , java.lang.String.class ) ; tests.util.SerializationTester.assertCompabilityEquals ( c , "serialization/tests/api/java/util/Collections_CheckedSortedMap.golden.ser" ) ; }
Source:
private void notifyUnsupportedJvm ( @ org.jetbrains.annotations.PropertyKey ( resourceBundle = "messages.IdeBundle" ) final java.lang.String key ) { final java.lang.String ignoreKey = "ignore." + key ; final java.lang.String message = ( com.intellij.ide.IdeBundle.message ( key ) ) + ( com.intellij.ide.IdeBundle.message ( "unsupported.jvm.link" ) ) ; showNotification ( ignoreKey , message , new com.intellij.ui.HyperlinkAdapter ( ) { @ java.lang.Override protected void hyperlinkActivated ( javax.swing.event.HyperlinkEvent e ) { myProperties.setValue ( ignoreKey , "true" ) ; } } ) ; }

Target:
private void notifyUnsupported ( @ org.jetbrains.annotations.PropertyKey ( resourceBundle = "messages.IdeBundle" ) final java.lang.String key ) { final java.lang.String ignoreKey = "ignore." + key ; final java.lang.String message = ( com.intellij.ide.IdeBundle.message ( key ) ) + ( com.intellij.ide.IdeBundle.message ( "unsupported.dismiss.link" ) ) ; showNotification ( ignoreKey , message , new com.intellij.ui.BrowserHyperlinkListener ( ) { @ java.lang.Override protected void hyperlinkActivated ( javax.swing.event.HyperlinkEvent e ) { if ( ( e.getURL ( ) ) == null ) { myProperties.setValue ( ignoreKey , "true" ) ; } else { super . hyperlinkActivated ( e ) ; } } } ) ; }
Source:
public static java.lang.String [ ] getAvailableIDs ( int rawOffset ) { java.util.List < java.lang.String > matches = new java.util.ArrayList < java.lang.String > ( ) ; for ( int i = 0 , end = libcore.util.ZoneInfoDB.rawUtcOffsets.length ; i < end ; ++ i ) { if ( ( libcore.util.ZoneInfoDB.rawUtcOffsets [ i ] ) == rawOffset ) { matches.add ( libcore.util.ZoneInfoDB.ids [ i ] ) ; } } return matches.toArray ( new java.lang.String [ matches.size ( ) ] ) ; }

Target:
public java.lang.String [ ] getAvailableIDs ( int rawOffset ) { java.util.List < java.lang.String > matches = new java.util.ArrayList < java.lang.String > ( ) ; for ( int i = 0 , end = rawUtcOffsets.length ; i < end ; ++ i ) { if ( ( rawUtcOffsets [ i ] ) == rawOffset ) { matches.add ( ids [ i ] ) ; } } return matches.toArray ( new java.lang.String [ matches.size ( ) ] ) ; }
Source:
private com.android.ims.ImsReasonInfo makeACopy ( com.android.ims.ImsReasonInfo imsReasonInfo ) { android.os.Parcel p = android.os.Parcel.obtain ( ) ; imsReasonInfo.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; com.android.ims.ImsReasonInfo clonedReasonInfo = ImsReasonInfo.CREATOR.createFromParcel ( p ) ; p.recycle ( ) ; return clonedReasonInfo ; }

Target:
private android.telephony.ims.ImsReasonInfo makeACopy ( android.telephony.ims.ImsReasonInfo imsReasonInfo ) { android.os.Parcel p = android.os.Parcel.obtain ( ) ; imsReasonInfo.writeToParcel ( p , 0 ) ; p.setDataPosition ( 0 ) ; android.telephony.ims.ImsReasonInfo clonedReasonInfo = ImsReasonInfo.CREATOR.createFromParcel ( p ) ; p.recycle ( ) ; return clonedReasonInfo ; }
Source:
public void bouncyCastle ( ) throws java.lang.Exception { java.io.File bouncyCastleJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "bouncyjack" , ".jack" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.srcToLib ( com.android.jack.toolchain.ToolchainTest.corePath.getAbsolutePath ( ) , bouncyCastleJack , true , com.android.jack.toolchain.ToolchainTest.BOUNCY_SOURCELIST ) ; java.io.File bouncyCastleOutFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.libToExe ( bouncyCastleJack , bouncyCastleOutFolder , false ) ; }

Target:
public void bouncyCastle ( ) throws java.lang.Exception { java.io.File bouncyCastleJack = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "bouncyjack" , ".jack" ) ; com.android.jack.test.toolchain.AndroidToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.addToClasspath ( com.android.jack.toolchain.ToolchainTest.corePath ) . srcToLib ( bouncyCastleJack , true , com.android.jack.toolchain.ToolchainTest.BOUNCY_SOURCELIST ) ; java.io.File bouncyCastleOutFolder = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.AndroidToolchain.class ) ; toolchain.libToExe ( bouncyCastleJack , bouncyCastleOutFolder , false ) ; }
Source:
private boolean teardownForDun ( ) { final int rilRat = mPhone.getServiceState ( ) . getRilDataRadioTechnology ( ) ; if ( android.telephony.ServiceState.isCdma ( rilRat ) ) return true ; return ( fetchDunApn ( ) ) != null ; }

Target:
private boolean teardownForDun ( ) { final int rilRat = mPhone.getServiceState ( ) . getRilDataRadioTechnology ( ) ; if ( android.telephony.ServiceState.isCdma ( rilRat ) ) return true ; java.util.ArrayList < com.android.internal.telephony.dataconnection.ApnSetting > apns = fetchDunApns ( ) ; return ( apns.size ( ) ) > 0 ; }
Source:
public void testConnectTimeouts ( ) throws java.io.IOException { tests.net.StuckServer ss = new tests.net.StuckServer ( true ) ; int serverPort = ss.getLocalPort ( ) ; java.lang.String hostName = ss.getLocalSocketAddress ( ) . getAddress ( ) . getHostAddress ( ) ; java.net.URLConnection urlConnection = new java.net.URL ( ( ( ( ( "http://" + hostName ) + ":" ) + serverPort ) + "/" ) ) . openConnection ( ) ; int timeout = 1000 ; urlConnection.setConnectTimeout ( timeout ) ; long start = java.lang.System.currentTimeMillis ( ) ; try { urlConnection.getInputStream ( ) ; fail ( ) ; } catch ( java.net.SocketTimeoutException expected ) { long elapsed = ( java.lang.System.currentTimeMillis ( ) ) - start ; int attempts = java.net.InetAddress.getAllByName ( "localhost" ) . length ; assertTrue ( ( ( ( ( ( "timeout=" + timeout ) + ", elapsed=" ) + elapsed ) + ", attempts=" ) + attempts ) , ( ( java.lang.Math.abs ( ( ( attempts * timeout ) - elapsed ) ) ) < 500 ) ) ; } finally { ss.close ( ) ; } }

Target:
public java.lang.Object answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { int timeoutArg = ( ( int ) ( invocation.getArguments ( ) [ 1 ] ) ) ; socketConnectTimeouts [ attemptNumber ] = timeoutArg ; throw new java.net.SocketTimeoutException ( ( "Simulated timeout after " + timeoutArg ) ) ; }
Source:
private static com.android.builder.resources.ResourceSet getMergedSet ( ) throws com.android.builder.resources.DuplicateResourceException { if ( ( com.android.builder.resources.ResourceMergerTest.sMergedSet ) == null ) { java.io.File root = getRoot ( "baseMerge" ) ; com.android.builder.resources.ResourceSet res = com.android.builder.resources.ResourceSetTest.getBaseResourceSet ( ) ; com.android.builder.resources.ResourceSet overlay = new com.android.builder.resources.ResourceSet ( ) ; overlay.addSource ( new java.io.File ( root , "overlay" ) ) ; com.android.builder.resources.ResourceMerger merger = new com.android.builder.resources.ResourceMerger ( ) ; merger.addResourceSet ( res ) ; merger.addResourceSet ( overlay ) ; com.android.builder.resources.ResourceMergerTest.sMergedSet = merger.getMergedSet ( ) ; } return com.android.builder.resources.ResourceMergerTest.sMergedSet ; }

Target:
private static com.android.builder.resources.ResourceMerger getResourceMerger ( ) throws com.android.builder.resources.DuplicateResourceException , java.io.IOException { if ( ( com.android.builder.resources.ResourceMergerTest.sResourceMerger ) == null ) { java.io.File root = getRoot ( "baseMerge" ) ; com.android.builder.resources.ResourceSet res = com.android.builder.resources.ResourceSetTest.getBaseResourceSet ( ) ; com.android.builder.resources.ResourceSet overlay = new com.android.builder.resources.ResourceSet ( "overlay" ) ; overlay.addSource ( new java.io.File ( root , "overlay" ) ) ; overlay.loadFromFiles ( ) ; com.android.builder.resources.ResourceMergerTest.sResourceMerger = new com.android.builder.resources.ResourceMerger ( ) ; com.android.builder.resources.ResourceMergerTest.sResourceMerger.addResourceSet ( res ) ; com.android.builder.resources.ResourceMergerTest.sResourceMerger.addResourceSet ( overlay ) ; } return com.android.builder.resources.ResourceMergerTest.sResourceMerger ; }
Source:
public void disconnectClientBeforeWifiEnabled ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( mock ( android.os.Handler.class ) ) ; mLooper.dispatchAll ( ) ; controlChannel.disconnect ( ) ; mLooper.dispatchAll ( ) ; }

Target:
public void disconnectClientBeforeWifiEnabled ( ) throws java.lang.Exception { mWifiScanningServiceImpl.startService ( ) ; mWifiScanningServiceImpl.setWifiHandlerLogForTest ( mLog ) ; com.android.internal.util.test.BidirectionalAsyncChannel controlChannel = connectChannel ( org.mockito.Mockito.mock ( android.os.Handler.class ) ) ; mLooper.dispatchAll ( ) ; controlChannel.disconnect ( ) ; mLooper.dispatchAll ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { mTargetContext = android.support.test.InstrumentationRegistry.getTargetContext ( ) ; if ( skipTest ( ) ) return ; com.android.bluetooth.mapclient.MapUtils.setMnsService ( mMockMnsService ) ; startServices ( ) ; cleanUpInstanceMap ( ) ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( ! ( mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_mapmce ) ) ) { return ; } com.android.bluetooth.TestUtils.stopService ( mServiceRule , com.android.bluetooth.mapclient.MapClientService.class ) ; mService = com.android.bluetooth.mapclient.MapClientService.getMapClientService ( ) ; org.junit.Assert.assertNull ( mService ) ; com.android.bluetooth.TestUtils.clearAdapterService ( mAdapterService ) ; }
Source:
public void testRegisterNetworkScoreCache_noBroadcastNetworkPermission ( ) { org.mockito.Mockito.doThrow ( new java.lang.SecurityException ( ) ) . when ( mContext ) . enforceCallingOrSelfPermission ( org.mockito.Matchers.eq ( permission.BROADCAST_NETWORK_PRIVILEGED ) , org.mockito.Matchers.anyString ( ) ) ; try { mNetworkScoreService.registerNetworkScoreCache ( NetworkKey.TYPE_WIFI , mNetworkScoreCache ) ; junit.framework.Assert.fail ( "SecurityException expected" ) ; } catch ( java.lang.SecurityException e ) { } }

Target:
public void testRegisterNetworkScoreCache_noBroadcastNetworkPermission ( ) { org.mockito.Mockito.doThrow ( new java.lang.SecurityException ( ) ) . when ( mContext ) . enforceCallingOrSelfPermission ( org.mockito.Matchers.eq ( permission.BROADCAST_NETWORK_PRIVILEGED ) , org.mockito.Matchers.anyString ( ) ) ; try { mNetworkScoreService.registerNetworkScoreCache ( NetworkKey.TYPE_WIFI , mNetworkScoreCache , android.net.NetworkScoreManager.CACHE_FILTER_NONE ) ; junit.framework.Assert.fail ( "SecurityException expected" ) ; } catch ( java.lang.SecurityException e ) { } }
Source:
public java.lang.String getVersionName ( @ com.android.annotations.NonNull java.io.File manifestFile ) { javax.xml.xpath.XPath xpath = com.android.xml.AndroidXPathFactory.newXPath ( ) ; try { return xpath.evaluate ( "/manifest/@android:versionName" , new org.xml.sax.InputSource ( new java.io.FileInputStream ( manifestFile ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( java.io.FileNotFoundException e ) { throw new java.lang.RuntimeException ( e ) ; } return null ; }

Target:
private static java.lang.String getStringValue ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.lang.String xPath ) { javax.xml.xpath.XPath xpath = com.android.xml.AndroidXPathFactory.newXPath ( ) ; java.io.FileInputStream fis = null ; try { fis = new java.io.FileInputStream ( file ) ; return xpath.evaluate ( xPath , new org.xml.sax.InputSource ( fis ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { } catch ( java.io.FileNotFoundException e ) { throw new java.lang.RuntimeException ( e ) ; } finally { com.google.common.io.Closeables.closeQuietly ( fis ) ; } return null ; }
Source:
public static < T > T newProxy ( java.lang.Class < T > interfaceType , java.lang.reflect.InvocationHandler handler ) { com.google.common.base.Preconditions.checkNotNull ( interfaceType ) ; com.google.common.base.Preconditions.checkNotNull ( handler ) ; com.google.common.base.Preconditions.checkArgument ( interfaceType.isInterface ( ) ) ; java.lang.Object object = java.lang.reflect.Proxy.newProxyInstance ( interfaceType.getClassLoader ( ) , new java.lang.Class < ? > [ ] { interfaceType } , handler ) ; return interfaceType.cast ( object ) ; }

Target:
public static < T > T newProxy ( java.lang.Class < T > interfaceType , java.lang.reflect.InvocationHandler handler ) { com.google.common.base.Preconditions.checkNotNull ( handler ) ; com.google.common.base.Preconditions.checkArgument ( interfaceType.isInterface ( ) , "%s is not an interface" , interfaceType ) ; java.lang.Object object = java.lang.reflect.Proxy.newProxyInstance ( interfaceType.getClassLoader ( ) , new java.lang.Class < ? > [ ] { interfaceType } , handler ) ; return interfaceType.cast ( object ) ; }
Source:
private void createContextMenu ( ) { mMenuManager = new org.eclipse.jface.action.MenuManager ( ) { @ java.lang.Override public boolean isDynamic ( ) { return true ; } } ; setupStaticMenuActions ( mMenuManager ) ; setupDynamicMenuActions ( mMenuManager ) ; org.eclipse.swt.widgets.Menu menu = mMenuManager.createContextMenu ( this ) ; setMenu ( menu ) ; }

Target:
private void createContextMenu ( ) { mMenuManager = new org.eclipse.jface.action.MenuManager ( ) { @ java.lang.Override public boolean isDynamic ( ) { return true ; } } ; setupStaticMenuActions ( mMenuManager ) ; new com.android.ide.eclipse.adt.internal.editors.layout.gle2.DynamicContextMenu ( this , mMenuManager ) ; org.eclipse.swt.widgets.Menu menu = mMenuManager.createContextMenu ( this ) ; setMenu ( menu ) ; }
Source:
private android.util.Pair < com.android.server.wifi.nan.WifiNanClientState , com.android.server.wifi.nan.WifiNanDiscoverySessionState > getClientSessionForPubSubId ( int pubSubId ) { for ( int i = 0 ; i < ( mClients.size ( ) ) ; ++ i ) { com.android.server.wifi.nan.WifiNanClientState client = mClients.valueAt ( i ) ; com.android.server.wifi.nan.WifiNanDiscoverySessionState session = client.getNanSessionStateForPubSubId ( pubSubId ) ; if ( session != null ) { return new android.util.Pair ( client , session ) ; } } return null ; }

Target:
private android.util.Pair < com.android.server.wifi.aware.WifiAwareClientState , com.android.server.wifi.aware.WifiAwareDiscoverySessionState > getClientSessionForPubSubId ( int pubSubId ) { for ( int i = 0 ; i < ( mClients.size ( ) ) ; ++ i ) { com.android.server.wifi.aware.WifiAwareClientState client = mClients.valueAt ( i ) ; com.android.server.wifi.aware.WifiAwareDiscoverySessionState session = client.getAwareSessionStateForPubSubId ( pubSubId ) ; if ( session != null ) { return new android.util.Pair ( client , session ) ; } } return null ; }
Source:
public boolean pageUp ( final boolean top ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return pageUp ( top ) ; } } ) ; return ret ; } return mAwContents.pageUp ( top ) ; }

Target:
public boolean canGoForward ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { java.lang.Boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return canGoForward ( ) ; } } ) ; return ret ; } return mAwContents.canGoForward ( ) ; }
Source:
public java.util.List < com.android.sched.util.codec.ValueDescription > getValueDescriptions ( ) { if ( ( descriptions ) == null ) { descriptions = new java.util.ArrayList < com.android.sched.util.codec.ValueDescription > ( entries.length ) ; for ( com.android.sched.util.codec.KeyValueCodec.Entry < T > entry : entries ) { if ( ( entry.description ) != null ) { descriptions.add ( new com.android.sched.util.codec.ValueDescription ( entry.key , entry.description ) ) ; } } } assert ( descriptions ) != null ; return descriptions ; }

Target:
public java.util.List < com.android.sched.util.codec.ValueDescription > getValueDescriptions ( ) { if ( ( descriptions ) == null ) { descriptions = new java.util.ArrayList < com.android.sched.util.codec.ValueDescription > ( entries.length ) ; for ( com.android.sched.util.codec.KeyValueCodec.Entry < T > entry : entries ) { if ( ( ! ( entry.hidden ) ) && ( ( entry.description ) != null ) ) { descriptions.add ( new com.android.sched.util.codec.ValueDescription ( entry.key , entry.description ) ) ; } } } assert ( descriptions ) != null ; return descriptions ; }
Source:
private void notifyListenerOnFileChange ( org.eclipse.core.resources.IProject project , com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile file , int eventType ) { synchronized ( mListeners ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.IResourceListener listener : mListeners ) { try { listener.fileChanged ( project , file , eventType ) ; } catch ( java.lang.Throwable t ) { com.android.ide.eclipse.adt.AdtPlugin.log ( t , "Failed to execute ResourceManager.IResouceListener.fileChanged()" ) ; } } } }

Target:
private void notifyListenerOnFileChange ( org.eclipse.core.resources.IProject project , com.android.ide.common.resources.ResourceFile file , int eventType ) { synchronized ( mListeners ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.IResourceListener listener : mListeners ) { try { listener.fileChanged ( project , file , eventType ) ; } catch ( java.lang.Throwable t ) { com.android.ide.eclipse.adt.AdtPlugin.log ( t , "Failed to execute ResourceManager.IResouceListener.fileChanged()" ) ; } } } }
Source:
private static java.util.List < java.io.File > splitPaths ( java.lang.String path1 , java.lang.String path2 , boolean wantDirectories ) { java.util.List < java.io.File > result = new java.util.ArrayList < java.io.File > ( ) ; dalvik.system.DexPathList.splitAndAdd ( path1 , wantDirectories , result ) ; dalvik.system.DexPathList.splitAndAdd ( path2 , wantDirectories , result ) ; return result ; }

Target:
private static dalvik.system.DexPathList.Element [ ] makePathElements ( java.util.List < java.io.File > files , java.util.List < java.io.IOException > suppressedExceptions ) { return dalvik.system.DexPathList.makeElements ( files , null , suppressedExceptions , true ) ; }
Source:
public void setVideoState ( java.lang.String callId , int videoState ) { com.android.server.telecom.Log.startSession ( "CSW.sVS" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setVideoState %s %d" , callId , videoState ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setVideoState ( videoState ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void setVideoState ( java.lang.String callId , int videoState ) { android.telecom.Log.startSession ( "CSW.sVS" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "setVideoState %s %d" , callId , videoState ) ; com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.setVideoState ( videoState ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
private void readFromParcel ( android.os.Parcel in ) { serviceType = in.readInt ( ) ; requestType = in.readInt ( ) ; teleserviceType = in.readInt ( ) ; serviceClass = in.readInt ( ) ; result = in.readInt ( ) ; ssInfo = in.createIntArray ( ) ; cfInfo = ( ( com.android.ims.ImsCallForwardInfo [ ] ) ( in.readParcelableArray ( this . getClass ( ) . getClassLoader ( ) ) ) ) ; }

Target:
private void readFromParcel ( android.os.Parcel in ) { serviceType = in.readInt ( ) ; requestType = in.readInt ( ) ; teleserviceType = in.readInt ( ) ; serviceClass = in.readInt ( ) ; result = in.readInt ( ) ; ssInfo = in.createIntArray ( ) ; cfInfo = ( ( android.telephony.ims.ImsCallForwardInfo [ ] ) ( in.readParcelableArray ( this . getClass ( ) . getClassLoader ( ) ) ) ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JUnlock unlockStmt ) { com.android.jack.dx.rop.code.RegisterSpec unlockReg = getRegisterSpec ( unlockStmt.getLockExpr ( ) ) ; com.android.jack.dx.rop.code.Insn unlockInsn = new com.android.jack.dx.rop.code.ThrowingInsn ( com.android.jack.dx.rop.code.Rops.MONITOR_EXIT , com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( unlockStmt ) , com.android.jack.dx.rop.code.RegisterSpecList.make ( unlockReg ) , getCatchTypes ( ) ) ; addInstruction ( unlockInsn ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JReturnBlockElement element ) { com.android.jack.ir.ast.JExpression expression = element.getExpression ( ) ; com.android.jack.dx.rop.code.RegisterSpecList sources = ( expression != null ) ? com.android.jack.dx.rop.code.RegisterSpecList.make ( getRegisterSpec ( expression ) ) : com.android.jack.dx.rop.code.RegisterSpecList.EMPTY ; com.android.jack.ir.ast.JType type = ( expression != null ) ? expression.getType ( ) : JPrimitiveTypeEnum.VOID.getType ( ) ; addInstruction ( new com.android.jack.dx.rop.code.PlainInsn ( com.android.jack.dx.rop.code.Rops.opReturn ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( type ) ) , com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( element.getSourceInfo ( ) ) , null , sources ) ) ; return false ; }
Source:
private static void assertTimeEquals ( long expected , long actual ) { if ( expected != actual ) { fail ( ( ( ( "expected " + ( com.android.server.NetworkPolicyManagerServiceTest.formatTime ( expected ) ) ) + " but was actually " ) + ( com.android.server.NetworkPolicyManagerServiceTest.formatTime ( actual ) ) ) ) ; } }

Target:
private static void assertTimeEquals ( long expected , long actual ) { if ( expected != actual ) { org.junit.Assert.fail ( ( ( ( "expected " + ( com.android.server.NetworkPolicyManagerServiceTest.formatTime ( expected ) ) ) + " but was actually " ) + ( com.android.server.NetworkPolicyManagerServiceTest.formatTime ( actual ) ) ) ) ; } }
Source:
public void testCsPutBooleanExtra ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; android.telecom.Connection connection = mConnectionServiceFixtureA.mLatestConnection ; connection.putExtra ( com.android.server.telecom.tests.CallExtrasTest.EXTRA_KEY_BOOL , true ) ; mInCallServiceFixtureX.waitForUpdate ( ) ; assertTrue ( mInCallServiceFixtureX.getCall ( ids.mCallId ) . getExtras ( ) . containsKey ( com.android.server.telecom.tests.CallExtrasTest.EXTRA_KEY_BOOL ) ) ; assertTrue ( mInCallServiceFixtureX.getCall ( ids.mCallId ) . getExtras ( ) . getBoolean ( com.android.server.telecom.tests.CallExtrasTest.EXTRA_KEY_BOOL ) ) ; }

Target:
public void testCsPutBooleanExtra ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; android.telecom.Connection connection = mConnectionServiceFixtureA.mLatestConnection ; connection.putExtra ( com.android.server.telecom.tests.CallExtrasTest.EXTRA_KEY_BOOL , true ) ; mInCallServiceFixtureX.waitForUpdate ( ) ; org.junit.Assert.assertTrue ( mInCallServiceFixtureX.getCall ( ids.mCallId ) . getExtras ( ) . containsKey ( com.android.server.telecom.tests.CallExtrasTest.EXTRA_KEY_BOOL ) ) ; org.junit.Assert.assertTrue ( mInCallServiceFixtureX.getCall ( ids.mCallId ) . getExtras ( ) . getBoolean ( com.android.server.telecom.tests.CallExtrasTest.EXTRA_KEY_BOOL ) ) ; }
Source:
private java.lang.String findTaskInfo ( java.lang.String name ) throws java.lang.Exception { com.android.tradefed.device.CollectingOutputReceiver outputReceiver = new com.android.tradefed.device.CollectingOutputReceiver ( ) ; mDevice.executeShellCommand ( android.wm.cts.CrossAppDragAndDropTests.AM_STACK_LIST , outputReceiver ) ; final java.lang.String output = outputReceiver.getOutput ( ) ; for ( java.lang.String line : output.split ( "\\n" ) ) { if ( line.contains ( name ) ) { return line ; } } return "" ; }

Target:
private java.lang.String findTaskInfo ( java.lang.String name ) throws java.lang.Exception { com.android.tradefed.device.CollectingOutputReceiver outputReceiver = new com.android.tradefed.device.CollectingOutputReceiver ( ) ; mDevice.executeShellCommand ( android.wm.cts.CrossAppDragAndDropTests.AM_STACK_LIST , outputReceiver ) ; final java.lang.String output = outputReceiver.getOutput ( ) ; final java.util.regex.Pattern pattern = java.util.regex.Pattern.compile ( java.lang.String.format ( android.wm.cts.CrossAppDragAndDropTests.TASK_REGEX_PATTERN_STRING , name ) ) ; for ( java.lang.String line : output.split ( "\\n" ) ) { if ( pattern.matcher ( line ) . find ( ) ) { return line ; } } return "" ; }
Source:
public void onMessageSendFailed ( int messageId ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "messageId" , messageId ) ; mEventFacade.postEvent ( "WifiNanSessionOnMessageSendFailed" , mResults ) ; }

Target:
public void onMessageSendFailed ( int messageId ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "messageId" , messageId ) ; synchronized ( mLock ) { java.lang.Long startTime = mMessageStartTime.get ( messageId ) ; if ( startTime != null ) { mResults.putLong ( "latencyMs" , ( ( java.lang.System.currentTimeMillis ( ) ) - ( startTime.longValue ( ) ) ) ) ; mMessageStartTime.remove ( messageId ) ; } } mEventFacade.postEvent ( "WifiNanSessionOnMessageSendFailed" , mResults ) ; }
Source:
private boolean shouldTurnOffSignalStrength ( ) { return ( mIsPowerSaveOn ) || ( ( ! ( mIsCharging ) ) && ( ! ( mIsScreenOn ) ) ) ; }

Target:
private boolean shouldTurnOffDormancyUpdate ( ) { if ( mIsPowerSaveOn ) { return true ; } if ( ( ( ( mIsCharging ) || ( mIsScreenOn ) ) || ( mIsTetheringOn ) ) || ( ( mUpdateModes.get ( TelephonyManager.INDICATION_FILTER_DATA_CALL_DORMANCY_CHANGED ) ) == ( android.telephony.TelephonyManager.INDICATION_UPDATE_MODE_IGNORE_SCREEN_OFF ) ) ) { return false ; } return true ; }
Source:
public void actionPerformed ( java.awt.event.ActionEvent e ) { methodSpecificationDialog.setMemberSpecification ( new proguard.gui.MemberSpecification ( ) ) ; int returnValue = methodSpecificationDialog.showDialog ( ) ; if ( returnValue == ( MemberSpecificationDialog.APPROVE_OPTION ) ) { addElement ( new proguard.gui.MemberSpecificationsPanel.MyMemberSpecificationWrapper ( methodSpecificationDialog.getMemberSpecification ( ) , false ) ) ; } }

Target:
public void actionPerformed ( java.awt.event.ActionEvent e ) { methodSpecificationDialog.setMemberSpecification ( new proguard.MemberSpecification ( ) ) ; int returnValue = methodSpecificationDialog.showDialog ( ) ; if ( returnValue == ( MemberSpecificationDialog.APPROVE_OPTION ) ) { addElement ( new proguard.gui.MemberSpecificationsPanel.MyMemberSpecificationWrapper ( methodSpecificationDialog.getMemberSpecification ( ) , false ) ) ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JArrayLiteral arrayLiteral ) { java.util.List < com.android.jack.ir.ast.JLiteral > values = arrayLiteral.getValues ( ) ; if ( ( values.size ( ) ) > 1 ) { print ( '{' ) ; } visitCollectionWithCommas ( values.iterator ( ) ) ; if ( ( values.size ( ) ) > 1 ) { print ( '}' ) ; } return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedInterface x ) { printTypeFlags ( x ) ; print ( com.android.jack.ir.impl.CHARS_INTERFACE ) ; printTypeName ( x ) ; return false ; }
Source:
public void start ( java.lang.String outcomeName ) { outcomeName = toQualifiedOutcomeName ( outcomeName ) ; lastStartedOutcome = outcomeName ; if ( run.runnerType.supportsCaliper ( ) ) { run.console.verbose ( ( ( "running " + outcomeName ) + " with unlimited timeout" ) ) ; vogar.commands.Command command = currentCommand ; if ( ( command != null ) && ( ( run.smallTimeoutSeconds ) != 0 ) ) { command.scheduleTimeout ( run.smallTimeoutSeconds ) ; } run.driver.recordResults = false ; } else { run.driver.recordResults = true ; } }

Target:
public void start ( java.lang.String outcomeName ) { outcomeName = toQualifiedOutcomeName ( outcomeName ) ; lastStartedOutcome = outcomeName ; if ( run.runnerType.supportsCaliper ( ) ) { run.console.verbose ( ( ( "running " + outcomeName ) + " with unlimited timeout" ) ) ; vogar.commands.Command command = currentCommand ; if ( ( command != null ) && ( ( timeoutSeconds ) != 0 ) ) { command.scheduleTimeout ( timeoutSeconds ) ; } run.driver.recordResults = false ; } else { run.driver.recordResults = true ; } }
Source:
void stopDtmfTone ( ) { if ( ( mConnectionService ) == null ) { com.android.server.telecom.Log.w ( this , "stopDtmfTone() request on a call without a connection service." ) ; } else { com.android.server.telecom.Log.i ( this , "Send stopDtmfTone to connection service for call %s" , this ) ; com.android.server.telecom.Log.event ( this , Log.Events.STOP_DTMF ) ; mConnectionService.stopDtmfTone ( this ) ; } }

Target:
void playDtmfTone ( char digit ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "playDtmfTone() request on a call without a connection service." ) ; } else { android.telecom.Log.i ( this , "Send playDtmfTone to connection service for call %s" , this ) ; mConnectionService.playDtmfTone ( this , digit ) ; android.telecom.Log.addEvent ( this , LogUtils.Events.START_DTMF , android.telecom.Log.pii ( digit ) ) ; } }
Source:
public void testEmptyIterator ( ) { java.util.NavigableSet q = jsr166.TreeSubSetTest.set0 ( ) ; int i = 0 ; java.util.Iterator it = q.iterator ( ) ; while ( it.hasNext ( ) ) { assertTrue ( q.contains ( it.next ( ) ) ) ; ++ i ; } assertEquals ( 0 , i ) ; }

Target:
public void testEmptyIterator ( ) { assertIteratorExhausted ( jsr166.TreeSubSetTest.set0 ( ) . iterator ( ) ) ; }
Source:
boolean containsExplicitOption ( java.lang.String name ) { java.lang.reflect.Field field = optionsData.getFieldFromName ( name ) ; if ( field == null ) { throw new java.lang.IllegalArgumentException ( ( ( "No such option '" + name ) + "'" ) ) ; } return ( parsedValues.get ( field ) ) != null ; }

Target:
com.google.devtools.common.options.OptionsParser.OptionValueDescription getOptionValueDescription ( java.lang.String name ) { java.lang.reflect.Field field = optionsData.getFieldFromName ( name ) ; if ( field == null ) { throw new java.lang.IllegalArgumentException ( ( ( "No such option '" + name ) + "'" ) ) ; } return parsedValues.get ( field ) ; }