auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static java.lang.String [ ] getStaticHeader ( ) { return com.android.sched.util.log.stats.ExtendedSample.HEADER.clone ( ) ; }

Target:
public synchronized java.util.Iterator < java.lang.Object > iterator ( ) { ensureSorted ( ) ; return com.google.common.collect.Iterators.< java.lang.Object > forArray ( java.lang.Long.valueOf ( getCount ( ) ) , java.lang.Double.valueOf ( getTotal ( ) ) , java.lang.Double.valueOf ( getMin ( ) ) , java.lang.Double.valueOf ( getAverage ( ) ) , java.lang.Double.valueOf ( getFirstQuartile ( ) ) , java.lang.Double.valueOf ( getMedian ( ) ) , java.lang.Double.valueOf ( getThirdQuartile ( ) ) , java.lang.Double.valueOf ( getMax ( ) ) ) ; }
Source:
public static java.util.TimeZone makeTimeZone ( java.lang.String id ) throws java.io.IOException { int index = java.util.Arrays.binarySearch ( libcore.util.ZoneInfoDB.ids , id ) ; if ( index < 0 ) { return null ; } libcore.io.BufferIterator it = libcore.util.ZoneInfoDB.TZDATA.bigEndianIterator ( ) ; it.skip ( libcore.util.ZoneInfoDB.byteOffsets [ index ] ) ; return libcore.util.ZoneInfo.makeTimeZone ( id , it ) ; }

Target:
public java.util.TimeZone makeTimeZone ( java.lang.String id ) throws java.io.IOException { int index = java.util.Arrays.binarySearch ( ids , id ) ; if ( index < 0 ) { return null ; } libcore.io.BufferIterator it = mappedFile.bigEndianIterator ( ) ; it.skip ( byteOffsets [ index ] ) ; return libcore.util.ZoneInfo.makeTimeZone ( id , it ) ; }
Source:
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 , 3 , java.text.NumberFormat.Field.INTEGER ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 4 , 6 , 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 , 3 , java.text.NumberFormat.Field.INTEGER ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 3 , 4 , java.text.NumberFormat.Field.DECIMAL_SEPARATOR ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 4 , 6 , java.text.NumberFormat.Field.FRACTION ) ) ; v.add ( new org.apache.harmony.tests.java.text.FieldContainer ( 7 , 9 , java.text.NumberFormat.Field.CURRENCY ) ) ; return v ; }
Source:
private static boolean isMatchesSafelyMethod ( java.lang.reflect.Method method ) { return ( ( method.getName ( ) . equals ( "matchesSafely" ) ) && ( ( method.getParameterTypes ( ) . length ) == 1 ) ) && ( ! ( method.isSynthetic ( ) ) ) ; }

Target:
public final void describeMismatch ( java.lang.Object item , org.hamcrest.Description description ) { if ( item == null ) { super . describeMismatch ( null , description ) ; } else if ( ! ( expectedType.isInstance ( item ) ) ) { description.appendText ( "was a " ) . appendText ( item.getClass ( ) . getName ( ) ) . appendText ( " (" ) . appendValue ( item ) . appendText ( ")" ) ; } else { describeMismatchSafely ( ( ( T ) ( item ) ) , description ) ; } }
Source:
public java.net.Socket createSocket ( java.net.InetAddress addr , int port , java.net.InetAddress localAddr , int localPort ) throws java.io.IOException { org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl s = ( ( org.apache.harmony.xnet.provider.jsse.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.setHandshakeTimeout ( mHandshakeTimeoutMillis ) ; s.setChannelIdPrivateKey ( mChannelIdPrivateKey ) ; return s ; }
Source:
public static int findResourceLine ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.lang.String key , @ com.android.annotations.NonNull com.android.utils.ILogger logger ) { int slash = key.indexOf ( '/' ) ; if ( slash == ( - 1 ) ) { assert false : slash ; return - 1 ; } final java.lang.String type = key.substring ( 0 , slash ) ; final java.lang.String name = key.substring ( ( slash + 1 ) ) ; return com.android.ide.common.blame.parser.aapt.AbstractAaptOutputParser.findValueDeclaration ( file , type , name , logger ) ; }

Target:
public static com.android.ide.common.blame.SourcePosition findResourceLine ( @ com.android.annotations.NonNull java.io.File file , @ com.android.annotations.NonNull java.lang.String key , @ com.android.annotations.NonNull com.android.utils.ILogger logger ) { int slash = key.indexOf ( '/' ) ; if ( slash == ( - 1 ) ) { assert false : slash ; return com.android.ide.common.blame.SourcePosition.UNKNOWN ; } final java.lang.String type = key.substring ( 0 , slash ) ; final java.lang.String name = key.substring ( ( slash + 1 ) ) ; return com.android.ide.common.blame.parser.aapt.AbstractAaptOutputParser.findValueDeclaration ( file , type , name , logger ) ; }
Source:
public lombok.ast.AstVisitor createJavaVisitor ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context ) { return new com.android.tools.lint.checks.CallSuperDetector.PerformanceVisitor ( context ) ; }

Target:
public boolean visitMethodDeclaration ( lombok.ast.MethodDeclaration node ) { com.android.tools.lint.client.api.JavaParser.ResolvedNode resolved = context.resolve ( node ) ; if ( resolved instanceof com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = ( ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) ( resolved ) ) ; com.android.tools.lint.checks.CallSuperDetector.checkCallSuper ( context , node , method ) ; } return false ; }
Source:
protected boolean postCreateContent ( ) { com.android.sdkuilib.internal.repository.UpdaterData updaterData = getUpdaterData ( ) ; com.android.sdkuilib.internal.tasks.ProgressViewFactory factory = new com.android.sdkuilib.internal.tasks.ProgressViewFactory ( ) ; factory.setProgressView ( new com.android.sdkuilib.internal.tasks.ProgressView ( mStatusText , mProgressBar , mButtonStop ) ) ; updaterData.setTaskFactory ( factory ) ; return super . postCreateContent ( ) ; }

