auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static < K , V > com.google.common.collect.SortedMapDifference < K , V > sortedMapDifference ( boolean areEqual , java.util.SortedMap < K , V > onlyOnLeft , java.util.SortedMap < K , V > onlyOnRight , java.util.SortedMap < K , V > onBoth , java.util.SortedMap < K , com.google.common.collect.MapDifference.ValueDifference < V > > differences ) { return new com.google.common.collect.Maps.SortedMapDifferenceImpl < K , V > ( areEqual , java.util.Collections.unmodifiableSortedMap ( onlyOnLeft ) , java.util.Collections.unmodifiableSortedMap ( onlyOnRight ) , java.util.Collections.unmodifiableSortedMap ( onBoth ) , java.util.Collections.unmodifiableSortedMap ( differences ) ) ; }

Target:
public java.util.NavigableMap < K , V > tailMap ( K fromKey , boolean inclusive ) { return com.google.common.collect.Maps.asMap ( set.tailSet ( fromKey , inclusive ) , function ) ; }
Source:
public void onResume ( ) { super . onResume ( ) ; com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onResume" ) ; registerRefreshAnnotatedCallLogReceiver ( ) ; com.android.dialer.calllog.CallLogComponent.get ( getContext ( ) ) . getRefreshAnnotatedCallLogNotifier ( ) . notify ( true ) ; if ( ( recyclerView.getAdapter ( ) ) != null ) { ( ( com.android.dialer.calllog.ui.NewCallLogAdapter ) ( recyclerView.getAdapter ( ) ) ) . clearCache ( ) ; recyclerView.getAdapter ( ) . notifyDataSetChanged ( ) ; } shouldMarkCallsRead = false ; com.android.dialer.common.concurrent.ThreadUtil.getUiThreadHandler ( ) . postDelayed ( setShouldMarkCallsReadTrue , com.android.dialer.calllog.ui.NewCallLogFragment.MARK_ALL_CALLS_READ_WAIT_MILLIS ) ; }

Target:
private void onFragmentShown ( ) { registerRefreshAnnotatedCallLogReceiver ( ) ; com.android.dialer.calllog.CallLogComponent.get ( getContext ( ) ) . getRefreshAnnotatedCallLogNotifier ( ) . notify ( true ) ; if ( ( recyclerView.getAdapter ( ) ) != null ) { ( ( com.android.dialer.calllog.ui.NewCallLogAdapter ) ( recyclerView.getAdapter ( ) ) ) . clearCache ( ) ; recyclerView.getAdapter ( ) . notifyDataSetChanged ( ) ; } shouldMarkCallsRead = false ; com.android.dialer.common.concurrent.ThreadUtil.getUiThreadHandler ( ) . postDelayed ( setShouldMarkCallsReadTrue , com.android.dialer.calllog.ui.NewCallLogFragment.MARK_ALL_CALLS_READ_WAIT_MILLIS ) ; }
Source:
void copy3DRangeFromUnchecked ( int xoff , int yoff , int zoff , int w , int h , int d , float [ ] data ) { mRS.validate ( ) ; validate3DRange ( xoff , yoff , zoff , w , h , d ) ; mRS.nAllocationData3D ( getIDSafe ( ) , xoff , yoff , zoff , mSelectedLOD , w , h , d , data , ( ( data.length ) * 4 ) ) ; }

Target:
public void copy2DRangeTo ( int xoff , int yoff , int w , int h , float [ ] data ) { validateIsFloat32 ( ) ; copy2DRangeToUnchecked ( xoff , yoff , w , h , data , Element.DataType.FLOAT_32 , data.length ) ; }
Source:
public void testAesGcm128Udp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.getKey ( 288 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }

Target:
public void testAuthUdp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , null , auth , false , 1 , true ) ; }
Source:
public com.android.gallery3d.filtershow.filters.FilterRepresentation getDefaultRepresentation ( ) { com.android.gallery3d.filtershow.filters.FilterRepresentation representation = new com.android.gallery3d.filtershow.filters.FilterBasicRepresentation ( "Sharpen" , 0 , 0 , 100 ) ; representation.setSerializationName ( com.android.gallery3d.filtershow.filters.ImageFilterSharpen.SERIALIZATION_NAME ) ; representation.setShowParameterValue ( true ) ; representation.setFilterClass ( com.android.gallery3d.filtershow.filters.ImageFilterSharpen.class ) ; representation.setTextId ( R.string.sharpness ) ; representation.setOverlayId ( R.drawable.filtershow_button_colors_sharpen ) ; representation.setEditorId ( R.id.imageShow ) ; representation.setSupportsPartialRendering ( true ) ; return representation ; }

Target:
public com.android.gallery3d.filtershow.filters.FilterRepresentation getDefaultRepresentation ( ) { com.android.gallery3d.filtershow.filters.FilterRepresentation representation = new com.android.gallery3d.filtershow.filters.FilterBasicRepresentation ( "Sharpen" , 0 , 0 , 100 ) ; representation.setSerializationName ( com.android.gallery3d.filtershow.filters.ImageFilterSharpen.SERIALIZATION_NAME ) ; representation.setShowParameterValue ( true ) ; representation.setFilterClass ( com.android.gallery3d.filtershow.filters.ImageFilterSharpen.class ) ; representation.setTextId ( R.string.sharpness ) ; representation.setOverlayId ( R.drawable.filtershow_button_colors_sharpen ) ; representation.setEditorId ( BasicEditor.ID ) ; representation.setSupportsPartialRendering ( true ) ; return representation ; }
Source:
private java.lang.String getJackJarPath ( ) { java.security.CodeSource codeSource = com.android.jack.Main.class . getProtectionDomain ( ) . getCodeSource ( ) ; if ( codeSource != null ) { java.net.URL location = codeSource.getLocation ( ) ; try { if ( ( location != null ) && ( location.toString ( ) . endsWith ( ".jar" ) ) ) { return location.toURI ( ) . getPath ( ) ; } } catch ( java.net.URISyntaxException e ) { } } return null ; }

