auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void saveLocked ( ) { java.io.FileOutputStream fos = null ; try { java.lang.String folder = com.android.prefs.AndroidLocation.getFolder ( ) ; java.io.File f = new java.io.File ( folder , com.android.sdklib.internal.repository.SdkSourceProperties.SRC_FILENAME ) ; fos = new java.io.FileOutputStream ( f ) ; com.android.sdklib.internal.repository.SdkSourceProperties.sSourcesProperties.store ( fos , "## Sites Settings for Android SDK Manager" ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException ignore ) { } catch ( java.io.IOException ignore ) { } finally { if ( fos != null ) { try { fos.close ( ) ; } catch ( java.io.IOException ignore ) { } } } }

Target:
protected void saveLocked ( ) { java.io.FileOutputStream fos = null ; try { java.lang.String folder = com.android.prefs.AndroidLocation.getFolder ( ) ; java.io.File f = new java.io.File ( folder , com.android.sdklib.internal.repository.SdkSourceProperties.SRC_FILENAME ) ; fos = new java.io.FileOutputStream ( f ) ; com.android.sdklib.internal.repository.SdkSourceProperties.sSourcesProperties.store ( fos , "## Sites Settings for Android SDK Manager" ) ; } catch ( com.android.prefs.AndroidLocation.AndroidLocationException ignore ) { } catch ( java.io.IOException ignore ) { } finally { if ( fos != null ) { try { fos.close ( ) ; } catch ( java.io.IOException ignore ) { } } } }
Source:
public void eventPublishTerminated ( short sessionId , android.hardware.wifi.V1_0.WifiNanStatus status ) { if ( com.android.server.wifi.aware.WifiAwareNativeCallback.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNativeCallback.TAG , ( ( ( "eventPublishTerminated: sessionId=" + sessionId ) + ", status=" ) + ( com.android.server.wifi.aware.WifiAwareNativeCallback.statusString ( status ) ) ) ) ; } mWifiAwareStateManager.onSessionTerminatedNotification ( sessionId , status.status , true ) ; }

Target:
public void eventPublishTerminated ( byte sessionId , android.hardware.wifi.V1_0.WifiNanStatus status ) { if ( com.android.server.wifi.aware.WifiAwareNativeCallback.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNativeCallback.TAG , ( ( ( "eventPublishTerminated: sessionId=" + sessionId ) + ", status=" ) + ( com.android.server.wifi.aware.WifiAwareNativeCallback.statusString ( status ) ) ) ) ; } mWifiAwareStateManager.onSessionTerminatedNotification ( sessionId , status.status , true ) ; }
Source:
public void testWriteAndReadBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; }

Target:
public void testWriteAndReadBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false , null ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; }
Source:
public static java.lang.String getCallbackName ( int whichCallback ) { switch ( whichCallback ) { case android.net.ConnectivityManager.CALLBACK_PRECHECK : return "CALLBACK_PRECHECK" ; case android.net.ConnectivityManager.CALLBACK_AVAILABLE : return "CALLBACK_AVAILABLE" ; case android.net.ConnectivityManager.CALLBACK_LOSING : return "CALLBACK_LOSING" ; case android.net.ConnectivityManager.CALLBACK_LOST : return "CALLBACK_LOST" ; case android.net.ConnectivityManager.CALLBACK_UNAVAIL : return "CALLBACK_UNAVAIL" ; case android.net.ConnectivityManager.CALLBACK_CAP_CHANGED : return "CALLBACK_CAP_CHANGED" ; case android.net.ConnectivityManager.CALLBACK_IP_CHANGED : return "CALLBACK_IP_CHANGED" ; case android.net.ConnectivityManager.CALLBACK_RELEASED : return "CALLBACK_RELEASED" ; case android.net.ConnectivityManager.CALLBACK_EXIT : return "CALLBACK_EXIT" ; case android.net.ConnectivityManager.EXPIRE_LEGACY_REQUEST : return "EXPIRE_LEGACY_REQUEST" ; case android.net.ConnectivityManager.CALLBACK_SUSPENDED : return "CALLBACK_SUSPENDED" ; case android.net.ConnectivityManager.CALLBACK_RESUMED : return "CALLBACK_RESUMED" ; default : return java.lang.Integer.toString ( whichCallback ) ; } }

Target:
public static java.lang.String getCallbackName ( int whichCallback ) { switch ( whichCallback ) { case android.net.ConnectivityManager.CALLBACK_PRECHECK : return "CALLBACK_PRECHECK" ; case android.net.ConnectivityManager.CALLBACK_AVAILABLE : return "CALLBACK_AVAILABLE" ; case android.net.ConnectivityManager.CALLBACK_LOSING : return "CALLBACK_LOSING" ; case android.net.ConnectivityManager.CALLBACK_LOST : return "CALLBACK_LOST" ; case android.net.ConnectivityManager.CALLBACK_UNAVAIL : return "CALLBACK_UNAVAIL" ; case android.net.ConnectivityManager.CALLBACK_CAP_CHANGED : return "CALLBACK_CAP_CHANGED" ; case android.net.ConnectivityManager.CALLBACK_IP_CHANGED : return "CALLBACK_IP_CHANGED" ; case android.net.ConnectivityManager.EXPIRE_LEGACY_REQUEST : return "EXPIRE_LEGACY_REQUEST" ; case android.net.ConnectivityManager.CALLBACK_SUSPENDED : return "CALLBACK_SUSPENDED" ; case android.net.ConnectivityManager.CALLBACK_RESUMED : return "CALLBACK_RESUMED" ; default : return java.lang.Integer.toString ( whichCallback ) ; } }
Source:
public T get ( int i ) { if ( i >= ( mSize ) ) { throw new java.lang.IndexOutOfBoundsException ( ) ; } return mData [ ( ( ( mStart ) + i ) % ( mSize ) ) ] ; }