Target:
private boolean postCreateContent ( ) { com.android.sdkuilib.internal.tasks.ProgressViewFactory factory = new com.android.sdkuilib.internal.tasks.ProgressViewFactory ( ) ; factory.setProgressView ( new com.android.sdkuilib.internal.tasks.ProgressView ( mStatusText , mProgressBar , mButtonStop ) ) ; mUpdaterData.setTaskFactory ( factory ) ; setWindowImage ( mShell ) ; setupSources ( ) ; initializeSettings ( ) ; if ( mUpdaterData.checkIfInitFailed ( ) ) { return false ; } mUpdaterData.broadcastOnSdkLoaded ( ) ; if ( mRequestAutoUpdate ) { mUpdaterData.updateOrInstallAll_WithGUI ( null , false ) ; } mPkgPage.onPageSelected ( ) ; return true ; }
Source:
public static void computeRemainder ( android.renderscript.cts.TestRemainder.ArgumentsFloatFloatFloat args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; double num = ( ( double ) ( args.inX ) ) ; double den = ( ( double ) ( args.inY ) ) ; args.out = ( ( float ) ( num - ( ( java.lang.StrictMath.round ( ( num / den ) ) ) * den ) ) ) ; }

Target:
public static void computeRound ( android.renderscript.cts.TestRound.ArgumentsFloatFloat args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = java.lang.StrictMath.round ( args.in ) ; }
Source:
private boolean hasBinary ( java.lang.String path ) { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( latch ) ; try { executeShellCommand ( ( "ls " + path ) , receiver ) ; } catch ( java.lang.Exception e ) { return false ; } try { latch.await ( com.android.ddmlib.Device.GETPROP_TIMEOUT , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { return false ; } java.lang.String value = receiver.getOutput ( ) . trim ( ) ; return ! ( value.endsWith ( "No such file or directory" ) ) ; }

Target:
private boolean hasBinary ( java.lang.String path ) { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( latch ) ; try { executeShellCommand ( ( "ls " + path ) , receiver ) ; } catch ( java.lang.Exception e ) { return false ; } try { latch.await ( com.android.ddmlib.Device.LS_TIMEOUT_SEC , java.util.concurrent.TimeUnit.SECONDS ) ; } catch ( java.lang.InterruptedException e ) { return false ; } java.lang.String value = receiver.getOutput ( ) . trim ( ) ; return ! ( value.endsWith ( "No such file or directory" ) ) ; }
Source:
public android.view.View newView ( android.content.Context context , android.database.Cursor cursor , android.view.ViewGroup parent ) { android.view.View view = mInflater.inflate ( R.layout.select_dialog_multichoice , parent , false ) ; bindView ( view , context , cursor ) ; if ( ( cursor.getInt ( cursor.getColumnIndexOrThrow ( mIsCheckedColumn ) ) ) == 1 ) { listView.setItemChecked ( cursor.getPosition ( ) , true ) ; } return view ; }

Target:
public void bindView ( android.view.View view , android.content.Context context , android.database.Cursor cursor ) { android.widget.CheckedTextView text = ( ( android.widget.CheckedTextView ) ( view.findViewById ( R.id.text1 ) ) ) ; text.setText ( cursor.getString ( cursor.getColumnIndexOrThrow ( mLabelColumn ) ) ) ; if ( ( cursor.getInt ( cursor.getColumnIndexOrThrow ( mIsCheckedColumn ) ) ) == 1 ) { listView.setItemChecked ( cursor.getPosition ( ) , true ) ; } }
Source:
public void test1_get ( ) { int [ ] bits = com.android.dx.util.Bits.makeBitSet ( 100 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { assertFalse ( com.android.dx.util._tests.BitsTest.label ( i ) , com.android.dx.util.Bits.get ( bits , i ) ) ; } }

Target:
public void test1_get ( ) { int [ ] bits = com.android.dx.util.Bits.makeBitSet ( 100 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { assertFalse ( com.android.dx.util.BitsTest.label ( i ) , com.android.dx.util.Bits.get ( bits , i ) ) ; } }
Source:
public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { java.lang.String value = deviceXDpiText.getText ( ) ; if ( ( value.length ( ) ) == 0 ) { mXDpi = java.lang.Float.NaN ; } else { mXDpi = java.lang.Float.parseFloat ( value ) ; } }

Target:
public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { java.lang.String value = deviceXDpiText.getText ( ) ; if ( ( value.length ( ) ) == 0 ) { mXDpi = java.lang.Float.NaN ; } else { try { mXDpi = mDecimalFormat.parse ( value ) . floatValue ( ) ; } catch ( java.text.ParseException exception ) { mXDpi = java.lang.Float.NaN ; } } }
Source:
public void testIterator ( ) { java.util.concurrent.ConcurrentLinkedQueue q = populatedQueue ( jsr166.SIZE ) ; int i = 0 ; java.util.Iterator it = q.iterator ( ) ; while ( it.hasNext ( ) ) { assertTrue ( q.contains ( it.next ( ) ) ) ; ++ i ; } assertEquals ( i , jsr166.SIZE ) ; }

Target:
public void testIterator ( ) { java.util.concurrent.ConcurrentLinkedQueue q = populatedQueue ( jsr166.SIZE ) ; java.util.Iterator it = q.iterator ( ) ; int i ; for ( i = 0 ; it.hasNext ( ) ; i ++ ) assertTrue ( q.contains ( it.next ( ) ) ) ; assertEquals ( i , jsr166.SIZE ) ; assertIteratorExhausted ( it ) ; }
Source:
public int rmdex ( java.lang.String codePath ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "rmdex" ) ; builder.append ( ' ' ) ; builder.append ( codePath ) ; return execute ( builder.toString ( ) ) ; }

Target:
public int rmdex ( java.lang.String codePath , java.lang.String instructionSet ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "rmdex" ) ; builder.append ( ' ' ) ; builder.append ( codePath ) ; builder.append ( ' ' ) ; builder.append ( instructionSet ) ; return execute ( builder.toString ( ) ) ; }
Source:
public java.lang.String formatValue ( @ javax.annotation.Nonnull com.android.sched.util.file.OutputStreamFile stream ) { return formatValue ( ( ( com.android.sched.util.file.AbstractStreamFile ) ( stream ) ) ) ; }

Target:
public java.lang.String formatValue ( @ javax.annotation.Nonnull com.android.sched.util.file.OutputStreamFile stream ) { if ( stream.isStandard ( ) ) { if ( stream.getLocation ( ) . equals ( StandardOutputKind.STANDARD_OUTPUT.getLocation ( ) ) ) { return STANDARD_IO_NAME ; } else { assert stream.getLocation ( ) . equals ( StandardOutputKind.STANDARD_ERROR.getLocation ( ) ) ; return STANDARD_ERROR_NAME ; } } else { return stream.getPath ( ) ; } }
Source:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeInt ( downloadId ) ; out.writeParcelable ( fileServiceInfo , flags ) ; out.writeParcelable ( sourceUri , flags ) ; out.writeParcelable ( destinationUri , flags ) ; out.writeInt ( subId ) ; }

Target:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeInt ( downloadId ) ; out.writeParcelable ( fileServiceInfo , flags ) ; out.writeParcelable ( sourceUri , flags ) ; out.writeParcelable ( destinationUri , flags ) ; out.writeInt ( subId ) ; out.writeString ( serializedResultIntentForApp ) ; }
Source:
protected int compareTo0 ( com.android.jack.dx.rop.cst.Constant other ) { com.android.jack.dx.rop.cst.CstMemberRef otherMember = ( ( com.android.jack.dx.rop.cst.CstMemberRef ) ( other ) ) ; int cmp = definingClass.compareTo ( otherMember.definingClass ) ; if ( cmp != 0 ) { return cmp ; } com.android.jack.dx.rop.cst.CstString thisName = nat.getName ( ) ; com.android.jack.dx.rop.cst.CstString otherName = otherMember.nat.getName ( ) ; return thisName.compareTo ( otherName ) ; }