Target:
public java.lang.String getMessage ( ) { return ( "Environment variable '" + ( missingVariable ) ) + "' is undefined" ; }
Source:
public static int getContactType ( com.android.dialer.calllog.model.CoalescedRow row ) { boolean isVoicemail = false ; boolean isSpam = false ; boolean isBusiness = false ; int numberPresentation = 0 ; boolean isConference = false ; return com.android.dialer.lettertile.LetterTileDrawable.getContactTypeFromPrimitives ( isVoicemail , isSpam , isBusiness , numberPresentation , isConference ) ; }

Target:
public static int getContactType ( com.android.dialer.calllog.model.CoalescedRow row ) { boolean isVoicemail = false ; boolean isSpam = false ; boolean isBusiness = false ; int numberPresentation = row.numberPresentation ( ) ; boolean isConference = false ; return com.android.dialer.lettertile.LetterTileDrawable.getContactTypeFromPrimitives ( isVoicemail , isSpam , isBusiness , numberPresentation , isConference ) ; }
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 , java.lang.Object [ ] params ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }
Source:
private static android.view.View findViewShouldExist ( android.view.View root , int childViewId ) { android.view.View result = root.findViewById ( childViewId ) ; if ( result == null ) { android.util.Log.w ( android.view.View.VIEW_LOG_TAG , ( ( "couldn't find next focus view specified " + "by user for id " ) + childViewId ) ) ; } return result ; }

Target:
private android.view.View findViewInsideOutShouldExist ( android.view.View root , final int childViewId ) { android.view.View result = root.findViewByPredicateInsideOut ( this , new com.android.internal.util.Predicate < android.view.View > ( ) { @ java.lang.Override public boolean apply ( android.view.View t ) { return ( t.mID ) == childViewId ; } } ) ; if ( result == null ) { android.util.Log.w ( android.view.View.VIEW_LOG_TAG , ( ( "couldn't find next focus view specified " + "by user for id " ) + childViewId ) ) ; } return result ; }
Source:
static java.lang.String encodeUrl ( java.lang.String url ) { try { return java.net.URLEncoder.encode ( url , "UTF-8" ) ; } catch ( java.io.UnsupportedEncodingException e ) { java.lang.System.err.println ( ( "Invalid string " + ( e.getLocalizedMessage ( ) ) ) ) ; return url ; } }

Target:
static java.lang.String encodeUrl ( java.lang.String url ) { try { url = url.replace ( '\\' , '/' ) ; return java.net.URLEncoder.encode ( url , "UTF-8" ) . replace ( "%2F" , "/" ) ; } catch ( java.io.UnsupportedEncodingException e ) { java.lang.System.err.println ( ( "Invalid string " + ( e.getLocalizedMessage ( ) ) ) ) ; return url ; } }
Source:
protected static void handleNotInService ( int ss , android.app.PendingIntent sentIntent ) { if ( sentIntent != null ) { try { if ( ss == ( android.telephony.ServiceState.STATE_POWER_OFF ) ) { sentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_RADIO_OFF ) ; } else { sentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_NO_SERVICE ) ; } } catch ( android.app.PendingIntent.CanceledException ex ) { } } }

Target:
protected static void handleNotInService ( int ss , android.app.PendingIntent sentIntent ) { if ( sentIntent != null ) { try { if ( ss == ( android.telephony.ServiceState.STATE_POWER_OFF ) ) { sentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_RADIO_OFF ) ; } else { sentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_NO_SERVICE ) ; } } catch ( android.app.PendingIntent.CanceledException ex ) { android.telephony.Rlog.e ( com.android.internal.telephony.SMSDispatcher.TAG , "Failed to send result" ) ; } } }
Source:
private void setBluetoothOn ( boolean on ) { if ( mBluetoothRouteManager.isBluetoothAvailable ( ) ) { if ( on != ( mBluetoothRouteManager.isBluetoothAudioConnectedOrPending ( ) ) ) { android.telecom.Log.i ( this , "connecting bluetooth %s" , on ) ; if ( on ) { mBluetoothRouteManager.connectBluetoothAudio ( null ) ; } else { mBluetoothRouteManager.disconnectBluetoothAudio ( ) ; } } } }

Target:
private void setBluetoothOn ( ) { if ( mBluetoothRouteManager.isBluetoothAvailable ( ) ) { if ( ! ( mBluetoothRouteManager.isBluetoothAudioConnectedOrPending ( ) ) ) { android.telecom.Log.i ( this , "connecting bluetooth audio" ) ; mBluetoothRouteManager.connectBluetoothAudio ( null ) ; } } }
Source:
private java.util.Set caughtSuperClasses ( proguard.optimize.peephole.Clazz clazz ) { if ( ! ( clazz.extends_ ( ClassConstants.INTERNAL_NAME_JAVA_LANG_THROWABLE ) ) ) { return java.util.Collections.EMPTY_SET ; } java.util.Set set = new java.util.HashSet ( ) ; clazz.hierarchyAccept ( true , true , false , false , new proguard.optimize.peephole.CaughtClassFilter ( new proguard.optimize.peephole.ClassCollector ( set ) ) ) ; return set ; }

