auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
static com.android.dialer.calllog.datasources.DataSources provideCallLogDataSources ( com.android.dialer.calllog.datasources.systemcalllog.SystemCallLogDataSource systemCallLogDataSource , com.android.dialer.calllog.datasources.contacts.ContactsDataSource contactsDataSource ) { java.util.List < com.android.dialer.calllog.datasources.CallLogDataSource > allDataSources = java.util.Collections.unmodifiableList ( java.util.Arrays.asList ( systemCallLogDataSource , contactsDataSource ) ) ; return new com.android.dialer.calllog.datasources.DataSources ( ) { @ java.lang.Override public com.android.dialer.calllog.datasources.systemcalllog.SystemCallLogDataSource getSystemCallLogDataSource ( ) { return systemCallLogDataSource ; } @ java.lang.Override public java.util.List < com.android.dialer.calllog.datasources.CallLogDataSource > getDataSourcesIncludingSystemCallLog ( ) { return allDataSources ; } @ java.lang.Override public java.util.List < com.android.dialer.calllog.datasources.CallLogDataSource > getDataSourcesExcludingSystemCallLog ( ) { return allDataSources.subList ( 1 , allDataSources.size ( ) ) ; } } ; }

Target:
static com.android.dialer.calllog.datasources.DataSources provideCallLogDataSources ( com.android.dialer.calllog.datasources.systemcalllog.SystemCallLogDataSource systemCallLogDataSource , com.android.dialer.calllog.datasources.contacts.ContactsDataSource contactsDataSource , com.android.dialer.calllog.datasources.phonelookup.PhoneLookupDataSource phoneLookupDataSource ) { com.google.common.collect.ImmutableList < com.android.dialer.calllog.datasources.CallLogDataSource > allDataSources = com.google.common.collect.ImmutableList.of ( systemCallLogDataSource , contactsDataSource , phoneLookupDataSource ) ; return new com.android.dialer.calllog.datasources.DataSources ( ) { @ java.lang.Override public com.android.dialer.calllog.datasources.systemcalllog.SystemCallLogDataSource getSystemCallLogDataSource ( ) { return systemCallLogDataSource ; } @ java.lang.Override public com.google.common.collect.ImmutableList < com.android.dialer.calllog.datasources.CallLogDataSource > getDataSourcesIncludingSystemCallLog ( ) { return allDataSources ; } @ java.lang.Override public com.google.common.collect.ImmutableList < com.android.dialer.calllog.datasources.CallLogDataSource > getDataSourcesExcludingSystemCallLog ( ) { return allDataSources.subList ( 1 , allDataSources.size ( ) ) ; } } ; }
Source:
private void updateViewPortTransform ( java.awt.geom.AffineTransform tx ) { mViewPortTransform = new java.awt.geom.AffineTransform ( tx ) ; try { mViewPortInverseTransform = mViewPortTransform.createInverse ( ) ; } catch ( java.awt.geom.NoninvertibleTransformException e ) { mViewPortInverseTransform = new java.awt.geom.AffineTransform ( ) ; } updateTransform ( ) ; }

Target:
public void displayThread ( @ com.android.annotations.NonNull java.lang.String threadName ) { mCallHierarchyRenderer = null ; mTimeScaleRenderer = null ; int threadId = findThreadIdFromName ( threadName ) ; if ( threadId < 0 ) { return ; } mTopLevelCall = mTraceData.getTopLevelCall ( threadId ) ; if ( ( mTopLevelCall ) == null ) { return ; } mTimeScaleRenderer = new com.android.tools.perflib.vmtrace.viz.TimeScaleRenderer ( mTopLevelCall.getEntryGlobalTime ( ) , mTraceData.getTimeUnits ( ) ) ; int yOffset = mTimeScaleRenderer.getLayoutHeight ( ) ; mCallHierarchyRenderer = new com.android.tools.perflib.vmtrace.viz.CallHierarchyRenderer ( mTraceData , mTopLevelCall , yOffset ) ; zoomFit ( ) ; }
Source:
public void testAesCbcHmacSha256Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacMd5Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , android.net.cts.IpSecManagerTest.getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
public void validateUserCredentialWithEapTls ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.userCredential = new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ; cred.userCredential.username = "username" ; cred.userCredential.password = "password" ; cred.userCredential.eapType = android.net.wifi.EAPConstants.EAP_TLS ; cred.userCredential.nonEapInnerMethod = "MS-CHAP" ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateUserCredentialWithoutRealm ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithUserCredential ( ) ; cred.setRealm ( null ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
private android.aidl.tests.ITestService getService ( ) throws android.aidl.tests.TestServiceClient.TestFailException { android.os.IBinder service = new android.os.ServiceManager ( ) . getService ( android.aidl.tests.ITestService.class . getName ( ) ) ; if ( service == null ) { mLog.logAndThrow ( "Failed to obtain binder..." ) ; } android.aidl.tests.ITestService ret = ITestService.Stub.asInterface ( service ) ; if ( ret == null ) { mLog.logAndThrow ( "Failed to cast IBinder instance." ) ; } return ret ; }

Target:
private android.aidl.tests.ITestService getService ( ) throws android.aidl.tests.TestFailException { android.os.IBinder service = new android.os.ServiceManager ( ) . getService ( android.aidl.tests.ITestService.class . getName ( ) ) ; if ( service == null ) { mLog.logAndThrow ( "Failed to obtain binder..." ) ; } android.aidl.tests.ITestService ret = ITestService.Stub.asInterface ( service ) ; if ( ret == null ) { mLog.logAndThrow ( "Failed to cast IBinder instance." ) ; } return ret ; }
Source:
public java.awt.Rectangle getLayoutRec ( final int position , final int fixedPos , final int length , final int fixedFitLength ) { return new java.awt.Rectangle ( position , fixedPos , length , fixedFitLength ) ; }

Target:
public java.awt.Rectangle getLayoutRec ( final int position , final int fixedPos , final int length , final int fixedFitLength ) { return new java.awt.Rectangle ( position , ( fixedPos + ( ( myTabs.getTabsPosition ( ) ) == ( com.intellij.ui.tabs.JBTabsPosition.bottom ) ? 1 : 0 ) ) , length , fixedFitLength ) ; }
Source:
private void writeOneBuffer ( com.android.volley.toolbox.ByteArrayPool pool ) throws java.io.IOException { byte [ ] data = new byte [ 16384 ] ; for ( int i = 0 ; i < ( data.length ) ; i ++ ) { data [ i ] = ( ( byte ) ( i & 255 ) ) ; } com.android.volley.toolbox.PoolingByteArrayOutputStream os = new com.android.volley.toolbox.PoolingByteArrayOutputStream ( pool ) ; os.write ( data ) ; assertTrue ( java.util.Arrays.equals ( data , os.toByteArray ( ) ) ) ; }

Target:
private void writeOneBuffer ( com.android.volley.toolbox.ByteArrayPool pool ) throws java.io.IOException { byte [ ] data = new byte [ 16384 ] ; for ( int i = 0 ; i < ( data.length ) ; i ++ ) { data [ i ] = ( ( byte ) ( i & 255 ) ) ; } com.android.volley.toolbox.PoolingByteArrayOutputStream os = new com.android.volley.toolbox.PoolingByteArrayOutputStream ( pool ) ; os.write ( data ) ; org.junit.Assert.assertTrue ( java.util.Arrays.equals ( data , os.toByteArray ( ) ) ) ; }
Source:
void continueUserSwitch ( com.android.server.am.UserState uss , int oldUserId , int newUserId ) { completeSwitchAndInitialize ( uss , newUserId , false , true ) ; }

Target:
public void resizeDockedStack ( android.graphics.Rect dockedBounds , android.graphics.Rect tempDockedTaskBounds , android.graphics.Rect tempDockedTaskInsetBounds , android.graphics.Rect tempOtherTaskBounds , android.graphics.Rect tempOtherTaskInsetBounds ) { enforceCallingPermission ( android.Manifest.permission.MANAGE_ACTIVITY_STACKS , "resizeDockedStack()" ) ; long ident = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { mStackSupervisor.resizeDockedStackLocked ( dockedBounds , tempDockedTaskBounds , tempDockedTaskInsetBounds , tempOtherTaskBounds , tempOtherTaskInsetBounds , com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS ) ; } } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } }
Source:
final void get ( double [ ] dst , int dstOffset , int doubleCount ) { int byteCount = checkGetBounds ( SizeOf.DOUBLE , dst.length , dstOffset , doubleCount ) ; this . block.peekDoubleArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , doubleCount , order.needsSwap ) ; position += byteCount ; }