Target:
public final int hashCode ( ) { return ( ( ( definingClass.hashCode ( ) ) * 31 ) + ( ( name.hashCode ( ) ) * 31 ) ) + ( nat.hashCode ( ) ) ; }
Source:
public java.lang.String getLongDescription ( ) { java.lang.String s = getDescription ( ) ; if ( ( s == null ) || ( ( s.length ( ) ) == 0 ) ) { s = getShortDescription ( ) ; } if ( ( s.indexOf ( "revision" ) ) == ( - 1 ) ) { s += java.lang.String.format ( "\nRevision %1$s%2$s" , getPreviewVersion ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } return s ; }

Target:
public java.lang.String getLongDescription ( ) { java.lang.String s = getDescription ( ) ; if ( ( s == null ) || ( ( s.length ( ) ) == 0 ) ) { s = getShortDescription ( ) ; } if ( ( s.indexOf ( "revision" ) ) == ( - 1 ) ) { s += java.lang.String.format ( "\nRevision %1$s%2$s" , getRevision ( ) . toShortString ( ) , ( isObsolete ( ) ? " (Obsolete)" : "" ) ) ; } return s ; }
Source:
void startObserving ( ) { android.content.ContentResolver resolver = mContext.getContentResolver ( ) ; resolver.registerContentObserver ( Settings.System.getUriFor ( Settings.System.SCREEN_BRIGHTNESS ) , false , this ) ; resolver.registerContentObserver ( Settings.System.getUriFor ( Settings.System.SCREEN_BRIGHTNESS_MODE ) , false , this ) ; }

Target:
void startObserving ( ) { android.content.ContentResolver resolver = mContext.getContentResolver ( ) ; resolver.registerContentObserver ( Settings.System.getUriFor ( Settings.System.SCREEN_BRIGHTNESS ) , false , this ) ; resolver.registerContentObserver ( Settings.System.getUriFor ( Settings.System.SCREEN_BRIGHTNESS_MODE ) , false , this ) ; resolver.registerContentObserver ( Settings.System.getUriFor ( Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ ) , false , this ) ; }
Source:
synchronized void nAllocationData2D ( long 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 , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
private void checkWorldReadAccess ( java.lang.String path ) throws java.io.FileNotFoundException { try { android.system.StructStat stat = android.system.Os.stat ( path ) ; int accessBits = android.system.OsConstants.S_IROTH ; if ( ( android.system.OsConstants.S_ISREG ( stat.st_mode ) ) && ( ( ( stat.st_mode ) & accessBits ) == accessBits ) ) { checkLeadingPathComponentsWorldExecutable ( path ) ; return ; } } catch ( android.system.ErrnoException e ) { } throw new java.io.FileNotFoundException ( ( "Can't access " + path ) ) ; }

Target:
private static void checkWorldReadAccess ( java.lang.String path ) throws java.io.FileNotFoundException { final int accessBits = ( path.startsWith ( "/storage/" ) ) ? android.system.OsConstants.S_IRGRP : android.system.OsConstants.S_IROTH ; try { android.system.StructStat stat = android.system.Os.stat ( path ) ; if ( ( android.system.OsConstants.S_ISREG ( stat.st_mode ) ) && ( ( ( stat.st_mode ) & accessBits ) == accessBits ) ) { com.android.providers.media.MediaProvider.checkLeadingPathComponentsWorldExecutable ( path ) ; return ; } } catch ( android.system.ErrnoException e ) { } throw new java.io.FileNotFoundException ( ( "Can't access " + path ) ) ; }
Source:
public boolean launchAssistIntent ( android.content.Intent intent , int requestType , java.lang.String hint , int userHandle , android.os.Bundle args ) { return ( enqueueAssistContext ( requestType , intent , hint , null , null , userHandle , args , com.android.server.am.ActivityManagerService.PENDING_ASSIST_EXTRAS_TIMEOUT ) ) != null ; }

Target:
public com.android.server.am.ContentProviderHolder getContentProviderExternal ( java.lang.String name , int userId , android.os.IBinder token ) { enforceCallingPermission ( android.Manifest.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY , "Do not have permission in call getContentProviderExternal()" ) ; userId = mUserController.handleIncomingUser ( android.os.Binder.getCallingPid ( ) , android.os.Binder.getCallingUid ( ) , userId , false , com.android.server.am.ActivityManagerService.ALLOW_FULL_ONLY , "getContentProvider" , null ) ; return getContentProviderExternalUnchecked ( name , token , userId ) ; }
Source:
private static com.android.dx.rop.type.Type putIntern ( com.android.dx.rop.type.Type type ) { synchronized ( com.android.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.getDescriptor ( ) ; com.android.dx.rop.type.Type already = com.android.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }

Target:
public static void clearInternTable ( ) { com.android.dx.rop.type.Type.internTable.clear ( ) ; }
Source:
private java.lang.String getString ( int offset , int maxLength ) { int index = offset ; int lastIndex = index + maxLength ; while ( ( index < lastIndex ) && ( ( buffer [ index ] ) != 0 ) ) { index ++ ; } return new java.lang.String ( buffer , offset , ( index - offset ) , java.nio.charset.Charsets.ISO_8859_1 ) ; }

Target:
private java.lang.String getString ( int offset , int maxLength ) { int index = offset ; int lastIndex = index + maxLength ; while ( ( index < lastIndex ) && ( ( buffer [ index ] ) != 0 ) ) { index ++ ; } return new java.lang.String ( buffer , offset , ( index - offset ) , java.nio.charset.StandardCharsets.ISO_8859_1 ) ; }
Source:
public void testSetupDriverForSoftApModeError ( ) { 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 ) ; org.mockito.Mockito.when ( wificondControl.setupDriverForSoftApMode ( ) ) . thenReturn ( null ) ; mWifiNative.setWificondControl ( wificondControl ) ; android.net.wifi.IApInterface returnedApInterface = mWifiNative.setupForSoftApMode ( ) ; org.junit.Assert.assertEquals ( null , returnedApInterface ) ; org.mockito.Mockito.verify ( mWifiNative ) . startHal ( org.mockito.Mockito.eq ( false ) ) ; org.mockito.Mockito.verify ( wificondControl ) . setupDriverForSoftApMode ( ) ; }

Target:
public void testSetupDriverForSoftApMode ( ) { android.net.wifi.IApInterface apInterface = org.mockito.Mockito.mock ( android.net.wifi.IApInterface.class ) ; org.mockito.Mockito.when ( mWificondControl.setupDriverForSoftApMode ( ) ) . thenReturn ( apInterface ) ; android.net.wifi.IApInterface returnedApInterface = mWifiNative.setupForSoftApMode ( ) ; org.junit.Assert.assertEquals ( apInterface , returnedApInterface ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . startVendorHal ( org.mockito.Mockito.eq ( false ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . setupDriverForSoftApMode ( ) ; }
Source:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; doLog ( lr , bundleName ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; doLog ( lr , bundleName ) ; }
Source:
public static int getTunerType ( android.content.Context context ) { return com.android.tv.tuner.TunerHal.TUNER_TYPE_USB ; }

Target:
public static android.util.Pair < java.lang.Integer , java.lang.Integer > getTunerTypeAndCount ( android.content.Context context ) { if ( com.android.tv.tuner.TunerHal.useBuiltInTuner ( context ) ) { } int usbTunerCount = com.android.tv.tuner.UsbTunerHal.getNumberOfDevices ( context ) ; if ( usbTunerCount > 0 ) { return new android.util.Pair ( com.android.tv.tuner.TunerHal.TUNER_TYPE_USB , usbTunerCount ) ; } return new android.util.Pair ( null , 0 ) ; }
Source:
void assertFutureTimesOut ( java.util.concurrent.Future future , long timeoutMillis ) { long startTime = java.lang.System.nanoTime ( ) ; try { future.get ( timeoutMillis , java.util.concurrent.TimeUnit.MILLISECONDS ) ; shouldThrow ( ) ; } catch ( java.util.concurrent.TimeoutException success ) { } catch ( java.lang.Exception e ) { threadUnexpectedException ( e ) ; } finally { future.cancel ( true ) ; } assertTrue ( ( ( millisElapsedSince ( startTime ) ) >= timeoutMillis ) ) ; }

Target:
void assertFutureTimesOut ( java.util.concurrent.Future future , long timeoutMillis ) { long startTime = java.lang.System.nanoTime ( ) ; try { future.get ( timeoutMillis , java.util.concurrent.TimeUnit.MILLISECONDS ) ; shouldThrow ( ) ; } catch ( java.util.concurrent.TimeoutException success ) { } catch ( java.lang.Exception fail ) { threadUnexpectedException ( fail ) ; } finally { future.cancel ( true ) ; } assertTrue ( ( ( jsr166.JSR166TestCase.millisElapsedSince ( startTime ) ) >= timeoutMillis ) ) ; }
Source:
protected boolean stop ( ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "stop()" ) ; if ( ( mContactChangeObserver ) == null ) { android.util.Log.i ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Avoid unregister when receiver it is not registered" ) ; return true ; } try { unregisterReceiver ( mPbapReceiver ) ; getContentResolver ( ) . unregisterContentObserver ( mContactChangeObserver ) ; mContactChangeObserver = null ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Unable to unregister pbap receiver" , e ) ; } mSessionStatusHandler.obtainMessage ( com.android.bluetooth.pbap.BluetoothPbapService.SHUTDOWN ) . sendToTarget ( ) ; setState ( BluetoothProfile.STATE_DISCONNECTED , BluetoothPbap.RESULT_CANCELED ) ; return true ; }

Target:
protected boolean stop ( ) { android.util.Log.v ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "stop()" ) ; if ( ( mContactChangeObserver ) == null ) { android.util.Log.i ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Avoid unregister when receiver it is not registered" ) ; return true ; } try { unregisterReceiver ( mPbapReceiver ) ; getContentResolver ( ) . unregisterContentObserver ( mContactChangeObserver ) ; mContactChangeObserver = null ; } catch ( java.lang.Exception e ) { android.util.Log.w ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "Unable to unregister pbap receiver" , e ) ; } mSessionStatusHandler.obtainMessage ( com.android.bluetooth.pbap.BluetoothPbapService.SHUTDOWN ) . sendToTarget ( ) ; mHandlerThread.quitSafely ( ) ; return true ; }
Source:
public void notifyCarrierSignalReceivers ( android.content.Intent intent ) { java.util.List < android.content.ComponentName > receiverList ; synchronized ( mCachedWakeSignalConfigs ) { receiverList = mCachedWakeSignalConfigs.get ( intent.getAction ( ) ) ; if ( ! ( com.android.internal.util.ArrayUtils.isEmpty ( receiverList ) ) ) { broadcast ( intent , receiverList , com.android.internal.telephony.CarrierSignalAgent.WAKE ) ; } } synchronized ( mCachedNoWakeSignalConfigs ) { receiverList = mCachedNoWakeSignalConfigs.get ( intent.getAction ( ) ) ; if ( ! ( com.android.internal.util.ArrayUtils.isEmpty ( receiverList ) ) ) { broadcast ( intent , receiverList , com.android.internal.telephony.CarrierSignalAgent.NO_WAKE ) ; } } }

Target:
public void notifyCarrierSignalReceivers ( android.content.Intent intent ) { java.util.Set < android.content.ComponentName > receiverSet ; synchronized ( mCachedWakeSignalConfigs ) { receiverSet = mCachedWakeSignalConfigs.get ( intent.getAction ( ) ) ; if ( ! ( com.android.internal.util.ArrayUtils.isEmpty ( receiverSet ) ) ) { broadcast ( intent , receiverSet , com.android.internal.telephony.CarrierSignalAgent.WAKE ) ; } } synchronized ( mCachedNoWakeSignalConfigs ) { receiverSet = mCachedNoWakeSignalConfigs.get ( intent.getAction ( ) ) ; if ( ! ( com.android.internal.util.ArrayUtils.isEmpty ( receiverSet ) ) ) { broadcast ( intent , receiverSet , com.android.internal.telephony.CarrierSignalAgent.NO_WAKE ) ; } } }
Source:
public void testCrashWatcher ( ) throws java.lang.Exception { com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( mInstrumentation , "CrashExample.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( mInstrumentation , "DisplayingBitmaps" ) ; mDevice.findObject ( new android.support.test.uiautomator.UiSelector ( ) . className ( "android.widget.ImageView" ) ) . click ( ) ; }

Target:
public void testCrashWatcher ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; android.support.test.uiautomator.UiDevice device = testFramework.getDevice ( ) ; exception.expectMessage ( org.hamcrest.core.StringStartsWith.startsWith ( "Caught an application crash." ) ) ; com.android.devtools.systemimage.uitest.utils.AppManager.installApp ( instrumentation , "CrashExample.apk" ) ; com.android.devtools.systemimage.uitest.utils.AppLauncher.launch ( instrumentation , "DisplayingBitmaps" ) ; device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . className ( "android.widget.ImageView" ) ) . click ( ) ; }
Source:
public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value intArrayValue = getStaticFieldValue ( debuggeeClassId , "INT_ARRAY" ) ; constructorArguments.add ( intArrayValue ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 0 ) ) ; constructorArguments.add ( new org.apache.harmony.jpda.tests.framework.jdwp.Value ( 1 ) ) ; }

Target:
public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value stringBuilderValue = getStaticFieldValue ( debuggeeClassId , "STRING_BUILDER" ) ; constructorArguments.add ( stringBuilderValue ) ; }
Source:
android.content.Intent makeBasicLaunchIntent ( ) { android.content.Intent intent = new android.content.Intent ( this , com.android.rs.image2.ImageProcessingActivity2.class ) ; intent.putExtra ( "enable long" , mSettings [ com.android.rs.image2.IPControls.SETTING_LONG_RUN ] ) ; intent.putExtra ( "enable pause" , mSettings [ com.android.rs.image2.IPControls.SETTING_PAUSE ] ) ; intent.putExtra ( "enable animate" , mSettings [ com.android.rs.image2.IPControls.SETTING_ANIMATE ] ) ; intent.putExtra ( "enable display" , mSettings [ com.android.rs.image2.IPControls.SETTING_DISPLAY ] ) ; intent.putExtra ( "resolution X" , mResolution.width ) ; intent.putExtra ( "resolution Y" , mResolution.height ) ; return intent ; }

Target:
android.content.Intent makeBasicLaunchIntent ( ) { android.content.Intent intent = new android.content.Intent ( this , com.android.rs.image2.ImageProcessingActivity2.class ) ; intent.putExtra ( "enable long" , mSettings [ com.android.rs.image2.IPControls.SETTING_LONG_RUN ] ) ; intent.putExtra ( "enable pause" , mSettings [ com.android.rs.image2.IPControls.SETTING_PAUSE ] ) ; intent.putExtra ( "enable animate" , mSettings [ com.android.rs.image2.IPControls.SETTING_ANIMATE ] ) ; intent.putExtra ( "enable display" , mSettings [ com.android.rs.image2.IPControls.SETTING_DISPLAY ] ) ; intent.putExtra ( "enable io" , mSettings [ com.android.rs.image2.IPControls.SETTING_USAGE_IO ] ) ; intent.putExtra ( "resolution X" , mResolution.width ) ; intent.putExtra ( "resolution Y" , mResolution.height ) ; return intent ; }
Source:
public int removeUserDataDirs ( int userId ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "rmuser" ) ; builder.append ( ' ' ) ; builder.append ( userId ) ; return mInstaller.execute ( builder.toString ( ) ) ; }

