auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void sendUrgentData ( int data ) throws java.io.IOException { if ( ! ( getImpl ( ) . supportsUrgentData ( ) ) ) { throw new java.net.SocketException ( "Urgent data not supported" ) ; } getImpl ( ) . sendUrgentData ( data ) ; }

Target:
public void sendUrgentData ( int data ) throws java.io.IOException { if ( isClosed ( ) ) { throw new java.net.SocketException ( "Socket is closed" ) ; } if ( ! ( getImpl ( ) . supportsUrgentData ( ) ) ) { throw new java.net.SocketException ( "Urgent data not supported" ) ; } getImpl ( ) . sendUrgentData ( data ) ; }
Source:
public static int testTrueBranch ( int x , int y ) { int z ; if ( Main.inlineTrue ( ) ) { z = x + y ; } else { z = x - y ; java.lang.System.nanoTime ( ) ; } return z ; }

Target:
public static int testTrueBranch ( int x , int y ) { try { java.lang.Class < ? > c = java.lang.Class.forName ( "Smali" ) ; java.lang.reflect.Method m = c.getMethod ( "testTrueBranch" , int . class , int . class ) ; return ( ( java.lang.Integer ) ( m.invoke ( null , x , y ) ) ) ; } catch ( java.lang.Throwable t ) { throw new java.lang.RuntimeException ( t ) ; } }
Source:
private static java.lang.String getOsVersion ( ) { java.util.regex.Pattern p = java.util.regex.Pattern.compile ( "(\\d+)\\.(\\d+).*" ) ; java.lang.String osVers = java.lang.System.getProperty ( "os.version" ) ; java.util.regex.Matcher m = p.matcher ( osVers ) ; if ( m.matches ( ) ) { return ( ( m.group ( 1 ) ) + '.' ) + ( m.group ( 2 ) ) ; } return null ; }

Target:
protected java.lang.String getOsVersion ( ) { java.util.regex.Pattern p = java.util.regex.Pattern.compile ( "(\\d+)\\.(\\d+).*" ) ; java.lang.String osVers = getSystemProperty ( com.android.sdkstats.SdkStatsService.SYS_PROP_OS_VERSION ) ; if ( ( osVers != null ) && ( ( osVers.length ( ) ) > 0 ) ) { java.util.regex.Matcher m = p.matcher ( osVers ) ; if ( m.matches ( ) ) { return ( ( m.group ( 1 ) ) + '.' ) + ( m.group ( 2 ) ) ; } } return null ; }
Source:
public void testFocusCallIsNullWhenRemoveTheFocusCall ( ) { requestFocus ( mActiveCall , null ) ; assertEquals ( mActiveCall , mFocusManagerUT.getCurrentFocusCall ( ) ) ; mCallsManagerListener.onCallRemoved ( ( ( com.android.server.telecom.Call ) ( mActiveCall ) ) ) ; waitForHandlerAction ( mFocusManagerUT.getHandler ( ) , com.android.server.telecom.tests.ConnectionServiceFocusManagerTest.CHECK_HANDLER_INTERVAL_MS ) ; assertNull ( mFocusManagerUT.getCurrentFocusCall ( ) ) ; }

Target:
public void testFocusCallIsNullWhenRemoveTheFocusCall ( ) { requestFocus ( mActiveCall , null ) ; org.junit.Assert.assertEquals ( mActiveCall , mFocusManagerUT.getCurrentFocusCall ( ) ) ; mCallsManagerListener.onCallRemoved ( ( ( com.android.server.telecom.Call ) ( mActiveCall ) ) ) ; waitForHandlerAction ( mFocusManagerUT.getHandler ( ) , com.android.server.telecom.tests.ConnectionServiceFocusManagerTest.CHECK_HANDLER_INTERVAL_MS ) ; org.junit.Assert.assertNull ( mFocusManagerUT.getCurrentFocusCall ( ) ) ; }
Source:
void assertCSConnections ( final int numConnections ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return numConnections ; } @ java.lang.Override public java.lang.Object actual ( ) { return android.telecom.cts.CtsConnectionService.getAllConnectionsFromTelecom ( ) . size ( ) ; } } , android.telecom.cts.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( ( "ConnectionService should contain " + numConnections ) + " connections." ) ) ; }

Target:
void assertCSConnections ( final int numConnections ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return numConnections ; } @ java.lang.Override public java.lang.Object actual ( ) { return android.telecom.cts.CtsConnectionService.getAllConnectionsFromTelecom ( ) . size ( ) ; } } , android.telecom.cts.TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( ( "ConnectionService should contain " + numConnections ) + " connections." ) ) ; }
Source:
public void testConstructor ( ) throws java.lang.Exception { try { libcore.io.ClassPathURLStreamHandler streamHandler = new libcore.io.ClassPathURLStreamHandler ( "Missing.file" ) ; fail ( "Should throw IOException" ) ; } catch ( java.io.IOException expected ) { } java.lang.String fileName = jarFile.getCanonicalPath ( ) ; libcore.io.ClassPathURLStreamHandler streamHandler = new libcore.io.ClassPathURLStreamHandler ( fileName ) ; streamHandler.close ( ) ; }