Target:
private java.util.Set caughtSuperClasses ( proguard.optimize.peephole.Clazz clazz ) { if ( ! ( clazz.extends_ ( ClassConstants.NAME_JAVA_LANG_THROWABLE ) ) ) { return java.util.Collections.EMPTY_SET ; } java.util.Set set = new java.util.HashSet ( ) ; clazz.hierarchyAccept ( true , true , false , false , new proguard.optimize.peephole.CaughtClassFilter ( new proguard.optimize.peephole.ClassCollector ( set ) ) ) ; return set ; }
Source:
public static void setMultiprocessEnabled ( boolean enabled ) { synchronized ( android.webkit.WebViewZygote.sLock ) { android.webkit.WebViewZygote.sMultiprocessEnabled = enabled ; final java.lang.String serviceName = android.webkit.WebViewZygote.getServiceNameLocked ( ) ; if ( serviceName == null ) return ; if ( enabled ) { if ( ! ( android.webkit.WebViewZygote.sStartedService ) ) { android.os.SystemService.start ( serviceName ) ; android.webkit.WebViewZygote.sStartedService = true ; } } else { android.os.SystemService.stop ( serviceName ) ; android.webkit.WebViewZygote.sStartedService = false ; android.webkit.WebViewZygote.sZygote = null ; } } }

Target:
private static void stopZygoteLocked ( ) { if ( ( android.webkit.WebViewZygote.sZygote ) != null ) { android.webkit.WebViewZygote.sZygote.close ( ) ; java.lang.Process.killProcess ( android.webkit.WebViewZygote.sZygote.getPid ( ) ) ; android.webkit.WebViewZygote.sZygote = null ; } }
Source:
private void checkOutputDir ( ) throws com.android.jill.IllegalOptionsException { assert ( output ) != null ; if ( ! ( output.exists ( ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( output.getName ( ) ) + " does not exist." ) ) ; } if ( ( ! ( output.canRead ( ) ) ) || ( ! ( output.canWrite ( ) ) ) ) { throw new com.android.jill.IllegalOptionsException ( ( ( "The specified output folder '" + ( output.getAbsolutePath ( ) ) ) + "' for jack files cannot be written to or read from." ) ) ; } }

Target:
public java.io.File getOutput ( ) { assert ( output ) != null ; if ( ( ( workingDir ) != null ) && ( ! ( output.isAbsolute ( ) ) ) ) { return new java.io.File ( workingDir , output.getPath ( ) ) ; } else { return output ; } }
Source:
private static java.util.Properties loadLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.InputRootVDir vdir ) throws com.android.jack.library.NotJackLibraryException { java.util.Properties libraryProperties = new java.util.Properties ( ) ; try { com.android.sched.vfs.InputVFile libProp = vdir.getInputVFile ( JackLibrary.LIBRARY_PROPERTIES_VPATH ) ; libraryProperties.load ( libProp.openRead ( ) ) ; } catch ( java.io.IOException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Fails to read " + ( JackLibrary.LIBRARY_PROPERTIES_VPATH.getPathAsString ( '/' ) ) ) + " from " ) + vdir ) , e ) ; throw new com.android.jack.library.NotJackLibraryException ( vdir.getLocation ( ) ) ; } return libraryProperties ; }

Target:
private static java.util.Properties loadLibraryProperties ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVFS vfs ) throws com.android.jack.library.NotJackLibraryException { java.util.Properties libraryProperties = new java.util.Properties ( ) ; try { com.android.sched.vfs.InputVFile libProp = vfs.getRootDir ( ) . getInputVFile ( JackLibrary.LIBRARY_PROPERTIES_VPATH ) ; libraryProperties.load ( libProp.openRead ( ) ) ; } catch ( java.io.IOException e ) { com.android.jack.library.JackLibraryFactory.logger.log ( java.util.logging.Level.SEVERE , ( ( ( "Fails to read " + ( JackLibrary.LIBRARY_PROPERTIES_VPATH.getPathAsString ( '/' ) ) ) + " from " ) + vfs ) , e ) ; throw new com.android.jack.library.NotJackLibraryException ( vfs.getLocation ( ) ) ; } return libraryProperties ; }
Source:
public void testFlagIExistingE ( ) { int iFlags = PackageManager.INSTALL_EXTERNAL ; int rFlags = ( PackageManager.INSTALL_INTERNAL ) | ( PackageManager.INSTALL_REPLACE_EXISTING ) ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install , rFlags , true , false , ( - 1 ) , ( - 1 ) ) ; }

Target:
public void testFlagEExistingE ( ) { if ( android.os.Environment.isExternalStorageEmulated ( ) ) { return ; } int iFlags = android.content.pm.PackageManager.INSTALL_EXTERNAL ; int rFlags = ( android.content.pm.PackageManager.INSTALL_EXTERNAL ) | ( android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ) ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install , rFlags , true , false , ( - 1 ) , ( - 1 ) ) ; }
Source:
private java.lang.String formatNsn ( java.lang.String number , com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata metadata , com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat numberFormat , java.lang.String carrierCode ) { com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat [ ] intlNumberFormats = metadata.intlNumberFormat ; com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat [ ] availableFormats = ( ( ( intlNumberFormats.length ) == 0 ) || ( numberFormat == ( com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat.NATIONAL ) ) ) ? metadata.numberFormat : metadata.intlNumberFormat ; com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat formattingPattern = chooseFormattingPatternForNumber ( availableFormats , number ) ; return formattingPattern == null ? number : formatNsnUsingPattern ( number , formattingPattern , numberFormat , carrierCode ) ; }

Target:
private java.lang.String formatNsn ( java.lang.String number , com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata , com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat numberFormat , java.lang.String carrierCode ) { java.util.List < com.google.i18n.phonenumbers.Phonemetadata.NumberFormat > intlNumberFormats = metadata.intlNumberFormats ( ) ; java.util.List < com.google.i18n.phonenumbers.Phonemetadata.NumberFormat > availableFormats = ( ( ( intlNumberFormats.size ( ) ) == 0 ) || ( numberFormat == ( com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat.NATIONAL ) ) ) ? metadata.numberFormats ( ) : metadata.intlNumberFormats ( ) ; com.google.i18n.phonenumbers.Phonemetadata.NumberFormat formattingPattern = chooseFormattingPatternForNumber ( availableFormats , number ) ; return formattingPattern == null ? number : formatNsnUsingPattern ( number , formattingPattern , numberFormat , carrierCode ) ; }
Source:
public boolean clearBlacklist ( ) { return doBooleanCommand ( "BLACKLIST clear" ) ; }

