auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private com.android.layoutlib.api.LayoutScene convertToScene ( com.android.layoutlib.api.ILayoutResult result ) { com.android.layoutlib.api.SceneResult sceneResult ; com.android.layoutlib.api.ViewInfo rootViewInfo ; if ( ( result.getSuccess ( ) ) == ( com.android.layoutlib.api.ILayoutResult.SUCCESS ) ) { sceneResult = SceneStatus.SUCCESS.getResult ( ) ; rootViewInfo = convertToViewInfo ( result.getRootView ( ) ) ; } else { sceneResult = SceneStatus.ERROR_UNKNOWN.getResult ( result.getErrorMessage ( ) ) ; rootViewInfo = null ; } return new com.android.ide.common.layoutlib.BasicLayoutScene ( sceneResult , rootViewInfo , result.getImage ( ) ) ; }

Target:
private com.android.layoutlib.api.LayoutScene convertToScene ( com.android.layoutlib.api.ILayoutResult result ) { com.android.layoutlib.api.SceneResult sceneResult ; com.android.layoutlib.api.ViewInfo rootViewInfo ; if ( ( result.getSuccess ( ) ) == ( com.android.layoutlib.api.ILayoutResult.SUCCESS ) ) { sceneResult = SceneStatus.SUCCESS.createResult ( ) ; rootViewInfo = convertToViewInfo ( result.getRootView ( ) ) ; } else { sceneResult = SceneStatus.ERROR_UNKNOWN.createResult ( result.getErrorMessage ( ) ) ; rootViewInfo = null ; } return new com.android.ide.common.layoutlib.BasicLayoutScene ( sceneResult , rootViewInfo , result.getImage ( ) ) ; }
Source:
public static com.google.gct.testing.GoogleCloudTestingConfigurationImpl getConfigurationById ( int id , org.jetbrains.android.facet.AndroidFacet facet ) { for ( com.android.tools.idea.run.GoogleCloudTestingConfiguration configuration : com.google.gct.testing.GoogleCloudTestingUtils.TESTING_CONFIGURATION_FACTORY.getCustomConfigurationsFromStorage ( facet ) ) { if ( ( configuration.getId ( ) ) == id ) { return ( ( com.google.gct.testing.GoogleCloudTestingConfigurationImpl ) ( configuration ) ) ; } } for ( com.android.tools.idea.run.GoogleCloudTestingConfiguration configuration : com.google.gct.testing.GoogleCloudTestingUtils.TESTING_CONFIGURATION_FACTORY.getDefaultConfigurationsFromStorage ( facet ) ) { if ( ( configuration.getId ( ) ) == id ) { return ( ( com.google.gct.testing.GoogleCloudTestingConfigurationImpl ) ( configuration ) ) ; } } return null ; }

Target:
public static com.google.gct.testing.GoogleCloudTestingConfigurationImpl getConfigurationById ( int id , org.jetbrains.android.facet.AndroidFacet facet ) { for ( com.android.tools.idea.run.GoogleCloudTestingConfiguration configuration : com.google.gct.testing.GoogleCloudTestingUtils.TESTING_CONFIGURATION_FACTORY.getTestingConfigurations ( facet ) ) { if ( ( configuration.getId ( ) ) == id ) { return ( ( com.google.gct.testing.GoogleCloudTestingConfigurationImpl ) ( configuration ) ) ; } } return null ; }
Source:
public static com.android.internal.telephony.dataconnection.DataConnection makeDataConnection ( com.android.internal.telephony.Phone phone , int id , com.android.internal.telephony.dataconnection.DcTracker dct , com.android.internal.telephony.dataconnection.DcTesterFailBringUpAll failBringUpAll , com.android.internal.telephony.dataconnection.DcController dcc ) { com.android.internal.telephony.dataconnection.DataConnection dc = new com.android.internal.telephony.dataconnection.DataConnection ( phone , ( "DC-" + ( com.android.internal.telephony.dataconnection.DataConnection.mInstanceNumber.incrementAndGet ( ) ) ) , id , dct , failBringUpAll , dcc ) ; dc.start ( ) ; if ( com.android.internal.telephony.dataconnection.DataConnection.DBG ) dc.log ( ( "Made " + ( dc.getName ( ) ) ) ) ; return dc ; }

Target:
public static com.android.internal.telephony.dataconnection.DataConnection makeDataConnection ( com.android.internal.telephony.Phone phone , int id , com.android.internal.telephony.dataconnection.DcTracker dct , com.android.internal.telephony.dataconnection.DataServiceManager dataServiceManager , com.android.internal.telephony.dataconnection.DcTesterFailBringUpAll failBringUpAll , com.android.internal.telephony.dataconnection.DcController dcc ) { com.android.internal.telephony.dataconnection.DataConnection dc = new com.android.internal.telephony.dataconnection.DataConnection ( phone , ( "DC-" + ( com.android.internal.telephony.dataconnection.DataConnection.mInstanceNumber.incrementAndGet ( ) ) ) , id , dct , dataServiceManager , failBringUpAll , dcc ) ; dc.start ( ) ; if ( com.android.internal.telephony.dataconnection.DataConnection.DBG ) dc.log ( ( "Made " + ( dc.getName ( ) ) ) ) ; return dc ; }
Source:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile getVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotFileException { com.android.sched.vfs.BaseVElement element = parent.getFromCache ( name ) ; if ( element != null ) { if ( ! ( element.isVDir ( ) ) ) { return ( ( com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile ) ( element ) ) ; } else { throw new com.android.sched.util.file.NotFileException ( getVFileLocation ( parent , name ) ) ; } } else { throw new com.android.sched.util.file.NoSuchFileException ( getVFileLocation ( parent , name ) ) ; } }

