auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testSerializationCompatibility_SimpleImmutableEntry ( ) throws java.lang.Exception { java.util.AbstractMap.SimpleImmutableEntry e = new java.util.AbstractMap.SimpleImmutableEntry < java.lang.Integer , java.lang.String > ( 1 , "test" ) ; if ( ! ( ( tests.util.SerializationTester.readObject ( e , "serialization/java/util/AbstractMapTest_SimpleImmutableEntry.golden.ser" ) ) instanceof java.util.AbstractMap.SimpleImmutableEntry ) ) { fail ( "should be SimpleImmutableEntry" ) ; } tests.util.SerializationTester.assertCompabilityEquals ( e , "serialization/java/util/AbstractMapTest_SimpleImmutableEntry.golden.ser" ) ; }

Target:
public void testSerializationCompatibility_SimpleImmutableEntry ( ) throws java.lang.Exception { java.util.AbstractMap.SimpleImmutableEntry e = new java.util.AbstractMap.SimpleImmutableEntry < java.lang.Integer , java.lang.String > ( 1 , "test" ) ; if ( ! ( ( tests.util.SerializationTester.readObject ( e , "serialization/tests/api/java/util/AbstractMapTest_SimpleImmutableEntry.golden.ser" ) ) instanceof java.util.AbstractMap.SimpleImmutableEntry ) ) { fail ( "should be SimpleImmutableEntry" ) ; } tests.util.SerializationTester.assertCompabilityEquals ( e , "serialization/tests/api/java/util/AbstractMapTest_SimpleImmutableEntry.golden.ser" ) ; }
Source:
public void test6_findFirst2 ( ) { for ( int i = 0 ; i < 32 ; i ++ ) { int value = 1 << i ; value |= value > > > 1 ; assertEquals ( com.android.dx.util._tests.BitsTest.label ( i ) , i , com.android.dx.util.Bits.findFirst ( value , i ) ) ; } }

Target:
public void test6_findFirst2 ( ) { for ( int i = 0 ; i < 32 ; i ++ ) { int value = 1 << i ; value |= value > > > 1 ; assertEquals ( com.android.dx.util.BitsTest.label ( i ) , i , com.android.dx.util.Bits.findFirst ( value , i ) ) ; } }
Source:
void makeWindowFreezingScreenIfNeededLocked ( com.android.server.wm.WindowState w ) { if ( ! ( okToDisplay ( ) ) ) { if ( com.android.server.wm.WindowManagerService.DEBUG_ORIENTATION ) android.util.Slog.v ( com.android.server.wm.WindowManagerService.TAG , ( "Changing surface while display frozen: " + w ) ) ; w.mOrientationChanging = true ; w.mLastFreezeDuration = 0 ; mInnerFields.mOrientationChangeComplete = false ; if ( ! ( mWindowsFreezingScreen ) ) { mWindowsFreezingScreen = true ; mH.removeMessages ( com.android.server.wm.WindowManagerService.H.WINDOW_FREEZE_TIMEOUT ) ; mH.sendEmptyMessageDelayed ( com.android.server.wm.WindowManagerService.H.WINDOW_FREEZE_TIMEOUT , com.android.server.wm.WindowManagerService.WINDOW_FREEZE_TIMEOUT_DURATION ) ; } } }

Target:
void makeWindowFreezingScreenIfNeededLocked ( com.android.server.wm.WindowState w ) { if ( ! ( okToDisplay ( ) ) ) { if ( com.android.server.wm.WindowManagerService.DEBUG_ORIENTATION ) android.util.Slog.v ( com.android.server.wm.WindowManagerService.TAG , ( "Changing surface while display frozen: " + w ) ) ; w.mOrientationChanging = true ; w.mLastFreezeDuration = 0 ; mInnerFields.mOrientationChangeComplete = false ; if ( ( mWindowsFreezingScreen ) == ( com.android.server.wm.WindowManagerService.WINDOWS_FREEZING_SCREENS_NONE ) ) { mWindowsFreezingScreen = com.android.server.wm.WindowManagerService.WINDOWS_FREEZING_SCREENS_ACTIVE ; mH.removeMessages ( com.android.server.wm.WindowManagerService.H.WINDOW_FREEZE_TIMEOUT ) ; mH.sendEmptyMessageDelayed ( com.android.server.wm.WindowManagerService.H.WINDOW_FREEZE_TIMEOUT , com.android.server.wm.WindowManagerService.WINDOW_FREEZE_TIMEOUT_DURATION ) ; } } }
Source:
public void run ( java.util.Collection < com.android.ddmlib.testrunner.ITestRunListener > listeners ) throws com.android.ddmlib.TimeoutException , java.io.IOException { final java.lang.String runCaseCommandStr = java.lang.String.format ( "am instrument -w -r %s %s" , getArgsCommand ( ) , getRunnerPath ( ) ) ; com.android.ddmlib.Log.i ( com.android.ddmlib.testrunner.RemoteAndroidTestRunner.LOG_TAG , java.lang.String.format ( "Running %s on %s" , runCaseCommandStr , mRemoteDevice.getSerialNumber ( ) ) ) ; mParser = new com.android.ddmlib.testrunner.InstrumentationResultParser ( listeners ) ; mRemoteDevice.executeShellCommand ( runCaseCommandStr , mParser ) ; }