Target:
public boolean startFilteringMulticastV6Packets ( ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return ( ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) && ( mSupplicantStaIfaceHal.removeRxFilter ( SupplicantStaIfaceHal.RX_FILTER_TYPE_V6_MULTICAST ) ) ) && ( mSupplicantStaIfaceHal.stopRxFilter ( ) ) ; } else { return ( ( doBooleanCommand ( "DRIVER RXFILTER-STOP" ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-REMOVE 3" ) ) ) && ( doBooleanCommand ( "DRIVER RXFILTER-START" ) ) ; } }
Source:
public void testDupAssetSet ( ) throws java.lang.Exception { java.io.File root = com.android.builder.TestUtils.getRoot ( "assets" , "dupSet" ) ; com.android.builder.resources.AssetSet set = new com.android.builder.resources.AssetSet ( "main" ) ; set.addSource ( new java.io.File ( root , "assets1" ) ) ; set.addSource ( new java.io.File ( root , "assets2" ) ) ; boolean gotException = false ; try { set.loadFromFiles ( ) ; } catch ( com.android.builder.resources.DuplicateDataException e ) { gotException = true ; } assertTrue ( gotException ) ; }

Target:
public void testDupAssetSet ( ) throws java.lang.Exception { java.io.File root = com.android.builder.TestUtils.getRoot ( "assets" , "dupSet" ) ; com.android.builder.resources.AssetSet set = new com.android.builder.resources.AssetSet ( "main" ) ; set.addSource ( new java.io.File ( root , "assets1" ) ) ; set.addSource ( new java.io.File ( root , "assets2" ) ) ; boolean gotException = false ; com.android.builder.resources.RecordingLogger logger = new com.android.builder.resources.RecordingLogger ( ) ; try { set.loadFromFiles ( logger ) ; } catch ( com.android.builder.resources.DuplicateDataException e ) { gotException = true ; } assertTrue ( gotException ) ; checkLogger ( logger ) ; }
Source:
private int packageFlagsToInstallFlags ( com.android.server.pm.PackageSetting ps ) { int installFlags = 0 ; if ( ( com.android.server.pm.PackageManagerService.isExternal ( ps ) ) && ( android.text.TextUtils.isEmpty ( ps.volumeUuid ) ) ) { installFlags |= android.content.pm.PackageManager.INSTALL_EXTERNAL ; } if ( ps.isForwardLocked ( ) ) { installFlags |= android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ; } return installFlags ; }

Target:
private int packageFlagsToInstallFlags ( com.android.server.pm.PackageSetting ps ) { int installFlags = 0 ; if ( com.android.server.pm.PackageManagerService.isEphemeral ( ps ) ) { installFlags |= android.content.pm.PackageManager.INSTALL_EPHEMERAL ; } if ( ( com.android.server.pm.PackageManagerService.isExternal ( ps ) ) && ( android.text.TextUtils.isEmpty ( ps.volumeUuid ) ) ) { installFlags |= android.content.pm.PackageManager.INSTALL_EXTERNAL ; } if ( ps.isForwardLocked ( ) ) { installFlags |= android.content.pm.PackageManager.INSTALL_FORWARD_LOCK ; } return installFlags ; }
Source:
void enableVerboseLogging ( int verbose ) { if ( verbose > 0 ) { com.android.server.wifi.WifiNative.DBG = true ; } else { com.android.server.wifi.WifiNative.DBG = false ; } }

Target:
void enableVerboseLogging ( int verbose ) { if ( verbose > 0 ) { com.android.server.wifi.WifiNative.DBG = true ; } else { com.android.server.wifi.WifiNative.DBG = false ; } if ( ( mWificondControl ) != null ) { mWificondControl.enableVerboseLogging ( ( verbose > 0 ? true : false ) ) ; } if ( ( mSupplicantStaIfaceHal ) != null ) { mSupplicantStaIfaceHal.enableVerboseLogging ( ( verbose > 0 ) ) ; } }
Source:
public void test_parkUntil_1 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 500 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 1000 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 500 ) ; waiterThread.join ( ) ; parkerThread.join ( ) ; }

Target:
public void test_parkUntil_1 ( ) throws java.lang.Exception { java.util.concurrent.CyclicBarrier barrier = new java.util.concurrent.CyclicBarrier ( 2 ) ; org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker parker = new org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.Parker ( barrier , true , 500 ) ; java.lang.Thread parkerThread = new java.lang.Thread ( parker ) ; java.lang.Thread waiterThread = new java.lang.Thread ( new org.apache.harmony.tests.org.apache.harmony.kernel.dalvik.ThreadsTest.WaitAndUnpark ( barrier , 1000 , parkerThread ) ) ; parkerThread.start ( ) ; waiterThread.start ( ) ; parker.assertDurationIsInRange ( 500 ) ; waiterThread.join ( ) ; parkerThread.join ( ) ; }
Source:
public void testMeasureTextWithLongText ( ) { final int MAX_COUNT = 65535 ; char [ ] longText = new char [ MAX_COUNT ] ; for ( int n = 0 ; n < MAX_COUNT ; n ++ ) { longText [ n ] = 'm' ; } android.graphics.Paint p = new android.graphics.Paint ( ) ; float width = p.measureText ( longText , 0 , 1 ) ; assertEquals ( true , ( width > 0 ) ) ; }

Target:
public void testMeasureTextWithLongText ( ) { if ( "4.0.3" . equals ( Build.VERSION.RELEASE ) ) { return ; } final int MAX_COUNT = 65535 ; char [ ] longText = new char [ MAX_COUNT ] ; for ( int n = 0 ; n < MAX_COUNT ; n ++ ) { longText [ n ] = 'm' ; } android.graphics.Paint p = new android.graphics.Paint ( ) ; float width = p.measureText ( longText , 0 , 1 ) ; assertEquals ( true , ( width > 0 ) ) ; }
Source:
private android.bluetooth.BluetoothGattDescriptor getDescriptor ( ) { android.bluetooth.BluetoothGattDescriptor descriptor = null ; android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) ; if ( characteristic != null ) { descriptor = characteristic.getDescriptor ( com.android.cts.verifier.bluetooth.BleServerService.DESCRIPTOR_UUID ) ; if ( descriptor == null ) { showMessage ( "Descriptor not found" ) ; } } return descriptor ; }

Target:
private void writeCharacteristic ( java.lang.String writeValue ) { android.bluetooth.BluetoothGattCharacteristic characteristic = getCharacteristic ( com.android.cts.verifier.bluetooth.BleServerService.CHARACTERISTIC_UUID ) ; if ( characteristic != null ) return ; characteristic.setValue ( writeValue ) ; }
Source:
public int [ ] getChannelsForBand ( int band ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getChannelsForBandNative ( com.android.server.wifi.WifiNative.sWlan0Index , band ) ; } else { return null ; } } }