Target:
com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile getVFile ( @ javax.annotation.Nonnull com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVDir parent , @ javax.annotation.Nonnull java.lang.String name ) throws com.android.sched.util.file.NoSuchFileException , com.android.sched.util.file.NotFileException { com.android.sched.vfs.CaseInsensitiveFS.CaseInsensitiveVFile vFile = getVFileFromCache ( parent , name ) ; if ( vFile != null ) { return vFile ; } else { throw new com.android.sched.util.file.NoSuchFileException ( getVFileLocation ( parent , name ) ) ; } }
Source:
private void finishInitializing ( ) { if ( ( mCurrentCall ) == null ) { java.lang.String number = getAddress ( ) . getSchemeSpecificPart ( ) ; android.util.Log.d ( com.android.bluetooth.hfpclient.connserv.HfpClientConnection.TAG , ( "Dialing " + number ) ) ; mHeadsetProfile.dial ( mDevice , number ) ; setDialing ( ) ; } else { handleCallChanged ( mCurrentCall ) ; } }

Target:
public void updateCall ( android.bluetooth.BluetoothHeadsetClientCall call ) { mCurrentCall = call ; }
Source:
public boolean remove ( @ javax.annotation.Nullable java.lang.Object o ) { if ( o instanceof com.google.common.collect.Multiset.Entry ) { com.google.common.collect.Multiset.Entry < ? > entry = ( ( com.google.common.collect.Multiset.Entry < ? > ) ( o ) ) ; java.util.Collection < V > collection = multimap ( ) . asMap ( ) . get ( entry.getElement ( ) ) ; if ( ( collection != null ) && ( ( collection.size ( ) ) == ( entry.getCount ( ) ) ) ) { collection.clear ( ) ; return true ; } } return false ; }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object o ) { if ( o instanceof com.google.common.collect.Multiset.Entry ) { com.google.common.collect.Multiset.Entry < ? > entry = ( ( com.google.common.collect.Multiset.Entry < ? > ) ( o ) ) ; java.util.Collection < V > collection = multimap.asMap ( ) . get ( entry.getElement ( ) ) ; return ( collection != null ) && ( ( collection.size ( ) ) == ( entry.getCount ( ) ) ) ; } return false ; }
Source:
public void err ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.warning ( line ) ; } }

Target:
public void out ( @ com.android.annotations.Nullable java.lang.String line ) { if ( line != null ) { mLogger.verbose ( "AAPT notify(%1$s): %2$s" , mJob , line ) ; if ( line.equalsIgnoreCase ( "Done" ) ) { mOwner.reset ( ) ; mJob.finished ( ) ; } else if ( line.equalsIgnoreCase ( "Error" ) ) { mOwner.reset ( ) ; mJob.error ( ) ; } else { mLogger.verbose ( "AAPT(%1$s) discarded: %2$s" , mJob , line ) ; } } }
Source:
public java.util.Collection < V > values ( ) { java.util.Collection < V > result = values ; if ( result == null ) { return values = new com.google.common.collect.Maps.Values < K , V > ( ) { @ java.lang.Override java.util.Map < K , V > map ( ) { return com.google.common.collect.Maps.ImprovedAbstractMap.this ; } } ; } return result ; }

Target:
public java.util.Collection < V > values ( ) { java.util.Collection < V > result = values ; return result == null ? values = createValues ( ) : result ; }
Source:
public javax.net.ssl.SSLEngine engineCreateSSLEngine ( java.lang.String host , int port ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
public javax.net.ssl.SSLEngine engineCreateSSLEngine ( java.lang.String host , int port ) { if ( ( sslParameters ) == null ) { throw new java.lang.IllegalStateException ( "SSLContext is not initialized." ) ; } org.conscrypt.SSLParametersImpl p = ( ( org.conscrypt.SSLParametersImpl ) ( sslParameters.clone ( ) ) ) ; p.setUseClientMode ( false ) ; return new org.conscrypt.OpenSSLEngineImpl ( host , port , p ) ; }
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 ( ) ; 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 ( ) ; }
Source:
private boolean isGoodVersion ( int magic , int minorVersion , int majorVersion ) { if ( ( magic == ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAGIC ) ) && ( minorVersion >= 0 ) ) { if ( majorVersion == ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MAJOR_VERSION ) ) { if ( minorVersion <= ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MINOR_VERSION ) ) { return true ; } } else if ( ( majorVersion < ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAX_MAJOR_VERSION ) ) && ( majorVersion >= ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MIN_MAJOR_VERSION ) ) ) { return true ; } } return false ; }

Target:
private boolean isGoodMagic ( int magic ) { return magic == ( com.android.dx.cf.direct.DirectClassFile.CLASS_FILE_MAGIC ) ; }
Source:
public static boolean removeOccurrences ( com.google.common.collect.Multiset < ? > multisetToModify , com.google.common.collect.Multiset < ? > occurrencesToRemove ) { return com.google.common.collect.Multisets.removeOccurrencesImpl ( multisetToModify , occurrencesToRemove ) ; }