Target:
public T get ( int i ) { if ( ( i < 0 ) || ( i >= ( mSize ) ) ) { throw new java.lang.IndexOutOfBoundsException ( ) ; } return mData [ ( ( ( mStart ) + i ) % ( mSize ) ) ] ; }
Source:
public void installDrmEngine ( java.lang.String engineFilePath ) { if ( ( null == engineFilePath ) || ( engineFilePath.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( "Given engineFilePath: " + engineFilePath ) + "is not valid" ) ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } _installDrmEngine ( mUniqueId , engineFilePath ) ; }

Target:
public void installDrmEngine ( java.lang.String engineFilePath ) { if ( ( null == engineFilePath ) || ( engineFilePath.equals ( "" ) ) ) { throw new java.lang.IllegalArgumentException ( ( ( "Given engineFilePath: " + engineFilePath ) + "is not valid" ) ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } _installDrmEngine ( mUniqueId , engineFilePath ) ; }
Source:
public void testCropColor ( ) throws java.lang.Exception { java.awt.image.BufferedImage image = new java.awt.image.BufferedImage ( 100 , 100 , java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE ) ; java.awt.Graphics g = image.getGraphics ( ) ; g.setColor ( new java.awt.Color ( - 16711936 , true ) ) ; g.fillRect ( 0 , 0 , image.getWidth ( ) , image.getHeight ( ) ) ; g.dispose ( ) ; java.awt.image.BufferedImage crop = com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.cropColor ( image , - 16711936 ) ; assertNull ( crop ) ; }

Target:
public void testCropColor ( ) throws java.lang.Exception { java.awt.image.BufferedImage image = new java.awt.image.BufferedImage ( 100 , 100 , java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE ) ; java.awt.Graphics g = image.getGraphics ( ) ; g.setColor ( new java.awt.Color ( - 16711936 , true ) ) ; g.fillRect ( 0 , 0 , image.getWidth ( ) , image.getHeight ( ) ) ; g.dispose ( ) ; java.awt.image.BufferedImage crop = com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.cropColor ( image , - 16711936 , null ) ; assertNull ( crop ) ; }
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 [ ] zygoteArgs ) { try { return android.os.Process.startViaZygote ( processClass , niceName , uid , gid , gids , debugFlags , mountExternal , targetSdkVersion , seInfo , zygoteArgs ) ; } catch ( android.os.ZygoteStartFailedEx ex ) { android.util.Log.e ( android.os.Process.LOG_TAG , "Starting VM process through Zygote failed" ) ; throw new java.lang.RuntimeException ( "Starting VM process through Zygote failed" , ex ) ; } }

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 debugFlags , int mountExternal , int targetSdkVersion , java.lang.String seInfo , java.lang.String [ ] zygoteArgs ) { try { return android.os.Process.startViaZygote ( processClass , niceName , uid , gid , gids , debugFlags , mountExternal , targetSdkVersion , seInfo , null , zygoteArgs ) ; } catch ( android.os.ZygoteStartFailedEx ex ) { android.util.Log.e ( android.os.Process.LOG_TAG , "Starting VM process through Zygote failed" ) ; throw new java.lang.RuntimeException ( "Starting VM process through Zygote failed" , ex ) ; } }
Source:
public java.lang.String getExemplarLocationName ( java.lang.String tzID ) { if ( ( tzID == null ) || ( ( tzID.length ( ) ) == 0 ) ) { return null ; } java.lang.String locName = loadTimeZoneNames ( null , tzID ) . getName ( NameType.EXEMPLAR_LOCATION ) ; return locName ; }

Target:
public java.lang.String getExemplarLocationName ( java.lang.String tzID ) { if ( ( tzID == null ) || ( ( tzID.length ( ) ) == 0 ) ) { return null ; } java.lang.String locName = loadTimeZoneNames ( tzID ) . getName ( NameType.EXEMPLAR_LOCATION ) ; return locName ; }
Source:
public void testSmDigits ( ) throws java.lang.Exception { assertEquals ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 312 ) , 3 ) ; assertEquals ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 430 ) , 2 ) ; assertEquals ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 365 ) , 3 ) ; assertEquals ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 536 ) , 2 ) ; assertEquals ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 352 ) , 2 ) ; assertEquals ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 0 ) , 2 ) ; assertEquals ( com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 2000 ) , 2 ) ; }

Target:
public void testSmDigits ( ) throws java.lang.Exception { assertEquals ( 3 , com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 312 ) ) ; assertEquals ( 2 , com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 430 ) ) ; assertEquals ( 3 , com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 365 ) ) ; assertEquals ( 2 , com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 536 ) ) ; assertEquals ( 2 , com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 352 ) ) ; assertEquals ( 2 , com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 0 ) ) ; assertEquals ( 2 , com.android.internal.telephony.MccTable.smallestDigitsMccForMnc ( 2000 ) ) ; }
Source:
public void testRenameCoreLibrary ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , null , null , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "java/time/X" ) ) . isEqualTo ( "j$/time/X" ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "com/google/X" ) ) . isEqualTo ( "com/google/X" ) ; }