Target:
public int [ ] getChannelsForBand ( int band ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getChannelsForBand ( band ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getChannelsForBandNative ( com.android.server.wifi.WifiNative.sWlan0Index , band ) ; } else { return null ; } } } }
Source:
public void testPerformanceSummaryAddedProfilingPoint ( ) throws java.io.FileNotFoundException , java.io.IOException { java.util.Map < java.lang.String , com.android.vts.util.ProfilingPointSummary > today = dailySummaries.get ( 0 ) ; com.android.vts.util.ProfilingPointSummary summary = new com.android.vts.util.ProfilingPointSummary ( ) ; com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode mode = com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode.VTS_REGRESSION_MODE_INCREASING ; com.android.vts.proto.VtsReportMessage.ProfilingReportMessage report = com.android.vts.servlet.VtsPerformanceJobServletTest.createProfilingReport ( com.android.vts.servlet.VtsPerformanceJobServletTest.labels , com.android.vts.servlet.VtsPerformanceJobServletTest.highValues , mode ) ; summary.update ( report ) ; summary.update ( report ) ; today.put ( "p3" , summary ) ; java.lang.String output = com.android.vts.servlet.VtsPerformanceJobServlet.getPeformanceSummary ( "result_test" , dailySummaries , legendLabels ) ; com.android.vts.servlet.VtsPerformanceJobServletTest.compareToBaseline ( output , "performanceSummary3.html" ) ; }

Target:
public void testPerformanceSummaryAddedProfilingPoint ( ) throws java.io.FileNotFoundException , java.io.IOException { com.android.vts.util.PerformanceSummary today = dailySummaries.get ( 0 ) ; com.android.vts.util.ProfilingPointSummary summary = new com.android.vts.util.ProfilingPointSummary ( ) ; com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode mode = com.android.vts.proto.VtsReportMessage.VtsProfilingRegressionMode.VTS_REGRESSION_MODE_INCREASING ; com.android.vts.proto.VtsReportMessage.ProfilingReportMessage report = com.android.vts.servlet.VtsPerformanceJobServletTest.createProfilingReport ( com.android.vts.servlet.VtsPerformanceJobServletTest.labels , com.android.vts.servlet.VtsPerformanceJobServletTest.highValues , mode ) ; summary.update ( report ) ; summary.update ( report ) ; today.insertProfilingPointSummary ( "p3" , summary ) ; java.lang.String output = com.android.vts.servlet.VtsPerformanceJobServlet.getPeformanceSummary ( "result_test" , dailySummaries , legendLabels ) ; com.android.vts.servlet.VtsPerformanceJobServletTest.compareToBaseline ( output , "performanceSummary3.html" ) ; }
Source:
private static java.util.Map < java.lang.String , com.android.builder.png.Chunk > compareChunks ( @ com.android.annotations.NonNull java.io.File original , @ com.android.annotations.NonNull java.io.File tested ) throws java.io.IOException , java.util.zip.DataFormatException { java.util.Map < java.lang.String , com.android.builder.png.Chunk > originalChunks = readChunks ( original ) ; java.util.Map < java.lang.String , com.android.builder.png.Chunk > testedChunks = readChunks ( tested ) ; com.android.builder.png.NinePatchAaptProcessorTest.compareChunk ( originalChunks , testedChunks , "IHDR" ) ; com.android.builder.png.NinePatchAaptProcessorTest.compareChunk ( originalChunks , testedChunks , "npLb" ) ; com.android.builder.png.NinePatchAaptProcessorTest.compareChunk ( originalChunks , testedChunks , "npTc" ) ; return testedChunks ; }