Target:
public int removeUserDataDirs ( java.lang.String uuid , int userId ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( "rmuser" ) ; builder.append ( ' ' ) ; builder.append ( com.android.server.pm.Installer.escapeNull ( uuid ) ) ; builder.append ( ' ' ) ; builder.append ( userId ) ; return mInstaller.execute ( builder.toString ( ) ) ; }
Source:
public static void log ( java.lang.Throwable exception , java.lang.String format , java.lang.Object ... args ) { java.lang.String message = java.lang.String.format ( format , args ) ; org.eclipse.core.runtime.Status status = new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.ERROR , com.android.ide.eclipse.adt.AdtPlugin.PLUGIN_ID , message , exception ) ; com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . getLog ( ) . log ( status ) ; }

Target:
public static void log ( java.lang.Throwable exception , java.lang.String format , java.lang.Object ... args ) { java.lang.String message = java.lang.String.format ( format , args ) ; org.eclipse.core.runtime.Status status = new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.ERROR , com.android.ide.eclipse.adt.AdtPlugin.PLUGIN_ID , message , exception ) ; if ( ( com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) ) != null ) { com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . getLog ( ) . log ( status ) ; } else { java.lang.System.err.println ( status.toString ( ) ) ; } }
Source:
private java.nio.MappedByteBuffer mapFile ( java.lang.String filename , long offset ) throws java.io.IOException { java.nio.MappedByteBuffer buffer = null ; java.io.FileInputStream dataFile = new java.io.FileInputStream ( filename ) ; java.io.File file = new java.io.File ( filename ) ; java.nio.channels.FileChannel fc = dataFile.getChannel ( ) ; buffer = fc.map ( java.nio.channels.FileChannel.MapMode.READ_ONLY , offset , ( ( file.length ( ) ) - offset ) ) ; buffer.order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ; return buffer ; }

