auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testFormatKernelVersion ( ) throws java.lang.Exception { assertEquals ( "Unavailable" , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( "" ) ) ; assertEquals ( ( "2.6.38.8-gg784\n" + ( "root@hpao4.eem.corp.google.com #2\n" + "Fri Feb 24 03:31:23 PST 2012" ) ) , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( ( "Linux version 2.6.38.8-gg784 " + ( ( "(root@hpao4.eem.corp.google.com) " + "(gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #2 SMP " ) + "Fri Feb 24 03:31:23 PST 2012" ) ) ) ) ; assertEquals ( ( "3.0.31-g6fb96c9\n" + ( "android-build@vpbs1.mtv.corp.google.com #1\n" + "Thu Jun 28 11:02:39 PDT 2012" ) ) , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( ( "Linux version 3.0.31-g6fb96c9 " + ( ( "(android-build@vpbs1.mtv.corp.google.com) " + "(gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 " ) + "SMP PREEMPT Thu Jun 28 11:02:39 PDT 2012" ) ) ) ) ; assertEquals ( ( "2.6.38.8-a-b-jellybean+\n" + ( "x@y #1\n" + "Tue Aug 28 22:10:46 CDT 2012" ) ) , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( ( "Linux version " + ( "2.6.38.8-a-b-jellybean+ (x@y) " + "(gcc version 4.4.3 (GCC) ) #1 PREEMPT Tue Aug 28 22:10:46 CDT 2012" ) ) ) ) ; }

Target:
public void testFormatKernelVersion ( ) throws java.lang.Exception { assertEquals ( "Unavailable" , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( "" ) ) ; assertEquals ( ( "2.6.38.8-gg784\n" + ( "root@hpao4.eem.corp.google.com #2\n" + "Fri Feb 24 03:31:23 PST 2012" ) ) , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( ( "Linux version 2.6.38.8-gg784 " + ( ( "(root@hpao4.eem.corp.google.com) " + "(gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #2 SMP " ) + "Fri Feb 24 03:31:23 PST 2012" ) ) ) ) ; assertEquals ( ( "3.0.31-g6fb96c9\n" + ( "android-build@vpbs1.mtv.corp.google.com #1\n" + "Thu Jun 28 11:02:39 PDT 2012" ) ) , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( ( "Linux version 3.0.31-g6fb96c9 " + ( ( "(android-build@vpbs1.mtv.corp.google.com) " + "(gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 " ) + "SMP PREEMPT Thu Jun 28 11:02:39 PDT 2012" ) ) ) ) ; assertEquals ( ( "2.6.38.8-a-b-jellybean+\n" + ( "x@y #1\n" + "Tue Aug 28 22:10:46 CDT 2012" ) ) , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( ( "Linux version " + ( "2.6.38.8-a-b-jellybean+ (x@y) " + "(gcc version 4.4.3 (GCC) ) #1 PREEMPT Tue Aug 28 22:10:46 CDT 2012" ) ) ) ) ; assertEquals ( ( "3.18.31-g3ce5faa-dirty\n" + ( "x@y #5\n" + "Fri Oct 28 14:38:13 PDT 2016" ) ) , com.android.settingslib.DeviceInfoUtils.formatKernelVersion ( ( "Linux version " + ( ( "3.18.31-g3ce5faa-dirty (x@y) (Android clang " + "version 3.8.275480 (based on LLVM 3.8.275480)) " ) + "#5 SMP PREEMPT Fri Oct 28 14:38:13 PDT 2016" ) ) ) ) ; }
Source:
public static void createForTests ( ) { org.chromium.base.PowerMonitor.sInstance = new org.chromium.base.PowerMonitor ( ) ; }

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:
private int getArrayLength ( int res ) { int offset = android.icu.impl.ICUResourceBundleReader.RES_GET_OFFSET ( res ) ; if ( offset == 0 ) { return 0 ; } int type = android.icu.impl.ICUResourceBundleReader.RES_GET_TYPE ( res ) ; if ( type == ( android.icu.util.UResourceBundle.ARRAY ) ) { offset = getResourceByteOffset ( offset ) ; return getInt ( offset ) ; } else if ( type == ( ICUResourceBundle.ARRAY16 ) ) { return b16BitUnits.charAt ( offset ) ; } else { return 0 ; } }

Target:
public java.lang.String [ ] getStringArrayOrStringAsArray ( ) { android.icu.impl.ICUResourceBundleReader.Array array = reader.getArray ( res ) ; if ( array != null ) { return getStringArray ( array ) ; } java.lang.String s = reader.getString ( res ) ; if ( s != null ) { return new java.lang.String [ ] { s } ; } throw new android.icu.util.UResourceTypeMismatchException ( "" ) ; }
Source:
public int invokeOemRilRequestRaw ( byte [ ] oemReq , byte [ ] oemResp ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.invokeOemRilRequestRaw ( oemReq , oemResp ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return - 1 ; }

Target:
public boolean isVideoTelephonyAvailable ( ) { try { return getITelephony ( ) . isVideoTelephonyAvailable ( getSubId ( ) ) ; } catch ( android.os.RemoteException | java.lang.NullPointerException ex ) { return false ; } }
Source:
public void testLibraryWithMissingClass ( ) throws java.lang.Exception { mScopes = null ; mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING ) ; assertEquals ( ( "AndroidManifest.xml:11: Error: Class referenced in the manifest, test.pkg.TestService, was not found in the project or the libraries [MissingRegistered]\n" + ( ( " <service android:name=\".TestService\" />\n" + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "1 errors, 0 warnings\n" ) ) , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" + " package=\"test.pkg\"\n" ) + " android:versionCode=\"1\"\n" ) + " android:versionName=\"1.0\" >\n" ) + "\n" ) + " <uses-sdk android:minSdkVersion=\"14\" />\n" ) + "\n" ) + " <application\n" ) + " android:icon=\"@drawable/ic_launcher\"\n" ) + " android:label=\"@string/app_name\" >\n" ) + " <service android:name=\".TestService\" />\n" ) + "\n" ) + " </application>\n" ) + "\n" ) + "</manifest>" ) ) ) , copy ( "bytecode/TestProvider2.class.data" , "bin/classes/test/pkg/TestProvider2.class" ) , copy ( "bytecode/.classpath" , ".classpath" ) , source ( "project.properties" , ( "" + ( ( "target=android-14\n" + "android.library=true\n" ) + "manifestmerger.enabled=true\n" ) ) ) ) ) ; }