Target:
public void run ( java.util.Collection < com.android.ddmlib.testrunner.ITestRunListener > listeners ) throws com.android.ddmlib.TimeoutException , java.io.IOException { final java.lang.String runCaseCommandStr = java.lang.String.format ( "am instrument -w -r %s %s" , getArgsCommand ( ) , getRunnerPath ( ) ) ; com.android.ddmlib.Log.i ( com.android.ddmlib.testrunner.RemoteAndroidTestRunner.LOG_TAG , java.lang.String.format ( "Running %s on %s" , runCaseCommandStr , mRemoteDevice.getSerialNumber ( ) ) ) ; mParser = new com.android.ddmlib.testrunner.InstrumentationResultParser ( listeners ) ; mRemoteDevice.executeShellCommand ( runCaseCommandStr , mParser , mAdbTimeout ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JArrayRef x ) { com.android.jack.ir.ast.JExpression instance = x.getInstance ( ) ; parenPush ( x , instance ) ; accept ( instance ) ; parenPop ( x , instance ) ; print ( '[' ) ; accept ( x.getIndexExpr ( ) ) ; print ( ']' ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClass x ) { printTypeFlags ( x ) ; print ( com.android.jack.ir.impl.CHARS_CLASS ) ; printTypeName ( x ) ; return false ; }
Source:
public static void initialize ( com.android.utils.ILogger logger , java.io.File out ) throws java.io.IOException { synchronized ( com.android.builder.profile.ProcessRecorderFactory.LOCK ) { if ( ( com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.isInitialized ( ) ) || ( ! ( com.android.builder.profile.ProcessRecorderFactory.isEnabled ( ) ) ) ) { return ; } com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setLogger ( logger ) ; com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setOutputFile ( out ) ; com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setRecordWriter ( new com.android.builder.profile.ProcessRecorder.JsonRecordWriter ( new java.io.FileWriter ( out ) ) ) ; com.android.builder.profile.ProcessRecorderFactory.publishInitialRecords ( ) ; } }

Target:
public static void initialize ( @ com.android.annotations.NonNull com.android.utils.ILogger logger , @ com.android.annotations.NonNull java.io.File out , @ com.android.annotations.NonNull java.util.List < com.android.builder.profile.Recorder.Property > properties ) throws java.io.IOException { synchronized ( com.android.builder.profile.ProcessRecorderFactory.LOCK ) { if ( ( com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.isInitialized ( ) ) || ( ! ( com.android.builder.profile.ProcessRecorderFactory.isEnabled ( ) ) ) ) { return ; } com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setLogger ( logger ) ; com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setOutputFile ( out ) ; com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setRecordWriter ( new com.android.builder.profile.ProcessRecorder.JsonRecordWriter ( new java.io.FileWriter ( out ) ) ) ; com.android.builder.profile.ProcessRecorderFactory.publishInitialRecords ( properties ) ; } }
Source:
public boolean disconnect ( ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , "disconnect()" ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.disconnect ( ) ; }

Target:
public boolean unplug ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.BluetoothHidDeviceBinder.TAG , ( "unplug(): device=" + device ) ) ; com.android.bluetooth.hid.HidDevService service = getService ( ) ; if ( service == null ) { return false ; } return service.unplug ( device ) ; }
Source:
private void reportConnectionAttemptEnd ( int level2FailureCode , int connectivityFailureCode ) { mWifiMetrics.endConnectionEvent ( level2FailureCode , connectivityFailureCode ) ; switch ( level2FailureCode ) { case WifiMetrics.ConnectionEvent.FAILURE_NONE : mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED ) ; break ; case WifiMetrics.ConnectionEvent.FAILURE_REDUNDANT_CONNECTION_ATTEMPT : case WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED : break ; default : mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; } }

Target:
private void reportConnectionAttemptEnd ( int level2FailureCode , int connectivityFailureCode ) { mWifiMetrics.endConnectionEvent ( level2FailureCode , connectivityFailureCode ) ; switch ( level2FailureCode ) { case WifiMetrics.ConnectionEvent.FAILURE_NONE : mWifiDiagnostics.reportConnectionEvent ( mDiagsConnectionStartMillis , WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED ) ; break ; case WifiMetrics.ConnectionEvent.FAILURE_REDUNDANT_CONNECTION_ATTEMPT : case WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED : break ; default : mWifiDiagnostics.reportConnectionEvent ( mDiagsConnectionStartMillis , WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; } mDiagsConnectionStartMillis = - 1 ; }
Source:
public void test_zh_CN ( ) throws java.lang.Exception { libcore.icu.ImmutableIndex zh_CN = libcore.icu.AlphabeticIndexTest.createIndex ( new java.util.Locale ( "zh" , "CN" ) ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "贾" , "J" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "沈" , "C" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "瀋" , "S" ) ; }

Target:
public void test_zh_CN ( ) throws java.lang.Exception { libcore.icu.AlphabeticIndex.ImmutableIndex zh_CN = libcore.icu.AlphabeticIndexTest.createIndex ( new java.util.Locale ( "zh" , "CN" ) ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "贾" , "J" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "沈" , "C" ) ; libcore.icu.AlphabeticIndexTest.assertHasLabel ( zh_CN , "瀋" , "S" ) ; }
Source:
static android.renderscript.cts.CoreMathVerifier.RemainderAndQuotient remainderAndQuotient ( float numerator , float denominator ) { android.renderscript.cts.CoreMathVerifier.RemainderAndQuotient result = new android.renderscript.cts.CoreMathVerifier.RemainderAndQuotient ( ) ; if ( denominator == 0.0F ) { result.quotient = 0 ; result.remainder = java.lang.Float.NaN ; } else { result.quotient = ( ( int ) ( java.lang.StrictMath.round ( ( numerator / denominator ) ) ) ) ; result.remainder = numerator - ( ( result.quotient ) * denominator ) ; } return result ; }

Target:
public static void computeRemquo ( android.renderscript.cts.TestRemquo.ArgumentsFloatFloatIntFloat args ) { android.renderscript.cts.CoreMathVerifier.RemquoResult result = android.renderscript.cts.CoreMathVerifier.remquo ( args.inB , args.inC ) ; args.out = new android.renderscript.cts.Floaty ( result.remainder , 0 , 0 ) ; args.outD = result.quotient ; }
Source:
private static void checkSelectorPresence ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement element ) { org.w3c.dom.Attr selectorAttribute = element.getXml ( ) . getAttributeNodeNS ( SdkConstants.TOOLS_URI , Selector.SELECTOR_LOCAL_NAME ) ; if ( ( selectorAttribute != null ) && ( ! ( element.getOperationType ( ) . isSelectable ( ) ) ) ) { java.lang.String message = java.lang.String.format ( "Unsupported tools:selector=\"%1$s\" found on node %2$s at %3$s" , selectorAttribute.getValue ( ) , element.getId ( ) , element.printPosition ( ) ) ; mergingReport.addError ( message ) ; } }