Target:
public void testConstructor ( ) throws java.lang.Exception { try { libcore.io.ClassPathURLStreamHandler streamHandler = new libcore.io.ClassPathURLStreamHandler ( "Missing.file" ) ; fail ( "Should throw IOException" ) ; } catch ( java.io.IOException expected ) { } java.lang.String fileName = jarFile.getPath ( ) ; libcore.io.ClassPathURLStreamHandler streamHandler = new libcore.io.ClassPathURLStreamHandler ( fileName ) ; streamHandler.close ( ) ; }
Source:
public void testPullNonPullableExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; java.lang.Thread.sleep ( com.android.server.telecom.tests.TEST_TIMEOUT ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.never ( ) ) . pullExternalCall ( ids.mConnectionId ) ; }

Target:
public void testPullNonPullableExternalCall ( ) throws java.lang.Exception { mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties = android.telecom.Connection.PROPERTY_IS_EXTERNAL_CALL ; com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; java.lang.Thread.sleep ( com.android.server.telecom.tests.TEST_TIMEOUT ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.never ( ) ) . pullExternalCall ( org.mockito.Matchers.eq ( ids.mConnectionId ) , org.mockito.Matchers.any ( ) ) ; }
Source:
private void checkAndEnableDataCallAfterEmergencyCallDropped ( ) { if ( mIsInEmergencyCall ) { mIsInEmergencyCall = false ; java.lang.String inEcm = android.os.SystemProperties.get ( TelephonyProperties.PROPERTY_INECM_MODE , "false" ) ; if ( Phone.DEBUG_PHONE ) { log ( ( "checkAndEnableDataCallAfterEmergencyCallDropped,inEcm=" + inEcm ) ) ; } if ( ( inEcm.compareTo ( "false" ) ) == 0 ) { mPhone.mDcTracker.setInternalDataEnabled ( true ) ; mPhone.notifyEmergencyCallRegistrants ( false ) ; } mPhone.sendEmergencyCallStateChange ( false ) ; } }

Target:
private void checkAndEnableDataCallAfterEmergencyCallDropped ( ) { if ( mIsInEmergencyCall ) { mIsInEmergencyCall = false ; boolean inEcm = mPhone.isInEcm ( ) ; if ( Phone.DEBUG_PHONE ) { log ( ( "checkAndEnableDataCallAfterEmergencyCallDropped,inEcm=" + inEcm ) ) ; } if ( ! inEcm ) { mPhone.mDcTracker.setInternalDataEnabled ( true ) ; mPhone.notifyEmergencyCallRegistrants ( false ) ; } mPhone.sendEmergencyCallStateChange ( false ) ; } }
Source:
public android.net.NetworkScorerAppManager.NetworkScorerAppData getScorer ( java.lang.String packageName ) { if ( android.text.TextUtils.isEmpty ( packageName ) ) { return null ; } java.util.Collection < android.net.NetworkScorerAppManager.NetworkScorerAppData > applications = getAllValidScorers ( ) ; for ( android.net.NetworkScorerAppManager.NetworkScorerAppData app : applications ) { if ( packageName.equals ( app.mPackageName ) ) { return app ; } } return null ; }

Target:
public boolean setActiveScorer ( java.lang.String packageName ) { return false ; }
Source:
public void testAcceptRingingCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.any ( int [ ] . class ) ) ) . thenReturn ( call ) ; int fakeVideoState = 29578215 ; org.mockito.Mockito.when ( call.getVideoState ( ) ) . thenReturn ( fakeVideoState ) ; mTSIBinder.acceptRingingCall ( ) ; org.mockito.Mockito.verify ( call ) . answer ( fakeVideoState ) ; }

Target:
public void testAcceptRingingCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( mFakeCallsManager.getFirstCallWithState ( org.mockito.Matchers.anyInt ( ) ) ) . thenReturn ( call ) ; int fakeVideoState = 29578215 ; org.mockito.Mockito.when ( call.getVideoState ( ) ) . thenReturn ( fakeVideoState ) ; mTSIBinder.acceptRingingCall ( ) ; org.mockito.Mockito.verify ( call ) . answer ( org.mockito.Matchers.eq ( fakeVideoState ) ) ; }
Source:
public void run ( ) { com.google.api.services.oauth2.model.Userinfoplus userInfo = null ; try { userInfo = userInfoService.userinfo ( ) . get ( ) . execute ( ) ; } catch ( java.io.IOException e ) { com.google.gct.login.GoogleLoginUtils.LOG.error ( "Error retrieving user information." , e ) ; } if ( ( userInfo != null ) && ( ( userInfo.getId ( ) ) != null ) ) { callback.setProperty ( userInfo ) ; } else { callback.setProperty ( null ) ; } }

Target:
public void run ( ) { com.google.api.services.oauth2.model.Userinfoplus userInfo = null ; try { userInfo = userInfoService.userinfo ( ) . get ( ) . execute ( ) ; } catch ( java.io.IOException e ) { com.google.gct.login.GoogleLoginUtils.LOG.warn ( "Error retrieving user information." , e ) ; } if ( ( userInfo != null ) && ( ( userInfo.getId ( ) ) != null ) ) { callback.setProperty ( userInfo ) ; } else { callback.setProperty ( null ) ; } }
Source:
public boolean connect ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "connect(): not allowed for non-active user" ) ; return false ; } enforceCallingOrSelfPermission ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH_ADMIN permission" ) ; return false ; }

Target:
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 ( ) ; }
Source:
protected com.intellij.updater.ValidationResult doValidate ( java.io.File toFile ) { com.intellij.updater.ValidationResult result = doValidateAccess ( toFile , ValidationResult.Action.CREATE ) ; if ( result != null ) return result ; if ( toFile.exists ( ) ) { com.intellij.updater.ValidationResult [ ] options = ( myPatch.isStrict ( ) ) ? new com.intellij.updater.ValidationResult.Option [ ] { ValidationResult.Option.REPLACE } : new com.intellij.updater.ValidationResult.Option [ ] { ValidationResult.Option.REPLACE , ValidationResult.Option.KEEP } ; return new com.intellij.updater.ValidationResult ( ValidationResult.Kind.CONFLICT , myPath , ValidationResult.Action.CREATE , ValidationResult.ALREADY_EXISTS_MESSAGE , options ) ; } return null ; }