Target:
public final long getLong ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.LONG ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } long result = this . block.peekLong ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }
Source:
public void test_socket_IllegalBlockingModeException ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel channel = java.nio.channels.DatagramChannel.open ( ) ; channel.configureBlocking ( false ) ; java.net.DatagramSocket socket = channel.socket ( ) ; try { socket.send ( null ) ; fail ( "should throw IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } try { socket.receive ( null ) ; fail ( "should throw IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } }

Target:
public void test_socket_IllegalBlockingModeException ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel channel = java.nio.channels.DatagramChannel.open ( ) ; channel.configureBlocking ( false ) ; java.net.DatagramSocket socket = channel.socket ( ) ; try { socket.send ( null ) ; fail ( "should throw IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } try { socket.receive ( null ) ; fail ( "should throw IllegalBlockingModeException" ) ; } catch ( java.nio.channels.IllegalBlockingModeException e ) { } channel.close ( ) ; }
Source:
private void verifyNorm ( ) throws java.lang.Throwable { float expectedMagneticFieldEarth = ( ( android.hardware.SensorManager.MAGNETIC_FIELD_EARTH_MAX ) + ( android.hardware.SensorManager.MAGNETIC_FIELD_EARTH_MIN ) ) / 2 ; float magneticFieldEarthThreshold = expectedMagneticFieldEarth - ( android.hardware.SensorManager.MAGNETIC_FIELD_EARTH_MIN ) ; android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation verifyNorm = new android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation ( this . getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyNorm.verifyMagnitude ( expectedMagneticFieldEarth , magneticFieldEarthThreshold ) ; verifyNorm.execute ( ) ; logSuccess ( ) ; }

Target:
private void verifyNorm ( ) throws java.lang.Throwable { float expectedMagneticFieldEarth = ( ( android.hardware.SensorManager.MAGNETIC_FIELD_EARTH_MAX ) + ( android.hardware.SensorManager.MAGNETIC_FIELD_EARTH_MIN ) ) / 2 ; float magneticFieldEarthThreshold = expectedMagneticFieldEarth - ( android.hardware.SensorManager.MAGNETIC_FIELD_EARTH_MIN ) ; android.hardware.cts.helpers.sensoroperations.VerifySensorOperation verifyNorm = new android.hardware.cts.helpers.sensoroperations.VerifySensorOperation ( this . getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyNorm.verifyMagnitude ( expectedMagneticFieldEarth , magneticFieldEarthThreshold ) ; verifyNorm.execute ( ) ; logSuccess ( ) ; }
Source:
public com.google.appengine.api.datastore.Entity toEntity ( ) { com.google.appengine.api.datastore.Entity testCaseRunEntity = new com.google.appengine.api.datastore.Entity ( key ) ; testCaseRunEntity.setProperty ( com.android.vts.entity.TestCaseRunEntity.TEST_CASE_NAME , this . testCaseName ) ; testCaseRunEntity.setProperty ( com.android.vts.entity.TestCaseRunEntity.RESULT , this . result ) ; if ( ( systraceUrl ) != null ) { testCaseRunEntity.setUnindexedProperty ( com.android.vts.entity.TestCaseRunEntity.SYSTRACE_URL , this . systraceUrl ) ; } return testCaseRunEntity ; }

Target:
public boolean isFull ( ) { return ( this . testCases.size ( ) ) >= ( com.android.vts.entity.TestCaseRunEntity.SIZE_LIMIT ) ; }
Source:
private static < K , V > com.google.common.collect.MapDifference < K , V > mapDifference ( boolean areEqual , java.util.Map < K , V > onlyOnLeft , java.util.Map < K , V > onlyOnRight , java.util.Map < K , V > onBoth , java.util.Map < K , com.google.common.collect.MapDifference.ValueDifference < V > > differences ) { return new com.google.common.collect.Maps.MapDifferenceImpl < K , V > ( areEqual , java.util.Collections.unmodifiableMap ( onlyOnLeft ) , java.util.Collections.unmodifiableMap ( onlyOnRight ) , java.util.Collections.unmodifiableMap ( onBoth ) , java.util.Collections.unmodifiableMap ( differences ) ) ; }

Target:
static < K , V > java.util.Iterator < K > keyIterator ( java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator ) { return com.google.common.collect.Iterators.transform ( entryIterator , com.google.common.collect.Maps.< K > keyFunction ( ) ) ; }
Source:
private java.lang.String readPath ( java.io.FileInputStream fis , com.android.builder.internal.incremental.DependencyDataStore.ReusableBuffer buffers ) throws java.io.IOException { int length = readInt ( fis , buffers ) ; if ( ( ( buffers.pathBuffer ) == null ) || ( ( buffers.pathBuffer.length ) < length ) ) { buffers.pathBuffer = new byte [ length ] ; } int read = fis.read ( buffers.pathBuffer , 0 , length ) ; if ( read != length ) { throw new java.io.IOException ( "Failed to read path" ) ; } return new java.lang.String ( buffers.pathBuffer , 0 , length , com.google.common.base.Charsets.UTF_8 ) ; }

Target:
private static java.lang.String readPath ( @ com.android.annotations.NonNull java.io.FileInputStream fis , @ com.android.annotations.NonNull com.android.builder.internal.incremental.DependencyDataStore.ReusableBuffer buffers ) throws java.io.IOException { int length = com.android.builder.internal.incremental.DependencyDataStore.readInt ( fis , buffers ) ; if ( ( ( buffers.pathBuffer ) == null ) || ( ( buffers.pathBuffer.length ) < length ) ) { buffers.pathBuffer = new byte [ length ] ; } int read = fis.read ( buffers.pathBuffer , 0 , length ) ; if ( read != length ) { throw new java.io.IOException ( "Failed to read path" ) ; } return new java.lang.String ( buffers.pathBuffer , 0 , length , com.google.common.base.Charsets.UTF_8 ) ; }
Source:
protected vogar.commands.VmCommandBuilder newVmCommandBuilder ( vogar.Mode mode ) { vogar.Action action = new vogar.Action ( "fred" , "blah" , new java.io.File ( "resources" ) , new java.io.File ( "source" ) , new java.io.File ( "java" ) ) ; return mode.newVmCommandBuilder ( action , new java.io.File ( "/work" ) ) ; }

Target:
protected vogar.commands.VmCommandBuilder newVmCommandBuilder ( vogar.Mode mode ) { vogar.Action action = new vogar.Action ( "action" , "blah" , new java.io.File ( "resources" ) , new java.io.File ( "source" ) , new java.io.File ( "java" ) ) ; return mode.newVmCommandBuilder ( action , new java.io.File ( "/work" ) ) ; }
Source:
private void notifyInterfaceLinkStateChanged ( java.lang.String iface , boolean up ) { final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { mObservers.getBroadcastItem ( i ) . interfaceLinkStateChanged ( iface , up ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }

Target:
private void notifyInterfaceLinkStateChanged ( java.lang.String iface , boolean up ) { invokeForAllObservers ( ( o ) -> o.interfaceLinkStateChanged ( iface , up ) ) ; }
Source:
public java.lang.String getBuildGradleContent ( ) { return ( ( ( ( ( ( "apply plugin: \'com.android.library\'\n" + ( ( "\n" + "android {\n" ) + " compileSdkVersion " ) ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_COMPILE_SDK_VERSION ) ) + "\n" ) + " buildToolsVersion '" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_BUILD_TOOL_VERSION ) ) + "\'\n" ) + "}\n" ; }

Target:
public java.lang.String getBuildGradleContent ( ) { return ( ( ( ( ( ( ( ( ( ( ( "apply plugin: \'com.android.library\'\n" + ( ( "\n" + "android {\n" ) + " compileSdkVersion " ) ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_COMPILE_SDK_VERSION ) ) + "\n" ) + " buildToolsVersion '" ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.DEFAULT_BUILD_TOOL_VERSION ) ) + "\'\n" ) + " defaultConfig {\n" ) + " useJack " ) + ( com.android.build.gradle.integration.common.fixture.GradleTestProject.CUSTOM_JACK ) ) + "\n" ) + " }\n" ) + "}\n" ; }
Source:
public void test_getFileStore ( ) throws java.io.IOException { java.nio.file.FileStore mockFileStore = org.mockito.Mockito.mock ( java.nio.file.FileStore.class ) ; org.mockito.Mockito.when ( mockFileSystemProvider.getFileStore ( mockPath ) ) . thenReturn ( mockFileStore ) ; org.junit.Assert.assertEquals ( mockFileStore , java.nio.file.Files.getFileStore ( mockPath ) ) ; }

Target:
public void test_getFileStore ( ) throws java.io.IOException { org.mockito.Mockito.when ( mockFileSystemProvider.getFileStore ( mockPath ) ) . thenThrow ( new java.lang.SecurityException ( ) ) ; try { java.nio.file.Files.getFileStore ( mockPath ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.SecurityException expected ) { } }
Source:
public com.android.dx.io.Annotation adjust ( com.android.dx.io.Annotation annotation ) { com.android.dx.util.ByteArrayAnnotatedOutput out = new com.android.dx.util.ByteArrayAnnotatedOutput ( 32 ) ; new com.android.dx.merge.IndexMap.EncodedValueTransformer ( out ) . transformAnnotation ( annotation.getReader ( ) ) ; return new com.android.dx.io.Annotation ( target , annotation.getVisibility ( ) , new com.android.dx.io.EncodedValue ( out.toByteArray ( ) ) ) ; }

Target:
public com.android.dex.Annotation adjust ( com.android.dex.Annotation annotation ) { com.android.dx.util.ByteArrayAnnotatedOutput out = new com.android.dx.util.ByteArrayAnnotatedOutput ( 32 ) ; new com.android.dx.merge.IndexMap.EncodedValueTransformer ( out ) . transformAnnotation ( annotation.getReader ( ) ) ; return new com.android.dex.Annotation ( target , annotation.getVisibility ( ) , new com.android.dex.EncodedValue ( out.toByteArray ( ) ) ) ; }
Source:
private void rename ( @ javax.annotation.Nonnull com.android.jack.ir.ast.CanBeRenamed renamable , @ javax.annotation.Nonnull java.lang.String newName ) { com.android.sched.marker.MarkerManager markerManager = ( ( com.android.sched.marker.MarkerManager ) ( renamable ) ) ; if ( ! ( markerManager.containsMarker ( com.android.jack.shrob.obfuscation.OriginalNameMarker.class ) ) ) { markerManager.addMarker ( new com.android.jack.shrob.obfuscation.OriginalNameMarker ( ( ( com.android.jack.ir.ast.HasName ) ( renamable ) ) . getName ( ) ) ) ; request.append ( new com.android.jack.transformations.request.Rename ( renamable , newName ) ) ; } }

Target:
private void rename ( @ javax.annotation.Nonnull com.android.jack.ir.ast.CanBeRenamed renamable , @ javax.annotation.Nonnull java.lang.String newName , @ javax.annotation.Nonnull com.android.jack.transformations.request.TransformationRequest transformationRequest ) { com.android.sched.marker.MarkerManager markerManager = ( ( com.android.sched.marker.MarkerManager ) ( renamable ) ) ; if ( ! ( markerManager.containsMarker ( com.android.jack.shrob.obfuscation.OriginalNameMarker.class ) ) ) { markerManager.addMarker ( new com.android.jack.shrob.obfuscation.OriginalNameMarker ( ( ( com.android.jack.ir.ast.HasName ) ( renamable ) ) . getName ( ) ) ) ; transformationRequest.append ( new com.android.jack.transformations.request.Rename ( renamable , newName ) ) ; } }
Source:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { model.setSelected ( ( ( com.android.hierarchyviewerlib.device.ViewNode ) ( e.item.getData ( ) ) ) ) ; }

Target:
public void widgetSelected ( org.eclipse.swt.events.SelectionEvent e ) { if ( ( ( org.eclipse.jface.viewers.TreeSelection ) ( treeViewer.getSelection ( ) ) ) . isEmpty ( ) ) { model.setSelected ( null ) ; } else { model.setSelected ( ( ( com.android.hierarchyviewerlib.device.ViewNode ) ( e.item.getData ( ) ) ) ) ; } }
Source:
public java.util.List < com.android.tv.dvr.ScheduledRecording > getScheduledRecordings ( android.util.Range < java.lang.Long > period , @ com.android.tv.dvr.ScheduledRecording.RecordingState int state ) { java.util.List < com.android.tv.dvr.ScheduledRecording > temp = getScheduledRecordingsPrograms ( ) ; java.util.List < com.android.tv.dvr.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.ScheduledRecording r : temp ) { if ( ( r.isOverLapping ( period ) ) && ( ( r.getState ( ) ) == state ) ) { result.add ( r ) ; } } return result ; }

Target:
public java.util.List < com.android.tv.dvr.data.ScheduledRecording > getScheduledRecordings ( android.util.Range < java.lang.Long > period , @ com.android.tv.dvr.data.ScheduledRecording.RecordingState int state ) { java.util.List < com.android.tv.dvr.data.ScheduledRecording > temp = getScheduledRecordingsPrograms ( ) ; java.util.List < com.android.tv.dvr.data.ScheduledRecording > result = new java.util.ArrayList < > ( ) ; for ( com.android.tv.dvr.data.ScheduledRecording r : temp ) { if ( ( r.isOverLapping ( period ) ) && ( ( r.getState ( ) ) == state ) ) { result.add ( r ) ; } } return result ; }
Source:
public void setUp ( ) throws java.lang.Exception { mResource = getResource ( ) ; mScoreManager = getScoreManager ( ) ; mContext = getContext ( ) ; mWifiConfigManager = getWifiConfigManager ( ) ; when ( mClock.getElapsedSinceBootMillis ( ) ) . thenReturn ( android.os.SystemClock.elapsedRealtime ( ) ) ; mThresholdQualifiedRssi2G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz ) ; mThresholdQualifiedRssi5G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz ) ; mExternalScoreEvaluator = new com.android.server.wifi.ExternalScoreEvaluator ( mContext , mWifiConfigManager , mClock , null ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mResource = getResource ( ) ; mScoreManager = mock ( android.net.NetworkScoreManager.class ) ; mContext = getContext ( ) ; mScoreCache = new android.net.wifi.WifiNetworkScoreCache ( mContext ) ; mWifiConfigManager = getWifiConfigManager ( ) ; when ( mClock.getElapsedSinceBootMillis ( ) ) . thenReturn ( android.os.SystemClock.elapsedRealtime ( ) ) ; mThresholdQualifiedRssi2G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz ) ; mThresholdQualifiedRssi5G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz ) ; mExternalScoreEvaluator = new com.android.server.wifi.ExternalScoreEvaluator ( mContext , mWifiConfigManager , mScoreCache , mClock , null ) ; }
Source:
public void saveWebArchive ( final java.lang.String basename , final boolean autoname , final android.webkit.ValueCallback < java.lang.String > callback ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { saveWebArchive ( basename , autoname , callback ) ; } } ) ; return ; } mAwContents.saveWebArchive ( basename , autoname , callback ) ; }