Target:
public void testRenameCoreLibrary ( ) throws java.lang.Exception { com.google.devtools.build.android.desugar.CoreLibrarySupport support = new com.google.devtools.build.android.desugar.CoreLibrarySupport ( new com.google.devtools.build.android.desugar.CoreLibraryRewriter ( "" ) , null , null , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) , com.google.common.collect.ImmutableList.of ( ) ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "java/time/X" ) ) . isEqualTo ( "j$/time/X" ) ; com.google.common.truth.Truth.assertThat ( support.renameCoreLibrary ( "com/google/X" ) ) . isEqualTo ( "com/google/X" ) ; }
Source:
public void test_store_java_io_OutputStream_char ( ) throws java.lang.Exception { java.security.KeyStore keyStore = java.security.KeyStore.getInstance ( java.security.KeyStore.getDefaultType ( ) ) ; try { keyStore.store ( new java.io.ByteArrayOutputStream ( ) , "pwd" . toCharArray ( ) ) ; } catch ( java.security.KeyStoreException expected ) { } keyStore.load ( null , "pwd" . toCharArray ( ) ) ; try { keyStore.store ( null , "pwd" . toCharArray ( ) ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } catch ( java.io.IOException expected ) { } }

Target:
public void test_store_java_io_OutputStream_char ( ) throws java.lang.Exception { java.security.KeyStore keyStore = java.security.KeyStore.getInstance ( java.security.KeyStore.getDefaultType ( ) ) ; try { keyStore.store ( new java.io.ByteArrayOutputStream ( ) , "pwd" . toCharArray ( ) ) ; fail ( ) ; } catch ( java.security.KeyStoreException expected ) { } keyStore.load ( null , "pwd" . toCharArray ( ) ) ; try { keyStore.store ( null , "pwd" . toCharArray ( ) ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } catch ( java.io.IOException expected ) { } }
Source:
public void setSelected ( boolean selected ) { if ( ( ( ( mPrivateFlags ) & ( android.view.View.PFLAG_SELECTED ) ) != 0 ) != selected ) { mPrivateFlags = ( ( mPrivateFlags ) & ( ~ ( android.view.View.PFLAG_SELECTED ) ) ) | ( selected ? android.view.View.PFLAG_SELECTED : 0 ) ; if ( ! selected ) resetPressedState ( ) ; invalidate ( true ) ; refreshDrawableState ( ) ; dispatchSetSelected ( selected ) ; if ( selected ) { sendAccessibilityEvent ( AccessibilityEvent.TYPE_VIEW_SELECTED ) ; } else { notifyViewAccessibilityStateChangedIfNeeded ( AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED ) ; } } }

Target:
public void setSelected ( boolean selected ) { if ( ( ( ( mPrivateFlags ) & ( android.view.View.PFLAG_SELECTED ) ) != 0 ) != selected ) { mPrivateFlags = ( ( mPrivateFlags ) & ( ~ ( android.view.View.PFLAG_SELECTED ) ) ) | ( selected ? android.view.View.PFLAG_SELECTED : 0 ) ; if ( ! selected ) resetPressedState ( ) ; invalidate ( true ) ; refreshDrawableState ( ) ; dispatchSetSelected ( selected ) ; notifyViewAccessibilityStateChangedIfNeeded ( AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED ) ; } }
Source:
protected boolean cleanup ( ) { if ( com.android.bluetooth.hid.HidHostService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , "Stopping Bluetooth HidHostService" ) ; if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mInputDevices ) != null ) { for ( android.bluetooth.BluetoothDevice device : mInputDevices.keySet ( ) ) { int inputDeviceState = getConnectionState ( device ) ; if ( inputDeviceState != ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { broadcastConnectionState ( device , BluetoothProfile.STATE_DISCONNECTED ) ; } } mInputDevices.clear ( ) ; } com.android.bluetooth.hid.HidHostService.clearHidHostService ( ) ; return true ; }

Target:
protected void cleanup ( ) { if ( com.android.bluetooth.hid.HidHostService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidHostService.TAG , "Stopping Bluetooth HidHostService" ) ; if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mInputDevices ) != null ) { for ( android.bluetooth.BluetoothDevice device : mInputDevices.keySet ( ) ) { int inputDeviceState = getConnectionState ( device ) ; if ( inputDeviceState != ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { broadcastConnectionState ( device , BluetoothProfile.STATE_DISCONNECTED ) ; } } mInputDevices.clear ( ) ; } com.android.bluetooth.hid.HidHostService.clearHidHostService ( ) ; }
Source:
static java.lang.String getResourceForFirstArg ( org.w3c.dom.Node method , org.w3c.dom.Node call ) { assert ( call instanceof lombok.ast.MethodInvocation ) || ( call instanceof lombok.ast.ConstructorInvocation ) ; com.android.tools.lint.checks.StringFormatDetector.StringTracker tracker = new com.android.tools.lint.checks.StringFormatDetector.StringTracker ( null , method , call , 0 ) ; method.accept ( tracker ) ; java.lang.String name = tracker.getFormatStringName ( ) ; return name ; }

Target:
public static java.lang.String getResourceForFirstArg ( @ com.android.annotations.NonNull org.w3c.dom.Node method , @ com.android.annotations.NonNull org.w3c.dom.Node call ) { assert ( call instanceof lombok.ast.MethodInvocation ) || ( call instanceof lombok.ast.ConstructorInvocation ) ; com.android.tools.lint.checks.StringFormatDetector.StringTracker tracker = new com.android.tools.lint.checks.StringFormatDetector.StringTracker ( null , method , call , 0 ) ; method.accept ( tracker ) ; return tracker.getFormatStringName ( ) ; }
Source:
public java.lang.Object [ ] toArray ( ) { int length = c.size ( ) ; java.lang.Object [ ] result = new java.lang.Object [ length ] ; java.util.Iterator < ? > it = iterator ( ) ; for ( int i = length ; ( -- i ) >= 0 ; ) { result [ i ] = it.next ( ) ; } return result ; }

Target:
public java.lang.Object [ ] toArray ( ) { int length = c.size ( ) ; java.lang.Object [ ] result = new java.lang.Object [ length ] ; java.util.Iterator < ? > it = iterator ( ) ; for ( int i = 0 ; i < length ; i ++ ) { result [ i ] = it.next ( ) ; } return result ; }
Source:
public void testFixBootpathExtWithAndroidJar ( ) { java.lang.String [ ] [ ] testArray = new java.lang.String [ ] [ ] { null , new java.lang.String [ ] { "android.jar" } , null , new java.lang.String [ ] { "some_other_jar.jar" } } ; java.lang.String [ ] [ ] expectedArray = new java.lang.String [ ] [ ] { null , null , null , new java.lang.String [ ] { "some_other_jar.jar" } } ; assertEqualsArrays ( expectedArray , com.android.ide.eclipse.adt.internal.launch.JUnitLaunchConfigDelegate.fixBootpathExt ( testArray ) ) ; }

