auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testOneSystemOneUserOneDeletedSameSubject ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.installCertificate ( org.conscrypt.TrustedCertificateStoreTest.getCa3WithCa1Subject ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa3WithCa1Subject ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa3 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa3 ( ) ) ; }

Target:
public void testOneSystemOneUserOneDeleted ( ) throws java.lang.Exception { install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.installCertificate ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa2 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa2 ( ) ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { try { java.lang.Class < ? > a = java.lang.Class.forName ( "A" ) ; } catch ( java.lang.VerifyError e ) { java.lang.System.out.println ( "passed A" ) ; } try { java.lang.Class < ? > a = java.lang.Class.forName ( "B" ) ; } catch ( java.lang.VerifyError e ) { java.lang.System.out.println ( "passed B" ) ; } }

Target:
private static void test ( java.lang.String name ) throws java.lang.Exception { try { java.lang.Class < ? > a = java.lang.Class.forName ( name ) ; a.newInstance ( ) ; } catch ( java.lang.LinkageError e ) { java.lang.System.out.println ( ( "passed " + name ) ) ; } }
Source:
private void stopForegroundCompat ( ) { if ( ( mStopForeground ) != null ) { mStopForegroundArgs [ 0 ] = java.lang.Boolean.TRUE ; try { mStopForeground.invoke ( this , mStopForegroundArgs ) ; } catch ( java.lang.Exception e ) { com.googlecode.android_scripting.Log.e ( e ) ; } return ; } mNotificationManager.cancel ( mNotificationId ) ; setForeground ( false ) ; }

Target:
private void stopForegroundCompat ( ) { if ( ( mStopForeground ) != null ) { mStopForegroundArgs [ 0 ] = java.lang.Boolean.TRUE ; try { mStopForeground.invoke ( this , mStopForegroundArgs ) ; } catch ( java.lang.Exception e ) { com.googlecode.android_scripting.Log.e ( e ) ; } return ; } getNotificationManager ( ) . cancel ( mNotificationId ) ; setForeground ( false ) ; }
Source:
public void onClick ( android.view.View v ) { shutterStartTime = java.lang.System.currentTimeMillis ( ) ; mCamera.takePicture ( new android.hardware.Camera.ShutterCallback ( ) { @ java.lang.Override public void onShutter ( ) { long dT = ( java.lang.System.currentTimeMillis ( ) ) - ( shutterStartTime ) ; android.util.Log.d ( "CTS" , ( "Shutter Lag: " + dT ) ) ; } } , null , this ) ; }

Target:
public void onClick ( android.view.View v ) { if ( ! ( mTakingPicture ) ) { mTakingPicture = true ; shutterStartTime = java.lang.System.currentTimeMillis ( ) ; mCamera.takePicture ( new android.hardware.Camera.ShutterCallback ( ) { @ java.lang.Override public void onShutter ( ) { long dT = ( java.lang.System.currentTimeMillis ( ) ) - ( shutterStartTime ) ; android.util.Log.d ( "CTS" , ( "Shutter Lag: " + dT ) ) ; } } , null , this ) ; } }
Source:
public void TestCurrent ( ) { com.ibm.icu.text.RuleBasedBreakIterator rbbi = new com.ibm.icu.text.RuleBasedBreakIterator ( "" ) ; rbbi.setText ( ( ( java.text.CharacterIterator ) ( null ) ) ) ; if ( ( rbbi.current ( ) ) != ( com.ibm.icu.text.BreakIterator.DONE ) ) { errln ( ( "RuleBasedBreakIterator.current() was suppose to return " + "BreakIterator.DONE when the object has a fText of null." ) ) ; } rbbi.setText ( "dummy" ) ; if ( ( rbbi.current ( ) ) != 0 ) { errln ( ( "RuleBasedBreakIterator.current() was suppose to return " + "0 when the object has a fText of dummy." ) ) ; } }

Target:
public void TestCurrent ( ) { com.ibm.icu.text.RuleBasedBreakIterator rbbi = new com.ibm.icu.text.RuleBasedBreakIterator ( ".;" ) ; rbbi.setText ( ( ( java.text.CharacterIterator ) ( null ) ) ) ; if ( ( rbbi.current ( ) ) != ( com.ibm.icu.text.BreakIterator.DONE ) ) { errln ( ( "RuleBasedBreakIterator.current() was suppose to return " + "BreakIterator.DONE when the object has a fText of null." ) ) ; } rbbi.setText ( "dummy" ) ; if ( ( rbbi.current ( ) ) != 0 ) { errln ( ( "RuleBasedBreakIterator.current() was suppose to return " + "0 when the object has a fText of dummy." ) ) ; } }
Source:
private void initialization ( java.lang.Class < K > type ) { keyType = type ; keys = java.lang.Enum.getSharedConstants ( java.lang.Enum , keyType ) ; enumSize = keys.length ; values = new java.lang.Object [ enumSize ] ; hasMapping = new boolean [ enumSize ] ; }

Target:
private void initialization ( java.lang.Class < K > type ) { keyType = type ; keys = java.lang.Enum.getSharedConstants ( java.lang.Enum , keyType ) ; enumSize = keys.length ; @ java.lang.SuppressWarnings ( value = "unchecked" ) V [ ] valueArray = ( ( V [ ] ) ( new java.lang.Object [ enumSize ] ) ) ; values = valueArray ; hasMapping = new boolean [ enumSize ] ; }
Source:
private void writeObject ( java.io.ObjectOutputStream stream ) throws java.io.IOException { if ( key.isEngineBased ( ) ) { throw new java.io.NotSerializableException ( "engine-based keys can not be serialized" ) ; } stream.defaultWriteObject ( ) ; stream.writeObject ( getParams ( ) ) ; final java.security.spec.ECPoint pubKey = getPublicKey ( ) ; stream.writeObject ( pubKey.getAffineX ( ) ) ; stream.writeObject ( pubKey.getAffineY ( ) ) ; }

Target:
private void readObject ( java.io.ObjectInputStream stream ) throws java.io.IOException , java.lang.ClassNotFoundException { stream.defaultReadObject ( ) ; byte [ ] encoded = ( ( byte [ ] ) ( stream.readObject ( ) ) ) ; key = new org.apache.harmony.xnet.provider.jsse.OpenSSLKey ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.d2i_PUBKEY ( encoded ) ) ; final int origGroup = org.apache.harmony.xnet.provider.jsse.NativeCrypto.EC_KEY_get0_group ( key.getPkeyContext ( ) ) ; group = new org.apache.harmony.xnet.provider.jsse.OpenSSLECGroupContext ( org.apache.harmony.xnet.provider.jsse.NativeCrypto.EC_GROUP_dup ( origGroup ) ) ; }
Source:
private static java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > getNegativeCurrencyVectorTR ( ) { java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > v = new java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > ( ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 1 , 4 , java.text.NumberFormat.Field.INTEGER ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 4 , 5 , java.text.NumberFormat.Field.DECIMAL_SEPARATOR ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 5 , 7 , java.text.NumberFormat.Field.FRACTION ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 8 , 10 , java.text.NumberFormat.Field.CURRENCY ) ) ; return v ; }