Target:
public void setNetworkAvailable ( final boolean networkUp ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setNetworkAvailable ( networkUp ) ; } } ) ; return ; } mAwContents.setNetworkAvailable ( networkUp ) ; }
Source:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.internal.telephony.LocaleTracker.EVENT_GET_CELL_INFO : synchronized ( this ) { getCellInfo ( ) ; updateLocale ( ) ; } break ; default : throw new java.lang.IllegalStateException ( ( "Unexpected message arrives. msg = " + ( msg.what ) ) ) ; } }

Target:
public void handleMessage ( android.os.Message msg ) { switch ( msg.what ) { case com.android.internal.telephony.LocaleTracker.EVENT_GET_CELL_INFO : synchronized ( this ) { getCellInfo ( ) ; updateLocale ( ) ; } break ; case com.android.internal.telephony.LocaleTracker.EVENT_UPDATE_OPERATOR_NUMERIC : updateOperatorNumericSync ( ( ( java.lang.String ) ( msg.obj ) ) ) ; break ; default : throw new java.lang.IllegalStateException ( ( "Unexpected message arrives. msg = " + ( msg.what ) ) ) ; } }
Source:
public boolean startUserInBackground ( final int userId ) { return startUser ( userId , false ) ; }

Target:
private final boolean canGcNowLocked ( ) { boolean processingBroadcasts = false ; for ( com.android.server.am.BroadcastQueue q : mBroadcastQueues ) { if ( ( ( q.mParallelBroadcasts.size ( ) ) != 0 ) || ( ( q.mOrderedBroadcasts.size ( ) ) != 0 ) ) { processingBroadcasts = true ; } } return ( ! processingBroadcasts ) && ( ( isSleepingLocked ( ) ) || ( mStackSupervisor.allResumedActivitiesIdle ( ) ) ) ; }
Source:
public static final javax.crypto.KeyAgreement getInstance ( java.lang.String algorithm , java.lang.String provider ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException { if ( ( provider == null ) || ( provider.isEmpty ( ) ) ) { throw new java.lang.IllegalArgumentException ( "Provider is null or empty" ) ; } java.security.Provider impProvider = java.security.Security.getProvider ( provider ) ; if ( impProvider == null ) { throw new java.security.NoSuchProviderException ( provider ) ; } return javax.crypto.KeyAgreement.getInstance ( algorithm , impProvider ) ; }

Target:
public static final javax.crypto.KeyAgreement getInstance ( java.lang.String algorithm , java.lang.String provider ) throws java.security.NoSuchAlgorithmException , java.security.NoSuchProviderException { if ( ( provider == null ) || ( provider.isEmpty ( ) ) ) { throw new java.lang.IllegalArgumentException ( "Provider is null or empty" ) ; } java.security.Provider impProvider = java.security.Security.getProvider ( provider ) ; if ( impProvider == null ) { throw new java.security.NoSuchProviderException ( provider ) ; } return javax.crypto.KeyAgreement.getKeyAgreement ( algorithm , impProvider ) ; }
Source:
public void testEvaluateNetworks_recommendationsDisabled ( ) { org.mockito.Mockito.when ( mFrameworkFacade.getIntegerSetting ( mContext , Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED , 0 ) ) . thenReturn ( 0 ) ; mRecommendedNetworkEvaluator.mContentObserver.onChange ( false ) ; mRecommendedNetworkEvaluator.evaluateNetworks ( null , null , null , false , false , null ) ; org.mockito.Mockito.verifyZeroInteractions ( mWifiConfigManager , mNetworkScoreManager ) ; }

Target:
public void testEvaluateNetworks_emptyScanList ( ) { android.net.wifi.WifiConfiguration result = mRecommendedNetworkEvaluator.evaluateNetworks ( new java.util.ArrayList < com.android.server.wifi.ScanDetail > ( ) , null , null , false , false , null ) ; junit.framework.Assert.assertNull ( result ) ; verifyZeroInteractions ( mWifiConfigManager , mNetworkScoreManager ) ; }
Source:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 150 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectAvailableCallbacks ( mWiFiNetworkAgent , false , timeoutMs ) ; networkCallback.assertNoCallback ( ) ; }