Target:
protected void doBuildPatchFile ( java.io.File toFile , com.intellij.updater.MultiZipFile.OutputStream patchOutput ) throws java.io.IOException { Runner.logger.info ( "building PatchFile" ) ; patchOutput.putNextEntry ( myPath ) ; if ( ! ( toFile.isDirectory ( ) ) ) { writeExecutableFlag ( patchOutput , toFile ) ; com.intellij.updater.Utils.copyFileToStream ( toFile , patchOutput ) ; } patchOutput.closeEntry ( ) ; }
Source:
public void onFormResubmission ( android.os.Message dontResend , android.os.Message resend ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onFormResubmission" ) ; mWebViewClient.onFormResubmission ( mWebView , dontResend , resend ) ; org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onFormResubmission ( android.os.Message dontResend , android.os.Message resend ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onFormResubmission" ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onFormResubmission" ) ; mWebViewClient.onFormResubmission ( mWebView , dontResend , resend ) ; } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onFormResubmission" ) ; } }
Source:
public < E extends T > java.util.List < E > sortedCopy ( java.lang.Iterable < E > iterable ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E [ ] array = ( ( E [ ] ) ( com.google.common.collect.Iterables.toArray ( iterable ) ) ) ; java.util.Arrays.sort ( array , this ) ; return com.google.common.collect.Lists.newArrayList ( java.util.Arrays.asList ( array ) ) ; }

Target:
public < E extends T > com.google.common.collect.ImmutableList < E > immutableSortedCopy ( java.lang.Iterable < E > elements ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E [ ] array = ( ( E [ ] ) ( com.google.common.collect.Iterables.toArray ( elements ) ) ) ; for ( E e : array ) { com.google.common.base.Preconditions.checkNotNull ( e ) ; } java.util.Arrays.sort ( array , this ) ; return com.google.common.collect.ImmutableList.asImmutableList ( array ) ; }
Source:
static boolean containsValueImpl ( java.util.Map < ? , ? > map , @ javax.annotation.Nullable java.lang.Object value ) { for ( java.util.Map.Entry < ? , ? > entry : map.entrySet ( ) ) { if ( com.google.common.base.Objects.equal ( entry.getValue ( ) , value ) ) { return true ; } } return false ; }

Target:
static boolean containsKeyImpl ( java.util.Map < ? , ? > map , @ javax.annotation.Nullable java.lang.Object key ) { return com.google.common.collect.Iterators.contains ( com.google.common.collect.Maps.keyIterator ( map.entrySet ( ) . iterator ( ) ) , key ) ; }
Source:
com.android.sched.vfs.DirectFS.DirectVFile getVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.DirectFS.DirectVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotFileException { assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.READ ) ) != 0 ; java.io.File file = new java.io.File ( parent.getNativePath ( ) , name ) ; com.android.sched.util.file.AbstractStreamFile.check ( file , new com.android.sched.util.location.FileLocation ( file ) ) ; return new com.android.sched.vfs.DirectFS.DirectVFile ( this , parent , name ) ; }

Target:
com.android.sched.vfs.ParentVDir getVDir ( @ javax.annotation.Nonnull com.android.sched.vfs.ParentVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotDirectoryException { assert ! ( isClosed ( ) ) ; assert ( ( permissions ) & ( com.android.sched.util.file.FileOrDirectory.Permission.READ ) ) != 0 ; java.io.File path = getNativeFile ( parent.getPath ( ) , name ) ; com.android.sched.util.file.Directory.check ( path , new com.android.sched.util.location.DirectoryLocation ( path ) ) ; return new com.android.sched.vfs.ParentVDir ( this , parent , name ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; result.append ( "(" ) ; for ( int i = 0 , typesLength = types.length ; i < typesLength ; i ++ ) { result.append ( ( ( buffer ) != null ? buffer.typeNames ( ) . get ( types [ i ] ) : types [ i ] ) ) ; } result.append ( ")" ) ; return result.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; result.append ( "(" ) ; for ( int i = 0 , typesLength = types.length ; i < typesLength ; i ++ ) { result.append ( ( ( dex ) != null ? dex.typeNames ( ) . get ( types [ i ] ) : types [ i ] ) ) ; } result.append ( ")" ) ; return result.toString ( ) ; }
Source:
private void closeStream ( java.io.InputStream is ) { if ( is != null ) { if ( is instanceof com.android.sdklib.io.NonClosingInputStream ) { ( ( com.android.sdklib.io.NonClosingInputStream ) ( is ) ) . setCloseBehavior ( CloseBehavior.CLOSE ) ; } try { is.close ( ) ; } catch ( java.io.IOException ignore ) { } } }

Target:
private void closeStream ( java.io.InputStream is ) { if ( is != null ) { if ( is instanceof com.android.io.NonClosingInputStream ) { ( ( com.android.io.NonClosingInputStream ) ( is ) ) . setCloseBehavior ( CloseBehavior.CLOSE ) ; } try { is.close ( ) ; } catch ( java.io.IOException ignore ) { } } }
Source:
static java.lang.String outOfBounds ( int index , int size ) { return ( ( "Index: " + index ) + ", Size: " ) + size ; }

Target:
public java.util.ListIterator < E > listIterator ( int index ) { java.lang.Object [ ] snapshot = elements ; if ( ( index < 0 ) || ( index > ( snapshot.length ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "index=" + index ) + ", length=" ) + ( snapshot.length ) ) ) ; } java.util.concurrent.CopyOnWriteArrayList.CowIterator < E > result = new java.util.concurrent.CopyOnWriteArrayList.CowIterator < E > ( snapshot , 0 , snapshot.length ) ; result.index = index ; return result ; }
Source:
public java.lang.String print ( boolean shortFormat ) { return "memory" ; }