Target:
public static boolean removeOccurrences ( com.google.common.collect.Multiset < ? > multisetToModify , java.lang.Iterable < ? > occurrencesToRemove ) { if ( occurrencesToRemove instanceof com.google.common.collect.Multiset ) { return com.google.common.collect.Multisets.removeOccurrencesImpl ( multisetToModify , ( ( com.google.common.collect.Multiset < ? > ) ( occurrencesToRemove ) ) ) ; } else { return com.google.common.collect.Multisets.removeOccurrencesImpl ( multisetToModify , occurrencesToRemove ) ; } }
Source:
public void readCharacteristic ( int clientIf , java.lang.String address , int srvcType , int srvcInstanceId , android.os.ParcelUuid srvcId , int charInstanceId , android.os.ParcelUuid charId , int authReq ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.readCharacteristic ( clientIf , address , srvcType , srvcInstanceId , srvcId.getUuid ( ) , charInstanceId , charId.getUuid ( ) , authReq ) ; }

Target:
public void writeCharacteristic ( int clientIf , java.lang.String address , int handle , int writeType , int authReq , byte [ ] value ) { com.android.bluetooth.gatt.GattService service = getService ( ) ; if ( service == null ) return ; service.writeCharacteristic ( clientIf , address , handle , writeType , authReq , value ) ; }
Source:
static com.android.build.gradle.tasks.annotations.Extractor.FieldItem create ( java.lang.String classFqn , org.eclipse.jdt.internal.compiler.lookup.FieldBinding field ) { java.lang.String name = new java.lang.String ( field.name ) ; return classFqn != null ? new com.android.build.gradle.tasks.annotations.Extractor.FieldItem ( classFqn , name ) : null ; }

Target:
static com.android.build.gradle.tasks.annotations.Extractor.FieldItem create ( java.lang.String classFqn , @ com.android.annotations.NonNull com.android.build.gradle.tasks.annotations.Extractor.ClassKind classKind , org.eclipse.jdt.internal.compiler.lookup.FieldBinding field ) { java.lang.String name = new java.lang.String ( field.name ) ; java.lang.String type = com.android.build.gradle.tasks.annotations.Extractor.FieldItem.getFieldType ( field ) ; return classFqn != null ? new com.android.build.gradle.tasks.annotations.Extractor.FieldItem ( classFqn , classKind , name , type ) : null ; }
Source:
private java.lang.String readFromFile ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFile file ) throws java.io.IOException { java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.InputStreamReader ( file.openRead ( ) ) ) ; java.lang.String string = reader.readLine ( ) ; junit.framework.Assert.assertNull ( reader.readLine ( ) ) ; reader.close ( ) ; return string ; }

Target:
private java.lang.String readFromFile ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFile file ) throws java.io.IOException { java.io.BufferedReader reader = new java.io.BufferedReader ( new java.io.InputStreamReader ( file.getInputStream ( ) ) ) ; java.lang.String string = reader.readLine ( ) ; junit.framework.Assert.assertNull ( reader.readLine ( ) ) ; reader.close ( ) ; return string ; }
Source:
public void testReceive_UnconnectedBufFull ( ) throws java.lang.Exception { assertFalse ( this . channel1.isConnected ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ONE ) ; dst.put ( ( ( byte ) ( 88 ) ) ) ; assertEquals ( dst.position ( ) , dst.limit ( ) ) ; assertNull ( this . channel1.receive ( dst ) ) ; }

Target:
public void testReceive_UnboundBufFull ( ) throws java.lang.Exception { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; assertFalse ( dc.isConnected ( ) ) ; assertFalse ( dc.socket ( ) . isBound ( ) ) ; java.nio.ByteBuffer dst = java.nio.ByteBuffer.allocateDirect ( org.apache.harmony.tests.java.nio.channels.DatagramChannelTest.CAPACITY_ONE ) ; dst.put ( ( ( byte ) ( 88 ) ) ) ; assertEquals ( dst.position ( ) , dst.limit ( ) ) ; assertNull ( dc.receive ( dst ) ) ; }
Source:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( canReadPhoneState ( callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) ; return ( ( imsManager.isVtEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) && ( imsManager.isVtEnabledByUser ( ) ) ; }

Target:
public boolean isVideoCallingEnabled ( java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "isVideoCallingEnabled" ) ) ) { return false ; } com.android.ims.ImsManager imsManager = com.android.ims.ImsManager.getInstance ( mPhone.getContext ( ) , mPhone.getPhoneId ( ) ) ; return ( ( imsManager.isVtEnabledByPlatform ( ) ) && ( imsManager.isEnhanced4gLteModeSettingEnabledByUser ( ) ) ) && ( imsManager.isVtEnabledByUser ( ) ) ; }
Source:
protected com.google.common.collect.ImmutableSet < java.lang.String > getAllowedValues ( ) { return com.google.common.collect.ImmutableSet.copyOf ( com.android.build.gradle.internal.dsl.AbiSplitOptions.ABI_LIST ) ; }