Target:
public void testSatisfiedNetworkRequestDoesNotTriggerOnUnavailable ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; final int timeoutMs = 150 ; mCm.requestNetwork ( nr , networkCallback , timeoutMs ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( android.net.NetworkCapabilities.TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.expectAvailableCallbacks ( mWiFiNetworkAgent , false , timeoutMs ) ; networkCallback.assertNoCallback ( ) ; }
Source:
public void onResult ( int result ) { this . mResult = result ; }

Target:
public void onResult ( int result ) { this . mResult = result ; if ( ( result == ( org.chromium.mojo.system.MojoResult.OK ) ) && ( ( mReadPipe ) != null ) ) { mReadPipe.readMessage ( null , 0 , MessagePipeHandle.ReadFlags.none ( ) . setMayDiscard ( true ) ) ; } }
Source:
public boolean lookingAt ( ) { synchronized ( this ) { matchFound = java.util.regex.Matcher.lookingAtImpl ( address , matchOffsets ) ; } return matchFound ; }

Target:
public boolean find ( int start ) { if ( ( start < 0 ) || ( start > ( input.length ( ) ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ( ( ( "start=" + start ) + "; length=" ) + ( input.length ( ) ) ) ) ; } synchronized ( this ) { matchFound = java.util.regex.Matcher.findImpl ( address , input , start , matchOffsets ) ; } return matchFound ; }
Source:
private static java.lang.String getShortIDFromCanonical ( java.lang.String canonicalID ) { java.lang.String shortID = null ; java.lang.String tzidKey = canonicalID.replace ( '/' , ':' ) ; try { com.ibm.icu.util.UResourceBundle keyTypeData = com.ibm.icu.util.UResourceBundle.getBundleInstance ( ICUResourceBundle.ICU_BASE_NAME , "keyTypeData" , ICUResourceBundle.ICU_DATA_CLASS_LOADER ) ; com.ibm.icu.util.UResourceBundle typeMap = keyTypeData.get ( "typeMap" ) ; com.ibm.icu.util.UResourceBundle typeKeys = typeMap.get ( "timezone" ) ; shortID = typeKeys.getString ( tzidKey ) ; } catch ( java.util.MissingResourceException e ) { } return shortID ; }

Target:
private static java.lang.String getShortIDFromCanonical ( java.lang.String canonicalID ) { java.lang.String shortID = null ; java.lang.String tzidKey = canonicalID.replace ( '/' , ':' ) ; try { com.ibm.icu.util.UResourceBundle keyTypeData = com.ibm.icu.util.UResourceBundle.getBundleInstance ( ICUData.ICU_BASE_NAME , "keyTypeData" , ICUResourceBundle.ICU_DATA_CLASS_LOADER ) ; com.ibm.icu.util.UResourceBundle typeMap = keyTypeData.get ( "typeMap" ) ; com.ibm.icu.util.UResourceBundle typeKeys = typeMap.get ( "timezone" ) ; shortID = typeKeys.getString ( tzidKey ) ; } catch ( java.util.MissingResourceException e ) { } return shortID ; }
Source:
public E take ( ) throws java.lang.InterruptedException { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == 0 ) notEmpty.await ( ) ; return extract ( ) ; } finally { lock.unlock ( ) ; } }