Target:
public com.google.common.collect.ImmutableMultimap < java.lang.Integer , com.android.manifmerger.Actions.Record > getResultingSourceMapping ( com.android.manifmerger.XmlDocument xmlDocument ) throws java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { com.android.manifmerger.XmlLoader.SourceLocation inMemory = XmlLoader.UNKNOWN ; com.android.manifmerger.XmlDocument loadedWithLineNumbers = com.android.manifmerger.XmlLoader.load ( inMemory , xmlDocument.prettyPrint ( ) ) ; com.google.common.collect.ImmutableMultimap.Builder < java.lang.Integer , com.android.manifmerger.Actions.Record > mappingBuilder = com.google.common.collect.ImmutableMultimap.builder ( ) ; for ( com.android.manifmerger.XmlElement xmlElement : loadedWithLineNumbers.getRootNode ( ) . getMergeableElements ( ) ) { parse ( xmlElement , mappingBuilder ) ; } return mappingBuilder.build ( ) ; }
Source:
public void testTimedoutAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testTimedoutAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 10 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; com.android.server.ConnectivityServiceTest.sleepFor ( 15 ) ; networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public void test_getDisplayCountry ( ) { assertTrue ( ( "Returned incorrect country: " + ( testLocale.getDisplayCountry ( ) ) ) , testLocale.getDisplayCountry ( ) . equals ( "Canada" ) ) ; java.util.Locale l_countryCD = new java.util.Locale ( "" , "CD" ) ; assertEquals ( "Congo - Kinshasa" , l_countryCD.getDisplayCountry ( ) ) ; }

Target:
public void test_getDisplayCountry ( ) { assertTrue ( ( "Returned incorrect country: " + ( testLocale.getDisplayCountry ( ) ) ) , testLocale.getDisplayCountry ( ) . equals ( "Canada" ) ) ; java.util.Locale l_countryCD = new java.util.Locale ( "" , "CD" ) ; assertEquals ( "Congo [DRC]" , l_countryCD.getDisplayCountry ( ) ) ; }
Source:
public void testStageInstallWithErrorCode_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro distro1 = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( distro1 ) ) ; assertInstallDistroStaged ( distro1 ) ; com.android.timezone.distro.TimeZoneDistro distro2 = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.stageInstallWithErrorCode ( distro2 ) ) ; assertInstallDistroStaged ( distro1 ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { byte [ ] distro1Bytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( distro1Bytes ) ) ) ; assertInstallDistroStaged ( distro1Bytes ) ; byte [ ] distro2Bytes = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBytes ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.stageInstallWithErrorCode ( new com.android.timezone.distro.TimeZoneDistro ( distro2Bytes ) ) ) ; assertInstallDistroStaged ( distro1Bytes ) ; assertNoInstalledDistro ( ) ; }
Source:
public java.util.zip.ZipOutputStream getOutputStream ( ) { assert ( file ) != null ; clearRemover ( ) ; try { return new com.android.sched.util.file.OutputZipFile.CustomZipOutputStream ( new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( file ) ) , compression ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
public synchronized java.util.zip.ZipOutputStream getOutputStream ( ) { assert ( file ) != null ; wasUsed = true ; if ( ( stream ) == null ) { clearRemover ( ) ; try { stream = new com.android.sched.util.file.OutputZipFile.CustomZipOutputStream ( new java.io.BufferedOutputStream ( new java.io.FileOutputStream ( file ) ) , compression ) ; } catch ( java.io.FileNotFoundException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } } return ( ( java.util.zip.ZipOutputStream ) ( stream ) ) ; }
Source:
public void verifyModifyOriginalConfig ( ) 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 = "test1" ; mProvider = new com.android.server.wifi.hotspot2.PasspointProvider ( config ) ; verifyInstalledConfig ( config , true ) ; config.homeSp.fqdn = "test2" ; verifyInstalledConfig ( config , false ) ; }

Target:
public void verifyModifyRetrievedConfig ( ) 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 = "test1" ; mProvider = createProvider ( config ) ; verifyInstalledConfig ( config , true ) ; android.net.wifi.hotspot2.PasspointConfiguration retrievedConfig = mProvider.getConfig ( ) ; retrievedConfig.homeSp.fqdn = "test2" ; verifyInstalledConfig ( retrievedConfig , false ) ; }
Source:
public static void setUp ( ) throws com.android.jack.IllegalOptionsException , com.android.sched.util.config.ConfigurationException { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.Types.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.Types.hooks ) ; options.getConfigBuilder ( com.android.jack.Types.hooks ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; session.getLookup ( ) . getOrCreatePackage ( "java/lang" ) ; }