Target:
public void testFixBootpathExtWithAndroidJar ( ) { java.lang.String [ ] [ ] testArray = new java.lang.String [ ] [ ] { null , new java.lang.String [ ] { } , new java.lang.String [ ] { "android.jar" } , null , new java.lang.String [ ] { "some_other_jar.jar" } } ; java.lang.String [ ] [ ] expectedArray = new java.lang.String [ ] [ ] { null , new java.lang.String [ ] { } , null , null , new java.lang.String [ ] { "some_other_jar.jar" } } ; assertEqualsArrays ( expectedArray , com.android.ide.eclipse.adt.internal.launch.JUnitLaunchConfigDelegate.fixBootpathExt ( testArray ) ) ; }
Source:
private static com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode createNode ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode parent , java.lang.String fqn , boolean hasChildren ) { java.lang.String name = fqn.substring ( ( ( fqn.lastIndexOf ( '.' ) ) + 1 ) ) ; com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor descriptor = com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfoTest.createDesc ( name , fqn , hasChildren ) ; if ( parent == null ) { parent = new com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfoTest.createDesc ( "doc" , "doc" , true ) ) ; } return ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent.appendNewUiChild ( descriptor ) ) ) ; }

Target:
public static com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode createNode ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode parent , java.lang.String fqn , boolean hasChildren ) { java.lang.String name = fqn.substring ( ( ( fqn.lastIndexOf ( '.' ) ) + 1 ) ) ; com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor descriptor = com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfoTest.createDesc ( name , fqn , hasChildren ) ; if ( parent == null ) { parent = new com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfoTest.createDesc ( "doc" , "doc" , true ) ) ; } return ( ( com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode ) ( parent.appendNewUiChild ( descriptor ) ) ) ; }
Source:
public static final java.text.DecimalFormatSymbols getInstance ( java.util.Locale locale ) { sun.util.LocaleServiceProviderPool pool = sun.util.LocaleServiceProviderPool.getPool ( java.text.spi.DecimalFormatSymbolsProvider.class ) ; if ( pool.hasProviders ( ) ) { java.text.DecimalFormatSymbols providersInstance = pool.getLocalizedObject ( java.text.DecimalFormatSymbols.DecimalFormatSymbolsGetter.INSTANCE , locale ) ; if ( providersInstance != null ) { return providersInstance ; } } return new java.text.DecimalFormatSymbols ( locale ) ; }

Target:
public static final java.text.DecimalFormatSymbols getInstance ( java.util.Locale locale ) { return new java.text.DecimalFormatSymbols ( locale ) ; }
Source:
private void doBadSubscribeConfiguration ( java.lang.String serviceName , byte [ ] ssi , byte [ ] matchFilter ) throws java.lang.IllegalArgumentException { android.net.wifi.aware.SubscribeConfig subscribeConfig = new android.net.wifi.aware.SubscribeConfig ( serviceName.getBytes ( ) , ssi , matchFilter , android.net.wifi.aware.SubscribeConfig.SUBSCRIBE_TYPE_PASSIVE , 0 , 0 , android.net.wifi.aware.SubscribeConfig.MATCH_STYLE_ALL , true ) ; int clientId = doConnect ( ) ; android.net.wifi.aware.IWifiAwareDiscoverySessionCallback mockCallback = org.mockito.Mockito.mock ( android.net.wifi.aware.IWifiAwareDiscoverySessionCallback.class ) ; mDut.subscribe ( clientId , subscribeConfig , mockCallback ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . subscribe ( clientId , subscribeConfig , mockCallback ) ; }

Target:
private void doBadSubscribeConfiguration ( java.lang.String serviceName , byte [ ] ssi , byte [ ] matchFilter ) throws java.lang.IllegalArgumentException { android.net.wifi.aware.SubscribeConfig subscribeConfig = new android.net.wifi.aware.SubscribeConfig ( serviceName.getBytes ( ) , ssi , matchFilter , android.net.wifi.aware.SubscribeConfig.SUBSCRIBE_TYPE_PASSIVE , 0 , android.net.wifi.aware.SubscribeConfig.MATCH_STYLE_ALL , true ) ; int clientId = doConnect ( ) ; android.net.wifi.aware.IWifiAwareDiscoverySessionCallback mockCallback = org.mockito.Mockito.mock ( android.net.wifi.aware.IWifiAwareDiscoverySessionCallback.class ) ; mDut.subscribe ( clientId , subscribeConfig , mockCallback ) ; org.mockito.Mockito.verify ( mAwareStateManagerMock ) . subscribe ( clientId , subscribeConfig , mockCallback ) ; }
Source:
static void useImplement ( DoubledImplement di , boolean isOne ) { try { di.one ( ) ; if ( ! isOne ) { java.lang.System.err.println ( "ERROR: did not get LinkageError on DI" ) ; } } catch ( java.lang.LinkageError le ) { if ( ! isOne ) { java.lang.System.out.println ( "Got LinkageError on DI (late)" ) ; } else { throw le ; } } }

Target:
static void useImplement ( DoubledImplement di , boolean isOne ) { try { di.one ( ) ; if ( ! isOne ) { java.lang.System.out.println ( "ERROR: did not get LinkageError on DI" ) ; } } catch ( java.lang.LinkageError le ) { if ( ! isOne ) { java.lang.System.out.println ( "Got LinkageError on DI (late)" ) ; } else { throw le ; } } }
Source:
private boolean isIPv6ULA ( ) { if ( ( ( address ) != null ) && ( ( address ) instanceof java.net.Inet6Address ) ) { byte [ ] bytes = address.getAddress ( ) ; return ( ( bytes [ 0 ] ) & ( ( byte ) ( 254 ) ) ) == ( ( byte ) ( 252 ) ) ; } return false ; }

Target:
private boolean isIPv6ULA ( ) { if ( ( address ) instanceof java.net.Inet6Address ) { byte [ ] bytes = address.getAddress ( ) ; return ( ( bytes [ 0 ] ) & ( ( byte ) ( 254 ) ) ) == ( ( byte ) ( 252 ) ) ; } return false ; }
Source:
public void testSingleIncomingCallRemoteDisconnect ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.mockito.Mockito.when ( mClockProxy.currentTimeMillis ( ) ) . thenReturn ( com.android.server.telecom.tests.TEST_DISCONNECT_TIME ) ; org.mockito.Mockito.when ( mClockProxy.elapsedRealtime ( ) ) . thenReturn ( com.android.server.telecom.tests.TEST_DISCONNECT_ELAPSED_TIME ) ; mConnectionServiceFixtureA.sendSetDisconnected ( ids.mConnectionId , DisconnectCause.LOCAL ) ; assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureY.getCall ( ids.mCallId ) . getState ( ) ) ; }