Target:
private java.nio.MappedByteBuffer mapFile ( java.lang.String filename , long offset ) throws java.io.IOException { java.nio.MappedByteBuffer buffer = null ; java.io.FileInputStream dataFile = new java.io.FileInputStream ( filename ) ; try { java.io.File file = new java.io.File ( filename ) ; java.nio.channels.FileChannel fc = dataFile.getChannel ( ) ; buffer = fc.map ( java.nio.channels.FileChannel.MapMode.READ_ONLY , offset , ( ( file.length ( ) ) - offset ) ) ; buffer.order ( java.nio.ByteOrder.LITTLE_ENDIAN ) ; return buffer ; } finally { dataFile.close ( ) ; } }
Source:
public java.lang.String [ ] getAvailableIDs ( int rawUtcOffset ) { java.util.List < java.lang.String > matches = new java.util.ArrayList < java.lang.String > ( ) ; int [ ] rawUtcOffsets = getRawUtcOffsets ( ) ; for ( int i = 0 ; i < ( rawUtcOffsets.length ) ; ++ i ) { if ( ( rawUtcOffsets [ i ] ) == rawUtcOffset ) { matches.add ( ids [ i ] ) ; } } return matches.toArray ( new java.lang.String [ matches.size ( ) ] ) ; }

Target:
public java.lang.String [ ] getAvailableIDs ( int rawUtcOffset ) { checkNotClosed ( ) ; java.util.List < java.lang.String > matches = new java.util.ArrayList < java.lang.String > ( ) ; int [ ] rawUtcOffsets = getRawUtcOffsets ( ) ; for ( int i = 0 ; i < ( rawUtcOffsets.length ) ; ++ i ) { if ( ( rawUtcOffsets [ i ] ) == rawUtcOffset ) { matches.add ( ids [ i ] ) ; } } return matches.toArray ( new java.lang.String [ matches.size ( ) ] ) ; }
Source:
private void writeInstanceFieldRef ( @ javax.annotation.Nonnull org.objectweb.asm.tree.FieldInsnNode fldInsn , @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , int offset ) throws java.io.IOException { writeDebugBegin ( currentClass , currentLine ) ; writer.writeKeyword ( Token.FIELD_REF ) ; writer.writeOpen ( ) ; writer.writeId ( fldInsn.name ) ; writer.writeId ( fldInsn.desc ) ; writer.writeId ( org.objectweb.asm.Type.getObjectType ( fldInsn.owner ) . getDescriptor ( ) ) ; writer.writeFieldRefKindEnum ( com.android.jill.frontend.java.MethodBodyWriter.FieldRefKind.INSTANCE ) ; writeStackAccess ( frame , offset ) ; writeDebugEnd ( currentClass , currentLine ) ; writer.writeClose ( ) ; }