Target:
private static java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > getPositiveCurrencyVectorTR ( ) { java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > v = new java.util.Vector < org.apache.harmony.tests.java.text.FieldContainer > ( ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 0 , 1 , java.text.NumberFormat.Field.CURRENCY ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 1 , 4 , java.text.NumberFormat.Field.INTEGER ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 4 , 5 , java.text.NumberFormat.Field.DECIMAL_SEPARATOR ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 5 , 7 , java.text.NumberFormat.Field.FRACTION ) ) ; return v ; }
Source:
public E poll ( long timeout , java.util.concurrent.TimeUnit unit ) throws java.lang.InterruptedException { long nanos = unit.toNanos ( timeout ) ; final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == 0 ) { if ( nanos <= 0 ) return null ; nanos = notEmpty.awaitNanos ( nanos ) ; } return extract ( ) ; } finally { lock.unlock ( ) ; } }

Target:
public E poll ( long timeout , java.util.concurrent.TimeUnit unit ) throws java.lang.InterruptedException { long nanos = unit.toNanos ( timeout ) ; final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == 0 ) { if ( nanos <= 0 ) return null ; nanos = notEmpty.awaitNanos ( nanos ) ; } return dequeue ( ) ; } finally { lock.unlock ( ) ; } }
Source:
public boolean setLine1NumberForDisplayForSubscriber ( int subId , java.lang.String alphaTag , java.lang.String number ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setLine1NumberForDisplayForSubscriber ( subId , alphaTag , number ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return false ; }

Target:
public boolean setLine1NumberForDisplay ( int subId , java.lang.String alphaTag , java.lang.String number ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setLine1NumberForDisplayForSubscriber ( subId , alphaTag , number ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return false ; }
Source:
private void processThisCallLocalArgs ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding , com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.ir.ast.JTypeLookupException { if ( ( binding.syntheticOuterLocalVariables ( ) ) != null ) { for ( org.eclipse.jdt.internal.compiler.lookup.SyntheticArgumentBinding arg : binding.syntheticOuterLocalVariables ( ) ) { com.android.jack.ir.ast.JParameter param = ( ( com.android.jack.ir.ast.JParameter ) ( curMethod.getJVariable ( arg ) ) ) ; assert param != null ; call.addArg ( new com.android.jack.ir.ast.JParameterRef ( call.getSourceInfo ( ) , param ) ) ; } } }

Target:
private void processThisCallLocalArgs ( org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding binding , com.android.jack.ir.ast.JMethodCall call ) throws com.android.jack.ir.ast.JTypeLookupException { if ( ( binding.syntheticOuterLocalVariables ( ) ) != null ) { for ( org.eclipse.jdt.internal.compiler.lookup.SyntheticArgumentBinding arg : binding.syntheticOuterLocalVariables ( ) ) { com.android.jack.ir.ast.JParameter param = ( ( com.android.jack.ir.ast.JParameter ) ( curMethod.getJVariable ( arg ) ) ) ; assert param != null ; call.addArg ( param.makeRef ( call.getSourceInfo ( ) ) ) ; } } }
Source:
public void testCompare0 ( ) throws java.lang.Exception { android.text.format.Time a = new android.text.format.Time ( android.text.format.Time.TIMEZONE_UTC ) ; android.text.format.Time b = new android.text.format.Time ( "America/Los_Angeles" ) ; assertTrue ( ( ( android.text.format.Time.compare ( a , b ) ) < 0 ) ) ; assertTrue ( ( ( android.text.format.Time.compare ( b , a ) ) > 0 ) ) ; assertTrue ( ( ( android.text.format.Time.compare ( b , b ) ) == 0 ) ) ; assertTrue ( ( ( android.text.format.Time.compare ( a , a ) ) == 0 ) ) ; }

Target:
public void testCtor ( ) throws java.lang.Exception { java.lang.String tz = android.text.format.Time.TIMEZONE_UTC ; android.text.format.Time t = new android.text.format.Time ( tz ) ; assertEquals ( tz , t.timezone ) ; android.text.format.Time expected = new android.text.format.Time ( tz ) ; android.text.format.cts.TimeTest.Fields.set ( expected , 1970 , 0 , 1 , 0 , 0 , 0 , ( - 1 ) , 0 , 0 , 0 ) ; android.text.format.cts.TimeTest.Fields.assertTimeEquals ( expected , t ) ; }
Source:
public java.net.Socket createSocket ( java.net.InetAddress addr , int port , java.net.InetAddress localAddr , int localPort ) throws java.io.IOException { com.android.org.conscrypt.OpenSSLSocketImpl s = ( ( com.android.org.conscrypt.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( addr , port , localAddr , localPort ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; return s ; }

Target:
public java.net.Socket createSocket ( java.net.InetAddress addr , int port , java.net.InetAddress localAddr , int localPort ) throws java.io.IOException { com.android.org.conscrypt.OpenSSLSocketImpl s = ( ( com.android.org.conscrypt.OpenSSLSocketImpl ) ( getDelegate ( ) . createSocket ( addr , port , localAddr , localPort ) ) ) ; s.setNpnProtocols ( mNpnProtocols ) ; s.setAlpnProtocols ( mAlpnProtocols ) ; s.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; return s ; }
Source:
public void run ( ) { synchronized ( this ) { ( wasRun ) ++ ; } if ( incrementCount ) ( timerCounter ) ++ ; if ( ( ( terminateCount ) == ( timerCounter ) ) && ( ( timer ) != null ) ) timer.cancel ( ) ; if ( sleepInRun ) { try { java.lang.Thread.sleep ( 200 ) ; } catch ( java.lang.InterruptedException e ) { } } synchronized ( sync ) { sync.notify ( ) ; } }

Target:
public void run ( ) { synchronized ( this ) { ( wasRun ) ++ ; } if ( incrementCount ) { ( timerCounter ) ++ ; } if ( ( ( terminateCount ) == ( timerCounter ) ) && ( ( timer ) != null ) ) { timer.cancel ( ) ; } if ( sleepInRun ) { try { java.lang.Thread.sleep ( 200 ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( e ) ; } } synchronized ( sync ) { sync.notify ( ) ; } }
Source:
public boolean updateSourcePackages ( com.android.sdklib.internal.repository.SdkSource source , java.lang.Package [ ] newPackages ) { if ( ( newPackages.length ) > 0 ) { mVisitedSources.add ( source ) ; } if ( source == null ) { return processLocals ( this , newPackages ) ; } else { return processSource ( this , source , newPackages ) ; } }

Target:
public boolean updateSourcePackages ( com.android.sdklib.internal.repository.SdkSource source , java.lang.Package [ ] newPackages ) { mVisitedSources.add ( source ) ; if ( source == null ) { return processLocals ( this , newPackages ) ; } else { return processSource ( this , source , newPackages ) ; } }
Source:
public void execute ( com.android.build.gradle.managed.SigningConfig signingConfig ) { try { signingConfig.setName ( com.android.builder.core.BuilderConstants.DEBUG ) ; signingConfig.setStoreFile ( com.android.ide.common.signing.KeystoreHelper.defaultDebugKeystoreLocation ( ) ) ; signingConfig.setStorePassword ( DefaultSigningConfig.DEFAULT_PASSWORD ) ; signingConfig.setKeyAlias ( DefaultSigningConfig.DEFAULT_ALIAS ) ; signingConfig.setKeyPassword ( DefaultSigningConfig.DEFAULT_PASSWORD ) ; signingConfig.setStoreType ( java.security.KeyStore.getDefaultType ( ) ) ; } catch ( com.android.prefs.AndroidLocation e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public void execute ( com.android.build.gradle.managed.SigningConfig signingConfig ) { try { signingConfig.setStoreFile ( com.android.ide.common.signing.KeystoreHelper.defaultDebugKeystoreLocation ( ) ) ; signingConfig.setStorePassword ( DefaultSigningConfig.DEFAULT_PASSWORD ) ; signingConfig.setKeyAlias ( DefaultSigningConfig.DEFAULT_ALIAS ) ; signingConfig.setKeyPassword ( DefaultSigningConfig.DEFAULT_PASSWORD ) ; signingConfig.setStoreType ( java.security.KeyStore.getDefaultType ( ) ) ; } catch ( com.android.prefs.AndroidLocation e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public < U > java.lang.Class < ? extends U > asSubclass ( java.lang.Class < U > clazz ) { if ( clazz.isAssignableFrom ( this ) ) { return ( ( java.lang.Class < ? extends U > ) ( this ) ) ; } java.lang.String actualClassName = this . getName ( ) ; java.lang.String desiredClassName = clazz.getName ( ) ; throw new java.lang.ClassCastException ( ( ( actualClassName + " cannot be cast to " ) + desiredClassName ) ) ; }

Target:
public < U > java.lang.Class < ? extends U > asSubclass ( java.lang.Class < U > c ) { if ( c.isAssignableFrom ( this ) ) { return ( ( java.lang.Class < ? extends U > ) ( this ) ) ; } java.lang.String actualClassName = this . getName ( ) ; java.lang.String desiredClassName = c.getName ( ) ; throw new java.lang.ClassCastException ( ( ( actualClassName + " cannot be cast to " ) + desiredClassName ) ) ; }
Source:
synchronized void nAllocationData2D ( int id , int xoff , int yoff , int mip , int face , int w , int h , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }
Source:
public void testCheckAccessLevel_hasCarrierPrivileges ( ) throws java.lang.Exception { setHasCarrierPrivileges ( true ) ; setIsDeviceOwner ( false ) ; setIsProfileOwner ( false ) ; setHasAppOpsPermission ( AppOpsManager.MODE_DEFAULT , false ) ; setHasReadHistoryPermission ( false ) ; assertEquals ( NetworkStatsAccess.Level.DEVICE , com.android.server.net.NetworkStatsAccess.checkAccessLevel ( mContext , com.android.server.net.NetworkStatsAccessTest.TEST_UID , com.android.server.net.NetworkStatsAccessTest.TEST_PKG ) ) ; }

Target:
public void testCheckAccessLevel_hasCarrierPrivileges ( ) throws java.lang.Exception { setHasCarrierPrivileges ( true ) ; setIsDeviceOwner ( false ) ; setIsProfileOwner ( false ) ; setHasAppOpsPermission ( AppOpsManager.MODE_DEFAULT , false ) ; setHasReadHistoryPermission ( false ) ; org.junit.Assert.assertEquals ( NetworkStatsAccess.Level.DEVICE , com.android.server.net.NetworkStatsAccess.checkAccessLevel ( mContext , com.android.server.net.NetworkStatsAccessTest.TEST_UID , com.android.server.net.NetworkStatsAccessTest.TEST_PKG ) ) ; }
Source:
public void addFrom ( java.lang.String name , java.lang.String address ) { if ( ( this . mFrom ) == null ) this . mFrom = new java.util.ArrayList < android.text.util.Rfc822Token > ( 1 ) ; this . mFrom.add ( new android.text.util.Rfc822Token ( name , address , null ) ) ; }

Target:
public void addFrom ( java.lang.String name , java.lang.String address ) { if ( ( this . from ) == null ) this . from = new java.util.ArrayList < android.text.util.Rfc822Token > ( 1 ) ; this . from.add ( new android.text.util.Rfc822Token ( name , address , null ) ) ; }
Source:
public void run ( ) { try { mLooper = android.os.Looper.myLooper ( ) ; android.os.Looper.prepare ( ) ; mHandler = new android.media.cts.EncodeVirtualDisplayWithCompositionTest.GlCompositor.CompositionHandler ( ) ; initGl ( ) ; mStartCompletionSemaphore.release ( ) ; android.os.Looper.loop ( ) ; } catch ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.GlException e ) { e.printStackTrace ( ) ; fail ( "got gl exception" ) ; } finally { cleanupGl ( ) ; mHandler = null ; mLooper = null ; } }

Target:
public void run ( ) { try { android.os.Looper.prepare ( ) ; mLooper = android.os.Looper.myLooper ( ) ; mHandler = new android.media.cts.EncodeVirtualDisplayWithCompositionTest.GlCompositor.CompositionHandler ( ) ; initGl ( ) ; mStartCompletionSemaphore.release ( ) ; android.os.Looper.loop ( ) ; } catch ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.GlException e ) { e.printStackTrace ( ) ; fail ( "got gl exception" ) ; } finally { cleanupGl ( ) ; mHandler = null ; mLooper = null ; } }
Source:
public void test_getJarFileURL ( ) throws java.lang.Exception { java.net.URL fileURL = new java.net.URL ( tests.api.java.net.JarURLConnectionTest.BASE ) ; java.net.URL u = new java.net.URL ( ( ( "jar:" + ( tests.api.java.net.JarURLConnectionTest.BASE ) ) + "!/plus.bmp" ) ) ; juc = ( ( java.net.JarURLConnection ) ( u.openConnection ( ) ) ) ; assertEquals ( "Returned incorrect file URL" , fileURL , juc.getJarFileURL ( ) ) ; java.net.URL url = new java.net.URL ( "jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class" ) ; assertEquals ( "file:/bar.jar" , ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getJarFileURL ( ) . toString ( ) ) ; }

Target:
public void test_getJarFileURL ( ) throws java.lang.Exception { java.net.URL url = new java.net.URL ( "jar:file:///bar.jar!/foo.jar!/Bugs/HelloWorld.class" ) ; assertEquals ( "file:///bar.jar" , ( ( java.net.JarURLConnection ) ( url.openConnection ( ) ) ) . getJarFileURL ( ) . toString ( ) ) ; }
Source:
private synchronized void connectionStateChanged ( android.bluetooth.BluetoothDevice device , int fromState , int toState ) { if ( ( device == null ) || ( fromState == toState ) ) { return ; } if ( toState == ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { int bondState = mAdapterService.getBondState ( device ) ; if ( bondState == ( android.bluetooth.BluetoothDevice.BOND_NONE ) ) { removeStateMachine ( device ) ; } } }

Target:
private synchronized void connectionStateChanged ( android.bluetooth.BluetoothDevice device , int fromState , int toState ) { }
Source:
private static org.gradle.api.Project getProject ( java.io.File outputFile , java.util.Set < org.gradle.api.Project > gradleProjects ) { org.gradle.api.Project projectMatch = null ; for ( org.gradle.api.Project project : gradleProjects ) { java.io.File buildDir = project.getBuildDir ( ) ; if ( com.android.build.gradle.internal.model.DependenciesImpl.contains ( buildDir , outputFile ) ) { projectMatch = project ; break ; } } return projectMatch ; }

Target:
public static org.gradle.api.Project getProject ( java.io.File outputFile , java.util.Set < org.gradle.api.Project > gradleProjects ) { org.gradle.api.Project projectMatch = null ; for ( org.gradle.api.Project project : gradleProjects ) { java.io.File buildDir = project.getBuildDir ( ) ; if ( com.android.build.gradle.internal.model.DependenciesImpl.contains ( buildDir , outputFile ) ) { projectMatch = project ; break ; } } return projectMatch ; }
Source:
public boolean contains ( java.lang.String key ) { try { return ( mBinder.exist ( key , ( - 1 ) ) ) == ( 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 ; } }

Target:
public boolean contains ( java.lang.String key ) { return contains ( key , ( - 1 ) ) ; }
Source:
void ensureZoomed ( ) { if ( ( mZoomFitNextImage ) && ( ( getClientArea ( ) . height ) > 0 ) ) { mZoomFitNextImage = false ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutActionBar actionBar = mEditorDelegate.getGraphicalEditor ( ) . getLayoutActionBar ( ) ; if ( actionBar.isZoomingAllowed ( ) ) { setFitScale ( true , true ) ; } } }

Target:
void ensureZoomed ( ) { if ( ( mZoomFitNextImage ) && ( ( getClientArea ( ) . height ) > 0 ) ) { mZoomFitNextImage = false ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutActionBar actionBar = getGraphicalEditor ( ) . getLayoutActionBar ( ) ; if ( actionBar.isZoomingAllowed ( ) ) { setFitScale ( true , true ) ; } } }
Source:
protected void raiseAlert ( short alertLevel , short alertDescription , java.lang.String message , java.lang.Exception cause ) throws java.io.IOException { getPeer ( ) . notifyAlertRaised ( alertLevel , alertDescription , message , cause ) ; byte [ ] error = new byte [ 2 ] ; error [ 0 ] = ( ( byte ) ( alertLevel ) ) ; error [ 1 ] = ( ( byte ) ( alertDescription ) ) ; safeWriteRecord ( ContentType.alert , error , 0 , 2 ) ; }

Target:
protected void raiseAlert ( short alertLevel , short alertDescription , java.lang.String message , java.lang.Throwable cause ) throws java.io.IOException { getPeer ( ) . notifyAlertRaised ( alertLevel , alertDescription , message , cause ) ; byte [ ] error = new byte [ 2 ] ; error [ 0 ] = ( ( byte ) ( alertLevel ) ) ; error [ 1 ] = ( ( byte ) ( alertDescription ) ) ; safeWriteRecord ( ContentType.alert , error , 0 , 2 ) ; }
Source:
public void testHeadsetSendDTMFNull ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockCallsManager.getForegroundCall ( ) ) . thenReturn ( null ) ; boolean sentDtmf = mBluetoothPhoneService.mBinder.sendDtmf ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_DTMF_TONE ) ; org.mockito.Mockito.verify ( mMockCallsManager , org.mockito.Mockito.never ( ) ) . playDtmfTone ( org.mockito.Matchers.any ( com.android.server.telecom.Call.class ) , org.mockito.Matchers.anyChar ( ) ) ; org.mockito.Mockito.verify ( mMockCallsManager , org.mockito.Mockito.never ( ) ) . stopDtmfTone ( org.mockito.Matchers.any ( com.android.server.telecom.Call.class ) ) ; assertEquals ( sentDtmf , false ) ; }

Target:
public void testHeadsetSendDTMFNull ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockCallsManager.getForegroundCall ( ) ) . thenReturn ( null ) ; boolean sentDtmf = mBluetoothPhoneService.mBinder.sendDtmf ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.TEST_DTMF_TONE ) ; org.mockito.Mockito.verify ( mMockCallsManager , org.mockito.Mockito.never ( ) ) . playDtmfTone ( org.mockito.Matchers.any ( com.android.server.telecom.Call.class ) , org.mockito.Matchers.anyChar ( ) ) ; org.mockito.Mockito.verify ( mMockCallsManager , org.mockito.Mockito.never ( ) ) . stopDtmfTone ( org.mockito.Matchers.any ( com.android.server.telecom.Call.class ) ) ; org.junit.Assert.assertEquals ( sentDtmf , false ) ; }
Source:
public void testReplacedAlias ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > mergedMap = merger.getDataMap ( ) ; java.util.List < com.android.ide.common.res2.ResourceItem > values = mergedMap.get ( "layout/alias_replaced_by_file" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.ide.common.res2.ResourceItem layout = values.get ( 1 ) ; assertNull ( layout.getValue ( ) ) ; }

Target:
public void testReplacedAlias ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( false ) ; com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > mergedMap = merger.getDataMap ( ) ; java.util.List < com.android.ide.common.res2.ResourceItem > values = mergedMap.get ( "layout/alias_replaced_by_file" ) ; assertEquals ( 2 , values.size ( ) ) ; com.android.ide.common.res2.ResourceItem layout = values.get ( 1 ) ; assertNull ( layout.getValue ( ) ) ; }
Source:
public boolean processMessage ( android.os.Message message ) { if ( android.net.wifi.WifiStateMachine.DBG ) log ( ( ( ( getName ( ) ) + ( message.toString ( ) ) ) + "\n" ) ) ; switch ( message.what ) { case android.net.wifi.WifiStateMachine.CMD_SET_SCAN_MODE : if ( ( message.arg1 ) == ( android.net.wifi.WifiStateMachine.SCAN_ONLY_MODE ) ) { deferMessage ( message ) ; } break ; case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT : deferMessage ( message ) ; handleNetworkDisconnect ( ) ; transitionTo ( mDisconnectedState ) ; break ; default : return NOT_HANDLED ; } android.util.EventLog.writeEvent ( android.net.wifi.WifiStateMachine.EVENTLOG_WIFI_EVENT_HANDLED , message.what ) ; return HANDLED ; }

Target:
public boolean processMessage ( android.os.Message message ) { if ( android.net.wifi.WifiStateMachine.DBG ) log ( ( ( ( getName ( ) ) + ( message.toString ( ) ) ) + "\n" ) ) ; switch ( message.what ) { case android.net.wifi.WifiStateMachine.CMD_SET_SCAN_MODE : if ( ( message.arg1 ) == ( android.net.wifi.WifiStateMachine.SCAN_ONLY_MODE ) ) { deferMessage ( message ) ; } break ; case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT : deferMessage ( message ) ; handleNetworkDisconnect ( ) ; transitionTo ( mDisconnectedState ) ; break ; default : return NOT_HANDLED ; } return HANDLED ; }
Source:
public void cleanup ( ) { mNumTextureUpdated.set ( 0 ) ; mVerticesData.clear ( ) ; if ( ( mTextureId ) != 0 ) { int [ ] textures = new int [ ] { mTextureId } ; android.opengl.GLES20.glDeleteTextures ( 1 , textures , 0 ) ; } android.opengl.GLES20.glFinish ( ) ; if ( ( mSurface ) != null ) { mSurface.release ( ) ; mSurface = null ; } if ( ( mSurfaceTexture ) != null ) { mSurfaceTexture.release ( ) ; mSurfaceTexture = null ; } }

Target:
public void cleanup ( ) { mNumTextureUpdated.set ( 0 ) ; if ( ( mTextureId ) != 0 ) { int [ ] textures = new int [ ] { mTextureId } ; android.opengl.GLES20.glDeleteTextures ( 1 , textures , 0 ) ; } android.opengl.GLES20.glFinish ( ) ; if ( ( mSurface ) != null ) { mSurface.release ( ) ; mSurface = null ; } if ( ( mSurfaceTexture ) != null ) { mSurfaceTexture.release ( ) ; mSurfaceTexture = null ; } }
Source:
public static java.io.File createTempDir ( ) throws com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.CannotSetPermissionException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { try { final java.io.File tmpDir = com.android.sched.util.file.Files.createTempDir ( com.android.jack.test.toolchain.AbstractTestTools.TMP_PREFIX ) ; java.lang.Runtime.getRuntime ( ) . addShutdownHook ( new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { com.android.jack.test.toolchain.AbstractTestTools.deleteTempDir ( tmpDir ) ; } catch ( java.io.IOException e ) { java.lang.System.err.println ( e.getMessage ( ) ) ; } } } ) ; return tmpDir ; } catch ( java.lang.IllegalStateException e ) { throw new java.io.IOException ( e ) ; } }

Target:
public static java.io.File createTempDir ( ) throws java.io.IOException { try { final java.io.File tmpDir = com.android.sched.util.file.Files.createTempDir ( ) ; java.lang.Runtime.getRuntime ( ) . addShutdownHook ( new java.lang.Thread ( ) { @ java.lang.Override public void run ( ) { try { com.android.jack.test.toolchain.AbstractTestTools.deleteTempDir ( tmpDir ) ; } catch ( java.io.IOException e ) { java.lang.System.err.println ( e.getMessage ( ) ) ; } } } ) ; return tmpDir ; } catch ( java.lang.IllegalStateException e ) { throw new java.io.IOException ( e ) ; } }
Source:
private void handleRadioAvailable ( ) { mCi.getBasebandVersion ( obtainMessage ( com.android.internal.telephony.EVENT_GET_BASEBAND_VERSION_DONE ) ) ; if ( isPhoneTypeGsm ( ) ) { mCi.getIMEI ( obtainMessage ( com.android.internal.telephony.EVENT_GET_IMEI_DONE ) ) ; mCi.getIMEISV ( obtainMessage ( com.android.internal.telephony.EVENT_GET_IMEISV_DONE ) ) ; } else { mCi.getDeviceIdentity ( obtainMessage ( com.android.internal.telephony.EVENT_GET_DEVICE_IDENTITY_DONE ) ) ; } mCi.getRadioCapability ( obtainMessage ( com.android.internal.telephony.EVENT_GET_RADIO_CAPABILITY ) ) ; startLceAfterRadioIsAvailable ( ) ; }

Target:
private void handleRadioAvailable ( ) { mCi.getBasebandVersion ( obtainMessage ( com.android.internal.telephony.EVENT_GET_BASEBAND_VERSION_DONE ) ) ; mCi.getDeviceIdentity ( obtainMessage ( com.android.internal.telephony.EVENT_GET_DEVICE_IDENTITY_DONE ) ) ; mCi.getRadioCapability ( obtainMessage ( com.android.internal.telephony.EVENT_GET_RADIO_CAPABILITY ) ) ; startLceAfterRadioIsAvailable ( ) ; }
Source:
public static org.eclipse.swt.graphics.Image getImage ( java.lang.String path ) { org.eclipse.swt.graphics.Image image = org.eclipse.wb.internal.core.DesignerPlugin.sImageCache.get ( path ) ; if ( image == null ) { org.eclipse.jface.resource.ImageDescriptor descriptor = org.eclipse.wb.internal.core.DesignerPlugin.getImageDescriptor ( path ) ; if ( descriptor != null ) { return descriptor.createImage ( ) ; } org.eclipse.wb.internal.core.DesignerPlugin.sImageCache.put ( path , image ) ; } return image ; }

Target:
public static org.eclipse.swt.graphics.Image getImage ( java.lang.String path ) { org.eclipse.swt.graphics.Image image = org.eclipse.wb.internal.core.DesignerPlugin.sImageCache.get ( path ) ; if ( image == null ) { org.eclipse.jface.resource.ImageDescriptor descriptor = org.eclipse.wb.internal.core.DesignerPlugin.getImageDescriptor ( path ) ; if ( descriptor != null ) { image = descriptor.createImage ( ) ; } org.eclipse.wb.internal.core.DesignerPlugin.sImageCache.put ( path , image ) ; } return image ; }
Source:
public static int waitpid ( int pid , android.util.MutableInt status , int options ) throws android.system.ErrnoException { android.util.MutableInt internalStatus = new android.util.MutableInt ( status.value ) ; try { return Libcore.os.waitpid ( pid , internalStatus , options ) ; } finally { status.value = internalStatus.value ; } }

Target:
public static int waitpid ( int pid , android.util.MutableInt status , int options ) throws android.system.ErrnoException { return Libcore.os.waitpid ( pid , status , options ) ; }
Source:
public void testGetAllPhoneAccounts ( ) throws android.os.RemoteException { java.util.List < android.telecom.PhoneAccount > phoneAccountList = new java.util.ArrayList < android.telecom.PhoneAccount > ( ) { { add ( makePhoneAccount ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_16 ) . build ( ) ) ; add ( makePhoneAccount ( com.android.server.telecom.tests.TelecomServiceImplTest.SIP_PA_HANDLE_17 ) . build ( ) ) ; } } ; org.mockito.Mockito.when ( mFakePhoneAccountRegistrar.getAllPhoneAccounts ( org.mockito.Matchers.any ( android.os.UserHandle.class ) ) ) . thenReturn ( phoneAccountList ) ; assertEquals ( 2 , mTSIBinder.getAllPhoneAccounts ( ) . size ( ) ) ; }