Target:
protected com.google.common.collect.ImmutableSet < java.lang.String > getAllowedValues ( ) { com.google.common.collect.ImmutableSet.Builder < java.lang.String > builder = com.google.common.collect.ImmutableSet.builder ( ) ; for ( com.android.build.gradle.internal.core.Abi abi : com.android.build.gradle.internal.NdkHandler.getAbiList ( ) ) { builder.add ( abi.getName ( ) ) ; } return builder.build ( ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , long [ ] d ) { int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 8 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { copy1DRangeFromUnchecked ( off , count , ( ( java.lang.Object ) ( d ) ) , Element.DataType.SIGNED_32 , d.length ) ; }
Source:
public void testPut ( ) throws java.lang.Exception { assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertFalse ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertFalse ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; mKeyStore.password ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( java.util.Arrays.equals ( android.security.KeyStoreTest.TEST_KEYVALUE , mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ) ; }

Target:
public void testPut ( ) throws java.lang.Exception { assertNull ( mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; assertFalse ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertFalse ( mKeyStore.contains ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ; mKeyStore.onUserPasswordChanged ( android.security.KeyStoreTest.TEST_PASSWD ) ; assertTrue ( mKeyStore.put ( android.security.KeyStoreTest.TEST_KEYNAME , android.security.KeyStoreTest.TEST_KEYVALUE , KeyStore.UID_SELF , KeyStore.FLAG_ENCRYPTED ) ) ; assertTrue ( java.util.Arrays.equals ( android.security.KeyStoreTest.TEST_KEYVALUE , mKeyStore.get ( android.security.KeyStoreTest.TEST_KEYNAME ) ) ) ; }
Source:
private boolean releaseWakeLock ( java.lang.String lockName ) { synchronized ( this ) { if ( ( mWakeLock ) == null ) { errorLog ( ( "Repeated wake lock release; aborting release: " + lockName ) ) ; return false ; } mWakeLock.release ( ) ; mWakeLock = null ; mWakeLockName = null ; } return true ; }

Target:
private boolean releaseWakeLock ( java.lang.String lockName ) { synchronized ( this ) { if ( ( mWakeLock ) == null ) { errorLog ( ( "Repeated wake lock release; aborting release: " + lockName ) ) ; return false ; } if ( mWakeLock.isHeld ( ) ) mWakeLock.release ( ) ; } return true ; }
Source:
public void testMergeConflict ( ) throws java.io.IOException { com.android.dx.io.DexBuffer a = resourceToDexBuffer ( "/testdata/A.dex" ) ; com.android.dx.io.DexBuffer b = resourceToDexBuffer ( "/testdata/B.dex" ) ; com.android.dx.io.DexBuffer ab = new com.android.dx.merge.DexMerger ( a , b , CollisionPolicy.FAIL ) . merge ( ) ; com.android.dx.merge.DexMerger dexMerger = new com.android.dx.merge.DexMerger ( a , ab , CollisionPolicy.FAIL ) ; try { dexMerger.merge ( ) ; fail ( ) ; } catch ( com.android.dx.util.DexException expected ) { assertEquals ( "Multiple dex files define Ltestdata/A;" , expected.getMessage ( ) ) ; } }

Target:
public void testMergeConflict ( ) throws java.io.IOException { com.android.dex.Dex a = resourceToDexBuffer ( "/testdata/A.dex" ) ; com.android.dex.Dex b = resourceToDexBuffer ( "/testdata/B.dex" ) ; com.android.dex.Dex ab = new com.android.dx.merge.DexMerger ( a , b , CollisionPolicy.FAIL ) . merge ( ) ; com.android.dx.merge.DexMerger dexMerger = new com.android.dx.merge.DexMerger ( a , ab , CollisionPolicy.FAIL ) ; try { dexMerger.merge ( ) ; fail ( ) ; } catch ( com.android.dex.DexException expected ) { assertEquals ( "Multiple dex files define Ltestdata/A;" , expected.getMessage ( ) ) ; } }
Source:
public final void accept ( @ com.android.annotations.NonNull com.android.tools.perflib.heap.Visitor visitor ) { if ( visitor.visitEnter ( this ) ) { if ( ( mType ) == ( Type.OBJECT ) ) { for ( java.lang.Object value : getValues ( ) ) { if ( value instanceof com.android.tools.perflib.heap.Instance ) { ( ( com.android.tools.perflib.heap.Instance ) ( value ) ) . accept ( visitor ) ; } } } visitor.visitLeave ( this ) ; } }

Target:
public final void accept ( @ com.android.annotations.NonNull com.android.tools.perflib.heap.Visitor visitor ) { visitor.visitArrayInstance ( this ) ; if ( ( mType ) == ( Type.OBJECT ) ) { for ( java.lang.Object value : getValues ( ) ) { if ( value instanceof com.android.tools.perflib.heap.Instance ) { visitor.visitLater ( ( ( com.android.tools.perflib.heap.Instance ) ( value ) ) ) ; } } } }
Source:
public void setVoiceRadioTech ( int radioTech ) { synchronized ( mLock ) { if ( com.android.internal.telephony.uicc.IccCardProxy.DBG ) { log ( ( "Setting radio tech " + ( android.telephony.ServiceState.rilRadioTechnologyToString ( radioTech ) ) ) ) ; } if ( android.telephony.ServiceState.isGsm ( radioTech ) ) { mCurrentAppType = UiccController.APP_FAM_3GPP ; } else { mCurrentAppType = UiccController.APP_FAM_3GPP2 ; } updateQuietMode ( ) ; } }

Target:
public void setVoiceRadioTech ( int radioTech ) { synchronized ( mLock ) { if ( com.android.internal.telephony.uicc.IccCardProxy.DBG ) { log ( ( "Setting radio tech " + ( android.telephony.ServiceState.rilRadioTechnologyToString ( radioTech ) ) ) ) ; } if ( android.telephony.ServiceState.isGsm ( radioTech ) ) { mCurrentAppType = UiccController.APP_FAM_3GPP ; } else { mCurrentAppType = UiccController.APP_FAM_3GPP2 ; } updateCurrentAppType ( ) ; } }
Source:
private static int $noinline$bar ( ) { Main.assertIsInterpreted ( ) ; Main.sEntered = true ; while ( ! ( Main.sExitFlag ) ) { } Main.assertIsInterpreted ( ) ; return 4660 ; }

Target:
private static int $noinline$bar ( ) { Main.assertIsInterpreted ( ) ; synchronized ( Main.class ) { Main.sEntered = true ; Main.class . notify ( ) ; while ( ! ( Main.sExitFlag ) ) { try { Main.class . wait ( ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.Error ( "Unexpected exception." ) ; } } } Main.assertIsInterpreted ( ) ; return 4660 ; }
Source:
public void validateUserCredentialWithoutRealm ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; 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_TTLS ; 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:
public static void atraceDumpAndSend ( android.content.Context context , java.lang.String tags , int bufferSizeKb ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; java.io.File file = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , file ) ; com.android.traceur.AtraceUtils.atraceDump ( tags , bufferSizeKb , file ) ; com.android.traceur.FileSender.postNotification ( context , file ) ; }

Target:
protected void onPreExecute ( ) { java.lang.String format = "yyyy-MM-dd-HH-mm-ss" ; java.lang.String now = new java.text.SimpleDateFormat ( format , java.util.Locale.US ) . format ( new java.util.Date ( ) ) ; mFile = new java.io.File ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY , java.lang.String.format ( "trace-%s-%s-%s.ctrace" , Build.BOARD , Build.ID , now ) ) ; com.android.traceur.FileSender.postCaptureNotification ( context , mFile ) ; }
Source:
public boolean requestFocus ( final int direction , final android.graphics.Rect previouslyFocusedRect ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return requestFocus ( direction , previouslyFocusedRect ) ; } } ) ; return ret ; } mAwContents.requestFocus ( ) ; return mWebViewPrivate.super_requestFocus ( direction , previouslyFocusedRect ) ; }