Target:
private void writeInstanceFieldRef ( @ javax.annotation.Nonnull org.objectweb.asm.tree.FieldInsnNode fldInsn , @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame , int offset ) throws java.io.IOException { writeDebugBegin ( currentClass , currentLine ) ; writer.writeKeyword ( Token.FIELD_REF ) ; writer.writeOpen ( ) ; writer.writeId ( fldInsn.name ) ; writer.writeId ( fldInsn.desc ) ; writer.writeId ( org.objectweb.asm.Type.getObjectType ( fldInsn.owner ) . getDescriptor ( ) ) ; writer.writeFieldRefKindEnum ( com.android.jill.frontend.java.MethodBodyWriter.FieldRefKind.INSTANCE ) ; readStack ( frame , offset ) ; writeDebugEnd ( currentClass , currentLine ) ; writer.writeClose ( ) ; }
Source:
public void close ( ) throws java.io.IOException { out.close ( ) ; }

Target:
public void close ( ) throws java.io.IOException { out.close ( ) ; if ( ! ( tmpFile.renameTo ( targetFile ) ) ) { throw new java.io.IOException ( ( ( ( ( "Failed to rename \"" + ( tmpFile.getPath ( ) ) ) + "\" to \"" ) + ( targetFile.getPath ( ) ) ) + "\"" ) ) ; } }
Source:
public static final android.os.Process.ProcessStartResult start ( final java.lang.String processClass , final java.lang.String niceName , int uid , int gid , int [ ] gids , int debugFlags , int mountExternal , int targetSdkVersion , java.lang.String seInfo , java.lang.String abi , java.lang.String instructionSet , java.lang.String appDataDir , java.lang.String invokeWith , java.lang.String [ ] zygoteArgs ) { return android.os.Process.zygoteProcess.start ( processClass , niceName , uid , gid , gids , debugFlags , mountExternal , targetSdkVersion , seInfo , abi , instructionSet , appDataDir , invokeWith , zygoteArgs ) ; }