Target:
public void testGetAllPhoneAccounts ( ) throws android.os.RemoteException { java.util.List < android.telecom.PhoneAccount > phoneAccountList = new java.util.ArrayList < android.telecom.PhoneAccount > ( ) { { add ( makePhoneAccount ( com.android.server.telecom.tests.TelecomServiceImplTest.TEL_PA_HANDLE_16 ) . build ( ) ) ; add ( makePhoneAccount ( com.android.server.telecom.tests.TelecomServiceImplTest.SIP_PA_HANDLE_17 ) . build ( ) ) ; } } ; org.mockito.Mockito.when ( mFakePhoneAccountRegistrar.getAllPhoneAccounts ( org.mockito.Matchers.any ( android.os.UserHandle.class ) ) ) . thenReturn ( phoneAccountList ) ; org.junit.Assert.assertEquals ( 2 , mTSIBinder.getAllPhoneAccounts ( ) . size ( ) ) ; }
Source:
public void sendDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( ( "sendDtmf called with invalid character '" + c ) + "'" ) ) ; } else { if ( ( mCT.getState ( ) ) == ( PhoneConstants.State.OFFHOOK ) ) { mCT.sendDtmf ( c , null ) ; } } }

Target:
public void sendDtmf ( char c ) { if ( ! ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) ) { loge ( ( ( "sendDtmf called with invalid character '" + c ) + "'" ) ) ; } else { if ( ( mCT.getState ( ) ) == ( PhoneConstants.State.OFFHOOK ) ) { mCT.sendDtmf ( c , null ) ; } } }
Source:
public void enter ( ) { super . enter ( ) ; mWasOnSpeaker = true ; setSpeakerphoneOn ( true ) ; setBluetoothOff ( ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_SPEAKER , mAvailableRoutes , null , mBluetoothRouteManager.getConnectedDevices ( ) ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }

Target:
public void enter ( ) { super . enter ( ) ; mWasOnSpeaker = true ; setSpeakerphoneOn ( true ) ; setBluetoothOff ( ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_SPEAKER , mAvailableRoutes , null , mBluetoothRouteManager.getConnectedDevices ( ) ) ; setSystemAudioState ( newState , true ) ; updateInternalCallAudioState ( ) ; }
Source:
public void testDeadlockOnOutgoingCall ( ) throws java.lang.Exception { for ( int i = 0 ; i < 100 ; i ++ ) { com.android.server.telecom.tests.BasicCallTests test = new com.android.server.telecom.tests.BasicCallTests ( ) ; test.setContext ( getContext ( ) ) ; test.setTestContext ( getTestContext ( ) ) ; test.setName ( getName ( ) ) ; test.setUp ( ) ; test.do_testDeadlockOnOutgoingCall ( ) ; test.tearDown ( ) ; } }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; }
Source:
private java.util.zip.ZipFile processZip ( @ javax.annotation.Nonnull java.io.File file ) throws com.android.sched.util.file.ZipException { try { return new java.util.zip.ZipFile ( file ) ; } catch ( java.util.zip.ZipException e ) { throw new com.android.sched.util.file.ZipException ( getLocation ( ) , e ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }

Target:
protected java.util.zip.ZipFile processZip ( @ javax.annotation.Nonnull java.io.File file ) throws com.android.sched.util.file.ZipException { try { return new java.util.zip.ZipFile ( file ) ; } catch ( java.util.zip.ZipException e ) { throw new com.android.sched.util.file.ZipException ( getLocation ( ) , e ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.ConcurrentIOException ( e ) ; } }
Source:
public static void verifyGolden ( junit.framework.TestCase test , java.lang.Object [ ] objects , org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert comparator ) throws java.lang.Exception { assertFalse ( "Empty array" , ( ( objects.length ) == 0 ) ) ; for ( int i = 0 ; i < ( objects.length ) ; i ++ ) { java.io.Serializable deserialized = org.apache.harmony.testframework.serialization.SerializationTest.getObject ( test , ( ( ".golden." + i ) + ".ser" ) ) ; comparator.assertDeserialized ( ( ( java.io.Serializable ) ( objects [ i ] ) ) , deserialized ) ; } }

Target:
public static void verifyGolden ( java.lang.Object test , java.lang.Object [ ] objects , org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert comparator ) throws java.lang.Exception { assertFalse ( "Empty array" , ( ( objects.length ) == 0 ) ) ; for ( int i = 0 ; i < ( objects.length ) ; i ++ ) { java.io.Serializable deserialized = org.apache.harmony.testframework.serialization.SerializationTest.getObject ( test , ( ( ".golden." + i ) + ".ser" ) ) ; comparator.assertDeserialized ( ( ( java.io.Serializable ) ( objects [ i ] ) ) , deserialized ) ; } }
Source:
public final java.nio.charset.CoderResult flush ( java.nio.ByteBuffer out ) { if ( ( ( state ) != ( java.nio.charset.CharsetEncoder.FLUSHED ) ) && ( ( state ) != ( java.nio.charset.CharsetEncoder.END_OF_INPUT ) ) ) { throw illegalStateException ( ) ; } java.nio.charset.CoderResult result = implFlush ( out ) ; if ( result == ( java.nio.charset.CoderResult.UNDERFLOW ) ) { state = java.nio.charset.CharsetEncoder.FLUSHED ; } return result ; }

Target:
public final java.nio.charset.CoderResult flush ( java.nio.ByteBuffer out ) { if ( ( ( state ) != ( java.nio.charset.CharsetEncoder.FLUSHED ) ) && ( ( state ) != ( java.nio.charset.CharsetEncoder.END_OF_INPUT ) ) ) { throw illegalStateException ( ) ; } if ( ( state ) == ( java.nio.charset.CharsetEncoder.FLUSHED ) ) { return java.nio.charset.CoderResult.UNDERFLOW ; } java.nio.charset.CoderResult result = implFlush ( out ) ; if ( result == ( java.nio.charset.CoderResult.UNDERFLOW ) ) { state = java.nio.charset.CharsetEncoder.FLUSHED ; } return result ; }
Source:
public static void writeUint32 ( long i , java.io.OutputStream output ) throws java.io.IOException { output.write ( ( ( int ) ( i > > 24 ) ) ) ; output.write ( ( ( int ) ( i > > 16 ) ) ) ; output.write ( ( ( int ) ( i > > 8 ) ) ) ; output.write ( ( ( int ) ( i ) ) ) ; }

Target:
public static void writeUint32 ( long i , java.io.OutputStream output ) throws java.io.IOException { output.write ( ( ( byte ) ( i > > > 24 ) ) ) ; output.write ( ( ( byte ) ( i > > > 16 ) ) ) ; output.write ( ( ( byte ) ( i > > > 8 ) ) ) ; output.write ( ( ( byte ) ( i ) ) ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String [ ] pkgs = intent.getStringArrayExtra ( Intent.EXTRA_PACKAGES ) ; if ( pkgs != null ) { for ( java.lang.String pkg : pkgs ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false ) ) { setResultCode ( Activity.RESULT_OK ) ; return ; } } } } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String [ ] pkgs = intent.getStringArrayExtra ( Intent.EXTRA_PACKAGES ) ; if ( pkgs != null ) { for ( java.lang.String pkg : pkgs ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false , false ) ) { setResultCode ( Activity.RESULT_OK ) ; return ; } } } } }
Source:
private void testScriptSide ( android.renderscript.RenderScript pRS ) { com.android.rs.unittest.ScriptC_element s = new com.android.rs.unittest.ScriptC_element ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; initializeGlobals ( pRS , s ) ; s.invoke_element_test ( ) ; pRS.finish ( ) ; s.get_complexStruct ( ) . getAllocation ( ) . destroy ( ) ; s.get_complexStruct ( ) . getElement ( ) . destroy ( ) ; s.destroy ( ) ; }