Target:
private static void checkSelectorPresence ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement element ) { org.w3c.dom.Attr selectorAttribute = element.getXml ( ) . getAttributeNodeNS ( SdkConstants.TOOLS_URI , Selector.SELECTOR_LOCAL_NAME ) ; if ( ( selectorAttribute != null ) && ( ! ( element.getOperationType ( ) . isSelectable ( ) ) ) ) { java.lang.String message = java.lang.String.format ( "Unsupported tools:selector=\"%1$s\" found on node %2$s at %3$s" , selectorAttribute.getValue ( ) , element.getId ( ) , element.printPosition ( ) ) ; element.addMessage ( mergingReport , com.android.manifmerger.ERROR , message ) ; } }
Source:
public void testResetBatteryLevel_testResetBeforeUpdate ( ) { com.android.bluetooth.btservice.RemoteDevices remoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; remoteDevices.resetBatteryLevel ( mDevice1 ) ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void testUpdateBatteryLevel_errorTooLargeValue ( ) { int batteryLevel = 101 ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.updateBatteryLevel ( mDevice1 , batteryLevel ) ; org.mockito.Mockito.verify ( mAdapterService , org.mockito.Mockito.never ( ) ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }
Source:
public boolean enableDataConnectivity ( ) { enforceModifyPermission ( ) ; int subId = mSubscriptionController.getDefaultDataSubId ( ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { phone.setDataEnabled ( true ) ; return true ; } else { return false ; } }

Target:
public boolean enableDataConnectivity ( ) { enforceModifyPermission ( ) ; int subId = mSubscriptionController.getDefaultDataSubId ( ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { phone.setUserDataEnabled ( true ) ; return true ; } else { return false ; } }
Source:
public boolean onPreferenceTreeClick ( android.preference.PreferenceScreen preferenceScreen , android.preference.Preference preference ) { if ( preference.getKey ( ) . equals ( com.android.phone.CdmaOptions.BUTTON_CDMA_ROAMING_KEY ) ) { return true ; } return false ; }

Target:
public void showDialog ( android.preference.Preference preference ) { if ( preference.getKey ( ) . equals ( com.android.phone.CdmaOptions.BUTTON_CDMA_SYSTEM_SELECT_KEY ) ) { mButtonCdmaSystemSelect.showDialog ( null ) ; } else if ( preference.getKey ( ) . equals ( com.android.phone.CdmaOptions.BUTTON_CDMA_SUBSCRIPTION_KEY ) ) { mButtonCdmaSubscription.showDialog ( null ) ; } }
Source:
public java.util.Iterator < V > iterator ( ) { final java.util.Iterator < java.util.Map.Entry < K , V > > entryIterator = entrySet ( ) . iterator ( ) ; return new com.google.common.collect.UnmodifiableIterator < V > ( ) { @ java.lang.Override public boolean hasNext ( ) { return entryIterator.hasNext ( ) ; } @ java.lang.Override public V next ( ) { return entryIterator.next ( ) . getValue ( ) ; } } ; }

Target:
static < K , V > com.google.common.collect.UnmodifiableIterator < V > valueIterator ( final com.google.common.collect.UnmodifiableIterator < java.util.Map.Entry < K , V > > entryIterator ) { return new com.google.common.collect.UnmodifiableIterator < V > ( ) { @ java.lang.Override public boolean hasNext ( ) { return entryIterator.hasNext ( ) ; } @ java.lang.Override public V next ( ) { return entryIterator.next ( ) . getValue ( ) ; } } ; }
Source:
public void removeAuthority ( android.accounts.Account account , java.lang.String authority ) { synchronized ( mAuthorities ) { removeAuthorityLocked ( account , authority , true ) ; } }

Target:
public void setMasterSyncAutomatically ( boolean flag , int userId ) { synchronized ( mAuthorities ) { java.lang.Boolean auto = mMasterSyncAutomatically.get ( userId ) ; if ( ( auto != null ) && ( ( ( boolean ) ( auto ) ) == flag ) ) { return ; } mMasterSyncAutomatically.put ( userId , flag ) ; writeAccountInfoLocked ( ) ; } if ( flag ) { requestSync ( null , userId , null , new android.os.Bundle ( ) ) ; } reportChange ( ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS ) ; mContext.sendBroadcast ( android.content.SyncStorageEngine.SYNC_CONNECTION_SETTING_CHANGED_INTENT ) ; }
Source:
private void setUncryptProgress ( final int progress ) { mHandler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( ( mProgressDialog ) != null ) { mProgressDialog.setProgress ( progress ) ; } } } ) ; }

Target:
private void setRebootProgress ( final int progress , final java.lang.CharSequence message ) { mHandler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { if ( ( mProgressDialog ) != null ) { mProgressDialog.setProgress ( progress ) ; if ( message != null ) { mProgressDialog.setMessage ( message ) ; } } } } ) ; }
Source:
public int interceptMotionBeforeQueueingWhenScreenOff ( int policyFlags ) { int result = 0 ; final boolean isWakeMotion = ( policyFlags & ( ( android.view.WindowManagerPolicy.FLAG_WAKE ) | ( android.view.WindowManagerPolicy.FLAG_WAKE_DROPPED ) ) ) != 0 ; if ( isWakeMotion ) { if ( ( ( mKeyguardMediator ) != null ) && ( mKeyguardMediator.isShowing ( ) ) ) { mKeyguardMediator.onWakeMotionWhenKeyguardShowingTq ( ) ; } else { result |= ACTION_POKE_USER_ACTIVITY ; } } return result ; }

Target:
public boolean inKeyguardRestrictedKeyInputMode ( ) { if ( ( mKeyguardMediator ) == null ) return false ; return mKeyguardMediator.isInputRestricted ( ) ; }
Source:
public void trackingDisabled_unsolicitedResultsIgnored_withToken ( ) { configureTrackingDisabled ( ) ; mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageTrackerTest.INITIAL_APP_PACKAGE_VERSIONS ) ; mPackageTracker.start ( ) ; mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; mPackageTracker.recordCheckResult ( com.android.server.timezone.PackageTrackerTest.createArbitraryCheckToken ( ) , true ) ; mFakeIntentHelper.assertReliabilityTriggeringDisabled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; }