Target:
public static final android.os.Process.ProcessStartResult start ( final java.lang.String processClass , final java.lang.String niceName , int uid , int gid , int [ ] gids , int runtimeFlags , int mountExternal , int targetSdkVersion , java.lang.String seInfo , java.lang.String abi , java.lang.String instructionSet , java.lang.String appDataDir , java.lang.String invokeWith , java.lang.String [ ] zygoteArgs ) { return android.os.Process.zygoteProcess.start ( processClass , niceName , uid , gid , gids , runtimeFlags , mountExternal , targetSdkVersion , seInfo , abi , instructionSet , appDataDir , invokeWith , zygoteArgs ) ; }
Source:
public boolean setLoggingEventHandler ( com.android.server.wifi.WifiNative.WifiLoggerEventHandler handler ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { int oldId = com.android.server.wifi.WifiNative.sLogCmdId ; com.android.server.wifi.WifiNative.sLogCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; if ( ! ( com.android.server.wifi.WifiNative.setLoggingEventHandlerNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sLogCmdId ) ) ) { com.android.server.wifi.WifiNative.sLogCmdId = oldId ; return false ; } com.android.server.wifi.WifiNative.sWifiLoggerEventHandler = handler ; return true ; } else { return false ; } } }

Target:
public boolean setLoggingEventHandler ( com.android.server.wifi.WifiNative.WifiLoggerEventHandler handler ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.setLoggingEventHandler ( handler ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { int oldId = com.android.server.wifi.WifiNative.sLogCmdId ; com.android.server.wifi.WifiNative.sLogCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; if ( ! ( com.android.server.wifi.WifiNative.setLoggingEventHandlerNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sLogCmdId ) ) ) { com.android.server.wifi.WifiNative.sLogCmdId = oldId ; return false ; } com.android.server.wifi.WifiNative.sWifiLoggerEventHandler = handler ; return true ; } else { return false ; } } } }
Source:
public org.bouncycastle.math.ec.ECPoint decrypt ( org.bouncycastle.crypto.ec.ECPair pair ) { if ( ( key ) == null ) { throw new java.lang.IllegalStateException ( "ECElGamalDecryptor not initialised" ) ; } org.bouncycastle.math.ec.ECPoint tmp = pair.getX ( ) . multiply ( key.getD ( ) ) ; return pair.getY ( ) . add ( tmp.negate ( ) ) . normalize ( ) ; }

Target:
public org.bouncycastle.math.ec.ECPoint decrypt ( org.bouncycastle.crypto.ec.ECPair pair ) { if ( ( key ) == null ) { throw new java.lang.IllegalStateException ( "ECElGamalDecryptor not initialised" ) ; } org.bouncycastle.math.ec.ECPoint tmp = pair.getX ( ) . multiply ( key.getD ( ) ) ; return pair.getY ( ) . subtract ( tmp ) . normalize ( ) ; }
Source:
static com.android.server.IpSecService create ( android.content.Context context , java.lang.String socket ) throws java.lang.InterruptedException { final com.android.server.IpSecService service = new com.android.server.IpSecService ( context , socket ) ; final java.util.concurrent.CountDownLatch connectedSignal = service.mConnectedSignal ; if ( com.android.server.IpSecService.DBG ) android.util.Log.d ( com.android.server.IpSecService.TAG , "Creating IpSecService" ) ; service.mThread.start ( ) ; if ( com.android.server.IpSecService.DBG ) android.util.Log.d ( com.android.server.IpSecService.TAG , "Awaiting socket connection" ) ; connectedSignal.await ( ) ; if ( com.android.server.IpSecService.DBG ) android.util.Log.d ( com.android.server.IpSecService.TAG , "Connected" ) ; service.connectNativeNetdService ( ) ; return service ; }

Target:
public void systemReady ( ) { if ( isNetdAlive ( ) ) { android.util.Slog.d ( com.android.server.IpSecService.TAG , "IpSecService is ready" ) ; } else { android.util.Slog.wtf ( com.android.server.IpSecService.TAG , "IpSecService not ready: failed to connect to NetD Native Service!" ) ; } }
Source:
private java.lang.Object get ( final int local ) { maxLocals = java.lang.Math.max ( maxLocals , local ) ; return local < ( locals.size ( ) ) ? locals.get ( local ) : org.objectweb.asm.Opcodes.TOP ; }

Target:
private void set ( final int local , final java.lang.Object type ) { maxLocals = java.lang.Math.max ( maxLocals , ( local + 1 ) ) ; while ( local >= ( locals.size ( ) ) ) { locals.add ( Opcodes.TOP ) ; } locals.set ( local , type ) ; }
Source:
private static java.lang.String getProcesses ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; try { java.lang.String [ ] rootProcesses = android.tests.getinfo.RootProcessScanner.getRootProcesses ( ) ; for ( java.lang.String rootProcess : rootProcesses ) { builder.append ( rootProcess ) . append ( ';' ) ; } } catch ( java.io.FileNotFoundException notFound ) { builder.append ( notFound.getMessage ( ) ) ; } catch ( android.tests.getinfo.RootProcessScanner.MalformedStatMException malformedStatM ) { builder.append ( malformedStatM.getMessage ( ) ) ; } return builder.toString ( ) ; }

Target:
private static java.lang.String getProcesses ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; try { java.lang.String [ ] rootProcesses = android.tests.getinfo.RootProcessScanner.getRootProcesses ( ) ; for ( java.lang.String rootProcess : rootProcesses ) { builder.append ( rootProcess ) . append ( ';' ) ; } } catch ( java.lang.Exception exception ) { android.util.Log.e ( android.tests.getinfo.DeviceInfoInstrument.TAG , ( "Error getting processes: " + ( exception.getMessage ( ) ) ) , exception ) ; builder.append ( exception.getMessage ( ) ) ; } return builder.toString ( ) ; }
Source:
public static void setBoolean ( java.lang.Object array , int index , boolean value ) { if ( array instanceof boolean [ ] ) { ( ( boolean [ ] ) ( array ) ) [ index ] = value ; } else { throw java.lang.reflect.Array.badArray ( array ) ; } }