Target:
private void testScriptSide ( android.renderscript.RenderScript pRS ) { com.android.rs.unittest.ScriptC_element s = new com.android.rs.unittest.ScriptC_element ( pRS ) ; initializeGlobals ( pRS , s ) ; s.invoke_element_test ( ) ; pRS.finish ( ) ; s.get_complexStruct ( ) . getAllocation ( ) . destroy ( ) ; s.get_complexStruct ( ) . getElement ( ) . destroy ( ) ; s.destroy ( ) ; }
Source:
private void addRemoteAddOn ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , com.android.sdklib.repository.descriptors.IdDisplay vendor , com.android.sdklib.repository.descriptors.IdDisplay name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newAddon ( version , revision , vendor , name ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }

Target:
private void addRemoteAddOn ( com.android.sdklib.AndroidVersion version , com.android.sdklib.repository.MajorRevision revision , com.android.sdklib.repository.descriptors.IdDisplay vendor , com.android.sdklib.repository.descriptors.IdDisplay name ) { com.android.sdklib.repository.descriptors.IPkgDesc d = PkgDesc.Builder.newAddon ( version , revision , vendor , name ) . create ( ) ; com.android.sdklib.repository.remote.RemotePkgInfo r = new com.android.sdklib.repository.remote.RemotePkgInfo ( d , mSource , 0 ) ; mRemotePkgs.put ( d.getType ( ) , r ) ; }
Source:
public static java.util.UUID nameUUIDFromBytes ( byte [ ] name ) { java.security.MessageDigest md ; try { md = java.security.MessageDigest.getInstance ( "MD5" ) ; } catch ( java.security.NoSuchAlgorithmException nsae ) { throw new java.lang.InternalError ( "MD5 not supported" ) ; } byte [ ] md5Bytes = md.digest ( name ) ; md5Bytes [ 6 ] &= 15 ; md5Bytes [ 6 ] |= 48 ; md5Bytes [ 8 ] &= 63 ; md5Bytes [ 8 ] |= 128 ; return new java.util.UUID ( md5Bytes ) ; }