Target:
public void testSingleIncomingCallRemoteDisconnect ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.mockito.Mockito.when ( mClockProxy.currentTimeMillis ( ) ) . thenReturn ( com.android.server.telecom.tests.TEST_DISCONNECT_TIME ) ; org.mockito.Mockito.when ( mClockProxy.elapsedRealtime ( ) ) . thenReturn ( com.android.server.telecom.tests.TEST_DISCONNECT_ELAPSED_TIME ) ; mConnectionServiceFixtureA.sendSetDisconnected ( ids.mConnectionId , DisconnectCause.LOCAL ) ; org.junit.Assert.assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; org.junit.Assert.assertEquals ( Call.STATE_DISCONNECTED , mInCallServiceFixtureY.getCall ( ids.mCallId ) . getState ( ) ) ; }
Source:
protected void onPause ( ) { super . onPause ( ) ; mLocalManager.setForegroundActivity ( null ) ; mDevicePreferenceMap.clear ( ) ; mDeviceList.removeAll ( ) ; unregisterReceiver ( mReceiver ) ; mLocalManager.unregisterCallback ( this ) ; if ( ( mScreenType ) == ( com.android.settings.bluetooth.BluetoothSettings.SCREEN_TYPE_SETTINGS ) ) { mNamePreference.pause ( ) ; mDiscoverableEnabler.pause ( ) ; mEnabler.pause ( ) ; } }

Target:
protected void onPause ( ) { super . onPause ( ) ; mDevicePreferenceMap.clear ( ) ; mDeviceList.removeAll ( ) ; mLocalManager.setForegroundActivity ( null ) ; mDevicePreferenceMap.clear ( ) ; mDeviceList.removeAll ( ) ; unregisterReceiver ( mReceiver ) ; mLocalManager.unregisterCallback ( this ) ; if ( ( mScreenType ) == ( com.android.settings.bluetooth.BluetoothSettings.SCREEN_TYPE_SETTINGS ) ) { mNamePreference.pause ( ) ; mDiscoverableEnabler.pause ( ) ; mEnabler.pause ( ) ; } }
Source:
public void test_getInstanceLjava_util_Locale ( ) { try { java.text.DecimalFormatSymbols.getInstance ( null ) ; fail ( "Should throw NullPointerException" ) ; } catch ( java.lang.NullPointerException e ) { } assertEquals ( new java.text.DecimalFormatSymbols ( java.util.Locale.GERMANY ) , java.text.DecimalFormatSymbols.getInstance ( java.util.Locale.GERMANY ) ) ; java.util.Locale locale = new java.util.Locale ( "not exist language" , "not exist country" ) ; java.text.DecimalFormatSymbols symbols = java.text.DecimalFormatSymbols.getInstance ( locale ) ; assertNotNull ( symbols ) ; assertEquals ( java.text.DecimalFormatSymbols.getInstance ( ) , symbols ) ; }

Target:
public void test_getInstanceLjava_util_Locale ( ) { try { java.text.DecimalFormatSymbols.getInstance ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } assertEquals ( new java.text.DecimalFormatSymbols ( java.util.Locale.GERMANY ) , java.text.DecimalFormatSymbols.getInstance ( java.util.Locale.GERMANY ) ) ; java.util.Locale locale = new java.util.Locale ( "not exist language" , "not exist country" ) ; java.text.DecimalFormatSymbols symbols = java.text.DecimalFormatSymbols.getInstance ( locale ) ; assertNotNull ( symbols ) ; }
Source:
private static boolean endsWith ( java.lang.String sentence , java.lang.String word , boolean allowPrefix , boolean allowSuffix ) { int index = com.android.tools.lint.checks.TextFieldDetector.indexOfWord ( sentence , word , allowPrefix , allowSuffix ) ; if ( index != ( - 1 ) ) { return index == ( ( sentence.length ( ) ) - ( word.length ( ) ) ) ; } return false ; }

Target:
private static boolean endsWith ( java.lang.String sentence , java.lang.String word , boolean allowPrefix , boolean allowSuffix ) { int index = com.android.tools.lint.checks.TextFieldDetector.indexOfWord ( sentence , word , allowPrefix , allowSuffix ) ; return ( index != ( - 1 ) ) && ( index == ( ( sentence.length ( ) ) - ( word.length ( ) ) ) ) ; }
Source:
public java.lang.String p2pServDiscReq ( java.lang.String addr , java.lang.String query ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.requestServiceDiscovery ( addr , query ) ; } else { java.lang.String command = "P2P_SERV_DISC_REQ" ; command += " " + addr ; command += " " + query ; return doStringCommand ( command ) ; } }

Target:
public java.lang.String p2pServDiscReq ( java.lang.String addr , java.lang.String query ) { return mSupplicantP2pIfaceHal.requestServiceDiscovery ( addr , query ) ; }
Source:
public void testSendImsCdmaTest ( ) throws java.lang.Exception { switchImsSmsFormat ( PhoneConstants.PHONE_TYPE_CDMA ) ; mImsSmsDispatcher.sendText ( "111" , "222" , com.android.internal.telephony.TAG , null , null , null , null , false , ( - 1 ) , false , ( - 1 ) ) ; org.mockito.Mockito.verify ( mSimulatedCommandsVerifier ) . sendImsCdmaSms ( ( ( byte [ ] ) ( org.mockito.Matchers.any ( ) ) ) , org.mockito.Mockito.eq ( 0 ) , org.mockito.Mockito.eq ( 0 ) , org.mockito.Matchers.any ( android.os.Message.class ) ) ; }