Target:
public void onMeasure ( final int widthMeasureSpec , final int heightMeasureSpec ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { runVoidTaskOnUiThreadBlocking ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; } } ) ; return ; } mAwContents.onMeasure ( widthMeasureSpec , heightMeasureSpec ) ; }
Source:
public void testDisableSupplicant ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; mWifiNative.setWificondControl ( wificondControl ) ; mWifiNative.disableSupplicant ( ) ; org.mockito.Mockito.verify ( wificondControl ) . disableSupplicant ( ) ; }

Target:
public void testGetTxPacketCounters ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mWificondControl.getTxPacketCounters ( ) ) . thenReturn ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiNativeTest.PACKET_COUNTERS_RESULT , mWifiNative.getTxPacketCounters ( ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . getTxPacketCounters ( ) ; }
Source:
public int getTargetSdkVersion ( ) { if ( ( mTestedConfig ) != null ) { return mTestedConfig.getTargetSdkVersion ( ) ; } int targetSdkVersion = mMergedFlavor.getTargetSdkVersion ( ) ; if ( targetSdkVersion == ( - 1 ) ) { java.io.File manifestLocation = mDefaultSourceProvider.getManifestFile ( ) ; targetSdkVersion = com.android.builder.VariantConfiguration.sManifestParser.getTargetSdkVersion ( manifestLocation ) ; } return targetSdkVersion ; }

Target:
public com.android.builder.model.ApiVersion getTargetSdkVersion ( ) { if ( ( mTestedConfig ) != null ) { return mTestedConfig.getTargetSdkVersion ( ) ; } com.android.builder.model.ApiVersion targetSdkVersion = mMergedFlavor.getTargetSdkVersion ( ) ; if ( targetSdkVersion == null ) { java.io.File manifestLocation = mDefaultSourceProvider.getManifestFile ( ) ; targetSdkVersion = com.android.builder.DefaultApiVersion.create ( com.android.builder.VariantConfiguration.sManifestParser.getTargetSdkVersion ( manifestLocation ) ) ; } return targetSdkVersion ; }
Source:
public void testInterfaceCountersUdp6 ( ) 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 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1000 , false ) ; }

Target:
public void testAesCbcHmacSha384Udp4UdpEncap ( ) 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_SHA384 , android.net.cts.IpSecManagerTest.getKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
public void onSaveInstanceState ( android.os.Bundle outState ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , "onSaveInstanceState" ) ; super . onSaveInstanceState ( outState ) ; outState.putParcelable ( com.android.stk.StkDialogActivity.TEXT , mTextMsg ) ; }

Target:
public void onSaveInstanceState ( android.os.Bundle outState ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkDialogActivity.LOG_TAG , "onSaveInstanceState" ) ; super . onSaveInstanceState ( outState ) ; outState.putParcelable ( com.android.stk.StkDialogActivity.TEXT_KEY , mTextMsg ) ; outState.putParcelable ( com.android.stk.StkDialogActivity.TIMEOUT_INTENT_KEY , mTimeoutIntent ) ; outState.putInt ( com.android.stk.StkDialogActivity.SLOT_ID_KEY , mSlotId ) ; }
Source:
protected boolean doPrepare ( long positionUs ) throws com.google.android.exoplayer.ExoPlaybackException { boolean sourcePrepared = mSource.prepare ( positionUs ) ; if ( ! sourcePrepared ) { return false ; } for ( int i = 0 ; i < ( mSource.getTrackCount ( ) ) ; i ++ ) { if ( com.android.tv.tuner.exoplayer.ac3.Ac3PassthroughTrackRenderer.handlesMimeType ( mSource.getFormat ( i ) . mimeType ) ) { if ( ( mTrackIndex ) < 0 ) { mTrackIndex = i ; } mTracksIndex.add ( i ) ; } } return true ; }