Target:
public static void tearDownAndCheck ( ) throws java.io.IOException , java.util.zip.DataFormatException { com.android.builder.png.NinePatchAaptProcessorTestUtils.tearDownAndCheck ( com.android.builder.png.NinePatchAaptProcessorTest.mSourceAndCrunchedFiles , com.android.builder.png.NinePatchAaptProcessorTest.getCruncher ( ) , com.android.builder.png.NinePatchAaptProcessorTest.classStartTime ) ; com.android.builder.png.NinePatchAaptProcessorTest.mSourceAndCrunchedFiles = null ; }
Source:
public void urlParsing ( ) { com.android.volley.RequestTest.UrlParseRequest nullUrl = new com.android.volley.RequestTest.UrlParseRequest ( null ) ; assertEquals ( 0 , nullUrl.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest emptyUrl = new com.android.volley.RequestTest.UrlParseRequest ( "" ) ; assertEquals ( 0 , emptyUrl.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest noHost = new com.android.volley.RequestTest.UrlParseRequest ( "http:///" ) ; assertEquals ( 0 , noHost.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest badProtocol = new com.android.volley.RequestTest.UrlParseRequest ( "bad:http://foo" ) ; assertEquals ( 0 , badProtocol.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest goodProtocol = new com.android.volley.RequestTest.UrlParseRequest ( "http://foo" ) ; assertFalse ( ( 0 == ( goodProtocol.getTrafficStatsTag ( ) ) ) ) ; }

Target:
public void urlParsing ( ) { com.android.volley.RequestTest.UrlParseRequest nullUrl = new com.android.volley.RequestTest.UrlParseRequest ( null ) ; org.junit.Assert.assertEquals ( 0 , nullUrl.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest emptyUrl = new com.android.volley.RequestTest.UrlParseRequest ( "" ) ; org.junit.Assert.assertEquals ( 0 , emptyUrl.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest noHost = new com.android.volley.RequestTest.UrlParseRequest ( "http:///" ) ; org.junit.Assert.assertEquals ( 0 , noHost.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest badProtocol = new com.android.volley.RequestTest.UrlParseRequest ( "bad:http://foo" ) ; org.junit.Assert.assertEquals ( 0 , badProtocol.getTrafficStatsTag ( ) ) ; com.android.volley.RequestTest.UrlParseRequest goodProtocol = new com.android.volley.RequestTest.UrlParseRequest ( "http://foo" ) ; org.junit.Assert.assertFalse ( ( 0 == ( goodProtocol.getTrafficStatsTag ( ) ) ) ) ; }
Source:
public void testParseMinusInfinityBigDecimalFalse ( ) { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.DecimalFormat.getInstance ( ) ) ) ; java.text.DecimalFormatSymbols symbols = new java.text.DecimalFormatSymbols ( ) ; java.lang.Number number = format.parse ( ( "-" + ( symbols.getInfinity ( ) ) ) , new java.text.ParsePosition ( 0 ) ) ; assertTrue ( ( number instanceof java.lang.Double ) ) ; assertTrue ( java.lang.Double.isInfinite ( number.doubleValue ( ) ) ) ; }

Target:
public void test_parse_minusInfinityBigDecimalFalse ( ) { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( ) ) ) ; java.text.DecimalFormatSymbols symbols = new java.text.DecimalFormatSymbols ( ) ; java.lang.Number number = format.parse ( ( "-" + ( symbols.getInfinity ( ) ) ) , new java.text.ParsePosition ( 0 ) ) ; assertTrue ( ( number instanceof java.lang.Double ) ) ; assertTrue ( java.lang.Double.isInfinite ( number.doubleValue ( ) ) ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { org.chromium.base.PowerMonitor.onBatteryChargingChanged ( intent ) ; }

Target:
public static void create ( android.content.Context context ) { context = context.getApplicationContext ( ) ; if ( ( org.chromium.base.PowerMonitor.sInstance ) == null ) { org.chromium.base.PowerMonitor.sInstance = org.chromium.base.PowerMonitor.LazyHolder.INSTANCE ; org.chromium.base.ApplicationStatus.registerApplicationStateListener ( org.chromium.base.PowerMonitor.sInstance ) ; android.content.IntentFilter ifilter = new android.content.IntentFilter ( android.content.Intent.ACTION_BATTERY_CHANGED ) ; android.content.Intent batteryStatusIntent = context.registerReceiver ( null , ifilter ) ; if ( batteryStatusIntent != null ) org.chromium.base.PowerMonitor.onBatteryChargingChanged ( batteryStatusIntent ) ; } }
Source:
public void testAssistantStackFinishToPreviousApp ( ) throws java.lang.Exception { launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; enableAssistant ( ) ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK , android.server.cts.ActivityManagerAssistantStackTests.EXTRA_FINISH_SELF , "true" ) ; disableAssistant ( ) ; mAmWmState.waitForValidState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.waitForActivityState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerState.STATE_RESUMED ) ; mAmWmState.assertFocusedActivity ( "TestActivity should be resumed" , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; mAmWmState.assertActivityInFullscreenTypeStack ( "TestActivity should go on a suitable fullscreen-type stack." , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; }

Target:
public void testAssistantStackFinishToPreviousApp ( ) throws java.lang.Exception { launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; enableAssistant ( ) ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK , android.server.cts.ActivityManagerAssistantStackTests.EXTRA_FINISH_SELF , "true" ) ; disableAssistant ( ) ; mAmWmState.waitForValidState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.waitForActivityState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerState.STATE_RESUMED ) ; mAmWmState.assertFocusedActivity ( "TestActivity should be resumed" , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; mAmWmState.assertFrontStack ( "Fullscreen stack should be on top." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertFocusedStack ( "Fullscreen stack should be focused." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }
Source:
public java.lang.String toMimeType ( ) { switch ( mTnf ) { case android.nfc.NdefRecord.TNF_WELL_KNOWN : if ( java.util.Arrays.equals ( mType , android.nfc.NdefRecord.RTD_TEXT ) ) { return "text/plain" ; } break ; case android.nfc.NdefRecord.TNF_MIME_MEDIA : java.lang.String mimeType = new java.lang.String ( mType , java.nio.charset.Charsets.US_ASCII ) ; return android.content.Intent.normalizeMimeType ( mimeType ) ; } return null ; }

Target:
public java.lang.String toMimeType ( ) { switch ( mTnf ) { case android.nfc.NdefRecord.TNF_WELL_KNOWN : if ( java.util.Arrays.equals ( mType , android.nfc.NdefRecord.RTD_TEXT ) ) { return "text/plain" ; } break ; case android.nfc.NdefRecord.TNF_MIME_MEDIA : java.lang.String mimeType = new java.lang.String ( mType , java.nio.charset.StandardCharsets.US_ASCII ) ; return android.content.Intent.normalizeMimeType ( mimeType ) ; } return null ; }
Source:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( boolean emulateStudio_1_0 , java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return buildModel ( connection , new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }

Target:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( boolean emulateStudio_1_0 , java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks , com.android.build.gradle.integration.common.fixture.GradleTestProject.ExpectedBuildResult.SUCCESS ) ; return buildModel ( connection , new com.android.build.gradle.integration.common.fixture.GetAndroidModelAction ( ) , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }
Source:
public int getPermissionGrantState ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName , java.lang.String permission ) { throwIfParentInstance ( "getPermissionGrantState" ) ; try { return mService.getPermissionGrantState ( admin , packageName , permission ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } }

Target:
public int getPermissionGrantState ( @ android.annotation.Nullable android.content.ComponentName admin , java.lang.String packageName , java.lang.String permission ) { throwIfParentInstance ( "getPermissionGrantState" ) ; try { return mService.getPermissionGrantState ( admin , mContext.getPackageName ( ) , packageName , permission ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } }
Source:
void expandCapacity ( int minimumCapacity ) { int newCapacity = ( ( value.length ) * 2 ) + 2 ; if ( ( newCapacity - minimumCapacity ) < 0 ) newCapacity = minimumCapacity ; if ( newCapacity < 0 ) { if ( minimumCapacity < 0 ) throw new java.lang.OutOfMemoryError ( ) ; newCapacity = java.lang.Integer.MAX_VALUE ; } value = java.util.Arrays.copyOf ( value , newCapacity ) ; }

Target:
private int hugeCapacity ( int minCapacity ) { if ( ( ( java.lang.Integer.MAX_VALUE ) - minCapacity ) < 0 ) { throw new java.lang.OutOfMemoryError ( ) ; } return minCapacity > ( java.lang.AbstractStringBuilder.MAX_ARRAY_SIZE ) ? minCapacity : java.lang.AbstractStringBuilder.MAX_ARRAY_SIZE ; }
Source:
public V remove ( java.lang.Object key ) { int hash = java.util.concurrent.ConcurrentHashMap.hash ( key.hashCode ( ) ) ; java.util.concurrent.ConcurrentHashMap.Segment < K , V > s = segmentForHash ( hash ) ; return s == null ? null : s.remove ( key , hash , null ) ; }

Target:
public V putIfAbsent ( K key , V value ) { return putVal ( key , value , true ) ; }
Source:
public static void init ( boolean clientSupport ) { com.android.ddmlib.AndroidDebugBridge.sClientSupport = clientSupport ; com.android.ddmlib.MonitorThread monitorThread = com.android.ddmlib.MonitorThread.createInstance ( ) ; monitorThread.start ( ) ; com.android.ddmlib.HandleHello.register ( monitorThread ) ; com.android.ddmlib.HandleAppName.register ( monitorThread ) ; com.android.ddmlib.HandleTest.register ( monitorThread ) ; com.android.ddmlib.HandleThread.register ( monitorThread ) ; com.android.ddmlib.HandleHeap.register ( monitorThread ) ; com.android.ddmlib.HandleWait.register ( monitorThread ) ; com.android.ddmlib.HandleProfiling.register ( monitorThread ) ; }

Target:
public static void init ( boolean clientSupport ) { com.android.ddmlib.AndroidDebugBridge.sClientSupport = clientSupport ; com.android.ddmlib.AndroidDebugBridge.initAdbSocketAddr ( ) ; com.android.ddmlib.MonitorThread monitorThread = com.android.ddmlib.MonitorThread.createInstance ( ) ; monitorThread.start ( ) ; com.android.ddmlib.HandleHello.register ( monitorThread ) ; com.android.ddmlib.HandleAppName.register ( monitorThread ) ; com.android.ddmlib.HandleTest.register ( monitorThread ) ; com.android.ddmlib.HandleThread.register ( monitorThread ) ; com.android.ddmlib.HandleHeap.register ( monitorThread ) ; com.android.ddmlib.HandleWait.register ( monitorThread ) ; com.android.ddmlib.HandleProfiling.register ( monitorThread ) ; }
Source:
public boolean pingSupplicant ( ) { enforceAccessPermission ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncPingSupplicant ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return false ; } }

Target:
public boolean pingSupplicant ( ) { enforceAccessPermission ( ) ; mLog.trace ( "pingSupplicant uid=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncPingSupplicant ( mWifiStateMachineChannel ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return false ; } }
Source:
private static java.lang.String makeHex ( byte [ ] bytes , int from , int len ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( int i = 0 ; i < len ; i ++ ) { sb.append ( java.lang.String.format ( "%02x" , bytes [ ( from + i ) ] ) ) ; } return sb.toString ( ) ; }

Target:
private byte [ ] macAddressFromString ( java.lang.String macString ) { java.lang.String [ ] macBytes = macString.split ( ":" ) ; if ( ( macBytes.length ) != 6 ) { throw new java.lang.IllegalArgumentException ( "MAC address should be 6 bytes long!" ) ; } byte [ ] mac = new byte [ 6 ] ; for ( int i = 0 ; i < ( macBytes.length ) ; i ++ ) { java.lang.Integer hexVal = java.lang.Integer.parseInt ( macBytes [ i ] , 16 ) ; mac [ i ] = hexVal.byteValue ( ) ; } return mac ; }
Source:
public static android.telephony.SmsMessage createFromPdu ( byte [ ] pdu , java.lang.String format ) { com.android.internal.telephony.SmsMessageBase wrappedMessage ; if ( SmsConstants.FORMAT_3GPP2.equals ( format ) ) { wrappedMessage = com.android.internal.telephony.cdma.SmsMessage.createFromPdu ( pdu ) ; } else if ( SmsConstants.FORMAT_3GPP.equals ( format ) ) { wrappedMessage = com.android.internal.telephony.gsm.SmsMessage.createFromPdu ( pdu ) ; } else { android.util.Log.e ( android.telephony.SmsMessage.LOG_TAG , ( "createFromPdu(): unsupported message format " + format ) ) ; return null ; } return new android.telephony.SmsMessage ( wrappedMessage ) ; }

Target:
public static android.telephony.SmsMessage createFromPdu ( byte [ ] pdu , java.lang.String format ) { com.android.internal.telephony.SmsMessageBase wrappedMessage ; if ( SmsConstants.FORMAT_3GPP2.equals ( format ) ) { wrappedMessage = com.android.internal.telephony.cdma.SmsMessage.createFromPdu ( pdu ) ; } else if ( SmsConstants.FORMAT_3GPP.equals ( format ) ) { wrappedMessage = com.android.internal.telephony.gsm.SmsMessage.createFromPdu ( pdu ) ; } else { android.telephony.Rlog.e ( android.telephony.SmsMessage.LOG_TAG , ( "createFromPdu(): unsupported message format " + format ) ) ; return null ; } return new android.telephony.SmsMessage ( wrappedMessage ) ; }
Source:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { super . init ( workbench , selection ) ; setWindowTitle ( "New Android Application" ) ; mValues = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizardState ( ) ; mMainPage = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectPage ( mValues ) ; mActivityPage = new com.android.ide.eclipse.adt.internal.wizards.templates.ActivityPage ( mValues , true , true ) ; }

Target:
public void init ( org.eclipse.ui.IWorkbench workbench , org.eclipse.jface.viewers.IStructuredSelection selection ) { super . init ( workbench , selection ) ; setWindowTitle ( "New Android Application" ) ; mValues = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectWizardState ( ) ; mMainPage = new com.android.ide.eclipse.adt.internal.wizards.templates.NewProjectPage ( mValues ) ; mContentsPage = new com.android.ide.eclipse.adt.internal.wizards.templates.ProjectContentsPage ( mValues ) ; mContentsPage.init ( selection , com.android.ide.eclipse.adt.AdtUtils.getActivePart ( ) ) ; mActivityPage = new com.android.ide.eclipse.adt.internal.wizards.templates.ActivityPage ( mValues , true , true ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , float [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 4 ) , Element.DataType.FLOAT_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.FLOAT_32 , data.length ) ; }
Source:
private void verifyCdmaInfo ( android.telephony.CellInfoCdma cdma ) { int level = cdma.getCellSignalStrength ( ) . getLevel ( ) ; assertTrue ( ( "getLevel() out of range [0,4], level=" + level ) , ( ( level >= 0 ) && ( level <= 4 ) ) ) ; }

Target:
private void verifyCdmaInfo ( android.telephony.CellInfoCdma cdma ) { java.lang.String alphaLong = ( ( java.lang.String ) ( cdma.getCellIdentity ( ) . getOperatorAlphaLong ( ) ) ) ; assertNotNull ( "getOperatorAlphaLong() returns NULL!" , alphaLong ) ; java.lang.String alphaShort = ( ( java.lang.String ) ( cdma.getCellIdentity ( ) . getOperatorAlphaShort ( ) ) ) ; assertNotNull ( "getOperatorAlphaShort() returns NULL!" , alphaShort ) ; int level = cdma.getCellSignalStrength ( ) . getLevel ( ) ; assertTrue ( ( "getLevel() out of range [0,4], level=" + level ) , ( ( level >= 0 ) && ( level <= 4 ) ) ) ; }
Source:
public void test_getAbsolutePath ( ) throws java.lang.Exception { java.lang.String userDir = java.lang.System.getProperty ( "user.dir" ) ; java.io.File f = new java.io.File ( "poop" ) ; assertEquals ( ( ( userDir + ( java.io.File.separator ) ) + "poop" ) , f.getAbsolutePath ( ) ) ; }

Target:
public void test_getAbsolutePath ( ) throws java.lang.Exception { java.lang.String userDir = java.lang.System.getProperty ( "user.dir" ) ; if ( ! ( userDir.endsWith ( java.io.File.separator ) ) ) { userDir = userDir + ( java.io.File.separator ) ; } java.io.File f = new java.io.File ( "poop" ) ; assertEquals ( ( userDir + "poop" ) , f.getAbsolutePath ( ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; this . localAddr1 = new java.net.InetSocketAddress ( "127.0.0.1" , tests.support.Support_PortManager.getNextPort ( ) ) ; this . localAddr2 = new java.net.InetSocketAddress ( "127.0.0.1" , tests.support.Support_PortManager.getNextPort ( ) ) ; this . channel1 = java.nio.channels.SocketChannel.open ( ) ; this . channel2 = java.nio.channels.SocketChannel.open ( ) ; this . server1 = new java.net.ServerSocket ( localAddr1.getPort ( ) ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; this . channel1 = java.nio.channels.SocketChannel.open ( ) ; this . channel2 = java.nio.channels.SocketChannel.open ( ) ; this . server1 = new java.net.ServerSocket ( 0 ) ; this . localAddr1 = new java.net.InetSocketAddress ( "127.0.0.1" , server1.getLocalPort ( ) ) ; this . server2 = new java.net.ServerSocket ( 0 ) ; this . localAddr2 = new java.net.InetSocketAddress ( "127.0.0.1" , server2.getLocalPort ( ) ) ; }