Target:
public void trackingDisabled_unsolicitedResultsIgnored_withToken ( ) { configureTrackingDisabled ( ) ; mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageTrackerTest.INITIAL_APP_PACKAGE_VERSIONS ) ; mPackageTracker.start ( ) ; mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; mPackageTracker.recordCheckResult ( com.android.server.timezone.PackageTrackerTest.createArbitraryCheckToken ( ) , true ) ; mFakeIntentHelper.assertReliabilityTriggerNotScheduled ( ) ; checkPackageStorageStatusIsInitialOrReset ( ) ; }
Source:
public void testFiveCount_L ( ) throws java.lang.Exception { java.util.TimeZone.setDefault ( java.util.TimeZone.getTimeZone ( "GMT" ) ) ; assertEquals ( "1" , formatDate ( java.util.Locale.ENGLISH , "L" ) ) ; assertEquals ( "01" , formatDate ( java.util.Locale.ENGLISH , "LL" ) ) ; assertEquals ( "Jan" , formatDate ( java.util.Locale.ENGLISH , "LLL" ) ) ; assertEquals ( "January" , formatDate ( java.util.Locale.ENGLISH , "LLLL" ) ) ; assertEquals ( "J" , formatDate ( java.util.Locale.ENGLISH , "LLLLL" ) ) ; }

Target:
public void testFiveCount_E ( ) throws java.lang.Exception { assertEquals ( "Thu" , formatDateUtc ( java.util.Locale.ENGLISH , "E" ) ) ; assertEquals ( "Thu" , formatDateUtc ( java.util.Locale.ENGLISH , "EE" ) ) ; assertEquals ( "Thu" , formatDateUtc ( java.util.Locale.ENGLISH , "EEE" ) ) ; assertEquals ( "Thursday" , formatDateUtc ( java.util.Locale.ENGLISH , "EEEE" ) ) ; assertEquals ( "T" , formatDateUtc ( java.util.Locale.ENGLISH , "EEEEE" ) ) ; }
Source:
public boolean processMessage ( android.os.Message msg ) { if ( ( super . processMessage ( msg ) ) == ( HANDLED ) ) { return HANDLED ; } switch ( msg.what ) { case com.android.server.telecom.CallAudioRouteStateMachine.CONNECT_WIRED_HEADSET : sendInternalMessage ( com.android.server.telecom.CallAudioRouteStateMachine.SWITCH_HEADSET ) ; return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.CONNECT_BLUETOOTH : return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.DISCONNECT_BLUETOOTH : sendInternalMessage ( com.android.server.telecom.CallAudioRouteStateMachine.SWITCH_BASELINE_ROUTE ) ; mWasOnSpeaker = false ; return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.DISCONNECT_WIRED_HEADSET : updateSystemAudioState ( ) ; return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.CONNECT_DOCK : return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.DISCONNECT_DOCK : return HANDLED ; default : return NOT_HANDLED ; } }

Target:
public boolean processMessage ( android.os.Message msg ) { if ( ( super . processMessage ( msg ) ) == ( HANDLED ) ) { return HANDLED ; } switch ( msg.what ) { case com.android.server.telecom.CallAudioRouteStateMachine.CONNECT_WIRED_HEADSET : sendInternalMessage ( com.android.server.telecom.CallAudioRouteStateMachine.SWITCH_HEADSET ) ; return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.CONNECT_BLUETOOTH : return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.DISCONNECT_BLUETOOTH : sendInternalMessage ( com.android.server.telecom.CallAudioRouteStateMachine.SWITCH_BASELINE_ROUTE , com.android.server.telecom.CallAudioRouteStateMachine.NO_INCLUDE_BLUETOOTH_IN_BASELINE ) ; mWasOnSpeaker = false ; return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.DISCONNECT_WIRED_HEADSET : updateSystemAudioState ( ) ; return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.CONNECT_DOCK : return HANDLED ; case com.android.server.telecom.CallAudioRouteStateMachine.DISCONNECT_DOCK : return HANDLED ; default : return NOT_HANDLED ; } }
Source:
public final long long_literal ( ) throws org.jf.smali.RecognitionException { long value = 0 ; org.antlr.runtime.tree.CommonTree LONG_LITERAL210 = null ; try { { LONG_LITERAL210 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.LONG_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_LONG_LITERAL_in_long_literal3510 ) ) ) ; value = org.jf.smali.LiteralTools.parseLong ( ( LONG_LITERAL210 != null ? LONG_LITERAL210.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final char char_literal ( ) throws org.jf.smali.RecognitionException { char value = 0 ; org.antlr.runtime.tree.CommonTree CHAR_LITERAL210 = null ; try { { CHAR_LITERAL210 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.CHAR_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_CHAR_LITERAL_in_char_literal3470 ) ) ) ; value = ( CHAR_LITERAL210 != null ? CHAR_LITERAL210.getText ( ) : null ) . charAt ( 1 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public void testEmbedded ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( testDir , "embedded" ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , ":main:assembleRelease" ) ; java.io.File mainApk = new java.io.File ( project , ( ( "main/build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/main-release-unsigned.apk" ) ) ; com.android.build.gradle.ManualBuildTest.checkJar ( mainApk , java.util.Collections.< java.lang.String , java.lang.String > singletonMap ( ( ( ( ( ( ( com.android.SdkConstants.FD_RES ) + '/' ) + ( com.android.SdkConstants.FD_RES_RAW ) ) + '/' ) + ( com.android.builder.core.BuilderConstants.ANDROID_WEAR_MICRO_APK ) ) + ( com.android.SdkConstants.DOT_ANDROID_PACKAGE ) ) , null ) ) ; }

Target:
public void testEmbedded ( ) throws java.lang.Exception { java.io.File project = new java.io.File ( regularDir , "embedded" ) ; runTasksOn ( project , BasePlugin.GRADLE_TEST_VERSION , "clean" , ":main:assembleRelease" ) ; java.io.File mainApk = new java.io.File ( project , ( ( "main/build/" + ( com.android.builder.model.AndroidProject.FD_OUTPUTS ) ) + "/apk/main-release-unsigned.apk" ) ) ; com.android.build.gradle.ManualBuildTest.checkJar ( mainApk , java.util.Collections.< java.lang.String , java.lang.String > singletonMap ( ( ( ( ( ( ( com.android.SdkConstants.FD_RES ) + '/' ) + ( com.android.SdkConstants.FD_RES_RAW ) ) + '/' ) + ( com.android.builder.core.BuilderConstants.ANDROID_WEAR_MICRO_APK ) ) + ( com.android.SdkConstants.DOT_ANDROID_PACKAGE ) ) , null ) ) ; }
Source:
public android.webkit.WebBackForwardList saveState ( final android.os.Bundle outState ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return saveState ( outState ) ; } } ) ; return ret ; } if ( outState == null ) return null ; if ( ! ( mAwContents.saveState ( outState ) ) ) return null ; return copyBackForwardList ( ) ; }