Target:
public E poll ( ) { final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lock ( ) ; try { return ( count ) == 0 ? null : dequeue ( ) ; } finally { lock.unlock ( ) ; } }
Source:
protected vogar.Result execute ( ) throws java.lang.Exception { vogar.Classpath cp = vogar.Classpath.of ( jar ) ; if ( ( benchmark ) && ( ( action ) != null ) ) { cp.addAll ( classpath ) ; } androidSdk.dex ( localDex , cp ) ; return vogar.Result.SUCCESS ; }

Target:
protected vogar.Result execute ( ) throws java.lang.Exception { vogar.Classpath cp = vogar.Classpath.of ( jar ) ; if ( ( benchmark ) && ( ( action ) != null ) ) { cp.addAll ( classpath ) ; } androidSdk.dex ( multidex , localDex , cp ) ; return vogar.Result.SUCCESS ; }
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 ) ; try { java.lang.Thread.sleep ( 15 ) ; } catch ( java.lang.InterruptedException e ) { } 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 ( ) ; 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 ( ) ; }
Source:
public void setLinkAddresses ( java.util.Collection < android.net.LinkAddress > addresses ) { mLinkAddresses.clear ( ) ; for ( android.net.LinkAddress address : addresses ) { addLinkAddress ( address ) ; } }