Target:
public static void setUp ( ) throws com.android.jack.IllegalOptionsException , com.android.sched.util.config.ConfigurationException { com.android.jack.Options options = new com.android.jack.Options ( ) ; com.android.jack.Types.hooks = new com.android.sched.util.RunnableHooks ( ) ; options.checkValidity ( com.android.jack.Types.hooks ) ; options.getConfigBuilder ( com.android.jack.Types.hooks ) . getCodecContext ( ) . setDebug ( ) ; com.android.sched.util.config.ThreadConfig.setConfig ( options.getConfig ( ) ) ; com.android.jack.ir.ast.JSession session = com.android.jack.Jack.getSession ( ) ; session.getLookup ( ) . getOrCreatePackage ( "java/lang" ) ; }
Source:
public void setChoices ( double [ ] limits , java.lang.String [ ] formats ) { if ( ( limits.length ) != ( formats.length ) ) { throw new java.lang.IllegalArgumentException ( ) ; } choiceLimits = limits ; choiceFormats = formats ; }

Target:
public void setChoices ( double [ ] limits , java.lang.String [ ] formats ) { if ( ( limits.length ) != ( formats.length ) ) { throw new java.lang.IllegalArgumentException ( ( ( ( "limits.length != formats.length: " + ( limits.length ) ) + " != " ) + ( formats.length ) ) ) ; } choiceLimits = limits ; choiceFormats = formats ; }
Source:
public boolean setPhonebookAccessPermission ( int value ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return false ; } try { return android.bluetooth.BluetoothDevice.sService.setPhonebookAccessPermission ( this , value ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean cancelPairingUserInput ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot create pairing user input" ) ; return false ; } try { return service.cancelBondProcess ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public void onOtaspChanged ( int otaspMode ) { com.android.phone.otasp.OtaspSimStateReceiver.logd ( ( "onOtaspChanged: otaspMode=" + otaspMode ) ) ; if ( ( ( otaspMode == ( com.android.internal.telephony.ServiceStateTracker.OTASP_NEEDED ) ) && ( com.android.phone.otasp.OtaspSimStateReceiver.isCarrierSupported ( ) ) ) && ( com.android.phone.PhoneGlobals.getPhone ( ) . getIccRecordsLoaded ( ) ) ) { com.android.phone.otasp.OtaspSimStateReceiver.logd ( "otasp activation required, start otaspActivationService" ) ; mContext.startService ( new android.content.Intent ( mContext , com.android.phone.otasp.OtaspActivationService.class ) ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { mContext = context ; if ( CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED.equals ( intent.getAction ( ) ) ) { if ( com.android.phone.otasp.OtaspSimStateReceiver.DBG ) com.android.phone.otasp.OtaspSimStateReceiver.logd ( ( "Received intent: " + ( intent.getAction ( ) ) ) ) ; if ( ( com.android.phone.PhoneGlobals.getPhone ( ) . getIccRecordsLoaded ( ) ) && ( com.android.phone.otasp.OtaspSimStateReceiver.isCarrierSupported ( ) ) ) { final android.telephony.TelephonyManager telephonyManager = android.telephony.TelephonyManager.from ( context ) ; telephonyManager.listen ( mPhoneStateListener , PhoneStateListener.LISTEN_OTASP_CHANGED ) ; } } }
Source:
public static < T > T get ( java.util.Iterator < T > iterator , int position ) { com.google.common.collect.Iterators.checkNonnegative ( position ) ; int skipped = 0 ; while ( iterator.hasNext ( ) ) { T t = iterator.next ( ) ; if ( ( skipped ++ ) == position ) { return t ; } } throw new java.lang.IndexOutOfBoundsException ( ( ( ( ( "position (" + position ) + ") must be less than the number of elements that remained (" ) + skipped ) + ")" ) ) ; }

Target:
static < T > T pollNext ( java.util.Iterator < T > iterator ) { if ( iterator.hasNext ( ) ) { T result = iterator.next ( ) ; iterator.remove ( ) ; return result ; } else { return null ; } }
Source:
public void setVerbosityLevel ( @ javax.annotation.Nonnull com.android.jack.api.v01.VerbosityLevel verbosityLevel ) throws com.android.jack.api.v01.ConfigurationException { com.android.jack.Options.VerbosityLevel jackVerbosityLevel ; switch ( verbosityLevel ) { case DEBUG : { jackVerbosityLevel = com.android.jack.api.v01.com.android.jack.Options.VerbosityLevel ; break ; } case ERROR : { jackVerbosityLevel = com.android.jack.api.v01.com.android.jack.Options.VerbosityLevel ; break ; } case INFO : { jackVerbosityLevel = com.android.jack.api.v01.com.android.jack.Options.VerbosityLevel ; break ; } case WARNING : { jackVerbosityLevel = com.android.jack.api.v01.com.android.jack.Options.VerbosityLevel ; break ; } default : { throw new com.android.jack.api.v01.ConfigurationException ( ( ( "Verbosity level '" + verbosityLevel ) + "' is unsupported" ) ) ; } } options.setVerbosityLevel ( jackVerbosityLevel ) ; }

Target:
public void setVerbosityLevel ( @ javax.annotation.Nonnull com.android.jack.api.v01.VerbosityLevel verbosityLevel ) throws com.android.jack.api.v01.ConfigurationException { com.android.jack.api.v01.com.android.jack.VerbosityLevel jackVerbosityLevel ; switch ( verbosityLevel ) { case DEBUG : { jackVerbosityLevel = com.android.jack.api.v01.VerbosityLevel.INFO ; break ; } case ERROR : { jackVerbosityLevel = com.android.jack.api.v01.VerbosityLevel.ERROR ; break ; } case INFO : { jackVerbosityLevel = com.android.jack.api.v01.VerbosityLevel.INFO ; break ; } case WARNING : { jackVerbosityLevel = com.android.jack.api.v01.VerbosityLevel.WARNING ; break ; } default : { throw new com.android.jack.api.v01.ConfigurationException ( ( ( "Verbosity level '" + verbosityLevel ) + "' is unsupported" ) ) ; } } options.setVerbosityLevel ( jackVerbosityLevel ) ; }
Source:
public void testAdbInstallFile ( ) throws java.lang.Exception { final java.util.List < java.lang.String > output ; }

Target:
public void testAdbInstallFile ( ) throws java.lang.Exception { final java.util.List < java.lang.String > output = android.appsecurity.cts.AppSecurityTests.AdbOutputReader.getOutput ( 5000L , new java.lang.String [ ] { "adb" , "-s" , getDevice ( ) . getSerialNumber ( ) , "shell" , "cmd" , "package" , "install" , "-S" , "1024" , "/data/local/tmp/foo.apk" } ) ; assertEquals ( "Line count" , 1 , output.size ( ) ) ; assertEquals ( "Error text" , "Error: APK content must be streamed" , output.get ( 0 ) ) ; }
Source:
public final void dumpSizes ( ) { for ( com.android.tools.perflib.heap.ClassObj theClass : mClassesById.values ( ) ) { int size = 0 ; for ( com.android.tools.perflib.heap.Instance instance : theClass.mInstances ) { size += instance.getCompositeSize ( ) ; } if ( size > 0 ) { java.lang.System.out.println ( ( ( ( ( theClass + ": base " ) + ( theClass.getSize ( ) ) ) + ", composite " ) + size ) ) ; } } }

Target:
public final void dumpSubclasses ( ) { for ( java.lang.Object value : mClassesById.getValues ( ) ) { com.android.tools.perflib.heap.ClassObj theClass = ( ( com.android.tools.perflib.heap.ClassObj ) ( value ) ) ; int count = theClass.mSubclasses.size ( ) ; if ( count > 0 ) { java.lang.System.out.println ( theClass ) ; theClass.dumpSubclasses ( ) ; } } }
Source:
public boolean nvResetConfig ( int resetType ) { enforceModifyPermissionOrCarrierPrivilege ( getDefaultSubscription ( ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvResetConfig: type " + resetType ) ) ; java.lang.Boolean success = ( ( java.lang.Boolean ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_RESET_CONFIG , resetType ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "nvResetConfig: type " + resetType ) + ' ' ) + ( success ? "ok" : "fail" ) ) ) ; return success ; }

Target:
public java.lang.String nvReadItem ( int itemID ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege ( mApp , getDefaultSubscription ( ) , "nvReadItem" ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvReadItem: item " + itemID ) ) ; java.lang.String value = ( ( java.lang.String ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_READ_ITEM , itemID ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( ( "nvReadItem: item " + itemID ) + " is \"" ) + value ) + '"' ) ) ; return value ; }
Source:
public static com.android.newbubble.NewBubbleInfo.Builder from ( @ android.support.annotation.NonNull com.android.newbubble.NewBubbleInfo bubbleInfo ) { return com.android.newbubble.NewBubbleInfo.builder ( ) . setPrimaryColor ( bubbleInfo.getPrimaryColor ( ) ) . setPrimaryIcon ( bubbleInfo.getPrimaryIcon ( ) ) . setStartingYPosition ( bubbleInfo.getStartingYPosition ( ) ) . setActions ( bubbleInfo.getActions ( ) ) . setAvatar ( bubbleInfo.getAvatar ( ) ) ; }

Target:
public static com.android.bubble.BubbleInfo.Builder from ( @ android.support.annotation.NonNull com.android.bubble.BubbleInfo bubbleInfo ) { return com.android.bubble.BubbleInfo.builder ( ) . setPrimaryColor ( bubbleInfo.getPrimaryColor ( ) ) . setPrimaryIcon ( bubbleInfo.getPrimaryIcon ( ) ) . setStartingYPosition ( bubbleInfo.getStartingYPosition ( ) ) . setActions ( bubbleInfo.getActions ( ) ) . setAvatar ( bubbleInfo.getAvatar ( ) ) ; }
Source:
public static void recordSparseSlowlyHistogram ( java.lang.String name , int sample ) { if ( ( org.chromium.base.metrics.RecordHistogram.sDisabledBy ) != null ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordSparseHistogram ( name , key , sample ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }

Target:
public static void recordSparseSlowlyHistogram ( java.lang.String name , int sample ) { if ( org.chromium.base.metrics.RecordHistogram.sIsDisabledForTests ) return ; long key = org.chromium.base.metrics.RecordHistogram.getCachedHistogramKey ( name ) ; long result = org.chromium.base.metrics.RecordHistogram.nativeRecordSparseHistogram ( name , key , sample ) ; if ( result != key ) org.chromium.base.metrics.RecordHistogram.sCache.put ( name , result ) ; }
Source:
public void copy ( @ javax.annotation.Nonnull com.android.sched.vfs.VFile srcFile , @ javax.annotation.Nonnull com.android.sched.vfs.DeflateFS.DeflateVFile dstFile ) throws com.android.sched.util.file.CannotCloseException , com.android.sched.util.file.CannotReadException , com.android.sched.util.file.CannotWriteException , com.android.sched.util.file.WrongPermissionException { if ( srcFile instanceof com.android.sched.vfs.DeflateFS.DeflateVFile ) { vfs.copy ( ( ( com.android.sched.vfs.DeflateFS.DeflateVFile ) ( srcFile ) ) . getWrappedFile ( ) , dstFile.getWrappedFile ( ) ) ; } else { super . copy ( srcFile , dstFile ) ; } }

Target:
public void copy ( @ javax.annotation.Nonnull com.android.sched.vfs.VFile srcFile , @ javax.annotation.Nonnull com.android.sched.vfs.DeflateFS.DeflateVFile dstFile ) throws com.android.sched.util.file.CannotCloseException , com.android.sched.util.file.CannotReadException , com.android.sched.util.file.CannotWriteException , com.android.sched.util.file.WrongPermissionException { if ( srcFile instanceof com.android.sched.vfs.DeflateFS.DeflateVFile ) { vfs.copy ( ( ( com.android.sched.vfs.DeflateFS.DeflateVFile ) ( srcFile ) ) . getWrappedFile ( ) , dstFile.getWrappedFile ( ) ) ; VFSStatCategory.OPTIMIZED_COPIES.getPercentStat ( getTracer ( ) , getInfoString ( ) ) . addTrue ( ) ; } else { super . copy ( srcFile , dstFile ) ; } }
Source:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof java.lang.reflect.AbstractMethod ) ) { return false ; } java.lang.reflect.AbstractMethod otherMethod = ( ( java.lang.reflect.AbstractMethod ) ( other ) ) ; return ( ( this . declaringClass ) == ( otherMethod.declaringClass ) ) && ( ( this . dexMethodIndex ) == ( otherMethod.dexMethodIndex ) ) ; }

Target:
final java.lang.reflect.AbstractMethod.GenericInfo getMethodOrConstructorGenericInfoInternal ( ) { java.lang.String signatureAttribute = getSignatureAttribute ( ) ; java.lang.Class < ? > [ ] exceptionTypes = this . getExceptionTypes ( ) ; libcore.reflect.GenericSignatureParser parser = new libcore.reflect.GenericSignatureParser ( this . getDeclaringClass ( ) . getClassLoader ( ) ) ; if ( ( this ) instanceof java.lang.reflect.Method ) { parser.parseForMethod ( this , signatureAttribute , exceptionTypes ) ; } else { parser.parseForConstructor ( this , signatureAttribute , exceptionTypes ) ; } return new java.lang.reflect.AbstractMethod.GenericInfo ( parser.exceptionTypes , parser.parameterTypes , parser.returnType , parser.formalTypeParameters ) ; }
Source:
public void testLaunchToSide ( ) throws java.lang.Exception { launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; launchActivityToSide ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }

Target:
public void testLaunchToSide ( ) throws java.lang.Exception { launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME } ) ; launchActivityToSide ( android.server.cts.ActivityManagerDockedStackTests.LAUNCH_TO_SIDE_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }
Source:
private libcore.tzdata.update2.DistroVersion readDistroVersion ( java.io.File distroDir ) throws java.io.IOException , libcore.tzdata.update2.DistroException { android.util.Slog.i ( logTag , "Reading distro format version" ) ; java.io.File distroVersionFile = new java.io.File ( distroDir , TimeZoneDistro.DISTRO_VERSION_FILE_NAME ) ; if ( ! ( distroVersionFile.exists ( ) ) ) { throw new libcore.tzdata.update2.DistroException ( ( "No distro version file found: " + distroVersionFile ) ) ; } byte [ ] versionBytes = libcore.tzdata.update2.FileUtils.readBytes ( distroVersionFile , DistroVersion.DISTRO_VERSION_FILE_LENGTH ) ; return libcore.tzdata.update2.DistroVersion.fromBytes ( versionBytes ) ; }