Target:
public void testLibraryWithMissingClass ( ) throws java.lang.Exception { mScopes = null ; mEnabled = com.google.common.collect.Sets.newHashSet ( com.android.tools.lint.checks.MissingClassDetector.MISSING ) ; assertEquals ( "No warnings." , lintProject ( xml ( "AndroidManifest.xml" , ( "" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n" + " package=\"test.pkg\"\n" ) + " android:versionCode=\"1\"\n" ) + " android:versionName=\"1.0\" >\n" ) + "\n" ) + " <uses-sdk android:minSdkVersion=\"14\" />\n" ) + "\n" ) + " <application\n" ) + " android:icon=\"@drawable/ic_launcher\"\n" ) + " android:label=\"@string/app_name\" >\n" ) + " <service android:name=\".TestService\" />\n" ) + "\n" ) + " </application>\n" ) + "\n" ) + "</manifest>" ) ) ) , copy ( "bytecode/TestProvider2.class.data" , "bin/classes/test/pkg/TestProvider2.class" ) , copy ( "bytecode/.classpath" , ".classpath" ) , source ( "project.properties" , ( "" + ( ( "target=android-14\n" + "android.library=true\n" ) + "manifestmerger.enabled=true\n" ) ) ) ) ) ; }
Source:
public com.android.sdklib.IAndroidTarget [ ] getTargets ( ) { if ( ( mTargets ) == null ) { java.io.File sdkHome = getSdkHome ( ) ; if ( sdkHome != null ) { com.android.sdklib.repository.local.LocalSdk localSdk = new com.android.sdklib.repository.local.LocalSdk ( sdkHome ) ; mTargets = localSdk.getTargets ( ) ; } else { mTargets = new com.android.sdklib.IAndroidTarget [ 0 ] ; } } return mTargets ; }

Target:
public com.android.sdklib.repository.local.LocalSdk getSdk ( ) { if ( ( mSdk ) == null ) { java.io.File sdkHome = getSdkHome ( ) ; if ( sdkHome != null ) { mSdk = new com.android.sdklib.repository.local.LocalSdk ( sdkHome ) ; } } return mSdk ; }
Source:
private static android.support.test.espresso.ViewAction actionCloseDrawer ( final int gravity ) { return new android.support.test.espresso.ViewAction ( ) { @ java.lang.Override public org.hamcrest.Matcher < android.view.View > getConstraints ( ) { return android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom ( android.support.v4.widget.DrawerLayout.class ) ; } @ java.lang.Override public java.lang.String getDescription ( ) { return "close drawer with gravity " + gravity ; } @ java.lang.Override public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { ( ( android.support.v4.widget.DrawerLayout ) ( view ) ) . closeDrawer ( gravity ) ; } } ; }