Target:
public boolean addLinkAddress ( android.net.LinkAddress address ) { if ( address == null ) { return false ; } int i = findLinkAddressIndex ( address ) ; if ( i < 0 ) { mLinkAddresses.add ( address ) ; return true ; } else if ( mLinkAddresses.get ( i ) . equals ( address ) ) { return false ; } else { mLinkAddresses.set ( i , address ) ; return true ; } }
Source:
public void deviceAttached ( android.hardware.usb.UsbDevice device ) { android.content.Intent intent = new android.content.Intent ( android.hardware.usb.UsbManager.ACTION_USB_DEVICE_ATTACHED ) ; intent.putExtra ( UsbManager.EXTRA_DEVICE , device ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; java.util.ArrayList < android.content.pm.ResolveInfo > matches ; java.lang.String defaultPackage ; synchronized ( mLock ) { matches = getDeviceMatchesLocked ( device , intent ) ; defaultPackage = mDevicePreferenceMap.get ( new com.android.server.usb.UsbSettingsManager.DeviceFilter ( device ) ) ; } resolveActivity ( intent , matches , defaultPackage , device , null ) ; }

Target:
public void deviceAttached ( android.hardware.usb.UsbDevice device ) { android.content.Intent intent = new android.content.Intent ( android.hardware.usb.UsbManager.ACTION_USB_DEVICE_ATTACHED ) ; intent.putExtra ( UsbManager.EXTRA_DEVICE , device ) ; intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK ) ; java.util.ArrayList < android.content.pm.ResolveInfo > matches ; java.lang.String defaultPackage ; synchronized ( mLock ) { matches = getDeviceMatchesLocked ( device , intent ) ; defaultPackage = mDevicePreferenceMap.get ( new com.android.server.usb.UsbSettingsManager.DeviceFilter ( device ) ) ; } mUserContext.sendBroadcast ( intent ) ; resolveActivity ( intent , matches , defaultPackage , device , null ) ; }
Source:
public void testWriteMissingFile ( ) throws java.lang.Exception { final java.io.File file = new java.io.File ( mContext.getFilesDir ( ) , android.support.v4.content.FileProviderTest.TEST_FILE ) ; final android.net.Uri uri = stageFileAndGetUri ( file , null ) ; try { assertContentsEquals ( new byte [ 0 ] , uri ) ; fail ( "Somehow read missing file?" ) ; } catch ( java.io.FileNotFoundException e ) { } final java.io.OutputStream out = mResolver.openOutputStream ( uri ) ; try { out.write ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT ) ; } finally { libcore.io.IoUtils.closeQuietly ( out ) ; } assertContentsEquals ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT , uri ) ; }