Target:
protected boolean doPrepare ( long positionUs ) throws com.google.android.exoplayer.ExoPlaybackException { boolean sourcePrepared = mSource.prepare ( positionUs ) ; if ( ! sourcePrepared ) { return false ; } for ( int i = 0 ; i < ( mSource.getTrackCount ( ) ) ; i ++ ) { if ( com.android.tv.tuner.exoplayer.ac3.Ac3DefaultTrackRenderer.handlesMimeType ( mSource.getFormat ( i ) . mimeType ) ) { if ( ( mTrackIndex ) < 0 ) { mTrackIndex = i ; } mTracksIndex.add ( i ) ; } } return true ; }
Source:
public void test_Jar_created_before_java_5 ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Created_by_1_4.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; } }

Target:
public void test_JarFile_InsertEntry_in_Manifest_Jar ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Inserted_Entry_Manifest.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; try ( java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ) { java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; int count = 0 ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; count ++ ; } assertEquals ( 5 , count ) ; } }
Source:
protected void saveCredentials ( org.jetbrains.plugins.github.GithubAuthData auth ) { final org.jetbrains.plugins.github.GithubSettings settings = org.jetbrains.plugins.github.GithubSettings.getInstance ( ) ; if ( ( settings.getAuthType ( ) ) != ( GithubAuthData.AuthType.TOKEN ) ) { settings.setCredentials ( myGithubLoginPanel.getHost ( ) , auth , myGithubLoginPanel.isSavePasswordSelected ( ) ) ; } }

Target:
protected void saveCredentials ( org.jetbrains.plugins.github.util.GithubAuthData auth ) { final org.jetbrains.plugins.github.util.GithubSettings settings = org.jetbrains.plugins.github.util.GithubSettings.getInstance ( ) ; if ( ( settings.getAuthType ( ) ) != ( GithubAuthData.AuthType.TOKEN ) ) { settings.setCredentials ( myGithubLoginPanel.getHost ( ) , auth , myGithubLoginPanel.isSavePasswordSelected ( ) ) ; } }
Source:
public android.net.ScoredNetwork get ( android.net.NetworkKey key ) { synchronized ( mScores ) { return mScores.get ( key ) ; } }

Target:
public android.net.ScoredNetwork get ( android.net.NetworkKey key ) { synchronized ( mScores ) { android.net.ScoredNetwork scoredNetwork = mScores.get ( key ) ; if ( scoredNetwork != null ) { return scoredNetwork ; } android.net.NetworkKey wildcardKey = new android.net.NetworkKey ( new android.net.WifiKey ( key.wifiKey.ssid , com.android.networkrecommendation.DefaultNetworkRecommendationService.WILDCARD_MAC ) ) ; scoredNetwork = mScores.get ( wildcardKey ) ; if ( scoredNetwork != null ) { return new android.net.ScoredNetwork ( key , scoredNetwork.rssiCurve , scoredNetwork.meteredHint , scoredNetwork.attributes ) ; } return null ; } }
Source:
private com.android.ide.eclipse.adt.internal.resources.ResourceType getSelectedResourceType ( ) { com.android.ide.eclipse.adt.internal.resources.ResourceType type = null ; org.eclipse.jface.viewers.TreePath selection = getSelection ( ) ; if ( ( selection != null ) && ( ( selection.getSegmentCount ( ) ) > 0 ) ) { java.lang.Object first = selection.getFirstSegment ( ) ; if ( first instanceof com.android.ide.eclipse.adt.internal.resources.ResourceType ) { type = ( ( com.android.ide.eclipse.adt.internal.resources.ResourceType ) ( first ) ) ; } } return type ; }

Target:
private com.android.resources.ResourceType getSelectedResourceType ( ) { com.android.resources.ResourceType type = null ; org.eclipse.jface.viewers.TreePath selection = getSelection ( ) ; if ( ( selection != null ) && ( ( selection.getSegmentCount ( ) ) > 0 ) ) { java.lang.Object first = selection.getFirstSegment ( ) ; if ( first instanceof com.android.resources.ResourceType ) { type = ( ( com.android.resources.ResourceType ) ( first ) ) ; } } return type ; }
Source:
private void calcOurContentVisibleRect ( android.graphics.Rect r ) { calcOurVisibleRect ( r ) ; r.left = viewToContent ( r.left ) ; r.top = viewToContent ( r.top ) ; r.right = viewToContent ( r.right ) ; r.bottom = viewToContent ( r.bottom ) ; }

Target:
private void calcOurVisibleRect ( android.graphics.Rect r ) { android.graphics.Point p = new android.graphics.Point ( ) ; getGlobalVisibleRect ( r , p ) ; r.offset ( ( - ( p.x ) ) , ( - ( p.y ) ) ) ; if ( mFindIsUp ) { r.bottom -= mFindHeight ; } }
Source:
private boolean keyguardIsShowingTq ( ) { if ( ( mKeyguardMediator ) == null ) return false ; return mKeyguardMediator.isShowingAndNotHidden ( ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( Intent.ACTION_DREAMING_STARTED.equals ( intent.getAction ( ) ) ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onDreamingStarted ( ) ; } } else if ( Intent.ACTION_DREAMING_STOPPED.equals ( intent.getAction ( ) ) ) { if ( ( mKeyguardMediator ) != null ) { mKeyguardMediator.onDreamingStopped ( ) ; } } }
Source:
public void testArgType ( ) { assertEquals ( "s" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "First: %1$s, Second %2$s, Third %3$s" , 1 ) ) ; assertEquals ( "d" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "First: %1$s, Second %2$-5d, Third %3$s" , 2 ) ) ; assertEquals ( "s" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "Skipping stuff: %11$s" , 11 ) ) ; assertEquals ( "d" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "First: %1$s, Skip \\%2$s, Value=%2$d" , 2 ) ) ; }