Target:
public void setNetworkAvailable ( final boolean networkUp ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setNetworkAvailable ( networkUp ) ; } } ) ; return ; } mAwContents.setNetworkAvailable ( networkUp ) ; }
Source:
private com.android.rs.test.Int2 mode ( com.android.rs.test.RenderScript RS , final byte [ ] inputArray ) { long [ ] hsg = histogram ( RS , inputArray ) ; int modeIdx = 0 ; for ( int i = 1 ; i < ( hsg.length ) ; ++ i ) if ( ( hsg [ i ] ) > ( hsg [ modeIdx ] ) ) modeIdx = i ; return new com.android.rs.test.Int2 ( modeIdx , ( ( int ) ( hsg [ modeIdx ] ) ) ) ; }

Target:
private android.renderscript.Int2 mode ( android.renderscript.RenderScript RS , final byte [ ] inputArray ) { long [ ] hsg = histogram ( RS , inputArray ) ; int modeIdx = 0 ; for ( int i = 1 ; i < ( hsg.length ) ; ++ i ) if ( ( hsg [ i ] ) > ( hsg [ modeIdx ] ) ) modeIdx = i ; return new android.renderscript.Int2 ( modeIdx , ( ( int ) ( hsg [ modeIdx ] ) ) ) ; }
Source:
public void selectionChanged ( ) { synchronized ( this ) { selectedNode = model.getSelection ( ) ; } doRedraw ( ) ; }

Target:
public void selectionChanged ( ) { synchronized ( this ) { selectedNode = model.getSelection ( ) ; if ( ( ( selectedNode ) != null ) && ( ( selectedNode.viewNode.image ) == null ) ) { com.android.hierarchyviewerlib.HierarchyViewerDirector.getDirector ( ) . loadCaptureInBackground ( selectedNode.viewNode ) ; } } doRedraw ( ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , byte [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , data.length , Element.DataType.SIGNED_8 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , array , ( arrayLen * ( dt.mSize ) ) , dt ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
private void filterStdErr ( java.lang.String line ) { if ( ( ( line.indexOf ( "emulator: device" ) ) != ( - 1 ) ) || ( ( line.indexOf ( "HAX is working" ) ) != ( - 1 ) ) ) { mMonitor.log ( "%1$s" , line ) ; return ; } mMonitor.logError ( "%1$s" , line ) ; }

Target:
private void filterStdErr ( java.lang.String line ) { com.android.sdklib.internal.repository.ITaskMonitor m = mMonitor ; if ( ( line == null ) || ( m == null ) ) { return ; } if ( ( ( line.indexOf ( "emulator: device" ) ) != ( - 1 ) ) || ( ( line.indexOf ( "HAX is working" ) ) != ( - 1 ) ) ) { m.log ( "%1$s" , line ) ; return ; } m.logError ( "%1$s" , line ) ; }
Source:
public void testBroadcastAssociationSuccessfulEvent ( ) { mWifiMonitor.registerHandler ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , WifiStateMachine.CMD_ASSOCIATED_BSSID , mHandlerSpy ) ; java.lang.String bssid = com.android.server.wifi.WifiMonitorTest.BSSID ; mWifiMonitor.broadcastAssociationSuccesfulEvent ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , bssid ) ; mLooper.dispatchAll ( ) ; org.mockito.ArgumentCaptor < android.os.Message > messageCaptor = org.mockito.ArgumentCaptor.forClass ( android.os.Message.class ) ; org.mockito.Mockito.verify ( mHandlerSpy ) . handleMessage ( messageCaptor.capture ( ) ) ; org.junit.Assert.assertEquals ( WifiStateMachine.CMD_ASSOCIATED_BSSID , messageCaptor.getValue ( ) . what ) ; org.junit.Assert.assertEquals ( bssid , ( ( java.lang.String ) ( messageCaptor.getValue ( ) . obj ) ) ) ; }

Target:
public void testBroadcastAssociatedBssidEvent ( ) { mWifiMonitor.registerHandler ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , WifiStateMachine.CMD_ASSOCIATED_BSSID , mHandlerSpy ) ; java.lang.String bssid = com.android.server.wifi.WifiMonitorTest.BSSID ; mWifiMonitor.broadcastAssociatedBssidEvent ( com.android.server.wifi.WifiMonitorTest.WLAN_IFACE_NAME , bssid ) ; mLooper.dispatchAll ( ) ; org.mockito.ArgumentCaptor < android.os.Message > messageCaptor = org.mockito.ArgumentCaptor.forClass ( android.os.Message.class ) ; org.mockito.Mockito.verify ( mHandlerSpy ) . handleMessage ( messageCaptor.capture ( ) ) ; org.junit.Assert.assertEquals ( WifiStateMachine.CMD_ASSOCIATED_BSSID , messageCaptor.getValue ( ) . what ) ; org.junit.Assert.assertEquals ( bssid , ( ( java.lang.String ) ( messageCaptor.getValue ( ) . obj ) ) ) ; }
Source:
private static long getLongAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name , long defaultValue ) { java.lang.Object value = annotation.getValue ( name ) ; if ( value instanceof java.lang.Number ) { return ( ( java.lang.Number ) ( value ) ) . longValue ( ) ; } return defaultValue ; }

Target:
private static boolean isZero ( @ com.android.annotations.NonNull com.intellij.psi.PsiElement argument ) { if ( argument instanceof com.intellij.psi.PsiLiteral ) { java.lang.Object value = ( ( com.intellij.psi.PsiLiteral ) ( argument ) ) . getValue ( ) ; return ( value instanceof java.lang.Number ) && ( ( ( ( java.lang.Number ) ( value ) ) . intValue ( ) ) == 0 ) ; } return false ; }
Source:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection ) ; } finally { connection.close ( ) ; } }