Target:
public void testWriteMissingFile ( ) throws java.lang.Exception { final java.io.File file = new java.io.File ( mContext.getFilesDir ( ) , android.support.v4.content.FileProviderTest.TEST_FILE ) ; final android.net.Uri uri = stageFileAndGetUri ( file , null ) ; try { assertContentsEquals ( new byte [ 0 ] , uri ) ; fail ( "Somehow read missing file?" ) ; } catch ( java.io.FileNotFoundException e ) { } final java.io.OutputStream out = mResolver.openOutputStream ( uri ) ; try { out.write ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT ) ; } finally { android.support.v4.content.FileProviderTest.closeQuietly ( out ) ; } assertContentsEquals ( android.support.v4.content.FileProviderTest.TEST_DATA_ALT , uri ) ; }
Source:
private boolean isCallToSyntheticCloseResource ( int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc ) { if ( opcode != ( org.objectweb.asm.Opcodes.INVOKESTATIC ) ) { return false ; } if ( ! ( internalName.equals ( owner ) ) ) { return false ; } if ( ! ( com.google.devtools.build.android.desugar.TryWithResourcesRewriter.CLOSE_RESOURCE_METHOD_NAME.equals ( name ) ) ) { return false ; } if ( ! ( com.google.devtools.build.android.desugar.TryWithResourcesRewriter.CLOSE_RESOURCE_METHOD_DESC.equals ( desc ) ) ) { return false ; } return true ; }

Target:
public static boolean isCallToSyntheticCloseResource ( java.lang.String currentClassInternalName , int opcode , java.lang.String owner , java.lang.String name , java.lang.String desc ) { if ( opcode != ( org.objectweb.asm.Opcodes.INVOKESTATIC ) ) { return false ; } if ( ! ( currentClassInternalName.equals ( owner ) ) ) { return false ; } if ( ! ( com.google.devtools.build.android.desugar.TryWithResourcesRewriter.CLOSE_RESOURCE_METHOD_NAME.equals ( name ) ) ) { return false ; } if ( ! ( com.google.devtools.build.android.desugar.TryWithResourcesRewriter.CLOSE_RESOURCE_METHOD_DESC.equals ( desc ) ) ) { return false ; } return true ; }
Source:
private static void deleteSubElement ( @ javax.annotation.Nonnull java.io.File dir ) { if ( dir.isDirectory ( ) ) { java.io.File [ ] fileList = dir.listFiles ( ) ; if ( fileList == null ) { throw new com.android.sched.util.ConcurrentIOException ( new com.android.sched.vfs.ListDirException ( dir ) ) ; } for ( java.io.File sub : fileList ) { com.android.sched.util.file.FileUtils.deleteSubElement ( sub ) ; } } dir.delete ( ) ; }