Target:
public void testArgType ( ) { assertEquals ( "s" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "First: %n%% %1$s, Second %2$s, Third %3$s" , 1 ) ) ; assertEquals ( "s" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "First: %1$s, Second %2$s, Third %3$s" , 1 ) ) ; assertEquals ( "d" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "First: %1$s, Second %2$-5d, Third %3$s" , 2 ) ) ; assertEquals ( "s" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "Skipping stuff: %11$s" , 11 ) ) ; assertEquals ( "d" , com.android.tools.lint.checks.StringFormatDetector.getFormatArgumentType ( "First: %1$s, Skip \\%2$s, Value=%2$d" , 2 ) ) ; }
Source:
public java.lang.String getContentType ( ) { try { if ( ! ( connected ) ) { connect ( ) ; } } catch ( java.io.IOException e ) { return "content/unknown" ; } if ( isDir ) { return "text/plain" ; } java.lang.String result = java.net.URLConnection.guessContentTypeFromName ( url.getFile ( ) ) ; if ( result != null ) { return result ; } try { result = java.net.URLConnection.guessContentTypeFromStream ( is ) ; } catch ( java.io.IOException e ) { } if ( result != null ) { return result ; } return "content/unknown" ; }

Target:
private java.lang.String getContentTypeForPlainFiles ( ) { java.lang.String result = java.net.URLConnection.guessContentTypeFromName ( url.getFile ( ) ) ; if ( result != null ) { return result ; } try { result = java.net.URLConnection.guessContentTypeFromStream ( is ) ; } catch ( java.io.IOException e ) { } if ( result != null ) { return result ; } return "content/unknown" ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mLiveChannelsHelper.assertAppStarted ( ) ; pressKeysForChannel ( TvTestInputConstants.CH_1_DEFAULT_DONT_MODIFY ) ; mDevice.pressDPadUp ( ) ; getInstrumentation ( ) . waitForIdleSync ( ) ; mBySettingsSidePanel = mSidePanelHelper.bySidePanelTitled ( R.string.side_panel_title_settings ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mLiveChannelsHelper.assertAppStarted ( ) ; pressKeysForChannel ( TvTestInputConstants.CH_2 ) ; com.android.tv.testing.uihelper.UiDeviceAsserts.assertWaitForCondition ( mDevice , android.support.test.uiautomator.Until.hasObject ( com.android.tv.testing.uihelper.Constants.CHANNEL_BANNER ) ) ; mDevice.pressDPadUp ( ) ; getInstrumentation ( ) . waitForIdleSync ( ) ; mBySettingsSidePanel = mSidePanelHelper.bySidePanelTitled ( R.string.side_panel_title_settings ) ; }
Source:
public void insertSeriesRecordings ( com.android.tv.dvr.SeriesRecording ... seriesRecordings ) { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; android.database.sqlite.SQLiteStatement statement = db.compileStatement ( com.android.tv.dvr.provider.DvrDatabaseHelper.SQL_INSERT_SERIES_RECORDINGS ) ; db.beginTransaction ( ) ; try { for ( com.android.tv.dvr.SeriesRecording r : seriesRecordings ) { statement.clearBindings ( ) ; android.content.ContentValues values = com.android.tv.dvr.SeriesRecording.toContentValues ( r ) ; bindColumns ( statement , com.android.tv.dvr.provider.DvrDatabaseHelper.COLUMNS_SERIES_RECORDINGS , values ) ; statement.execute ( ) ; } db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; } }

Target:
public void insertSeriesRecordings ( com.android.tv.dvr.data.SeriesRecording ... seriesRecordings ) { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; android.database.sqlite.SQLiteStatement statement = db.compileStatement ( com.android.tv.dvr.provider.DvrDatabaseHelper.SQL_INSERT_SERIES_RECORDINGS ) ; db.beginTransaction ( ) ; try { for ( com.android.tv.dvr.data.SeriesRecording r : seriesRecordings ) { statement.clearBindings ( ) ; android.content.ContentValues values = com.android.tv.dvr.data.SeriesRecording.toContentValues ( r ) ; bindColumns ( statement , com.android.tv.dvr.provider.DvrDatabaseHelper.COLUMNS_SERIES_RECORDINGS , values ) ; statement.execute ( ) ; } db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; } }
Source:
public static com.android.internal.telephony.IccCardConstants.State intToState ( int state ) throws java.lang.IllegalArgumentException { switch ( state ) { case 0 : return com.android.internal.telephony.IccCardConstants.State.UNKNOWN ; case 1 : return com.android.internal.telephony.IccCardConstants.State.ABSENT ; case 2 : return com.android.internal.telephony.IccCardConstants.State.PIN_REQUIRED ; case 3 : return com.android.internal.telephony.IccCardConstants.State.PUK_REQUIRED ; case 4 : return com.android.internal.telephony.IccCardConstants.State.NETWORK_LOCKED ; case 5 : return com.android.internal.telephony.IccCardConstants.State.READY ; case 6 : return com.android.internal.telephony.IccCardConstants.State.NOT_READY ; case 7 : return com.android.internal.telephony.IccCardConstants.State.PERM_DISABLED ; case 8 : return com.android.internal.telephony.IccCardConstants.State.CARD_IO_ERROR ; case 9 : return com.android.internal.telephony.IccCardConstants.State.CARD_RESTRICTED ; default : throw new java.lang.IllegalArgumentException ( ) ; } }

Target:
public static com.android.internal.telephony.IccCardConstants.State intToState ( int state ) throws java.lang.IllegalArgumentException { switch ( state ) { case 0 : return com.android.internal.telephony.IccCardConstants.State.UNKNOWN ; case 1 : return com.android.internal.telephony.IccCardConstants.State.ABSENT ; case 2 : return com.android.internal.telephony.IccCardConstants.State.PIN_REQUIRED ; case 3 : return com.android.internal.telephony.IccCardConstants.State.PUK_REQUIRED ; case 4 : return com.android.internal.telephony.IccCardConstants.State.NETWORK_LOCKED ; case 5 : return com.android.internal.telephony.IccCardConstants.State.READY ; case 6 : return com.android.internal.telephony.IccCardConstants.State.NOT_READY ; case 7 : return com.android.internal.telephony.IccCardConstants.State.PERM_DISABLED ; case 8 : return com.android.internal.telephony.IccCardConstants.State.CARD_IO_ERROR ; case 9 : return com.android.internal.telephony.IccCardConstants.State.CARD_RESTRICTED ; case 10 : return com.android.internal.telephony.IccCardConstants.State.LOADED ; default : throw new java.lang.IllegalArgumentException ( ) ; } }
Source:
public void applyRepresentation ( com.android.gallery3d.filtershow.filters.FilterRepresentation representation , android.renderscript.Allocation in , android.renderscript.Allocation out ) { com.android.gallery3d.filtershow.filters.ImageFilter filter = mFiltersManager.getFilterForRepresentation ( representation ) ; filter.useRepresentation ( representation ) ; filter.setEnvironment ( this ) ; if ( filter.supportsAllocationInput ( ) ) { filter.apply ( in , out ) ; } filter.setGeneralParameters ( ) ; filter.setEnvironment ( null ) ; }

Target:
public void applyRepresentation ( com.android.gallery3d.filtershow.filters.FilterRepresentation representation , android.support.v8.renderscript.Allocation in , android.support.v8.renderscript.Allocation out ) { com.android.gallery3d.filtershow.filters.ImageFilter filter = mFiltersManager.getFilterForRepresentation ( representation ) ; filter.useRepresentation ( representation ) ; filter.setEnvironment ( this ) ; if ( filter.supportsAllocationInput ( ) ) { filter.apply ( in , out ) ; } filter.setGeneralParameters ( ) ; filter.setEnvironment ( null ) ; }
Source:
public java.lang.String getName ( ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Remote Device name" ) ; return null ; } try { return android.bluetooth.BluetoothDevice.sService.getRemoteName ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }

Target:
public java.lang.String getName ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot get Remote Device name" ) ; return null ; } try { return service.getRemoteName ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return null ; }
Source:
public boolean password ( java.lang.String password ) { return password ( android.security.KeyStore.getPasswordBytes ( password ) ) ; }

Target:
public boolean unlock ( java.lang.String password ) { try { mError = mBinder.unlock ( password ) ; return ( mError ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
public void testCountryUsesUtc ( ) { org.junit.Assert.assertFalse ( mTimeZoneLookupHelper.countryUsesUtc ( "us" ) ) ; org.junit.Assert.assertTrue ( mTimeZoneLookupHelper.countryUsesUtc ( "gb" ) ) ; }

Target:
public void testGuessZoneIdByCountry ( ) { org.junit.Assert.assertEquals ( "Europe/London" , mTimeZoneLookupHelper.guessZoneIdByCountry ( "gb" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_SUMMER_TIME_MILLIS ) ) ; org.junit.Assert.assertEquals ( "Europe/London" , mTimeZoneLookupHelper.guessZoneIdByCountry ( "gb" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_WINTER_TIME_MILLIS ) ) ; org.junit.Assert.assertEquals ( "Europe/Berlin" , mTimeZoneLookupHelper.guessZoneIdByCountry ( "de" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_SUMMER_TIME_MILLIS ) ) ; org.junit.Assert.assertEquals ( "Europe/Berlin" , mTimeZoneLookupHelper.guessZoneIdByCountry ( "de" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_WINTER_TIME_MILLIS ) ) ; org.junit.Assert.assertNull ( mTimeZoneLookupHelper.guessZoneIdByCountry ( "us" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_SUMMER_TIME_MILLIS ) ) ; org.junit.Assert.assertNull ( mTimeZoneLookupHelper.guessZoneIdByCountry ( "us" , com.android.internal.telephony.TimeZoneLookupHelperTest.NH_WINTER_TIME_MILLIS ) ) ; }
Source:
public static com.android.internal.telephony.gsm.SmsMessage createFromPdu ( byte [ ] pdu ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( pdu ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.util.Log.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "SMS PDU parsing failed: " , ex ) ; return null ; } }

Target:
public static com.android.internal.telephony.gsm.SmsMessage createFromPdu ( byte [ ] pdu ) { try { com.android.internal.telephony.gsm.SmsMessage msg = new com.android.internal.telephony.gsm.SmsMessage ( ) ; msg.parsePdu ( pdu ) ; return msg ; } catch ( java.lang.RuntimeException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.gsm.SmsMessage.LOG_TAG , "SMS PDU parsing failed: " , ex ) ; return null ; } }