Target:
public java.util.Map < java.lang.String , com.android.builder.model.AndroidProject > executeAndReturnMultiModel ( boolean emulateStudio_1_0 , java.lang.String ... tasks ) { org.gradle.tooling.ProjectConnection connection = getProjectConnection ( ) ; try { executeBuild ( java.util.Collections.< java.lang.String > emptyList ( ) , connection , tasks ) ; return com.android.build.gradle.integration.common.fixture.GradleTestProject.buildModel ( connection , emulateStudio_1_0 ) ; } finally { connection.close ( ) ; } }
Source:
public void testUnsupportedCallbackException06 ( ) { tests.api.javax.security.auth.myCallback c = new tests.api.javax.security.auth.myCallback ( ) ; assertNotNull ( "Callback object is null" , c ) ; javax.security.auth.callback.UnsupportedCallbackException ucE ; for ( int i = 0 ; i < ( tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs.length ) ; i ++ ) { ucE = new javax.security.auth.callback.UnsupportedCallbackException ( c , tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertEquals ( "getMessage() must return: " . concat ( tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs [ i ] ) , ucE.getMessage ( ) , tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertEquals ( "Incorrect callback object was returned" , c , ucE.getCallback ( ) ) ; } }

Target:
public void testUnsupportedCallbackException06 ( ) { org.apache.harmony.tests.javax.security.auth.callback.myCallback c = new org.apache.harmony.tests.javax.security.auth.callback.myCallback ( ) ; assertNotNull ( "Callback object is null" , c ) ; javax.security.auth.callback.UnsupportedCallbackException ucE ; for ( int i = 0 ; i < ( org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs.length ) ; i ++ ) { ucE = new javax.security.auth.callback.UnsupportedCallbackException ( c , org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertEquals ( "getMessage() must return: " . concat ( org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs [ i ] ) , ucE.getMessage ( ) , org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertEquals ( "Incorrect callback object was returned" , c , ucE.getCallback ( ) ) ; } }
Source:
private com.android.jack.ir.ast.JPackage getPackage ( @ javax.annotation.Nonnull java.lang.String [ ] splitClassOrInterfaceName ) { com.android.jack.ir.ast.JPackage currentPackage = topLevelPackage ; int packageLength = ( splitClassOrInterfaceName.length ) - 1 ; for ( int i = 0 ; i < packageLength ; i ++ ) { currentPackage = currentPackage.getOrCreateSubPackage ( splitClassOrInterfaceName [ i ] ) ; } return currentPackage ; }

Target:
public com.android.jack.ir.ast.JClass getType ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage pack , @ javax.annotation.Nonnull java.lang.String simpleName ) { return pack.getPhantomClass ( simpleName ) ; }
Source:
protected void visitType ( int type , int index ) { if ( dex.typeNames ( ) . get ( index ) . equals ( Type.VOID.getDescriptor ( ) ) ) { constantValue = com.android.jack.dx.rop.cst.CstType.intern ( Type.VOID ) ; } else { constantValue = getCstTypeFromTypeIndex ( dex , index ) ; } }

Target:
protected void visitMethod ( int type , int index ) { assert ( cstIndexMap ) != null ; constantValue = cstIndexMap.getCstMethodRef ( index ) ; }
Source:
public void autoConnect ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { errorLog ( "autoConnect() - BT is not ON. Exiting autoConnect" ) ; return ; } if ( ( isQuietModeEnabled ( ) ) == false ) { debugLog ( "autoConnect() - Initiate auto connection on BT on..." ) ; autoConnectHeadset ( ) ; autoConnectA2dp ( ) ; autoConnectA2dpSink ( ) ; } else { debugLog ( "autoConnect() - BT is in quiet mode. Not initiating auto connections" ) ; } }

Target:
public void autoConnect ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) { errorLog ( "autoConnect() - BT is not ON. Exiting autoConnect" ) ; return ; } if ( ( isQuietModeEnabled ( ) ) == false ) { debugLog ( "autoConnect() - Initiate auto connection on BT on..." ) ; autoConnectHeadset ( ) ; autoConnectA2dp ( ) ; autoConnectHeadsetClient ( ) ; autoConnectA2dpSink ( ) ; autoConnectPbapClient ( ) ; } else { debugLog ( "autoConnect() - BT is in quiet mode. Not initiating auto connections" ) ; } }
Source:
public static void finalizeAllEnqueued ( ) throws java.lang.InterruptedException { java.lang.ref.FinalizerReference.Sentinel sentinel = new java.lang.ref.FinalizerReference.Sentinel ( ) ; java.lang.ref.FinalizerReference < java.lang.Object > reference = new java.lang.ref.FinalizerReference < java.lang.Object > ( null , java.lang.ref.FinalizerReference.queue ) ; reference.zombie = sentinel ; reference.enqueueInternal ( ) ; sentinel.awaitFinalization ( ) ; }

Target:
public static void finalizeAllEnqueued ( ) throws java.lang.InterruptedException { java.lang.ref.FinalizerReference.Sentinel sentinel = new java.lang.ref.FinalizerReference.Sentinel ( ) ; java.lang.ref.FinalizerReference.enqueueSentinelReference ( sentinel ) ; sentinel.awaitFinalization ( ) ; }
Source:
protected void visitField ( int type , int index ) { assert ( cstIndexMap ) != null ; if ( type == ( ValueType.VALUE_FIELD.getValue ( ) ) ) { constantValue = cstIndexMap.getCstFieldRef ( index ) ; } else { assert type == ( ValueType.VALUE_ENUM.getValue ( ) ) ; com.android.jack.dx.io.FieldId fieldId = dexBuffer.fieldIds ( ) . get ( index ) ; constantValue = new com.android.jack.dx.rop.cst.CstEnumRef ( cstIndexMap.getCstString ( fieldId.getNameIndex ( ) ) , cstIndexMap.getCstType ( fieldId.getTypeIndex ( ) ) ) ; } }