Target:
public void testSendImsCdmaTest ( ) throws java.lang.Exception { switchImsSmsFormat ( PhoneConstants.PHONE_TYPE_CDMA ) ; mImsSmsDispatcher.sendText ( "111" , "222" , com.android.internal.telephony.TAG , null , null , null , null , false ) ; org.mockito.Mockito.verify ( mSimulatedCommandsVerifier ) . sendImsCdmaSms ( ( ( byte [ ] ) ( org.mockito.Matchers.any ( ) ) ) , org.mockito.Mockito.eq ( 0 ) , org.mockito.Mockito.eq ( 0 ) , org.mockito.Matchers.any ( android.os.Message.class ) ) ; }
Source:
static com.android.cts.verifier.TestListAdapter.TestListItem createInteractiveTestItem ( android.app.Activity activity , java.lang.String id , int titleRes , int infoRes , com.android.cts.verifier.IntentDrivenTestActivity.ButtonInfo [ ] buttonInfos ) { return com.android.cts.verifier.TestListAdapter.TestListItem.newTest ( activity , titleRes , id , new android.content.Intent ( activity , com.android.cts.verifier.IntentDrivenTestActivity.class ) . putExtra ( IntentDrivenTestActivity.EXTRA_ID , id ) . putExtra ( IntentDrivenTestActivity.EXTRA_TITLE , titleRes ) . putExtra ( IntentDrivenTestActivity.EXTRA_INFO , infoRes ) . putExtra ( IntentDrivenTestActivity.EXTRA_BUTTONS , buttonInfos ) , null ) ; }

Target:
static com.android.cts.verifier.TestListAdapter.TestListItem createInteractiveTestItem ( android.app.Activity activity , java.lang.String id , int titleRes , int infoRes , com.android.cts.verifier.IntentDrivenTestActivity.ButtonInfo [ ] buttonInfos ) { return com.android.cts.verifier.TestListAdapter.TestListItem.newTest ( activity , titleRes , id , new android.content.Intent ( activity , com.android.cts.verifier.IntentDrivenTestActivity.class ) . putExtra ( IntentDrivenTestActivity.EXTRA_ID , id ) . putExtra ( IntentDrivenTestActivity.EXTRA_TITLE , titleRes ) . putExtra ( IntentDrivenTestActivity.EXTRA_INFO , infoRes ) . putExtra ( IntentDrivenTestActivity.EXTRA_BUTTONS , buttonInfos ) ) ; }
Source:
public java.lang.Boolean a2dpDisconnect ( android.bluetooth.BluetoothDevice device ) { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile.getPriority ( device ) ) > ( android.bluetooth.BluetoothProfile.PRIORITY_ON ) ) { com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile.setPriority ( device , BluetoothProfile.PRIORITY_ON ) ; } return com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile.disconnect ( device ) ; }

Target:
public java.lang.Boolean a2dpDisconnect ( android.bluetooth.BluetoothDevice device ) { if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile ) == null ) return false ; if ( ( com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile.getPriority ( device ) ) > ( android.bluetooth.BluetoothProfile.PRIORITY_ON ) ) { com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile.setPriority ( device , BluetoothProfile.PRIORITY_ON ) ; } return com.googlecode.android_scripting.facade.bluetooth.BluetoothA2dpFacade.sA2dpProfile.disconnect ( device ) ; }
Source:
private void transform ( @ javax.annotation.Nonnull org.objectweb.asm.tree.ClassNode cn , @ javax.annotation.Nonnull java.io.OutputStream os ) throws java.io.IOException { com.android.jill.backend.jayce.JayceWriter writer = createWriter ( os ) ; com.android.jill.frontend.java.ClassNodeWriter asm2jayce = new com.android.jill.frontend.java.ClassNodeWriter ( writer , new com.android.jill.frontend.java.SourceInfoWriter ( writer ) ) ; asm2jayce.write ( cn ) ; writer.flush ( ) ; }

Target:
private void transform ( @ javax.annotation.Nonnull org.objectweb.asm.tree.ClassNode cn , @ javax.annotation.Nonnull java.io.OutputStream os ) throws java.io.IOException { com.android.jill.backend.jayce.JayceWriter writer = createWriter ( os ) ; com.android.jill.frontend.java.ClassNodeWriter asm2jayce = new com.android.jill.frontend.java.ClassNodeWriter ( writer , new com.android.jill.frontend.java.SourceInfoWriter ( writer ) , options ) ; asm2jayce.write ( cn ) ; writer.flush ( ) ; }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "isConnected()" ) ; com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) return false ; return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothMap.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }

Target:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.map.BluetoothMapService.VERBOSE ) { android.util.Log.v ( com.android.bluetooth.map.BluetoothMapService.TAG , "isConnected()" ) ; } com.android.bluetooth.map.BluetoothMapService service = getService ( ) ; if ( service == null ) { return false ; } return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothMap.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }
Source:
private com.android.jack.ir.ast.JExpressionStatement makeResetCall ( com.android.jack.ir.sourceinfo.SourceInfo info ) { assert ( ( ( resetClass ) != null ) && ( ( lockClass ) != null ) ) && ( ( resetMethodId ) != null ) ; return new com.android.jack.ir.ast.JExpressionStatement ( info , new com.android.jack.ir.ast.JMethodCall ( info , null , resetClass , resetMethodId , JPrimitiveTypeEnum.VOID.getType ( ) , false ) ) ; }

Target:
private com.android.jack.ir.ast.JExpressionStatement makeResetCall ( com.android.jack.ir.sourceinfo.SourceInfo info ) { assert ( ( ( lockClass ) != null ) && ( ( resetClass ) != null ) ) && ( ( resetMethodId ) != null ) ; return new com.android.jack.ir.ast.JExpressionStatement ( info , new com.android.jack.ir.ast.JMethodCall ( info , null , resetClass , resetMethodId , JPrimitiveTypeEnum.VOID.getType ( ) , false ) ) ; }
Source:
private void newLine ( ) { try { synchronized ( this ) { ensureOpen ( ) ; java.io.BufferedWriter textOut = getTextOut ( ) ; textOut.newLine ( ) ; textOut.flushBuffer ( ) ; charOut.flushBuffer ( ) ; if ( autoFlush ) out.flush ( ) ; } } catch ( java.io.InterruptedIOException x ) { java.lang.Thread.currentThread ( ) . interrupt ( ) ; } catch ( java.io.IOException x ) { trouble = true ; } }