Target:
private static void deleteSubElement ( @ javax.annotation.Nonnull java.io.File dir ) { if ( dir.isDirectory ( ) ) { java.io.File [ ] fileList = dir.listFiles ( ) ; if ( fileList == null ) { throw new com.android.sched.util.ConcurrentIOException ( new com.android.sched.util.file.CannotListDirException ( new com.android.sched.util.location.DirectoryLocation ( dir ) ) ) ; } for ( java.io.File sub : fileList ) { com.android.sched.util.file.FileUtils.deleteSubElement ( sub ) ; } } dir.delete ( ) ; }
Source:
void reset ( ) { java.lang.System.setProperties ( null ) ; java.lang.System.setProperties ( mProperties ) ; java.util.Locale.setDefault ( mDefaultLocale ) ; java.util.TimeZone.setDefault ( mDefaultTimeZone ) ; java.net.Authenticator.setDefault ( null ) ; java.net.CookieHandler.setDefault ( null ) ; java.net.ResponseCache.setDefault ( null ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( mHostnameVerifier ) ; javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory ( mSslSocketFactory ) ; }

Target:
void reset ( ) { java.lang.System.setProperties ( null ) ; java.lang.System.setProperties ( mProperties ) ; java.util.Locale.setDefault ( mDefaultLocale ) ; java.util.TimeZone.setDefault ( mDefaultTimeZone ) ; java.net.Authenticator.setDefault ( null ) ; java.net.CookieHandler.setDefault ( null ) ; java.net.ResponseCache.setDefault ( null ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( mHostnameVerifier ) ; javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory ( mSslSocketFactory ) ; com.android.cts.runner.CtsTestRunListener.TestEnvironment.setDateFormatIs24Hour ( mDefaultIs24Hour ) ; }
Source:
public void currentPhysicalChannelConfigs ( int indicationType , java.util.ArrayList < android.hardware.radio.V1_2.PhysicalChannelConfig > configs ) { }

Target:
public void currentSignalStrength_1_2 ( int indicationType , com.android.internal.telephony.V1_2.SignalStrength signalStrength ) { mRil.processIndication ( indicationType ) ; android.telephony.SignalStrength ss = com.android.internal.telephony.RIL.convertHalSignalStrength_1_2 ( signalStrength ) ; if ( RIL.RILJ_LOGV ) mRil.unsljLogvRet ( com.android.internal.telephony.RILConstants.RIL_UNSOL_SIGNAL_STRENGTH , ss ) ; if ( ( mRil.mSignalStrengthRegistrant ) != null ) { mRil.mSignalStrengthRegistrant.notifyRegistrant ( new android.os.AsyncResult ( null , ss , null ) ) ; } }
Source:
public void test_sigDigitPatterns ( ) throws java.lang.Exception { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( java.util.Locale.US ) ) ) ; format.applyPattern ( "@@@" ) ; assertEquals ( "sigDigit doesn't work" , "12300" , format.format ( 12345 ) ) ; assertEquals ( "sigDigit doesn't work" , "0.123" , format.format ( 0.12345 ) ) ; format.applyPattern ( "@@##" ) ; assertEquals ( "sigDigit doesn't work" , "3.142" , format.format ( 3.14159 ) ) ; assertEquals ( "sigDigit doesn't work" , "1.23" , format.format ( 1.23004 ) ) ; format.applyPattern ( "@@###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; format.applyPattern ( "0.0###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; try { format.applyPattern ( "@00" ) ; fail ( ( "expected IllegalArgumentException was not thrown for " + "pattern \"@00\"." ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } }

Target:
public void test_sigDigitPatterns ( ) throws java.lang.Exception { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( java.util.Locale.US ) ) ) ; format.applyPattern ( "@@@" ) ; assertEquals ( "sigDigit doesn't work" , "12300" , format.format ( 12345 ) ) ; assertEquals ( "sigDigit doesn't work" , "0.123" , format.format ( 0.12345 ) ) ; format.applyPattern ( "@@##" ) ; assertEquals ( "sigDigit doesn't work" , "3.142" , format.format ( 3.14159 ) ) ; assertEquals ( "sigDigit doesn't work" , "1.23" , format.format ( 1.23004 ) ) ; format.applyPattern ( "@@###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; format.applyPattern ( "0.0###E0" ) ; assertEquals ( "1.23E1" , format.format ( 12.3 ) ) ; try { format.applyPattern ( "@00" ) ; fail ( ( "expected IllegalArgumentException was not thrown for " + "pattern \"@00\"." ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } try { format.applyPattern ( "@.###" ) ; fail ( ( "expected IllegalArgumentException was not thrown for " + "pattern \"@.###\"." ) ) ; } catch ( java.lang.IllegalArgumentException e ) { } }
Source:
public java.lang.String uninstallPackage ( java.lang.String packageName ) throws com.android.ddmlib.InstallException { try { com.android.ddmlib.Device.InstallReceiver receiver = new com.android.ddmlib.Device.InstallReceiver ( ) ; executeShellCommand ( ( "pm uninstall " + packageName ) , receiver , com.android.ddmlib.Device.INSTALL_TIMEOUT ) ; return receiver.getErrorMessage ( ) ; } catch ( com.android.ddmlib.TimeoutException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.ShellCommandUnresponsiveException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( java.io.IOException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } }

Target:
public java.lang.String uninstallPackage ( java.lang.String packageName ) throws com.android.ddmlib.InstallException { try { com.android.ddmlib.Device.InstallReceiver receiver = new com.android.ddmlib.Device.InstallReceiver ( ) ; executeShellCommand ( ( "pm uninstall " + packageName ) , receiver , com.android.ddmlib.Device.INSTALL_TIMEOUT_MINUTES , java.util.concurrent.TimeUnit.MINUTES ) ; return receiver.getErrorMessage ( ) ; } catch ( com.android.ddmlib.TimeoutException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.ShellCommandUnresponsiveException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( java.io.IOException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } }
Source:
private void replyToMessage ( android.os.Message msg , int what , java.lang.Object obj ) { if ( ( msg.replyTo ) == null ) return ; android.os.Message dstMsg = obtainMessageWithArg2 ( msg ) ; dstMsg.what = what ; dstMsg.obj = obj ; mReplyChannel.replyToMessage ( msg , dstMsg ) ; }

Target:
private void replyToMessage ( android.os.Message msg , int what , java.lang.Object obj ) { if ( ( msg.replyTo ) == null ) return ; android.os.Message dstMsg = obtainMessageWithWhatAndArg2 ( msg , what ) ; dstMsg.obj = obj ; mReplyChannel.replyToMessage ( msg , dstMsg ) ; }
Source:
public void testCarrierNetworkChange_roamingBeforeNetworkChange ( ) { int strength = android.telephony.SignalStrength.SIGNAL_STRENGTH_GREAT ; setupDefaultSignal ( ) ; setLevel ( strength ) ; setGsmRoaming ( true ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON , true ) ; setCarrierNetworkChange ( true ) ; verifyLastMobileDataIndicators ( true , com.android.systemui.statusbar.phone.SignalDrawable.getCarrierChangeState ( SignalStrength.NUM_SIGNAL_STRENGTH_BINS ) , 0 , false ) ; setCarrierNetworkChange ( false ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON , true ) ; }

Target:
public void testCarrierNetworkChange_roamingBeforeNetworkChange ( ) { int strength = android.telephony.SignalStrength.SIGNAL_STRENGTH_GREAT ; setupDefaultSignal ( ) ; setLevel ( strength ) ; setGsmRoaming ( true ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON , true ) ; setCarrierNetworkChange ( true ) ; verifyLastMobileDataIndicators ( true , com.android.settingslib.graph.SignalDrawable.getCarrierChangeState ( SignalStrength.NUM_SIGNAL_STRENGTH_BINS ) , 0 , false ) ; setCarrierNetworkChange ( false ) ; verifyLastMobileDataIndicators ( true , strength , com.android.systemui.statusbar.policy.DEFAULT_ICON , true ) ; }
Source:
void assertCallState ( final android.telecom.Call call , final int state ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return state ; } @ java.lang.Override public java.lang.Object actual ( ) { return call.getState ( ) ; } } , android.telecom.cts.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( ( ( "Call: " + call ) + " should be in state " ) + state ) ) ; }

Target:
void assertCallState ( final android.telecom.Call call , final int state ) { waitUntilConditionIsTrueOrTimeout ( new android.telecom.cts.BaseTelecomTestWithMockServices.Condition ( ) { @ java.lang.Override public java.lang.Object expected ( ) { return state ; } @ java.lang.Override public java.lang.Object actual ( ) { return call.getState ( ) ; } } , android.telecom.cts.TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , ( ( ( "Call: " + call ) + " should be in state " ) + state ) ) ; }