Target:
protected void visitField ( int type , int index ) { assert ( cstIndexMap ) != null ; if ( type == ( ValueType.VALUE_FIELD.getValue ( ) ) ) { constantValue = cstIndexMap.getCstFieldRef ( index ) ; } else { assert type == ( ValueType.VALUE_ENUM.getValue ( ) ) ; com.android.jack.dx.io.FieldId fieldId = dexBuffer.fieldIds ( ) . get ( index ) ; constantValue = new com.android.jack.dx.rop.cst.CstEnumRef ( cstIndexMap.getCstString ( fieldId.getNameIndex ( ) ) , cstIndexMap.getType ( fieldId.getTypeIndex ( ) ) ) ; } }
Source:
public final int update ( java.nio.ByteBuffer input , java.nio.ByteBuffer output ) throws javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == output ) { throw new java.lang.IllegalArgumentException ( "input == output" ) ; } return spiImpl.engineUpdate ( input , output ) ; }

Target:
public final byte [ ] update ( byte [ ] input ) { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == null ) { throw new java.lang.IllegalArgumentException ( "input == null" ) ; } if ( ( input.length ) == 0 ) { return null ; } return getSpi ( ) . engineUpdate ( input , 0 , input.length ) ; }
Source:
public void testAllocSpiSpiUnavaiableExeption ( ) throws java.lang.Exception { android.net.IpSecSpiResponse spiResp = new android.net.IpSecSpiResponse ( IpSecManager.Status.SPI_UNAVAILABLE , 0 , 0 ) ; org.mockito.Mockito.when ( mMockIpSecService.reserveSecurityParameterIndex ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyObject ( ) ) ) . thenReturn ( spiResp ) ; try { mIpSecManager.reserveSecurityParameterIndex ( IpSecTransform.DIRECTION_OUT , android.net.IpSecManagerTest.GOOGLE_DNS_4 ) ; org.junit.Assert.fail ( "ResourceUnavailableException was not thrown" ) ; } catch ( android.net.IpSecManager e ) { } }

Target:
public void testAllocSpiSpiUnavaiableExeption ( ) throws java.lang.Exception { android.net.IpSecSpiResponse spiResp = new android.net.IpSecSpiResponse ( IpSecManager.Status.SPI_UNAVAILABLE , 0 , 0 ) ; org.mockito.Mockito.when ( mMockIpSecService.allocateSecurityParameterIndex ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.anyObject ( ) ) ) . thenReturn ( spiResp ) ; try { mIpSecManager.allocateSecurityParameterIndex ( IpSecTransform.DIRECTION_OUT , android.net.IpSecManagerTest.GOOGLE_DNS_4 ) ; org.junit.Assert.fail ( "ResourceUnavailableException was not thrown" ) ; } catch ( android.net.IpSecManager e ) { } }
Source:
public java.util.Set < java.lang.String > getCarrierVvmPackageNames ( ) { com.android.dialer.common.Assert.checkArgument ( isValid ( ) ) ; java.util.Set < java.lang.String > names = com.android.voicemail.impl.OmtpVvmCarrierConfigHelper.getCarrierVvmPackageNames ( mCarrierConfig ) ; if ( names != null ) { return names ; } return com.android.voicemail.impl.OmtpVvmCarrierConfigHelper.getCarrierVvmPackageNames ( mTelephonyConfig ) ; }

Target:
public java.util.Set < java.lang.String > getCarrierVvmPackageNames ( ) { com.android.dialer.common.Assert.checkArgument ( isValid ( ) ) ; java.util.Set < java.lang.String > names = com.android.voicemail.impl.OmtpVvmCarrierConfigHelper.getCarrierVvmPackageNames ( mOverrideConfig ) ; if ( names != null ) { return names ; } names = com.android.voicemail.impl.OmtpVvmCarrierConfigHelper.getCarrierVvmPackageNames ( mCarrierConfig ) ; if ( names != null ) { return names ; } return com.android.voicemail.impl.OmtpVvmCarrierConfigHelper.getCarrierVvmPackageNames ( mTelephonyConfig ) ; }
Source:
public boolean deselect ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo canvasViewInfo ) { if ( canvasViewInfo == null ) { return false ; } for ( java.util.ListIterator < com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasSelection > it = mSelections.listIterator ( ) ; it.hasNext ( ) ; ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasSelection s = it.next ( ) ; if ( canvasViewInfo == ( s.getViewInfo ( ) ) ) { it.remove ( ) ; return true ; } } return false ; }

Target:
public boolean deselect ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo canvasViewInfo ) { if ( canvasViewInfo == null ) { return false ; } for ( java.util.ListIterator < com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem > it = mSelections.listIterator ( ) ; it.hasNext ( ) ; ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionItem s = it.next ( ) ; if ( canvasViewInfo == ( s.getViewInfo ( ) ) ) { it.remove ( ) ; return true ; } } return false ; }
Source:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/DetachedFromWindow.java:7: Warning: Overriding method should call super.onDetachedFromWindow [MissingSuperCall]\n" + " protected void onDetachedFromWindow() {\n" ) + " ^\n" ) + "src/test/pkg/DetachedFromWindow.java:26: Warning: Overriding method should call super.onDetachedFromWindow [MissingSuperCall]\n" ) + " protected void onDetachedFromWindow() {\n" ) + " ^\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( ( "src/test/pkg/DetachedFromWindow.java.txt=>" + "src/test/pkg/DetachedFromWindow.java" ) ) ) ; }