Target:
public static android.support.test.espresso.ViewAction close ( ) { return android.support.test.espresso.contrib.DrawerActions.close ( GravityCompat.START ) ; }
Source:
public void silenceRinger ( java.lang.String callingPackage ) { try { com.android.server.telecom.Log.startSession ( "TSI.sR" ) ; synchronized ( mLock ) { enforcePermissionOrPrivilegedDialer ( android.Manifest.permission.MODIFY_PHONE_STATE , callingPackage ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { com.android.server.telecom.Log.i ( this , "Silence Ringer requested by %s" , callingPackage ) ; mCallsManager.getCallAudioManager ( ) . silenceRingers ( ) ; mCallsManager.getInCallController ( ) . silenceRinger ( ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void silenceRinger ( java.lang.String callingPackage ) { try { android.telecom.Log.startSession ( "TSI.sR" ) ; synchronized ( mLock ) { enforcePermissionOrPrivilegedDialer ( android.Manifest.permission.MODIFY_PHONE_STATE , callingPackage ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { android.telecom.Log.i ( this , "Silence Ringer requested by %s" , callingPackage ) ; mCallsManager.getCallAudioManager ( ) . silenceRingers ( ) ; mCallsManager.getInCallController ( ) . silenceRinger ( ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public void testNewInstanceString_ByteArrayCharsetConstructor ( ) { runTestNewInstanceString ( "([BLjava/nio/charset/Charset;)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.NewInstanceStringTest.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value byteArrayValue = getStaticFieldValue ( debuggeeClassId , "BYTE_ARRAY" ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value charsetValue = getStaticFieldValue ( debuggeeClassId , "CHARSET" ) ; constructorArguments.add ( byteArrayValue ) ; constructorArguments.add ( charsetValue ) ; } } ) ; }

Target:
public void testNewInstanceString_CharArrayConstructor ( ) { runTestNewInstanceString ( "([C)V" , new org.apache.harmony.jpda.tests.jdwp.ClassType.ConstructorArgumentsProvider ( ) { @ java.lang.Override public void provideConstructorArguments ( java.util.List < org.apache.harmony.jpda.tests.framework.jdwp.Value > constructorArguments ) { long debuggeeClassId = getClassIDBySignature ( getDebuggeeClassSignature ( ) ) ; org.apache.harmony.jpda.tests.framework.jdwp.Value charArrayValue = getStaticFieldValue ( debuggeeClassId , "CHAR_ARRAY" ) ; constructorArguments.add ( charArrayValue ) ; } } ) ; }
Source:
public void testViewClassLayoutReference ( ) throws java.lang.Exception { assertEquals ( ( "view.xml:16: Error: View requires API level 11 (current min is 1): <CalendarView>\n" + ( ( "view.xml:24: Error: ?android:attr/dividerHorizontal requires API level 11 (current min is 1)\n" + "view.xml:25: Error: ?android:attr/textColorLinkInverse requires API level 11 (current min is 1)\n" ) + "view.xml:9: Error: View requires API level 5 (current min is 1): <QuickContactBadge>" ) ) , lintProject ( "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/view.xml=>res/layout/view.xml" ) ) ; }

Target:
public void testViewClassLayoutReference ( ) throws java.lang.Exception { assertEquals ( ( "res/layout/view.xml:9: Error: View requires API level 5 (current min is 1): <QuickContactBadge> [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( ( " <view\n" + " ^\n" ) + "res/layout/view.xml:16: Error: View requires API level 11 (current min is 1): <CalendarView> [NewApi]\n" ) + " <view\n" ) + " ^\n" ) + "res/layout/view.xml:24: Error: ?android:attr/dividerHorizontal requires API level 11 (current min is 1) [NewApi]\n" ) + " unknown=\"?android:attr/dividerHorizontal\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/view.xml:25: Error: ?android:attr/textColorLinkInverse requires API level 11 (current min is 1) [NewApi]\n" ) + " android:textColor=\"?android:attr/textColorLinkInverse\" />\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "4 errors, 0 warnings\n" ) + "" ) ) , lintProject ( "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/view.xml=>res/layout/view.xml" ) ) ; }
Source:
private com.android.internal.telephony.RadioCapability makeStaticRadioCapability ( ) { int raf = android.telephony.RadioAccessFamily.RAF_UNKNOWN ; java.lang.String rafString = mContext.getResources ( ) . getString ( com.android.internal.R.string.config_radio_access_family ) ; if ( ( android.text.TextUtils.isEmpty ( rafString ) ) == false ) { raf = android.telephony.RadioAccessFamily.rafTypeFromString ( rafString ) ; } com.android.internal.telephony.RadioCapability rc = new com.android.internal.telephony.RadioCapability ( mInstanceId.intValue ( ) , 0 , 0 , raf , "" , com.android.internal.telephony.RadioCapability.RC_STATUS_SUCCESS ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( "Faking RIL_REQUEST_GET_RADIO_CAPABILITY response using " + raf ) ) ; return rc ; }

Target:
private com.android.internal.telephony.RadioCapability makeStaticRadioCapability ( ) { int raf = android.telephony.RadioAccessFamily.RAF_UNKNOWN ; java.lang.String rafString = mContext.getResources ( ) . getString ( com.android.internal.R.string.config_radio_access_family ) ; if ( ( android.text.TextUtils.isEmpty ( rafString ) ) == false ) { raf = android.telephony.RadioAccessFamily.rafTypeFromString ( rafString ) ; } com.android.internal.telephony.RadioCapability rc = new com.android.internal.telephony.RadioCapability ( mInstanceId.intValue ( ) , 0 , 0 , raf , "" , RadioCapability.RC_STATUS_SUCCESS ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( "Faking RIL_REQUEST_GET_RADIO_CAPABILITY response using " + raf ) ) ; return rc ; }
Source:
int getConnectionState ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getConnectionState: " + ( device.getAddress ( ) ) ) ) ; if ( ( mInputDevices.get ( device ) ) == null ) { return android.bluetooth.BluetoothInputDevice.STATE_DISCONNECTED ; } return mInputDevices.get ( device ) ; }

Target:
int getConnectionState ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "getConnectionState: " + ( device.getAddress ( ) ) ) ) ; if ( ( mInputDevices.get ( device ) ) == null ) { return android.bluetooth.BluetoothHidHost.STATE_DISCONNECTED ; } return mInputDevices.get ( device ) ; }
Source:
public synchronized void kill ( ) { if ( sendCommand ( com.android.ddmlib.EmulatorConsole.COMMAND_KILL ) ) { com.android.ddmlib.EmulatorConsole.RemoveConsole ( mPort ) ; } }

Target:
private synchronized boolean checkConnection ( ) { if ( ( mSocketChannel ) == null ) { java.net.InetSocketAddress socketAddr ; try { java.net.InetAddress hostAddr = java.net.InetAddress.getByName ( com.android.ddmlib.EmulatorConsole.HOST ) ; socketAddr = new java.net.InetSocketAddress ( hostAddr , mPort ) ; mSocketChannel = java.nio.channels.SocketChannel.open ( socketAddr ) ; mSocketChannel.configureBlocking ( false ) ; readLines ( ) ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.w ( com.android.ddmlib.EmulatorConsole.LOG_TAG , ( "Failed to start Emulator console for " + ( java.lang.Integer.toString ( mPort ) ) ) ) ; return false ; } } return ping ( ) ; }
Source:
private void removeScanFilters ( int clientIf ) { java.util.Deque < java.lang.Integer > filterIndices = mClientFilterIndexMap.remove ( clientIf ) ; if ( filterIndices != null ) { mFilterIndexStack.addAll ( filterIndices ) ; for ( java.lang.Integer filterIndex : filterIndices ) { resetCountDownLatch ( ) ; gattClientScanFilterParamDeleteNative ( clientIf , filterIndex ) ; waitForCallback ( ) ; } } removeFilterIfExisits ( mAllPassRegularClients , clientIf , com.android.bluetooth.gatt.ScanManager.ScanNative.ALL_PASS_FILTER_INDEX_REGULAR_SCAN ) ; removeFilterIfExisits ( mAllPassBatchClients , clientIf , com.android.bluetooth.gatt.ScanManager.ScanNative.ALL_PASS_FILTER_INDEX_BATCH_SCAN ) ; }

Target:
private void removeScanFilters ( int scannerId ) { java.util.Deque < java.lang.Integer > filterIndices = mClientFilterIndexMap.remove ( scannerId ) ; if ( filterIndices != null ) { mFilterIndexStack.addAll ( filterIndices ) ; for ( java.lang.Integer filterIndex : filterIndices ) { resetCountDownLatch ( ) ; gattClientScanFilterParamDeleteNative ( scannerId , filterIndex ) ; waitForCallback ( ) ; } } removeFilterIfExisits ( mAllPassRegularClients , scannerId , com.android.bluetooth.gatt.ScanManager.ScanNative.ALL_PASS_FILTER_INDEX_REGULAR_SCAN ) ; removeFilterIfExisits ( mAllPassBatchClients , scannerId , com.android.bluetooth.gatt.ScanManager.ScanNative.ALL_PASS_FILTER_INDEX_BATCH_SCAN ) ; }
Source:
private void addChildNode ( com.intellij.ui.CheckedTreeNode parentNode , com.google.gct.testing.dimension.CloudTestingType type , com.google.gct.testing.dimension.GoogleCloudTestingDimension dimension ) { com.intellij.ui.CheckedTreeNode newNode = new com.intellij.ui.CheckedTreeNode ( type ) ; parentNode.add ( newNode ) ; newNode.setChecked ( dimension.getEnabledTypes ( ) . contains ( type ) ) ; newNode.setEnabled ( dimension.isEditable ( ) ) ; }

Target:
private void addChildNode ( com.intellij.ui.CheckedTreeNode parentNode , com.google.gct.testing.dimension.CloudTestingType type , com.google.gct.testing.dimension.CloudConfigurationDimension dimension ) { com.intellij.ui.CheckedTreeNode newNode = new com.intellij.ui.CheckedTreeNode ( type ) ; parentNode.add ( newNode ) ; newNode.setChecked ( dimension.getEnabledTypes ( ) . contains ( type ) ) ; newNode.setEnabled ( dimension.isEditable ( ) ) ; }
Source:
public static int toUpperCase ( int codePoint ) { return java.lang.Character.toUpperCaseImpl ( codePoint ) ; }

Target:
public static int toUpperCase ( int codePoint ) { if ( ( codePoint >= 'a' ) && ( codePoint <= 'z' ) ) { return codePoint - ( 'a' - 'A' ) ; } if ( codePoint < 128 ) { return codePoint ; } return java.lang.Character.toUpperCaseImpl ( codePoint ) ; }
Source:
private void revertToNitzTimeZone ( ) { if ( ( Settings.Global.getInt ( mCr , Settings.Global.AUTO_TIME_ZONE , 0 ) ) == 0 ) { return ; } if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( ( "Reverting to NITZ TimeZone: tz='" + ( mSavedTimeZone ) ) ) ; if ( ( mSavedTimeZone ) != null ) { setAndBroadcastNetworkSetTimeZone ( mSavedTimeZone ) ; } }

Target:
public void registerForNetworkDetached ( android.os.Handler h , int what , java.lang.Object obj ) { android.os.Registrant r = new android.os.Registrant ( h , what , obj ) ; mNetworkDetachedRegistrants.add ( r ) ; if ( ( mSS.getVoiceRegState ( ) ) != ( android.telephony.ServiceState.STATE_IN_SERVICE ) ) { r.notifyRegistrant ( ) ; } }
Source:
private void handleTargetBSSIDEvent ( java.lang.String eventStr ) { java.lang.String BSSID = null ; java.util.regex.Matcher match = com.android.server.wifi.WifiMonitor.mTargetBSSIDPattern.matcher ( eventStr ) ; if ( match.find ( ) ) { BSSID = match.group ( 1 ) ; } else { android.util.Log.d ( com.android.server.wifi.WifiMonitor.TAG , ( "didn't find BSSID " + eventStr ) ) ; } mStateMachine.sendMessage ( WifiStateMachine.CMD_TARGET_BSSID , com.android.server.wifi.WifiMonitor.eventLogCounter , 0 , BSSID ) ; }

Target:
private void handleAssociatedBSSIDEvent ( java.lang.String eventStr ) { java.lang.String BSSID = null ; java.util.regex.Matcher match = com.android.server.wifi.WifiMonitor.mAssociatedPattern.matcher ( eventStr ) ; if ( match.find ( ) ) { BSSID = match.group ( 1 ) ; } mStateMachine.sendMessage ( WifiStateMachine.CMD_ASSOCIATED_BSSID , com.android.server.wifi.WifiMonitor.eventLogCounter , 0 , BSSID ) ; }
Source:
public void setFeatureValueReceived ( int value ) { if ( value != ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.FEATURE_DISABLED ) ) { if ( c == null ) { return ; } c.onChangeCapabilityConfigurationError ( cap.getCapability ( ) , cap.getRadioTech ( ) , com.android.internal.telephony.ims.CAPABILITY_ERROR_GENERIC ) ; } }

Target:
public void setFeatureValueReceived ( int value ) { if ( value != ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.FEATURE_DISABLED ) ) { if ( c == null ) { return ; } c.onChangeCapabilityConfigurationError ( cap.getCapability ( ) , cap.getRadioTech ( ) , com.android.internal.telephony.ims.CAPABILITY_ERROR_GENERIC ) ; } android.util.Log.i ( com.android.internal.telephony.ims.MmTelFeatureCompatAdapter.TAG , ( ( "changeEnabledCapabilities - setFeatureValueReceived" + " with value " ) + value ) ) ; }
Source:
private android.content.pm.ProviderInfo getProviderInfoLocked ( java.lang.String authority , int userHandle ) { android.content.pm.ProviderInfo pi = null ; com.android.server.am.ContentProviderRecord cpr = mProviderMap.getProviderByName ( authority , userHandle ) ; if ( cpr != null ) { pi = cpr.info ; } else { try { pi = android.app.AppGlobals.getPackageManager ( ) . resolveContentProvider ( authority , PackageManager.GET_URI_PERMISSION_PATTERNS , userHandle ) ; } catch ( android.os.RemoteException ex ) { } } return pi ; }

Target:
private android.content.pm.ProviderInfo getProviderInfoLocked ( java.lang.String authority , int userHandle , int pmFlags ) { android.content.pm.ProviderInfo pi = null ; com.android.server.am.ContentProviderRecord cpr = mProviderMap.getProviderByName ( authority , userHandle ) ; if ( cpr != null ) { pi = cpr.info ; } else { try { pi = android.app.AppGlobals.getPackageManager ( ) . resolveContentProvider ( authority , ( ( android.content.pm.PackageManager.GET_URI_PERMISSION_PATTERNS ) | pmFlags ) , userHandle ) ; } catch ( android.os.RemoteException ex ) { } } return pi ; }
Source:
private java.lang.String getExpectedResultFile ( java.lang.String test ) { int pos = test.lastIndexOf ( '.' ) ; if ( pos == ( - 1 ) ) return null ; java.lang.String shortName = test.substring ( 0 , pos ) ; return shortName + "-expected.txt" ; }

Target:
private java.lang.String getExpectedResultFile ( java.lang.String test ) { int pos = test.lastIndexOf ( '.' ) ; if ( pos == ( - 1 ) ) return null ; java.lang.String genericExpectedResult = ( test.substring ( 0 , pos ) ) + "-expected.txt" ; java.lang.String androidExpectedResultsDir = ( "platform/android-" + ( mJsEngine ) ) + "/" ; java.lang.String androidExpectedResult = genericExpectedResult.replaceFirst ( com.android.dumprendertree.LayoutTestsAutoTest.LAYOUT_TESTS_ROOT , ( ( com.android.dumprendertree.LayoutTestsAutoTest.LAYOUT_TESTS_ROOT ) + androidExpectedResultsDir ) ) ; java.io.File f = new java.io.File ( androidExpectedResult ) ; return f.exists ( ) ? androidExpectedResult : genericExpectedResult ; }
Source:
public void hold ( ) { if ( ( mState ) == ( CallState.ACTIVE ) ) { if ( ( mConnectionService ) != null ) { mConnectionService.hold ( this ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "hold call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_HOLD ) ; } }

Target:
public void hold ( java.lang.String reason ) { if ( ( mState ) == ( CallState.ACTIVE ) ) { if ( ( mConnectionService ) != null ) { mConnectionService.hold ( this ) ; } else { android.telecom.Log.e ( this , new java.lang.NullPointerException ( ) , "hold call failed due to null CS callId=%s" , getId ( ) ) ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_HOLD , reason ) ; } }
Source:
public static java.io.File getBuildTool ( @ com.android.annotations.NonNull com.android.sdklib.repository.FullRevision fullRevision , @ com.android.annotations.NonNull com.android.sdklib.BuildToolInfo.PathId pathId ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( com.android.build.gradle.integration.common.utils.SdkHelper.findSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( ( "Test requires build-tools " + ( fullRevision.toString ( ) ) ) ) ; } return new java.io.File ( buildToolInfo.getPath ( pathId ) ) ; }

Target:
public static java.io.File getAapt ( com.android.sdklib.repository.FullRevision fullRevision ) { com.android.utils.ILogger logger = new com.android.utils.StdLogger ( StdLogger.Level.VERBOSE ) ; com.android.sdklib.SdkManager sdkManager = com.android.sdklib.SdkManager.createManager ( com.android.build.gradle.integration.common.utils.SdkHelper.findSdkDir ( ) . getAbsolutePath ( ) , logger ) ; assert sdkManager != null ; com.android.sdklib.BuildToolInfo buildToolInfo = sdkManager.getBuildTool ( fullRevision ) ; if ( buildToolInfo == null ) { throw new java.lang.RuntimeException ( ( "Test requires build-tools " + ( fullRevision.toString ( ) ) ) ) ; } return new java.io.File ( buildToolInfo.getPath ( BuildToolInfo.PathId.AAPT ) ) ; }
Source:
public long getNetworkTotalBytes ( android.net.NetworkTemplate template , long start , long end ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_NETWORK_USAGE_HISTORY , com.android.server.net.NetworkStatsService.TAG ) ; assertBandwidthControlEnabled ( ) ; return internalGetSummaryForNetwork ( template , start , end , NetworkStatsAccess.Level.DEVICE ) . getTotalBytes ( ) ; }

Target:
public void forceUpdateIfaces ( android.net.Network [ ] defaultNetworks ) { mContext.enforceCallingOrSelfPermission ( android.Manifest.permission.READ_NETWORK_USAGE_HISTORY , com.android.server.net.NetworkStatsService.TAG ) ; assertBandwidthControlEnabled ( ) ; final long token = android.os.Binder.clearCallingIdentity ( ) ; try { updateIfaces ( defaultNetworks ) ; } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } }
Source:
public void testPolish ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "res/values-pl/plurals5.xml:3: Error: For locale \"pl\" (Polish) the following quantities should also be defined: many [MissingQuantity]\n" + " <plurals name=\"my_plural\">\n" ) + " ^\n" ) + "res/values-pl/plurals5.xml:3: Warning: For language \"pl\" (Polish) the following quantities are not relevant: zero [UnusedQuantity]\n" ) + " <plurals name=\"my_plural\">\n" ) + " ^\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "res/values/plurals5.xml=>res/values-pl/plurals5.xml" ) ) ; }

Target:
public void testPolish ( ) throws java.lang.Exception { mEnabled = com.google.common.collect.Sets.newHashSet ( PluralsDetector.MISSING , PluralsDetector.EXTRA ) ; assertEquals ( ( "" + ( ( ( ( ( ( "res/values-pl/plurals5.xml:3: Error: For locale \"pl\" (Polish) the following quantities should also be defined: many [MissingQuantity]\n" + " <plurals name=\"my_plural\">\n" ) + " ^\n" ) + "res/values-pl/plurals5.xml:3: Warning: For language \"pl\" (Polish) the following quantities are not relevant: zero [UnusedQuantity]\n" ) + " <plurals name=\"my_plural\">\n" ) + " ^\n" ) + "1 errors, 1 warnings\n" ) ) , lintProject ( "res/values/plurals5.xml=>res/values-pl/plurals5.xml" ) ) ; }
Source:
public final java.lang.invoke.MethodType accessModeType ( java.lang.invoke.VarHandle.AccessMode accessMode ) { unsupported ( ) ; return null ; }

Target:
public final java.lang.invoke.MethodType accessModeType ( java.lang.invoke.VarHandle.AccessMode accessMode ) { switch ( coordinateTypes.size ( ) ) { case 0 : return accessMode.at.accessModeType ( null , varType ) ; case 1 : return accessMode.at.accessModeType ( coordinateTypes.get ( 0 ) , varType ) ; case 2 : return accessMode.at.accessModeType ( coordinateTypes.get ( 0 ) , varType , coordinateTypes.get ( 1 ) ) ; default : throw new java.lang.InternalError ( ( "bad coordinateTypes: " + ( coordinateTypes ) ) ) ; } }
Source:
com.android.jack.ir.InternalCompilerException translateException ( org.eclipse.jdt.internal.compiler.ast.ASTNode node , java.lang.Throwable e ) { com.android.jack.ir.InternalCompilerException ice = translateException ( e ) ; if ( node != null ) { ice.addNode ( node.getClass ( ) . getName ( ) , node.toString ( ) , makeSourceInfo ( node ) ) ; } return ice ; }

Target:
com.android.jack.ir.JNodeInternalError translateException ( org.eclipse.jdt.internal.compiler.ast.ASTNode node , java.lang.Throwable e ) { com.android.jack.ir.JNodeInternalError ice = translateException ( e ) ; if ( node != null ) { ice.addNode ( node.getClass ( ) . getName ( ) , node.toString ( ) , makeSourceInfo ( node ) ) ; } return ice ; }
Source:
public void adjustStreamVolume ( int streamType , int direction , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.adjustMasterVolume ( direction , flags , getContext ( ) . getOpPackageName ( ) ) ; } else { service.adjustStreamVolume ( streamType , direction , flags , getContext ( ) . getOpPackageName ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustStreamVolume" , e ) ; } }

Target:
public void adjustStreamVolume ( int streamType , int direction , int flags ) { android.media.IAudioService service = android.media.AudioManager.getService ( ) ; try { if ( mUseMasterVolume ) { service.adjustMasterVolume ( direction , flags , mApplicationContext.getOpPackageName ( ) ) ; } else { service.adjustStreamVolume ( streamType , direction , flags , mApplicationContext.getOpPackageName ( ) ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.media.AudioManager.TAG , "Dead object in adjustStreamVolume" , e ) ; } }
Source:
public synchronized com.android.ide.common.rendering.LayoutLibrary getLayoutLibrary ( ) { if ( ( ( mLayoutBridgeInit ) == false ) && ( ( mLayoutLibrary.getStatus ( ) ) == ( com.android.ide.common.sdk.LoadStatus.LOADED ) ) ) { mLayoutLibrary.init ( new java.io.File ( mTarget.getPath ( IAndroidTarget.FONTS ) ) , getEnumValueMap ( ) ) ; mLayoutBridgeInit = true ; } return mLayoutLibrary ; }

Target:
public void error ( java.lang.String tag , java.lang.Throwable throwable ) { com.android.ide.eclipse.adt.AdtPlugin.log ( throwable , null ) ; }
Source:
native void rsnAllocationData1D ( long con , long id , int off , int mip , int count , float [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID ) ; }
Source:
public void setLockPattern ( java.lang.String pattern , int userId ) throws android.os.RemoteException { checkWritePermission ( userId ) ; maybeUpdateKeystore ( pattern , userId ) ; final byte [ ] hash = com.android.internal.widget.LockPatternUtils.patternToHash ( com.android.internal.widget.LockPatternUtils.stringToPattern ( pattern ) ) ; mStorage.writePatternHash ( hash , userId ) ; }

Target:
public void setLockPattern ( java.lang.String pattern , int userId ) throws android.os.RemoteException { checkWritePermission ( userId ) ; setKeystorePassword ( pattern , userId ) ; final byte [ ] hash = com.android.internal.widget.LockPatternUtils.patternToHash ( com.android.internal.widget.LockPatternUtils.stringToPattern ( pattern ) ) ; mStorage.writePatternHash ( hash , userId ) ; }
Source:
private void reinitialize ( ) { android.telecom.CallAudioState initState = getInitialAudioState ( ) ; mDeviceSupportedRoutes = initState.getSupportedRouteMask ( ) ; mAvailableRoutes = ( mDeviceSupportedRoutes ) & ( getCurrentCallSupportedRoutes ( ) ) ; mIsMuted = initState.isMuted ( ) ; setMuteOn ( mIsMuted ) ; mWasOnSpeaker = false ; mHasUserExplicitlyLeftBluetooth = false ; mLastKnownCallAudioState = initState ; transitionTo ( mRouteCodeToQuiescentState.get ( initState.getRoute ( ) ) ) ; }

Target:
private void reinitialize ( ) { android.telecom.CallAudioState initState = getInitialAudioState ( ) ; mDeviceSupportedRoutes = initState.getSupportedRouteMask ( ) ; mAvailableRoutes = ( mDeviceSupportedRoutes ) & ( getCurrentCallSupportedRoutes ( ) ) ; mIsMuted = initState.isMuted ( ) ; setSpeakerphoneOn ( ( ( initState.getRoute ( ) ) == ( android.telecom.CallAudioState.ROUTE_SPEAKER ) ) ) ; setMuteOn ( mIsMuted ) ; mWasOnSpeaker = false ; mHasUserExplicitlyLeftBluetooth = false ; mLastKnownCallAudioState = initState ; transitionTo ( mRouteCodeToQuiescentState.get ( initState.getRoute ( ) ) ) ; }
Source:
protected java.util.Properties createExpectedProps ( ) { java.util.Properties props = new java.util.Properties ( ) ; props.setProperty ( PkgProps.PKG_REVISION , "42" ) ; props.setProperty ( PkgProps.PKG_LICENSE , "The License" ) ; props.setProperty ( PkgProps.PKG_DESC , "Some description." ) ; props.setProperty ( PkgProps.PKG_DESC_URL , "http://description/url" ) ; props.setProperty ( PkgProps.PKG_LIST_DISPLAY , "Some description." ) ; props.setProperty ( PkgProps.PKG_RELEASE_NOTE , "Release Note" ) ; props.setProperty ( PkgProps.PKG_RELEASE_URL , "http://release/note" ) ; props.setProperty ( PkgProps.PKG_SOURCE_URL , "http://source/url" ) ; props.setProperty ( PkgProps.PKG_OBSOLETE , "true" ) ; return props ; }

Target:
public static java.util.Properties createDefaultProps ( ) { java.util.Properties props = new java.util.Properties ( ) ; props.setProperty ( PkgProps.PKG_REVISION , "42" ) ; props.setProperty ( PkgProps.PKG_LICENSE , "The License" ) ; props.setProperty ( PkgProps.PKG_DESC , "Some description." ) ; props.setProperty ( PkgProps.PKG_DESC_URL , "http://description/url" ) ; props.setProperty ( PkgProps.PKG_LIST_DISPLAY , "Some description." ) ; props.setProperty ( PkgProps.PKG_RELEASE_NOTE , "Release Note" ) ; props.setProperty ( PkgProps.PKG_RELEASE_URL , "http://release/note" ) ; props.setProperty ( PkgProps.PKG_SOURCE_URL , "http://source/url" ) ; props.setProperty ( PkgProps.PKG_OBSOLETE , "true" ) ; return props ; }
Source:
public com.android.sched.vfs.VPath appendPath ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) { pathFragments.add ( new com.android.sched.vfs.VPath.VPathFragment ( java.lang.String.valueOf ( com.android.sched.vfs.VPath.INTERNAL_SEPARATOR ) , com.android.sched.vfs.VPath.INTERNAL_SEPARATOR ) ) ; pathFragments.addAll ( path.getPathFragments ( ) ) ; return this ; }

Target:
public com.android.sched.vfs.VPath appendPath ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) { if ( ! ( this . equals ( com.android.sched.vfs.VPath.ROOT ) ) ) { pathFragments.add ( new com.android.sched.vfs.VPath.VPathFragment ( java.lang.String.valueOf ( com.android.sched.vfs.VPath.INTERNAL_SEPARATOR ) , com.android.sched.vfs.VPath.INTERNAL_SEPARATOR ) ) ; } pathFragments.addAll ( path.getPathFragments ( ) ) ; return this ; }
Source:
protected void apply ( org.eclipse.jface.text.IDocument document , org.eclipse.wst.sse.core.internal.provisional.IStructuredModel model , org.w3c.dom.Node node , int start , int end ) { java.lang.String prefix = com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode.lookupNamespacePrefix ( node , com.android.ide.common.layout.LayoutConstants.ANDROID_URI ) ; try { document.replace ( start , 0 , ( prefix + ':' ) ) ; } catch ( org.eclipse.jface.text.BadLocationException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , null ) ; } }

Target:
protected void apply ( org.eclipse.jface.text.IDocument document , org.eclipse.wst.sse.core.internal.provisional.IStructuredModel model , org.w3c.dom.Node node , int start , int end ) { java.lang.String prefix = com.android.util.XmlUtils.lookupNamespacePrefix ( node , com.android.util.XmlUtils.ANDROID_URI ) ; try { document.replace ( start , 0 , ( prefix + ':' ) ) ; } catch ( org.eclipse.jface.text.BadLocationException e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , null ) ; } }
Source:
private static int translateState ( int state ) { switch ( state ) { case android.telecom.Call.STATE_NEW : case android.telecom.Call.STATE_CONNECTING : return com.android.incallui.call.DialerCall.State.CONNECTING ; case android.telecom.Call.STATE_SELECT_PHONE_ACCOUNT : return com.android.incallui.call.DialerCall.State.SELECT_PHONE_ACCOUNT ; case android.telecom.Call.STATE_DIALING : return com.android.incallui.call.DialerCall.State.DIALING ; case android.telecom.Call.STATE_PULLING_CALL : return com.android.incallui.call.DialerCall.State.PULLING ; case android.telecom.Call.STATE_RINGING : return com.android.incallui.call.DialerCall.State.INCOMING ; case android.telecom.Call.STATE_ACTIVE : return com.android.incallui.call.DialerCall.State.ACTIVE ; case android.telecom.Call.STATE_HOLDING : return com.android.incallui.call.DialerCall.State.ONHOLD ; case android.telecom.Call.STATE_DISCONNECTED : return com.android.incallui.call.DialerCall.State.DISCONNECTED ; case android.telecom.Call.STATE_DISCONNECTING : return com.android.incallui.call.DialerCall.State.DISCONNECTING ; default : return com.android.incallui.call.DialerCall.State.INVALID ; } }

Target:
private static int translateState ( int state ) { switch ( state ) { case android.telecom.Call.STATE_NEW : case android.telecom.Call.STATE_CONNECTING : return com.android.incallui.call.state.DialerCallState.CONNECTING ; case android.telecom.Call.STATE_SELECT_PHONE_ACCOUNT : return com.android.incallui.call.state.DialerCallState.SELECT_PHONE_ACCOUNT ; case android.telecom.Call.STATE_DIALING : return com.android.incallui.call.state.DialerCallState.DIALING ; case android.telecom.Call.STATE_PULLING_CALL : return com.android.incallui.call.state.DialerCallState.PULLING ; case android.telecom.Call.STATE_RINGING : return com.android.incallui.call.state.DialerCallState.INCOMING ; case android.telecom.Call.STATE_ACTIVE : return com.android.incallui.call.state.DialerCallState.ACTIVE ; case android.telecom.Call.STATE_HOLDING : return com.android.incallui.call.state.DialerCallState.ONHOLD ; case android.telecom.Call.STATE_DISCONNECTED : return com.android.incallui.call.state.DialerCallState.DISCONNECTED ; case android.telecom.Call.STATE_DISCONNECTING : return com.android.incallui.call.state.DialerCallState.DISCONNECTING ; default : return com.android.incallui.call.state.DialerCallState.INVALID ; } }
Source:
public com.android.builder.VariantConfiguration setDependencies ( @ com.android.annotations.NonNull java.util.List < ? extends com.android.builder.dependency.DependencyContainer > containers ) { for ( com.android.builder.dependency.DependencyContainer container : containers ) { mDirectLibraries.addAll ( container.getAndroidDependencies ( ) ) ; mJars.addAll ( container.getJarDependencies ( ) ) ; mJars.addAll ( container.getLocalDependencies ( ) ) ; } resolveIndirectLibraryDependencies ( mDirectLibraries , mFlatLibraries ) ; for ( com.android.builder.dependency.AndroidDependency androidDependency : mFlatLibraries ) { mJars.addAll ( androidDependency.getLocalDependencies ( ) ) ; } return this ; }

Target:
public com.android.builder.VariantConfiguration setDependencies ( @ com.android.annotations.NonNull java.util.List < ? extends com.android.builder.dependency.DependencyContainer > containers ) { for ( com.android.builder.dependency.DependencyContainer container : containers ) { mDirectLibraries.addAll ( container.getAndroidDependencies ( ) ) ; mJars.addAll ( container.getJarDependencies ( ) ) ; mJars.addAll ( container.getLocalDependencies ( ) ) ; } resolveIndirectLibraryDependencies ( mDirectLibraries , mFlatLibraries ) ; for ( com.android.builder.dependency.LibraryDependency libraryDependency : mFlatLibraries ) { mJars.addAll ( libraryDependency.getLocalDependencies ( ) ) ; } return this ; }
Source:
protected void onRestoreInstanceState ( android.os.Parcelable state ) { final com.android.internal.widget.LockPatternView.SavedState ss = ( ( com.android.internal.widget.LockPatternView.SavedState ) ( state ) ) ; super . onRestoreInstanceState ( ss.getSuperState ( ) ) ; setPattern ( com.android.internal.widget.LockPatternView.DisplayMode.Correct , com.android.internal.widget.LockPatternUtils.stringToPattern ( ss.getSerializedPattern ( ) ) ) ; mPatternDisplayMode = com.android.internal.widget.LockPatternView.DisplayMode.values ( ) [ ss.getDisplayMode ( ) ] ; mInputEnabled = ss.isInputEnabled ( ) ; mInStealthMode = ss.isInStealthMode ( ) ; }

Target:
protected void onRestoreInstanceState ( android.os.Parcelable state ) { final com.android.internal.widget.LockPatternView.SavedState ss = ( ( com.android.internal.widget.LockPatternView.SavedState ) ( state ) ) ; super . onRestoreInstanceState ( ss.getSuperState ( ) ) ; setPattern ( com.android.internal.widget.LockPatternView.DisplayMode.Correct , com.android.internal.widget.LockPatternUtils.stringToPattern ( ss.getSerializedPattern ( ) ) ) ; mPatternDisplayMode = com.android.internal.widget.LockPatternView.DisplayMode.values ( ) [ ss.getDisplayMode ( ) ] ; mInputEnabled = ss.isInputEnabled ( ) ; mInStealthMode = ss.isInStealthMode ( ) ; mTactileFeedbackEnabled = ss.isTactileFeedbackEnabled ( ) ; }
Source:
public final org.jf.dexlib2.iface.reference.FieldReference enum_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.FieldReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableFieldReference fully_qualified_field210 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_ENUM , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_ENUM_in_enum_literal3615 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_fully_qualified_field_in_enum_literal3617 ) ; fully_qualified_field210 = fully_qualified_field ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = fully_qualified_field210 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final org.jf.dexlib2.iface.reference.MethodReference method_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.MethodReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableMethodReference method_reference209 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_METHOD , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_METHOD_in_method_literal3594 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_method_reference_in_method_literal3596 ) ; method_reference209 = method_reference ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = method_reference209 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod x ) { return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JLambda lambda ) { com.android.jack.ir.ast.JDefinedInterface type = lambda.getType ( ) ; accept ( type ) ; com.android.jack.frontend.VirtualMethodsMarker vmm = type.getMarker ( com.android.jack.frontend.VirtualMethodsMarker.class ) ; assert vmm != null ; addId ( vmm , lambda.getMethod ( ) . getMethodId ( ) ) ; accept ( lambda.getBody ( ) ) ; return super . visit ( lambda ) ; }
Source:
public void actionPerformed ( java.awt.event.ActionEvent e ) { reloadInstanceFilters ( ) ; com.intellij.debugger.ui.breakpoints.EditInstanceFiltersDialog _dialog = new com.intellij.debugger.ui.breakpoints.EditInstanceFiltersDialog ( myProject ) ; _dialog.setFilters ( myInstanceFilters ) ; _dialog.show ( ) ; if ( ( _dialog.getExitCode ( ) ) == ( com.intellij.openapi.ui.DialogWrapper.OK_EXIT_CODE ) ) { myInstanceFilters = _dialog.getFilters ( ) ; updateInstanceFilterEditor ( true ) ; } }

Target:
public void actionPerformed ( java.awt.event.ActionEvent e ) { reloadClassFilters ( ) ; com.intellij.ide.util.ClassFilter classFilter = createClassConditionFilter ( ) ; com.intellij.debugger.ui.breakpoints.EditClassFiltersDialog _dialog = new com.intellij.debugger.ui.breakpoints.EditClassFiltersDialog ( myProject , classFilter ) ; _dialog.setFilters ( myClassFilters , myClassExclusionFilters ) ; _dialog.show ( ) ; if ( ( _dialog.getExitCode ( ) ) == ( com.intellij.openapi.ui.DialogWrapper.OK_EXIT_CODE ) ) { myClassFilters = _dialog.getFilters ( ) ; myClassExclusionFilters = _dialog.getExclusionFilters ( ) ; updateClassFilterEditor ( true ) ; } }
Source:
public void testContextMenuCustom ( ) { com.android.ide.common.layout.LinearLayoutRule rule = new com.android.ide.common.layout.LinearLayoutRule ( ) ; initialize ( rule , "android.widget.LinearLayout" ) ; com.android.ide.common.api.INode node = com.android.ide.common.layout.TestNode.create ( "android.widget.Button" ) . id ( "@+id/Button012" ) . set ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , "42dip" ) . set ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , "50sp" ) ; java.util.List < com.android.ide.common.api.MenuAction > contextMenu = rule.getContextMenu ( node ) ; assertEquals ( 4 , contextMenu.size ( ) ) ; assertEquals ( "Layout Width" , contextMenu.get ( 0 ) . getTitle ( ) ) ; com.android.ide.common.api.MenuAction menuAction = contextMenu.get ( 0 ) ; assertTrue ( ( menuAction instanceof com.android.ide.common.api.MenuAction.Choices ) ) ; com.android.ide.common.api.MenuAction.Choices choices = ( ( com.android.ide.common.api.MenuAction.Choices ) ( menuAction ) ) ; java.util.Map < java.lang.String , java.lang.String > items = choices.getChoices ( ) ; assertTrue ( items.containsKey ( "42dip" ) ) ; assertTrue ( items.containsValue ( "42dip" ) ) ; assertEquals ( "Other..." , items.get ( "zcustom" ) ) ; assertEquals ( "Match Parent" , items.get ( "match_parent" ) ) ; assertEquals ( "42dip" , choices.getCurrent ( ) ) ; }

Target:
public void testContextMenu ( ) { com.android.ide.common.layout.LinearLayoutRule rule = new com.android.ide.common.layout.LinearLayoutRule ( ) ; initialize ( rule , "android.widget.LinearLayout" ) ; com.android.ide.common.api.INode node = com.android.ide.common.layout.TestNode.create ( "android.widget.Button" ) . id ( "@+id/Button012" ) ; java.util.List < com.android.ide.common.api.MenuAction > contextMenu = rule.getContextMenu ( node ) ; assertEquals ( 6 , contextMenu.size ( ) ) ; assertNull ( contextMenu.get ( 0 ) ) ; assertEquals ( "Edit ID..." , contextMenu.get ( 1 ) . getTitle ( ) ) ; assertEquals ( "Layout Width" , contextMenu.get ( 2 ) . getTitle ( ) ) ; assertEquals ( "Layout Height" , contextMenu.get ( 3 ) . getTitle ( ) ) ; assertEquals ( "Properties" , contextMenu.get ( 4 ) . getTitle ( ) ) ; assertEquals ( "Orientation" , contextMenu.get ( 5 ) . getTitle ( ) ) ; com.android.ide.common.api.MenuAction propertiesMenu = contextMenu.get ( 4 ) ; assertTrue ( propertiesMenu.getClass ( ) . getName ( ) , ( propertiesMenu instanceof com.android.ide.common.api.MenuAction.Group ) ) ; }