Target:
public static void setBoolean ( java.lang.Object array , int index , boolean z ) { if ( array instanceof boolean [ ] ) { ( ( boolean [ ] ) ( array ) ) [ index ] = z ; } else { throw java.lang.reflect.Array.badArray ( array ) ; } }
Source:
public void testSuccessfulFollowOnUpdate ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle tzData1 = createValidTzDataBundle ( "2030a" ) ; assertTrue ( install ( tzData1 ) ) ; assertTzDataInstalled ( tzData1 ) ; libcore.tzdata.update2.ConfigBundle tzData2 = createValidTzDataBundle ( "2030b" ) ; assertTrue ( install ( tzData2 ) ) ; assertTzDataInstalled ( tzData2 ) ; }

Target:
public void testSuccessfulFollowOnUpdate_newerVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.ConfigBundle tzData1 = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION ) ; assertTrue ( installer.install ( tzData1.getBundleBytes ( ) ) ) ; assertTzDataInstalled ( tzData1 ) ; libcore.tzdata.update2.ConfigBundle tzData2 = createValidTzDataBundle ( libcore.tzdata.update2.TzDataBundleInstallerTest.NEWER_RULES_VERSION ) ; assertTrue ( installer.install ( tzData2.getBundleBytes ( ) ) ) ; assertTzDataInstalled ( tzData2 ) ; }
Source:
public void testPackageOverrideNone ( ) { com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilder ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) , false ) ; builder.setBuildVariant ( mMain , mFlavor , mDebug ) ; assertNull ( builder.getPackageOverride ( "" ) ) ; }

Target:
public void testPackageOverridePackageWithSuffixOnly ( ) { com.android.utils.StdLogger logger = new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) ; com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilderTest.AndroidBuilderMock ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.builder.AndroidBuilderTest.ManifestParserMock ( "fake.package.name" ) , new com.android.builder.CommandLineRunner ( logger ) , logger , false ) ; mDebug.getBuildType ( ) . setPackageNameSuffix ( "fortytwo" ) ; builder.setBuildVariant ( mMain , mDebug ) ; builder.addProductFlavor ( mFlavor ) ; assertEquals ( "fake.package.name.fortytwo" , builder.getPackageOverride ( "" ) ) ; }
Source:
private java.awt.Color getFillColor ( com.android.tools.perflib.vmtrace.Call c ) { com.android.tools.perflib.vmtrace.MethodInfo info = mTraceData.getMethod ( c.getMethodId ( ) ) ; int percent = quantize ( info.getInclusiveThreadPercent ( ) ) ; return getFill ( percent ) ; }

Target:
private double getDurationPercentage ( com.android.tools.perflib.vmtrace.Call call , com.android.tools.perflib.vmtrace.viz.CallHierarchyRenderer.TimeSelector selector ) { com.android.tools.perflib.vmtrace.MethodInfo info = mTraceData.getMethod ( call.getMethodId ( ) ) ; long methodTime = selector.get ( info , mThreadName ) ; long topLevelTime = getMethodInfo ( mTopCall ) . getInclusiveTime ( mThreadName , com.android.tools.perflib.vmtrace.ClockType.THREAD ) ; return ( ( ( double ) ( methodTime ) ) / topLevelTime ) * 100 ; }
Source:
public static void computeAsinh ( android.renderscript.cts.TestAsinh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 5 ; args.out = ( ( float ) ( java.lang.StrictMath.log ( ( ( args.in ) + ( java.lang.StrictMath.sqrt ( ( 1 + ( java.lang.StrictMath.pow ( args.in , 2 ) ) ) ) ) ) ) ) ) ; }

Target:
public static void computeAsinh ( android.renderscript.cts.TestAsinh.ArgumentsFloatFloat args ) { args.ulf = 5 ; args.ulfRelaxed = 5 ; double x = ( ( double ) ( args.in ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.log ( ( x + ( java.lang.StrictMath.sqrt ( ( ( x * x ) + 1.0 ) ) ) ) ) ) ) ; }
Source:
public void tesNoSplitDelegateLast ( ) { android.content.pm.ApplicationInfo ai = createMockApplicationInfo ( com.android.server.pm.dex.DexoptUtilsTest.DELEGATE_LAST_CLASS_LOADER_NAME , false , false ) ; java.lang.String [ ] sharedLibrary = new java.lang.String [ ] { "a.dex" , "b.dex" } ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( ai , sharedLibrary ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "PCL[a.dex:b.dex]" , contexts [ 0 ] ) ; }

Target:
public void tesNoSplitDelegateLast ( ) { com.android.server.pm.dex.DexoptUtilsTest.TestData data = createMockApplicationInfo ( com.android.server.pm.dex.DexoptUtilsTest.DELEGATE_LAST_CLASS_LOADER_NAME , false , false ) ; java.lang.String [ ] sharedLibrary = new java.lang.String [ ] { "a.dex" , "b.dex" } ; java.lang.String [ ] contexts = com.android.server.pm.dex.DexoptUtils.getClassLoaderContexts ( data.info , sharedLibrary , data.pathsWithCode ) ; org.junit.Assert.assertEquals ( 1 , contexts.length ) ; org.junit.Assert.assertEquals ( "PCL[a.dex:b.dex]" , contexts [ 0 ] ) ; }
Source:
public void onClick ( android.content.DialogInterface dialog , int which ) { removeUserNow ( ) ; }

Target:
protected java.lang.String doInBackground ( java.lang.Void ... values ) { android.content.pm.UserInfo user = mUserManager.getUserInfo ( android.os.UserHandle.myUserId ( ) ) ; if ( ( ( user.iconPath ) == null ) || ( user.iconPath.equals ( "" ) ) ) { assignProfilePhoto ( user ) ; } return user.name ; }