Target:
public static java.util.UUID nameUUIDFromBytes ( byte [ ] name ) { java.security.MessageDigest md ; try { md = java.security.MessageDigest.getInstance ( "MD5" ) ; } catch ( java.security.NoSuchAlgorithmException nsae ) { throw new java.lang.InternalError ( "MD5 not supported" , nsae ) ; } byte [ ] md5Bytes = md.digest ( name ) ; md5Bytes [ 6 ] &= 15 ; md5Bytes [ 6 ] |= 48 ; md5Bytes [ 8 ] &= 63 ; md5Bytes [ 8 ] |= 128 ; return new java.util.UUID ( md5Bytes ) ; }
Source:
public void test_getFile ( ) throws java.lang.Exception { u = new java.net.URL ( "http" , "www.yahoo.com:8080" , 1233 , "test/!@$%^&*/test.html#foo" ) ; assertEquals ( "returns a wrong file" , "test/!@$%^&*/test.html" , u.getFile ( ) ) ; u = new java.net.URL ( "http" , "www.yahoo.com:8080" , 1233 , "" ) ; assertTrue ( "returns a wrong file" , u.getFile ( ) . equals ( "" ) ) ; }

Target:
public void test_getFile ( ) throws java.lang.Exception { u = new java.net.URL ( "http" , "www.yahoo.com:8080" , 1233 , "test/!@$%^&*/test.html#foo" ) ; assertEquals ( "returns a wrong file" , "/test/!@$%^&*/test.html" , u.getFile ( ) ) ; u = new java.net.URL ( "http" , "www.yahoo.com:8080" , 1233 , "" ) ; assertTrue ( "returns a wrong file" , u.getFile ( ) . equals ( "" ) ) ; }
Source:
private static long getServerId ( java.io.File serverJar ) throws com.android.jack.launcher.ServerLauncher.NotAServerJarFileName { java.util.regex.Matcher matcher = com.android.jack.launcher.ServerLauncher.SERVER_JAR_PATTERN.matcher ( serverJar.getName ( ) ) ; if ( ! ( matcher.matches ( ) ) ) { throw new com.android.jack.launcher.ServerLauncher.NotAServerJarFileName ( ) ; } return java.lang.Long.parseLong ( matcher.group ( 1 ) ) ; }