Target:
private void newLine ( ) { try { synchronized ( this ) { ensureOpen ( ) ; textOut.newLine ( ) ; textOut.flushBuffer ( ) ; charOut.flushBuffer ( ) ; if ( autoFlush ) out.flush ( ) ; } } catch ( java.io.InterruptedIOException x ) { java.lang.Thread.currentThread ( ) . interrupt ( ) ; } catch ( java.io.IOException x ) { trouble = true ; } }
Source:
private long getPreferredApnId ( int subId , boolean checkApnSp ) { android.content.SharedPreferences sp = getContext ( ) . getSharedPreferences ( com.android.providers.telephony.TelephonyProvider.PREF_FILE_APN , Context.MODE_PRIVATE ) ; long apnId = sp.getLong ( ( ( com.android.providers.telephony.TelephonyProvider.COLUMN_APN_ID ) + subId ) , com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ; if ( ( apnId == ( com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ) && checkApnSp ) { apnId = getPreferredApnIdFromApn ( subId ) ; if ( apnId != ( com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ) { setPreferredApnId ( apnId , subId ) ; deletePreferredApn ( subId ) ; } } return apnId ; }

Target:
private long getPreferredApnId ( int subId , boolean checkApnSp ) { android.content.SharedPreferences sp = getContext ( ) . getSharedPreferences ( com.android.providers.telephony.TelephonyProvider.PREF_FILE_APN , Context.MODE_PRIVATE ) ; long apnId = sp.getLong ( ( ( com.android.providers.telephony.TelephonyProvider.COLUMN_APN_ID ) + subId ) , com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ; if ( ( apnId == ( com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ) && checkApnSp ) { apnId = getPreferredApnIdFromApn ( subId ) ; if ( apnId != ( com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ) { setPreferredApnId ( apnId , subId , false ) ; } } return apnId ; }
Source:
void setUp ( ) { BRANCH ( ( ( 39808.0 - ( cts ) ) - ( dev ) ) ) ; mNm.setInterruptionFilter ( NotificationManager.INTERRUPTION_FILTER_PRIORITY ) ; android.app.NotificationManager.Policy policy = mNm.getNotificationPolicy ( ) ; policy = new android.app.NotificationManager.Policy ( ( ( policy.priorityCategories ) | ( NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES ) ) , policy.priorityCallSenders , NotificationManager.Policy.PRIORITY_SENDERS_STARRED ) ; mNm.setNotificationPolicy ( policy ) ; createChannels ( ) ; sendNotifications ( com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.MODE_URI , false , false ) ; status = READY ; }

Target:
protected void setUp ( ) { mNm.setInterruptionFilter ( NotificationManager.INTERRUPTION_FILTER_PRIORITY ) ; android.app.NotificationManager.Policy policy = mNm.getNotificationPolicy ( ) ; policy = new android.app.NotificationManager.Policy ( ( ( policy.priorityCategories ) | ( NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES ) ) , policy.priorityCallSenders , NotificationManager.Policy.PRIORITY_SENDERS_STARRED ) ; mNm.setNotificationPolicy ( policy ) ; createChannels ( ) ; sendNotifications ( com.android.cts.verifier.notifications.AttentionManagementVerifierActivity.MODE_URI , false , false ) ; status = READY ; }
Source:
static boolean nativeGetBoundaryPath ( int native_region , int native_path ) { android.graphics.Region_Delegate region = android.graphics.Region_Delegate.sManager.getDelegate ( native_region ) ; if ( region == null ) { return false ; } android.graphics.Path_Delegate path = android.graphics.Path_Delegate.getDelegate ( native_path ) ; if ( path == null ) { return false ; } if ( region.mArea.isEmpty ( ) ) { path.reset ( ) ; return false ; } path.setPathIterator ( region.mArea.getPathIterator ( new java.awt.geom.AffineTransform ( ) ) ) ; return true ; }

Target:
static boolean nativeGetBoundaryPath ( long native_region , long native_path ) { android.graphics.Region_Delegate region = android.graphics.Region_Delegate.sManager.getDelegate ( native_region ) ; if ( region == null ) { return false ; } android.graphics.Path_Delegate path = android.graphics.Path_Delegate.getDelegate ( native_path ) ; if ( path == null ) { return false ; } if ( region.mArea.isEmpty ( ) ) { path.reset ( ) ; return false ; } path.setPathIterator ( region.mArea.getPathIterator ( new java.awt.geom.AffineTransform ( ) ) ) ; return true ; }
Source:
public void setInternationalCurrencySymbol ( java.lang.String currencyCode ) { intlCurrencySymbol = currencyCode ; currency = null ; if ( currencyCode != null ) { try { currency = java.util.Currency.getInstance ( currencyCode ) ; currencySymbol = currency.getSymbol ( locale ) ; } catch ( java.lang.IllegalArgumentException e ) { } } cachedIcuDFS = null ; }

Target:
public void setInternationalCurrencySymbol ( java.lang.String currencyCode ) { intlCurrencySymbol = currencyCode ; currency = null ; if ( currencyCode != null ) { try { currency = java.util.Currency.getInstance ( currencyCode ) ; currencySymbol = currency.getSymbol ( ) ; } catch ( java.lang.IllegalArgumentException e ) { } } cachedIcuDFS = null ; }
Source:
public void testNotifyResponseConfigFail ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiNanNative.NAN_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiNanNative.NAN_RESPONSE_ENABLED ) ; com.android.server.wifi.nan.WifiNanHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onConfigFailedResponse ( transactionId , WifiNanAttachCallback.REASON_INVALID_ARGS ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }

Target:
public void testNotifyResponseConfigFail ( ) throws org.json.JSONException { final short transactionId = 23 ; android.os.Bundle args = new android.os.Bundle ( ) ; args.putInt ( "status" , WifiNanNative.NAN_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; args.putInt ( "value" , 0 ) ; args.putInt ( "response_type" , WifiNanNative.NAN_RESPONSE_ENABLED ) ; com.android.server.wifi.nan.WifiNanHalMock.callNotifyResponse ( transactionId , com.android.server.wifi.HalMockUtils.convertBundleToJson ( args ) . toString ( ) ) ; org.mockito.Mockito.verify ( mNanStateManager ) . onConfigFailedResponse ( transactionId , WifiNanNative.NAN_STATUS_INVALID_BAND_CONFIG_FLAGS ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mNanStateManager ) ; }
Source:
public void testNonfullscreenAppOrientationRequests ( ) throws java.lang.Exception { if ( ! ( supportsRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } java.lang.String logSeparator = clearLogcat ( ) ; launchActivity ( android.server.cts.ActivityManagerAppConfigurationTests.PORTRAIT_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialReportedSizes = getLastReportedSizesForActivity ( android.server.cts.ActivityManagerAppConfigurationTests.PORTRAIT_ACTIVITY_NAME , logSeparator ) ; assertEquals ( "portrait activity should be in portrait" , 1 , initialReportedSizes.orientation ) ; logSeparator = clearLogcat ( ) ; launchActivityInComponent ( android.server.cts.ActivityManagerAppConfigurationTests.TRANSLUCENT_SDK_26_PACKAGE , android.server.cts.ActivityManagerAppConfigurationTests.TRANSLUCENT_ACTIVITY ) ; assertEquals ( "Legacy non-fullscreen activity requested landscape orientation" , 0 , mAmWmState.getWmState ( ) . getLastOrientation ( ) ) ; }

Target:
public void testNonfullscreenAppOrientationRequests ( ) throws java.lang.Exception { java.lang.String logSeparator = clearLogcat ( ) ; launchActivity ( android.server.cts.ActivityManagerAppConfigurationTests.PORTRAIT_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialReportedSizes = getLastReportedSizesForActivity ( android.server.cts.ActivityManagerAppConfigurationTests.PORTRAIT_ACTIVITY_NAME , logSeparator ) ; assertEquals ( "portrait activity should be in portrait" , 1 , initialReportedSizes.orientation ) ; logSeparator = clearLogcat ( ) ; launchActivityInComponent ( android.server.cts.ActivityManagerAppConfigurationTests.TRANSLUCENT_SDK_26_PACKAGE , android.server.cts.ActivityManagerAppConfigurationTests.TRANSLUCENT_ACTIVITY ) ; assertEquals ( "Legacy non-fullscreen activity requested landscape orientation" , 0 , mAmWmState.getWmState ( ) . getLastOrientation ( ) ) ; }
Source:
public boolean [ ] getKeyUsage ( ) { final boolean [ ] kusage = org.apache.harmony.xnet.provider.jsse.NativeCrypto.get_X509_ex_kusage ( mContext ) ; if ( ( kusage.length ) >= 9 ) { return kusage ; } final boolean [ ] resized = new boolean [ 9 ] ; java.lang.System.arraycopy ( kusage , 0 , resized , 0 , kusage.length ) ; return resized ; }

Target:
public boolean [ ] getKeyUsage ( ) { final boolean [ ] kusage = org.apache.harmony.xnet.provider.jsse.NativeCrypto.get_X509_ex_kusage ( mContext ) ; if ( kusage == null ) { return null ; } if ( ( kusage.length ) >= 9 ) { return kusage ; } final boolean [ ] resized = new boolean [ 9 ] ; java.lang.System.arraycopy ( kusage , 0 , resized , 0 , kusage.length ) ; return resized ; }
Source:
public void testMergeConflict ( ) throws java.io.IOException { com.android.dex.Dex a = resourceToDexBuffer ( "/testdata/A.dex" ) ; com.android.dex.Dex b = resourceToDexBuffer ( "/testdata/B.dex" ) ; com.android.dex.Dex ab = new com.android.dx.merge.DexMerger ( new com.android.dex.Dex [ ] { a , b } , CollisionPolicy.FAIL ) . merge ( ) ; com.android.dx.merge.DexMerger dexMerger = new com.android.dx.merge.DexMerger ( new com.android.dex.Dex [ ] { a , ab } , CollisionPolicy.FAIL ) ; try { dexMerger.merge ( ) ; fail ( ) ; } catch ( com.android.dex.DexException expected ) { assertEquals ( "Multiple dex files define Ltestdata/A;" , expected.getMessage ( ) ) ; } }

Target:
public void testMergeConflict ( ) throws java.io.IOException { com.android.dex.Dex a = resourceToDexBuffer ( "/testdata/A.dex" ) ; com.android.dex.Dex b = resourceToDexBuffer ( "/testdata/B.dex" ) ; com.android.dex.Dex ab = new com.android.dx.merge.DexMerger ( a , b , CollisionPolicy.FAIL ) . merge ( ) ; com.android.dx.merge.DexMerger dexMerger = new com.android.dx.merge.DexMerger ( a , ab , CollisionPolicy.FAIL ) ; try { dexMerger.merge ( ) ; fail ( ) ; } catch ( com.android.dex.DexException expected ) { assertEquals ( "Multiple dex files define Ltestdata/A;" , expected.getMessage ( ) ) ; } }
Source:
final synchronized java.lang.String getLocalizedLevelName ( ) { if ( ( localizedLevelName ) != null ) { return localizedLevelName ; } try { java.util.ResourceBundle rb = java.util.ResourceBundle.getBundle ( resourceBundleName ) ; localizedLevelName = rb.getString ( name ) ; } catch ( java.lang.Exception ex ) { localizedLevelName = name ; } return localizedLevelName ; }

Target:
final synchronized java.lang.String getLocalizedLevelName ( ) { if ( ( localizedLevelName ) != null ) { return localizedLevelName ; } try { localizedLevelName = rb.getString ( name ) ; } catch ( java.lang.Exception ex ) { localizedLevelName = name ; } return localizedLevelName ; }