Target:
public void test ( ) throws java.lang.Exception { assertEquals ( ( "" + ( ( ( ( ( ( "src/test/pkg/DetachedFromWindow.java:7: Warning: Overriding method should call super.onDetachedFromWindow [MissingSuperCall]\n" + " protected void onDetachedFromWindow() {\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "src/test/pkg/DetachedFromWindow.java:26: Warning: Overriding method should call super.onDetachedFromWindow [MissingSuperCall]\n" ) + " protected void onDetachedFromWindow() {\n" ) + " ~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 2 warnings\n" ) ) , lintProject ( ( "src/test/pkg/DetachedFromWindow.java.txt=>" + "src/test/pkg/DetachedFromWindow.java" ) ) ) ; }
Source:
private void appendHeader ( boolean isLibrary ) { if ( isLibrary ) { mBuildFile.append ( "apply plugin: \'android-library\'\n" ) ; } else { mBuildFile.append ( "apply plugin: \'android\'\n" ) ; } mBuildFile.append ( "\n" ) ; }

Target:
private void appendHeader ( boolean isLibrary ) { if ( isLibrary ) { mBuildFile.append ( "apply plugin: '" ) . append ( com.android.tools.lint.checks.GradleDetector.LIB_PLUGIN_ID ) . append ( "\'\n" ) ; } else { mBuildFile.append ( "apply plugin: '" ) . append ( com.android.tools.lint.checks.GradleDetector.APP_PLUGIN_ID ) . append ( "\'\n" ) ; } mBuildFile.append ( "\n" ) ; }
Source:
public void saveProperties ( java.util.Properties props ) { super . saveProperties ( props ) ; mVersion.saveProperties ( props ) ; props.setProperty ( PkgProps.SYS_IMG_ABI , mAbi ) ; }

Target:
public void saveProperties ( java.util.Properties props ) { super . saveProperties ( props ) ; mVersion.saveProperties ( props ) ; props.setProperty ( PkgProps.SYS_IMG_ABI , mAbi ) ; props.setProperty ( PkgProps.SYS_IMG_TAG_ID , mTag.getId ( ) ) ; props.setProperty ( PkgProps.SYS_IMG_TAG_DISPLAY , mTag.getDisplay ( ) ) ; }
Source:
public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { android.support.v4.widget.DrawerLayout drawer = ( ( android.support.v4.widget.DrawerLayout ) ( view ) ) ; android.support.v4.widget.DrawerLayout.DrawerListener existingListener = android.support.test.espresso.contrib.DrawerActions.getDrawerListener ( drawer ) ; if ( existingListener instanceof android.support.test.espresso.contrib.DrawerActions.IdlingDrawerListener ) { android.support.test.espresso.Espresso.unregisterIdlingResources ( ( ( android.support.test.espresso.IdlingResource ) ( existingListener ) ) ) ; drawer.setDrawerListener ( ( ( android.support.test.espresso.contrib.DrawerActions.IdlingDrawerListener ) ( existingListener ) ) . parentListener ) ; } }

Target:
public void perform ( android.support.test.espresso.UiController uiController , android.view.View view ) { android.support.v4.widget.DrawerLayout drawer = ( ( android.support.v4.widget.DrawerLayout ) ( view ) ) ; android.support.v4.widget.DrawerLayout.DrawerListener existingListener = android.support.test.espresso.contrib.DrawerActions.getDrawerListener ( drawer ) ; if ( existingListener instanceof android.support.test.espresso.contrib.DrawerActions.IdlingDrawerListener ) { android.support.test.espresso.contrib.DrawerActions.IdlingDrawerListener idleDrawerListener = ( ( android.support.test.espresso.contrib.DrawerActions.IdlingDrawerListener ) ( existingListener ) ) ; android.support.test.espresso.Espresso.unregisterIdlingResources ( idleDrawerListener ) ; drawer.setDrawerListener ( idleDrawerListener.parentListener ) ; idleDrawerListener.parentListener = null ; } }
Source:
public void run ( ) { final int MAX_COUNT = 1 << 21 ; char [ ] longText = new char [ MAX_COUNT ] ; for ( int n = 0 ; n < MAX_COUNT ; n ++ ) { longText [ n ] = 'm' ; } mTextView = findTextView ( R.id.textview_text ) ; mTextView.setText ( new java.lang.String ( longText ) ) ; }

Target:
public void run ( ) { assertFalse ( mTextView.moveCursorToVisibleOffset ( ) ) ; }
Source:
public void testSetWifiEnableWithoutPermission ( ) throws java.lang.Exception { doThrow ( new java.lang.SecurityException ( ) ) . when ( mContext ) . enforceCallingOrSelfPermission ( org.mockito.Matchers.eq ( android.Manifest.permission.CHANGE_WIFI_STATE ) , org.mockito.Matchers.eq ( "WifiService" ) ) ; mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , true ) ; }

Target:
public void testSetWifiEnableWithoutPermission ( ) throws java.lang.Exception { doThrow ( new java.lang.SecurityException ( ) ) . when ( mContext ) . enforceCallingOrSelfPermission ( org.mockito.Matchers.eq ( android.Manifest.permission.CHANGE_WIFI_STATE ) , org.mockito.Matchers.eq ( "WifiService" ) ) ; mWifiServiceImpl.setWifiEnabled ( com.android.server.wifi.WifiServiceImplTest.TEST_PACKAGE_NAME , true ) ; verify ( mWifiStateMachine , never ( ) ) . syncGetWifiApState ( ) ; }
Source:
static boolean isPhoneInEcm ( com.android.internal.telephony.Phone phone ) { if ( ( phone != null ) && ( com.android.internal.telephony.TelephonyCapabilities.supportsEcm ( phone ) ) ) { java.lang.String ecmMode = android.os.SystemProperties.get ( TelephonyProperties.PROPERTY_INECM_MODE ) ; if ( ecmMode != null ) { return ecmMode.equals ( "true" ) ; } } return false ; }

Target:
static boolean isPhoneInEcm ( com.android.internal.telephony.Phone phone ) { if ( ( phone != null ) && ( com.android.internal.telephony.TelephonyCapabilities.supportsEcm ( phone ) ) ) { return phone.isInEcm ( ) ; } return false ; }
Source:
public org.bouncycastle.math.ec.ECFieldElement sqrt ( ) { throw new java.lang.RuntimeException ( "Not implemented" ) ; }

Target:
public org.bouncycastle.math.ec.ECFieldElement sqrt ( ) { org.bouncycastle.math.ec.LongArray x1 = this . x ; if ( ( x1.isOne ( ) ) || ( x1.isZero ( ) ) ) { return this ; } org.bouncycastle.math.ec.LongArray x2 = x1.modSquareN ( ( ( m ) - 1 ) , m , ks ) ; return new org.bouncycastle.math.ec.ECFieldElement.F2m ( m , ks , x2 ) ; }
Source:
int findOffsetIndexForTimeInSeconds ( long seconds ) { int transition = java.util.Arrays.binarySearch ( mTransitions , seconds ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return - 1 ; } } return ( mTypes [ transition ] ) & 255 ; }

Target:
int findOffsetIndexForTimeInSeconds ( long seconds ) { int transition = findTransitionIndex ( seconds ) ; if ( transition < 0 ) { return - 1 ; } return ( mTypes [ transition ] ) & 255 ; }