Target:
private static int getServerId ( java.io.File serverJar ) throws com.android.jack.launcher.ServerLauncher.NotAServerJarFileName { java.util.regex.Matcher matcher = com.android.jack.launcher.ServerLauncher.SERVER_JAR_PATTERN.matcher ( serverJar.getName ( ) ) ; if ( ! ( matcher.matches ( ) ) ) { throw new com.android.jack.launcher.ServerLauncher.NotAServerJarFileName ( ) ; } return java.lang.Integer.parseInt ( matcher.group ( 1 ) ) ; }
Source:
public com.android.se.Channel openLogicalChannelWithoutChannelAccess ( byte [ ] aid ) throws java.io.IOException { try { return openLogicalChannel ( null , aid , ( ( byte ) ( 0 ) ) , null , null , 0 ) ; } catch ( android.os.ServiceSpecificException e ) { if ( ( e.errorCode ) == ( android.se.omapi.SEService.IO_ERROR ) ) { throw new java.io.IOException ( e.getMessage ( ) ) ; } throw e ; } catch ( android.os.RemoteException e ) { throw new java.io.IOException ( e.getMessage ( ) ) ; } }

Target:
public com.android.se.Channel openLogicalChannelWithoutChannelAccess ( byte [ ] aid ) throws java.io.IOException { return openLogicalChannel ( null , aid , ( ( byte ) ( 0 ) ) , null , null , 0 ) ; }
Source:
void stopScan ( com.android.bluetooth.gatt.ScanClient client ) { enforceAdminPermission ( ) ; int scanQueueSize = ( mScanManager.getBatchScanQueue ( ) . size ( ) ) + ( mScanManager.getRegularScanQueue ( ) . size ( ) ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "stopScan() - queue size =" + scanQueueSize ) ) ; com.android.bluetooth.gatt.AppScanStats app = null ; app = mScannerMap.getAppScanStatsById ( client.scannerId ) ; if ( app != null ) app.recordScanStop ( ) ; mScanManager.stopScan ( client ) ; }