Target:
private libcore.tzdata.shared2.DistroVersion readDistroVersion ( java.io.File distroDir ) throws java.io.IOException , libcore.tzdata.shared2.DistroException { android.util.Slog.i ( logTag , "Reading distro format version" ) ; java.io.File distroVersionFile = new java.io.File ( distroDir , libcore.tzdata.shared2.TimeZoneDistro.DISTRO_VERSION_FILE_NAME ) ; if ( ! ( distroVersionFile.exists ( ) ) ) { throw new libcore.tzdata.shared2.DistroException ( ( "No distro version file found: " + distroVersionFile ) ) ; } byte [ ] versionBytes = libcore.tzdata.shared2.FileUtils.readBytes ( distroVersionFile , DistroVersion.DISTRO_VERSION_FILE_LENGTH ) ; return libcore.tzdata.shared2.DistroVersion.fromBytes ( versionBytes ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.System.setProperty ( "dexmaker.dexcache" , getInstrumentation ( ) . getTargetContext ( ) . getCacheDir ( ) . getPath ( ) ) ; java.lang.ClassLoader newClassLoader = getInstrumentation ( ) . getClass ( ) . getClassLoader ( ) ; java.lang.Thread.currentThread ( ) . setContextClassLoader ( newClassLoader ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.when ( mMockContext.getPackageManager ( ) ) . thenReturn ( mMockPm ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; java.lang.System.setProperty ( "dexmaker.dexcache" , getInstrumentation ( ) . getTargetContext ( ) . getCacheDir ( ) . getPath ( ) ) ; java.lang.ClassLoader newClassLoader = getInstrumentation ( ) . getClass ( ) . getClassLoader ( ) ; java.lang.Thread.currentThread ( ) . setContextClassLoader ( newClassLoader ) ; org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.when ( mMockContext.getPackageManager ( ) ) . thenReturn ( mMockPm ) ; mNetworkScorerAppManager = new android.net.NetworkScorerAppManager ( mMockContext ) ; }
Source:
public void testEndCallWithNonRingingForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getForegroundCall ( ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( null ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( ) ; }

Target:
public void testEndCallWithNonRingingForegroundCall ( ) throws java.lang.Exception { com.android.server.telecom.Call call = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; org.mockito.Mockito.when ( call.getState ( ) ) . thenReturn ( CallState.ACTIVE ) ; org.mockito.Mockito.when ( mFakeCallsManager.getForegroundCall ( ) ) . thenReturn ( call ) ; org.junit.Assert.assertTrue ( mTSIBinder.endCall ( com.android.server.telecom.tests.TelecomServiceImplTest.TEST_PACKAGE ) ) ; org.mockito.Mockito.verify ( call ) . disconnect ( org.mockito.Matchers.eq ( 0L ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.TelecomServiceImplTest.TEST_PACKAGE ) ) ; }
Source:
protected java.util.List < org.eclipse.ltk.core.refactoring.Change > computeChanges ( ) { final com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler template = mValues.template ; template.setBackupMergedFiles ( false ) ; java.util.Map < java.lang.String , java.lang.Object > paramMap = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; addProjectInfo ( paramMap ) ; com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.addDirectoryParameters ( paramMap , getProject ( ) ) ; return template.render ( mProject , paramMap ) ; }

Target:
protected java.util.List < org.eclipse.ltk.core.refactoring.Change > computeChanges ( ) { final com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler template = mValues.template ; template.setBackupMergedFiles ( false ) ; java.util.Map < java.lang.String , java.lang.Object > paramMap = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; addProjectInfo ( paramMap ) ; com.android.ide.eclipse.adt.internal.wizards.templates.TemplateHandler.addDirectoryParameters ( paramMap , getProject ( ) ) ; if ( mValues.createActivity ) { paramMap.put ( com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizard.ATTR_APP_COMPAT , true ) ; } return template.render ( mProject , paramMap ) ; }
Source:
private void validateIsInt16 ( ) { if ( ( ( mType.mElement.mType ) == ( Element.DataType.SIGNED_16 ) ) || ( ( mType.mElement.mType ) == ( Element.DataType.UNSIGNED_16 ) ) ) { return ; } throw new android.renderscript.RSIllegalArgumentException ( ( "16 bit integer source does not match allocation type " + ( mType.mElement.mType ) ) ) ; }

Target:
private void validateIsInt16OrFloat16 ( ) { if ( ( ( ( mType.mElement.mType ) == ( Element.DataType.SIGNED_16 ) ) || ( ( mType.mElement.mType ) == ( Element.DataType.UNSIGNED_16 ) ) ) || ( ( mType.mElement.mType ) == ( Element.DataType.FLOAT_16 ) ) ) { return ; } throw new android.renderscript.RSIllegalArgumentException ( ( "16 bit integer source does not match allocation type " + ( mType.mElement.mType ) ) ) ; }
Source:
public void sendSingleScanAllChannelsRequest ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = createRequest ( channelsToSpec ( 2400 , 2450 , 5150 , 5175 , 5600 , 5650 , 5660 ) , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , true , 2400 , 5150 , 5175 ) ) ; }

Target:
public void sendSingleScanRequestWithNoResults ( ) throws java.lang.Exception { android.net.wifi.WifiScanner.ScanSettings requestSettings = com.android.server.wifi.ScanTestUtil.createRequest ( WifiScanner.WIFI_BAND_BOTH , 0 , 0 , 20 , WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN ) ; doSuccessfulSingleScan ( requestSettings , com.android.server.wifi.ScanTestUtil.computeSingleScanNativeSettings ( requestSettings ) , com.android.server.wifi.ScanResults.create ( 0 , new int [ 0 ] ) ) ; }
Source:
public java.util.Set < java.io.File > getCompileClasspath ( @ com.android.annotations.NonNull com.android.builder.core.VariantConfiguration < ? , ? , ? > variantConfiguration ) { java.util.Set < java.io.File > compileClasspath = variantConfiguration.getCompileClasspath ( ) ; if ( variantConfiguration.getRenderscriptSupportMode ( ) ) { java.io.File renderScriptSupportJar = getRenderScriptSupportJar ( ) ; java.util.Set < java.io.File > fullJars = com.google.common.collect.Sets.newHashSetWithExpectedSize ( ( ( compileClasspath.size ( ) ) + 1 ) ) ; fullJars.addAll ( compileClasspath ) ; if ( renderScriptSupportJar != null ) { fullJars.add ( renderScriptSupportJar ) ; } compileClasspath = fullJars ; } return compileClasspath ; }

Target:
public java.util.Set < java.io.File > getCompileClasspath ( @ com.android.annotations.NonNull com.android.builder.core.VariantConfiguration < ? , ? , ? > variantConfiguration ) { java.util.Set < java.io.File > compileClasspath = variantConfiguration.getCompileClasspath ( ) ; if ( variantConfiguration.getRenderscriptSupportModeEnabled ( ) ) { java.io.File renderScriptSupportJar = getRenderScriptSupportJar ( ) ; java.util.Set < java.io.File > fullJars = com.google.common.collect.Sets.newHashSetWithExpectedSize ( ( ( compileClasspath.size ( ) ) + 1 ) ) ; fullJars.addAll ( compileClasspath ) ; if ( renderScriptSupportJar != null ) { fullJars.add ( renderScriptSupportJar ) ; } compileClasspath = fullJars ; } return compileClasspath ; }