Target:
void stopScan ( com.android.bluetooth.gatt.ScanClient client ) { enforceAdminPermission ( ) ; int scanQueueSize = ( mScanManager.getBatchScanQueue ( ) . size ( ) ) + ( mScanManager.getRegularScanQueue ( ) . size ( ) ) ; if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , ( "stopScan() - queue size =" + scanQueueSize ) ) ; com.android.bluetooth.gatt.AppScanStats app = null ; app = mScannerMap.getAppScanStatsById ( client.scannerId ) ; if ( app != null ) app.recordScanStop ( client.scannerId ) ; mScanManager.stopScan ( client ) ; }
Source:
private static void draw ( int nCanvas , int nPaint , boolean compositeOnly , boolean forceSrcMode , com.android.layoutlib.bridge.impl.GcSnapshot.Drawable drawable ) { android.graphics.Canvas_Delegate canvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( nCanvas ) ; if ( canvasDelegate == null ) { return ; } android.graphics.Paint_Delegate paintDelegate = android.graphics.Paint_Delegate.getDelegate ( nPaint ) ; canvasDelegate.getSnapshot ( ) . draw ( drawable , paintDelegate , compositeOnly , forceSrcMode ) ; }

Target:
private static void draw ( long nCanvas , long nPaint , boolean compositeOnly , boolean forceSrcMode , com.android.layoutlib.bridge.impl.GcSnapshot.Drawable drawable ) { android.graphics.Canvas_Delegate canvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( nCanvas ) ; if ( canvasDelegate == null ) { return ; } android.graphics.Paint_Delegate paintDelegate = android.graphics.Paint_Delegate.getDelegate ( nPaint ) ; canvasDelegate.getSnapshot ( ) . draw ( drawable , paintDelegate , compositeOnly , forceSrcMode ) ; }