auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void dismissIntruder ( ) { if ( ( mCurrentlyIntrudingNotification ) == null ) return ; try { mBarService.onNotificationClear ( mCurrentlyIntrudingNotification.pkg , mCurrentlyIntrudingNotification.tag , mCurrentlyIntrudingNotification.id ) ; } catch ( com.android.systemui.statusbar.phone.android ex ) { } }

Target:
private void setHeadsUpVisibility ( boolean vis ) { if ( ! ( ENABLE_HEADS_UP ) ) return ; if ( com.android.systemui.statusbar.phone.PhoneStatusBar.DEBUG ) android.util.Log.v ( com.android.systemui.statusbar.phone.PhoneStatusBar.TAG , ( ( vis ? "showing" : "hiding" ) + " heads up window" ) ) ; mHeadsUpNotificationView.setVisibility ( ( vis ? android.view.View.VISIBLE : android.view.View.GONE ) ) ; if ( ! vis ) { if ( com.android.systemui.statusbar.phone.PhoneStatusBar.DEBUG ) android.util.Log.d ( com.android.systemui.statusbar.phone.PhoneStatusBar.TAG , "setting heads up entry to null" ) ; mInterruptingNotificationEntry = null ; } }
Source:
private void addAuthParam ( com.android.server.wifi.hotspot2.anqp.eap.AuthParam param ) { java.util.Set < com.android.server.wifi.hotspot2.anqp.eap.AuthParam > authParams = mAuthParams.get ( param.getAuthInfoID ( ) ) ; if ( authParams == null ) { authParams = new java.util.HashSet < > ( ) ; mAuthParams.put ( param.getAuthInfoID ( ) , authParams ) ; } authParams.add ( param ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( "EAPMethod{mEAPMethodID=" + ( mEAPMethodID ) ) + " mAuthParams=" ) + ( mAuthParams ) ) + "}" ; }
Source:
private static void append ( java.text.AttributedCharacterIterator iterator , int start , int limit , java.lang.StringBuilder result ) { int oldIndex = iterator.getIndex ( ) ; iterator.setIndex ( start ) ; for ( int i = start ; i < limit ; i ++ ) { result.append ( iterator.current ( ) ) ; iterator.next ( ) ; } iterator.setIndex ( oldIndex ) ; }

Target:
private java.lang.String format ( java.text.AttributedCharacterIterator iterator , com.ibm.icu.text.ScientificNumberFormatter.Style option ) { return option.format ( iterator , preExponent ) ; }
Source:
public void notifyStateChanged ( ) { try { int status = mImsManager.getImsServiceState ( ) ; log ( ( "Status Changed: " + status ) ) ; switch ( status ) { case android.telephony.ims.feature.ImsFeature.STATE_READY : { startListeningForCalls ( ) ; break ; } case android.telephony.ims.feature.ImsFeature.STATE_INITIALIZING : case android.telephony.ims.feature.ImsFeature.STATE_UNAVAILABLE : { stopListeningForCalls ( ) ; break ; } default : { android.util.Log.w ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.LOG_TAG , "Unexpected State!" ) ; } } } catch ( com.android.ims.ImsException e ) { retryGetImsService ( ) ; } }

Target:
public void onCallProgressing ( com.android.ims.ImsCall imsCall ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( "onCallProgressing" ) ; mPendingMO = null ; processCallStateChange ( imsCall , ImsPhoneCall.State.ALERTING , DisconnectCause.NOT_DISCONNECTED ) ; mMetrics.writeOnImsCallProgressing ( mPhone.getPhoneId ( ) , imsCall.getCallSession ( ) ) ; }
Source:
public void testDensityOnlyWithNoMatch ( ) { java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 2 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertNull ( result ) ; }

Target:
public void testDensityOnlyWithNoMatch ( ) { java.util.List < com.android.build.VariantOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 , 1 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 480 , 2 ) ) ; java.util.List < java.io.File > result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( 0 , result.size ( ) ) ; }
Source:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b , java.lang.Iterable < ? extends T > c ) { com.google.common.base.Preconditions.checkNotNull ( a ) ; com.google.common.base.Preconditions.checkNotNull ( b ) ; com.google.common.base.Preconditions.checkNotNull ( c ) ; return com.google.common.collect.Iterables.concat ( java.util.Arrays.asList ( a , b , c ) ) ; }

Target:
public static < T > java.lang.Iterable < T > concat ( java.lang.Iterable < ? extends T > a , java.lang.Iterable < ? extends T > b , java.lang.Iterable < ? extends T > c ) { return com.google.common.collect.Iterables.concat ( com.google.common.collect.ImmutableList.of ( a , b , c ) ) ; }
Source:
public static void computeTrunc ( android.renderscript.cts.TestTrunc.ArgumentsFloatFloat args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; int sign = ( ( java.lang.Float.floatToIntBits ( args.in ) ) > > 31 ) & 1 ; float trunc = ( ( int ) ( args.in ) ) ; if ( ( sign == 1 ) && ( trunc == ( + 0.0F ) ) ) { trunc = - 0.0F ; } args.out = trunc ; }

Target:
public static void computeSqrt ( android.renderscript.cts.TestSqrt.ArgumentsFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( android.renderscript.cts.CoreMathVerifier.sqrt ( args.in ) , 3 , 3 ) ; }
Source:
public void sayHi ( ) { java.lang.System.out.println ( "hello specific" ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { IsDefaultTest.test ( ) ; AnnotationTest.testAnnotationsByType ( ) ; AnnotationTest.testDeclaredAnnotation ( ) ; AnnotationTest.testDeclaredAnnotationsByType ( ) ; AnnotationTest.testMethodAnnotationsByType ( ) ; AnnotationTest.testMethodDeclaredAnnotations ( ) ; AnnotationTest.testMethodDeclaredAnnotationsByType ( ) ; }
Source:
public void testAspectRatio ( ) throws java.lang.Exception { double aspectRatio = getRealAspectRatio ( getActivity ( ) ) ; if ( ( aspectRatio >= 1.333 ) && ( aspectRatio <= 1.86 ) ) { return ; } if ( getActivity ( ) . getPackageManager ( ) . hasSystemFeature ( PackageManager.FEATURE_WATCH ) ) { if ( ( aspectRatio >= 1.0 ) && ( aspectRatio <= 1.86 ) ) { return ; } } fail ( ( "Aspect ratio was not between 1.333 and 1.86: " + aspectRatio ) ) ; }

Target:
public void testAspectRatio ( ) throws java.lang.Exception { double aspectRatio = getRealAspectRatio ( getActivity ( ) ) ; android.util.Log.i ( android.dpi.cts.AspectRatioTest.TAG , ( "Aspect Ratio: " + aspectRatio ) ) ; if ( ( aspectRatio >= 1.333 ) && ( aspectRatio <= 1.86 ) ) { return ; } if ( getActivity ( ) . getPackageManager ( ) . hasSystemFeature ( PackageManager.FEATURE_WATCH ) ) { if ( ( aspectRatio >= 1.0 ) && ( aspectRatio <= 1.86 ) ) { return ; } } fail ( ( "Aspect ratio was not between 1.333 and 1.86: " + aspectRatio ) ) ; }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput_char.d.T_aput_char_1 t = new dot.junit.opcodes.aput_char.d.T_aput_char_1 ( ) ; char [ ] arr = new char [ 2 ] ; try { t.run ( arr , 2 , 'g' ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE1 ( ) { loadAndRun ( "dot.junit.opcodes.aput_char.d.T_aput_char_1" , java.lang.ArrayIndexOutOfBoundsException.class , new char [ 2 ] , 2 , 'g' ) ; }
Source:
private libcore.tzdata.update2.BundleVersion readBundleVersion ( java.io.File bundleDir ) throws java.io.IOException , libcore.tzdata.update2.BundleException { android.util.Slog.i ( logTag , "Reading bundle format version" ) ; java.io.File bundleVersionFile = new java.io.File ( bundleDir , TimeZoneBundle.BUNDLE_VERSION_FILE_NAME ) ; if ( ! ( bundleVersionFile.exists ( ) ) ) { throw new libcore.tzdata.update2.BundleException ( ( "No bundle version file found: " + bundleVersionFile ) ) ; } byte [ ] versionBytes = libcore.tzdata.update2.FileUtils.readBytes ( bundleVersionFile , BundleVersion.BUNDLE_VERSION_FILE_LENGTH ) ; return libcore.tzdata.update2.BundleVersion.fromBytes ( versionBytes ) ; }

Target:
private libcore.tzdata.update2.DistroVersion readDistroVersion ( java.io.File distroDir ) throws java.io.IOException , libcore.tzdata.update2.DistroException { android.util.Slog.i ( logTag , "Reading distro format version" ) ; java.io.File distroVersionFile = new java.io.File ( distroDir , TimeZoneDistro.DISTRO_VERSION_FILE_NAME ) ; if ( ! ( distroVersionFile.exists ( ) ) ) { throw new libcore.tzdata.update2.DistroException ( ( "No distro version file found: " + distroVersionFile ) ) ; } byte [ ] versionBytes = libcore.tzdata.update2.FileUtils.readBytes ( distroVersionFile , DistroVersion.DISTRO_VERSION_FILE_LENGTH ) ; return libcore.tzdata.update2.DistroVersion.fromBytes ( versionBytes ) ; }
Source:
public void updateInterfaceIpState ( java.lang.String ifaceName , int mode ) { enforceNetworkStackPermission ( ) ; android.util.Slog.d ( com.android.server.wifi.WifiServiceImpl.TAG , ( ( ( "updateInterfaceIpState: ifaceName=" + ifaceName ) + " mode=" ) + mode ) ) ; }

Target:
public void updateInterfaceIpState ( java.lang.String ifaceName , int mode ) { enforceNetworkStackPermission ( ) ; java.lang.Integer previousMode = mIfaceIpModes.put ( ifaceName , mode ) ; android.util.Slog.d ( com.android.server.wifi.WifiServiceImpl.TAG , ( ( ( ( ( "updateInterfaceIpState: ifaceName=" + ifaceName ) + " mode=" ) + mode ) + " previous mode= " ) + previousMode ) ) ; }
Source:
public boolean hasIccCardUsingSlotIndex ( int slotIndex ) { int [ ] subId = mSubscriptionController.getSubIdUsingSlotIndex ( slotIndex ) ; final com.android.internal.telephony.Phone phone = getPhone ( subId [ 0 ] ) ; if ( ( subId != null ) && ( phone != null ) ) { return phone.getIccCard ( ) . hasIccCard ( ) ; } else { return false ; } }

Target:
public boolean hasIccCardUsingSlotIndex ( int slotIndex ) { final com.android.internal.telephony.Phone phone = com.android.internal.telephony.PhoneFactory.getPhone ( slotIndex ) ; if ( phone != null ) { return phone.getIccCard ( ) . hasIccCard ( ) ; } else { return false ; } }
Source:
public byte returnByte ( byte in ) { if ( ( index ) == 0 ) { isaac ( ) ; keyStream = org.bouncycastle.crypto.util.Pack.intToBigEndian ( results ) ; } byte out = ( ( byte ) ( ( keyStream [ index ] ) ^ in ) ) ; index = ( ( index ) + 1 ) & 1023 ; return out ; }

Target:
public byte returnByte ( byte in ) { if ( ( index ) == 0 ) { isaac ( ) ; keyStream = org.bouncycastle.util.Pack.intToBigEndian ( results ) ; } byte out = ( ( byte ) ( ( keyStream [ index ] ) ^ in ) ) ; index = ( ( index ) + 1 ) & 1023 ; return out ; }
Source:
public int stopSendingOffloadedPacket ( int slot ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "stopSendingOffloadedPacket " + slot ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.stopSendingOffloadedPacketNative ( com.android.server.wifi.WifiNative.sWlan0Index , slot ) ; } else { return - 1 ; } } }

Target:
public int stopSendingOffloadedPacket ( int slot ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "stopSendingOffloadedPacket " + slot ) ) ; if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.stopSendingOffloadedPacket ( slot ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.stopSendingOffloadedPacketNative ( com.android.server.wifi.WifiNative.sWlan0Index , slot ) ; } else { return - 1 ; } } } }
Source:
public int enableFirmwareRoaming ( int state ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "enableFirmwareRoaming: state =" + state ) ) ; try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.enableFirmwareRoaming ( state ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } return - 1 ; }

Target:
public int enableFirmwareRoaming ( int state ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "enableFirmwareRoaming: state =" + state ) ) ; if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.enableFirmwareRoaming ( state ) ; } else { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "enableFirmwareRoaming not supported" ) ; return - 1 ; } }
Source:
public void editingCanceled ( javax.swing.event.ChangeEvent e ) { javax.swing.tree.DefaultMutableTreeNode node = ( ( javax.swing.tree.DefaultMutableTreeNode ) ( myTree.getLastSelectedPathComponent ( ) ) ) ; if ( ( node != null ) && ( node instanceof com.intellij.dvcs.push.ui.EditableTreeNode ) ) { ( ( com.intellij.dvcs.push.ui.EditableTreeNode ) ( node ) ) . fireOnCancel ( ) ; } myTree.firePropertyChange ( PushLogTreeUtil.EDIT_MODE_PROP , true , false ) ; }

Target:
public void editingCanceled ( javax.swing.event.ChangeEvent e ) { javax.swing.tree.DefaultMutableTreeNode node = ( ( javax.swing.tree.DefaultMutableTreeNode ) ( myTree.getLastSelectedPathComponent ( ) ) ) ; if ( ( node != null ) && ( node instanceof com.intellij.dvcs.push.ui.EditableTreeNode ) ) { ( ( com.intellij.dvcs.push.ui.EditableTreeNode ) ( node ) ) . fireOnCancel ( ) ; } resetEditSync ( ) ; myTree.firePropertyChange ( PushLogTreeUtil.EDIT_MODE_PROP , true , false ) ; }
Source:
public void testOnKeyMultiple ( ) throws java.lang.Throwable { final android.view.cts.MockView view = ( ( android.view.cts.MockView ) ( mActivity.findViewById ( R.id.mock_view ) ) ) ; runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { view.setFocusable ( true ) ; } } ) ; assertFalse ( view.hasCalledOnKeyMultiple ( ) ) ; view.dispatchKeyEvent ( new android.view.KeyEvent ( android.view.KeyEvent.ACTION_MULTIPLE , android.view.KeyEvent.KEYCODE_ENTER ) ) ; assertTrue ( view.hasCalledOnKeyMultiple ( ) ) ; }

Target:
public void testOnKeyShortcut ( ) throws java.lang.Throwable { final android.view.cts.MockView view = ( ( android.view.cts.MockView ) ( mActivity.findViewById ( R.id.mock_view ) ) ) ; runTestOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { view.setFocusable ( true ) ; } } ) ; android.view.KeyEvent event = new android.view.KeyEvent ( android.view.KeyEvent.ACTION_DOWN , android.view.KeyEvent.KEYCODE_MENU ) ; getInstrumentation ( ) . sendKeySync ( event ) ; event = new android.view.KeyEvent ( android.view.KeyEvent.ACTION_DOWN , android.view.KeyEvent.KEYCODE_0 ) ; getInstrumentation ( ) . sendKeySync ( event ) ; assertTrue ( view.hasCalledOnKeyShortcut ( ) ) ; }
Source:
public int getSubscriptionCarrierId ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; return service.getSubscriptionCarrierId ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } return android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID ; }

Target:
public int getAndroidCarrierIdForSubscription ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; return service.getSubscriptionCarrierId ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } return android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID ; }
Source:
public void test_writeByte ( ) throws java.lang.Exception { os.writeByte ( ( - 1 ) ) ; os.writeByte ( 0 ) ; os.writeByte ( 1 ) ; os.writeByte ( 129 ) ; os.writeByte ( 4660 ) ; assertEquals ( "[ff, 00, 01, 81, 34]" , libcore.java.io.DataOutputStreamTest.toHexString ( bytes.toByteArray ( ) ) ) ; }

Target:
public void test_writeByte ( ) throws java.lang.Exception { os.writeByte ( ( - 1 ) ) ; os.writeByte ( 0 ) ; os.writeByte ( 1 ) ; os.writeByte ( 129 ) ; os.writeByte ( 4660 ) ; assertEquals ( "FF00018134" , libcore.util.HexEncoding.encodeToString ( bytes.toByteArray ( ) ) ) ; }
Source:
public boolean select ( org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor typeInfoRequestor ) { int modifiers = typeInfoRequestor.getModifiers ( ) ; if ( ( ( ! ( org.eclipse.jdt.core.Flags.isPublic ( modifiers ) ) ) || ( org.eclipse.jdt.core.Flags.isInterface ( modifiers ) ) ) || ( org.eclipse.jdt.core.Flags.isEnum ( modifiers ) ) ) { return false ; } return true ; }

Target:
public boolean select ( org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor typeInfoRequestor ) { int modifiers = typeInfoRequestor.getModifiers ( ) ; if ( ( ( ( ! ( org.eclipse.jdt.core.Flags.isPublic ( modifiers ) ) ) || ( org.eclipse.jdt.core.Flags.isInterface ( modifiers ) ) ) || ( org.eclipse.jdt.core.Flags.isEnum ( modifiers ) ) ) || ( org.eclipse.jdt.core.Flags.isAbstract ( modifiers ) ) ) { return false ; } return true ; }
Source:
public void handleMessage ( android.os.Message msg ) { com.android.internal.telephony.CarrierServiceBindHelper.AppBinding binding ; com.android.internal.telephony.CarrierServiceBindHelper.log ( ( "mHandler: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.internal.telephony.CarrierServiceBindHelper.EVENT_REBIND : binding = ( ( com.android.internal.telephony.CarrierServiceBindHelper.AppBinding ) ( msg.obj ) ) ; com.android.internal.telephony.CarrierServiceBindHelper.log ( ( "Rebinding if necessary for phoneId: " + ( binding.getPhoneId ( ) ) ) ) ; binding.rebind ( ) ; break ; } }

Target:
public void handleMessage ( android.os.Message msg ) { com.android.internal.telephony.CarrierServiceBindHelper.AppBinding binding ; com.android.internal.telephony.CarrierServiceBindHelper.log ( ( "mHandler: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.internal.telephony.CarrierServiceBindHelper.EVENT_REBIND : binding = ( ( com.android.internal.telephony.CarrierServiceBindHelper.AppBinding ) ( msg.obj ) ) ; com.android.internal.telephony.CarrierServiceBindHelper.log ( ( "Rebinding if necessary for phoneId: " + ( binding.getPhoneId ( ) ) ) ) ; binding.rebind ( ) ; break ; case com.android.internal.telephony.CarrierServiceBindHelper.EVENT_PERFORM_IMMEDIATE_UNBIND : binding = ( ( com.android.internal.telephony.CarrierServiceBindHelper.AppBinding ) ( msg.obj ) ) ; binding.performImmediateUnbind ( ) ; break ; } }
Source:
private void onDockChanged ( int dockState ) { if ( ( mDockState ) != dockState ) { com.android.server.telecom.Log.v ( this , "onDockChanged: is docked?%b" , ( dockState == ( android.content.Intent.EXTRA_DOCK_STATE_CAR ) ) ) ; mDockState = dockState ; for ( com.android.server.telecom.DockManager.Listener listener : mListeners ) { listener.onDockChanged ( isDocked ( ) ) ; } } }

Target:
private void onDockChanged ( int dockState ) { if ( ( mDockState ) != dockState ) { android.telecom.Log.v ( this , "onDockChanged: is docked?%b" , ( dockState == ( android.content.Intent.EXTRA_DOCK_STATE_CAR ) ) ) ; mDockState = dockState ; for ( com.android.server.telecom.DockManager.Listener listener : mListeners ) { listener.onDockChanged ( isDocked ( ) ) ; } } }
Source:
public void testRegistrationCallbackGetRegistrationTechDisconnected ( ) throws android.os.RemoteException { com.android.ims.ImsReasonInfo info = new com.android.ims.ImsReasonInfo ( com.android.ims.ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; junit.framework.Assert.assertEquals ( ImsRegistrationImplBase.REGISTRATION_TECH_NONE , mRegBinder.getRegistrationTechnology ( ) ) ; }

Target:
public void testRegistrationCallbackGetRegistrationTechDisconnected ( ) throws android.os.RemoteException { android.telephony.ims.ImsReasonInfo info = new android.telephony.ims.ImsReasonInfo ( ImsReasonInfo.CODE_LOCAL_NETWORK_NO_LTE_COVERAGE , 0 ) ; mRegistration.onDeregistered ( info ) ; org.mockito.Mockito.verify ( mCallback ) . onDeregistered ( org.mockito.ArgumentMatchers.eq ( info ) ) ; junit.framework.Assert.assertEquals ( ImsRegistrationImplBase.REGISTRATION_TECH_NONE , mRegBinder.getRegistrationTechnology ( ) ) ; }
Source:
public void testRotate_alertReminderDialogOpen_shouldNotCrash ( ) { mInstrumentation.startActivitySync ( createActivityIntent ( ) ) ; openAlertReminderDialog ( ) ; try { mDevice.setOrientationLeft ( ) ; mDevice.setOrientationNatural ( ) ; mDevice.setOrientationRight ( ) ; } catch ( java.lang.Exception e ) { junit.framework.Assert.fail ( ( "Exception " + e ) ) ; } }

Target:
public void testRotate_alertReminderDialogOpen_shouldNotCrash ( ) { try { mDevice.wakeUp ( ) ; mDevice.pressMenu ( ) ; } catch ( android.os.RemoteException exception ) { junit.framework.Assert.fail ( ( "Exception " + exception ) ) ; } mInstrumentation.startActivitySync ( createActivityIntent ( ) ) ; openAlertReminderDialog ( ) ; try { mDevice.setOrientationLeft ( ) ; mDevice.setOrientationNatural ( ) ; mDevice.setOrientationRight ( ) ; } catch ( java.lang.Exception e ) { junit.framework.Assert.fail ( ( "Exception " + e ) ) ; } }
Source:
public void testCreateMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; org.mockito.Mockito.when ( mTestImsService.mSpyMMTelFeature.getFeatureState ( ) ) . thenReturn ( ImsFeature.STATE_READY ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getImsFeatureMap ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertEquals ( mTestImsService.mSpyMMTelFeature , mTestImsService.getImsFeatureFromType ( features , ImsFeature.MMTEL ) ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . setImsFeatureStatusCallback ( org.mockito.Matchers.eq ( mTestCallback ) ) ; junit.framework.Assert.assertEquals ( ImsFeature.STATE_READY , mTestImsServiceBinder.getFeatureStatus ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL ) ) ; }

Target:
public void testCreateMMTelFeature ( ) throws android.os.RemoteException { mTestImsServiceBinder.createImsFeature ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL , mTestCallback ) ; org.mockito.Mockito.when ( mTestImsService.mSpyMMTelFeature.getFeatureState ( ) ) . thenReturn ( ImsFeature.STATE_READY ) ; android.util.SparseArray < android.telephony.ims.feature.ImsFeature > features = mTestImsService.getImsFeatureMap ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 ) ; junit.framework.Assert.assertEquals ( mTestImsService.mSpyMMTelFeature , mTestImsService.getImsFeatureFromType ( features , ImsFeature.MMTEL ) ) ; org.mockito.Mockito.verify ( mTestImsService.mSpyMMTelFeature ) . addImsFeatureStatusCallback ( org.mockito.Matchers.eq ( mTestCallback ) ) ; junit.framework.Assert.assertEquals ( ImsFeature.STATE_READY , mTestImsServiceBinder.getFeatureStatus ( android.telephony.ims.ImsServiceTest.TEST_SLOT_0 , ImsFeature.MMTEL ) ) ; }
Source:
public void testPackageOverridePackageFromFlavorWithSuffix ( ) { com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilder ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) , false ) ; mFlavor.setPackageName ( "foo.bar" ) ; mDebug.setPackageNameSuffix ( ".fortytwo" ) ; builder.setBuildVariant ( mMain , mFlavor , mDebug ) ; assertEquals ( "foo.bar.fortytwo" , builder.getPackageOverride ( "" ) ) ; }

Target:
public void testPackageOverridePackageFromFlavorWithSuffix ( ) { com.android.builder.AndroidBuilder builder = new com.android.builder.AndroidBuilderTest.AndroidBuilderMock ( new com.android.builder.DefaultSdkParser ( "" ) , new com.android.utils.StdLogger ( StdLogger.Level.ERROR ) , false ) ; mFlavor.getProductFlavor ( ) . setPackageName ( "foo.bar" ) ; mDebug.getBuildType ( ) . setPackageNameSuffix ( ".fortytwo" ) ; builder.setBuildVariant ( mMain , mDebug ) ; builder.addProductFlavor ( mFlavor ) ; assertEquals ( "foo.bar.fortytwo" , builder.getPackageOverride ( "" ) ) ; }
Source:
public void testExtraPathWithSlash ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + "<r:extra> <r:revision>1</r:revision> <r:path>path/cannot\\contain\\segments</r:path> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:extra>" ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-pattern-valid: Value \'path/cannot\\\\contain\\\\segments\' is not facet-valid with respect to pattern.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }

Target:
public void testExtraPathWithSlash ( ) throws java.lang.Exception { java.lang.String document = ( ( ( ( "<?xml version=\"1.0\"?>" + ( com.android.sdklib.repository.SdkRepositoryTest.OPEN_TAG ) ) + "<r:extra> <r:revision>1</r:revision> <r:path>path/cannot\\contain\\segments</r:path> " ) + "<r:archives> <r:archive os=\"any\"> <r:size>1</r:size> <r:checksum>2822ae37115ebf13412bbef91339ee0d9454525e</r:checksum> " ) + "<r:url>url</r:url> </r:archive> </r:archives> </r:extra>" ) + ( com.android.sdklib.repository.SdkRepositoryTest.CLOSE_TAG ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( new java.io.StringReader ( document ) ) ; javax.xml.validation.Validator validator = getRepoValidator ( SdkRepoConstants.NS_LATEST_VERSION , null ) ; try { validator.validate ( source ) ; } catch ( org.xml.sax.SAXParseException e ) { assertRegex ( "cvc-pattern-valid: Value \'path/cannot\\\\contain\\\\segments\' is not facet-valid with respect to pattern.*" , e.getMessage ( ) ) ; return ; } fail ( ) ; }
Source:
public void removeSession ( com.android.se.SecureElementService.SecureElementSession session ) { if ( session == null ) { throw new java.lang.NullPointerException ( "session is null" ) ; } mSessions.remove ( session ) ; }

Target:
public void removeSession ( com.android.se.SecureElementService.SecureElementSession session ) { if ( session == null ) { throw new java.lang.NullPointerException ( "session is null" ) ; } mSessions.remove ( session ) ; synchronized ( mLock ) { if ( ( mSessions.size ( ) ) == 0 ) { mDefaultApplicationSelectedOnBasicChannel = true ; } } }
Source:
public void testEnumConstructor ( ) throws java.lang.NoSuchMethodException , java.lang.SecurityException { java.lang.reflect.Constructor < ? > constructor = com.android.jack.java8.parameter.test002.Tests.Number.class . getDeclaredConstructor ( java.lang.String.class , int . class ) ; junit.framework.Assert.assertEquals ( 2 , constructor.getParameters ( ) . length ) ; check ( constructor.getParameters ( ) [ 0 ] , "enum$name" , true , false , true , com.android.jack.java8.parameter.test002.Tests.MODIFIER_SYNTHETIC ) ; check ( constructor.getParameters ( ) [ 1 ] , "enum$ordinal" , true , false , true , com.android.jack.java8.parameter.test002.Tests.MODIFIER_SYNTHETIC ) ; }

Target:
public void testEnumConstructor ( ) throws java.lang.NoSuchMethodException , java.lang.SecurityException { java.lang.reflect.Constructor < ? > constructor = com.android.jack.java8.parameter.test002.Tests.Number.class . getDeclaredConstructor ( java.lang.String.class , int . class ) ; junit.framework.Assert.assertEquals ( 2 , constructor.getParameters ( ) . length ) ; check ( constructor.getParameters ( ) [ 0 ] , "enum$name" , true , false , true , ParameterTestModifier.MODIFIER_SYNTHETIC ) ; check ( constructor.getParameters ( ) [ 1 ] , "enum$ordinal" , true , false , true , ParameterTestModifier.MODIFIER_SYNTHETIC ) ; }
Source:
protected void tearDown ( ) throws java.lang.Exception { if ( ( mVerify ) != null ) { mVerify.destroy ( ) ; mVerify = null ; } super . tearDown ( ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { if ( ( mVerify ) != null ) { mVerify.destroy ( ) ; } if ( ( mAllocSrc ) != null ) { mAllocSrc.destroy ( ) ; } if ( ( mAllocRef ) != null ) { mAllocRef.destroy ( ) ; } if ( ( mAllocDst ) != null ) { mAllocDst.destroy ( ) ; } super . tearDown ( ) ; }
Source:
private void broadcastOnSdkReload ( ) { if ( ( mListeners.size ( ) ) > 0 ) { runOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( com.android.sdklib.repository.ISdkChangeListener listener : mListeners ) { try { listener.onSdkReload ( ) ; } catch ( java.lang.Throwable t ) { mSdkLog.error ( t , null ) ; } } } } ) ; } }

Target:
private void broadcastOnSdkReload ( ) { if ( ! ( mListeners.isEmpty ( ) ) ) { runOnUiThread ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { for ( com.android.sdklib.repository.ISdkChangeListener listener : mListeners ) { try { listener.onSdkReload ( ) ; } catch ( java.lang.Throwable t ) { mSdkLog.error ( t , null ) ; } } } } ) ; } }
Source:
public void dragFinished ( org.eclipse.swt.dnd.DragSourceEvent e ) { if ( ( e.detail ) == ( org.eclipse.swt.dnd.DND.DROP_MOVE ) ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "dragFinished => MOVE" ) ; mLayoutEditor.wrapUndoRecording ( "Remove drag'n'drop source elements" , new java.lang.Runnable ( ) { public void run ( ) { mLayoutEditor.editXmlModel ( new java.lang.Runnable ( ) { public void run ( ) { cutDragSelection ( ) ; } } ) ; } } ) ; } mDragSelection.clear ( ) ; mDragElements = null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.GlobalCanvasDragInfo.getInstance ( ) . stopDrag ( ) ; }

Target:
public void dragFinished ( org.eclipse.swt.dnd.DragSourceEvent e ) { if ( ( e.detail ) == ( org.eclipse.swt.dnd.DND.DROP_MOVE ) ) { com.android.ide.eclipse.adt.AdtPlugin.printToConsole ( "CanvasDND" , "dragFinished => MOVE" ) ; mLayoutEditor.wrapUndoRecording ( "Remove drag'n'drop source elements" , new java.lang.Runnable ( ) { public void run ( ) { mLayoutEditor.editXmlModel ( new java.lang.Runnable ( ) { public void run ( ) { deleteSelection ( "Remove" , mDragSelection ) ; } } ) ; } } ) ; } mDragSelection.clear ( ) ; mDragElements = null ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.GlobalCanvasDragInfo.getInstance ( ) . stopDrag ( ) ; }
Source:
public void testRemoveAll ( ) { java.util.concurrent.CopyOnWriteArrayList full = jsr166.CopyOnWriteArrayListTest.populatedArray ( 3 ) ; java.util.Vector v = new java.util.Vector ( ) ; v.add ( one ) ; v.add ( two ) ; full.removeAll ( v ) ; assertEquals ( 1 , full.size ( ) ) ; }

Target:
public void testEmptyIterator ( ) { java.util.Collection c = new java.util.concurrent.CopyOnWriteArrayList ( ) ; assertIteratorExhausted ( c.iterator ( ) ) ; }
Source:
public void testDockActivity ( ) throws java.lang.Exception { if ( ! ( supportsMultiWindowMode ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }

Target:
public void testDockActivity ( ) throws java.lang.Exception { if ( ( ! ( supportsMultiWindowMode ( ) ) ) || ( ! ( supportsSplitScreenMultiWindow ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain home stack." , android.server.cts.HOME_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }
Source:
public void initComponent ( ) { checkJvm ( ) ; checkIBusPresent ( ) ; com.intellij.ide.SystemHealthMonitor.startDiskSpaceMonitoring ( ) ; }

Target:
public void appClosing ( ) { myProperties.setValue ( com.intellij.ide.SystemHealthMonitor.STUDIO_ACTIVITY_COUNT , java.lang.Long.toString ( com.intellij.ide.SystemHealthMonitor.ourStudioActionCount.get ( ) ) ) ; java.lang.String recordFile = java.lang.System.getProperty ( "studio.record.file" ) ; if ( ! ( com.google.common.base.Strings.isNullOrEmpty ( recordFile ) ) ) { com.intellij.openapi.util.io.FileUtil.delete ( new java.io.File ( recordFile ) ) ; } }
Source:
public void connectionForPutRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.Put request = new com.android.volley.mock.TestRequest.Put ( ) ; assertEquals ( request.getMethod ( ) , Method.PUT ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "PUT" , mMockConnection.getRequestMethod ( ) ) ; assertFalse ( mMockConnection.getDoOutput ( ) ) ; }

Target:
public void connectionForPostWithBodyRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.PostWithBody request = new com.android.volley.mock.TestRequest.PostWithBody ( ) ; org.junit.Assert.assertEquals ( request.getMethod ( ) , Method.POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; org.mockito.Mockito.verify ( mMockConnection ) . setRequestMethod ( "POST" ) ; org.mockito.Mockito.verify ( mMockConnection ) . setDoOutput ( true ) ; }
Source:
public void execute ( java.lang.Runnable task ) { if ( task == null ) throw new java.lang.NullPointerException ( ) ; java.util.concurrent.ForkJoinTask < ? > job ; if ( task instanceof java.util.concurrent.ForkJoinTask < ? > ) job = ( ( java.util.concurrent.ForkJoinTask < ? > ) ( task ) ) ; else job = new java.util.concurrent.ForkJoinTask.AdaptedRunnableAction ( task ) ; externalPush ( job ) ; }

Target:
public void execute ( java.lang.Runnable task ) { if ( task == null ) throw new java.lang.NullPointerException ( ) ; java.util.concurrent.ForkJoinTask < ? > job ; if ( task instanceof java.util.concurrent.ForkJoinTask < ? > ) job = ( ( java.util.concurrent.ForkJoinTask < ? > ) ( task ) ) ; else job = new java.util.concurrent.ForkJoinTask.RunnableExecuteAction ( task ) ; externalPush ( job ) ; }
Source:
public void testStringFromCharset ( ) { java.nio.charset.Charset cs = java.nio.charset.Charset.forName ( "UTF-8" ) ; byte [ ] bytes = new byte [ ] { ( ( byte ) ( 'h' ) ) , ( ( byte ) ( 'i' ) ) } ; assertEquals ( "hi" , new java.lang.String ( bytes , cs ) ) ; }

Target:
public void testString_BIIString ( ) throws java.lang.Exception { byte [ ] bytes = "xa٦bx" . getBytes ( "UTF-8" ) ; assertEquals ( "a٦b" , new java.lang.String ( bytes , 1 , ( ( bytes.length ) - 2 ) , "UTF-8" ) ) ; }
Source:
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_reference227 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_METHOD , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_METHOD_in_method_literal3840 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_method_reference_in_method_literal3842 ) ; method_reference227 = method_reference ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = method_reference227 ; } } 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_reference222 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_METHOD , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_METHOD_in_method_literal3725 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_method_reference_in_method_literal3727 ) ; method_reference222 = method_reference ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = method_reference222 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
private boolean shouldStubAsDefaultMethod ( int access , java.lang.String name , java.lang.String desc ) { return ( com.google.devtools.build.android.desugar.DefaultMethodClassFixer.isNonBridgeDefaultMethod ( access ) ) && ( ! ( instanceMethods.contains ( ( ( name + ":" ) + desc ) ) ) ) ; }

Target:
private boolean shouldStubAsDefaultMethod ( int access , java.lang.String name , java.lang.String desc ) { return ( com.google.devtools.build.android.desugar.BitFlags.noneSet ( access , ( ( ( ( org.objectweb.asm.Opcodes.ACC_ABSTRACT ) | ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) | ( org.objectweb.asm.Opcodes.ACC_BRIDGE ) ) | ( org.objectweb.asm.Opcodes.ACC_PRIVATE ) ) ) ) && ( ! ( instanceMethods.contains ( ( ( name + ":" ) + desc ) ) ) ) ; }
Source:
public void run ( ) { pair.listener.stopping ( from ) ; }

Target:
private void stopping ( final com.google.common.util.concurrent.Service.State from ) { if ( from == ( com.google.common.util.concurrent.Service.State.STARTING ) ) { com.google.common.util.concurrent.AbstractService.STOPPING_FROM_STARTING_CALLBACK.enqueueOn ( listeners ) ; } else if ( from == ( com.google.common.util.concurrent.Service.State.RUNNING ) ) { com.google.common.util.concurrent.AbstractService.STOPPING_FROM_RUNNING_CALLBACK.enqueueOn ( listeners ) ; } else { throw new java.lang.AssertionError ( ) ; } }
Source:
static com.android.ddmlib.IDevice createMockDevice ( ) { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; org.easymock.EasyMock.expect ( mockDevice.getSerialNumber ( ) ) . andStubReturn ( "serial" ) ; return mockDevice ; }

Target:
static com.android.ddmlib.IDevice createMockDevice ( ) { com.android.ddmlib.IDevice mockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; org.easymock.EasyMock.expect ( mockDevice.getSerialNumber ( ) ) . andStubReturn ( "serial" ) ; org.easymock.EasyMock.expect ( mockDevice.isOnline ( ) ) . andStubReturn ( java.lang.Boolean.TRUE ) ; return mockDevice ; }
Source:
boolean disconnect ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_DISCONNECT , device ) ; mHandler.sendMessage ( msg ) ; return true ; }

Target:
boolean disconnect ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.hid.HidService.DBG ) android.util.Log.d ( com.android.bluetooth.hid.HidService.TAG , ( "disconnect: " + ( device.getAddress ( ) ) ) ) ; enforceCallingOrSelfPermission ( com.android.bluetooth.hid.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidService.MESSAGE_DISCONNECT , device ) ; mHandler.sendMessage ( msg ) ; return true ; }
Source:
private boolean containsCallId ( java.util.List < com.android.ims.ImsExternalCallState > externalCallStates , int callId ) { if ( externalCallStates == null ) { return false ; } for ( com.android.ims.ImsExternalCallState state : externalCallStates ) { if ( ( state.getCallId ( ) ) == callId ) { return true ; } } return false ; }

Target:
private boolean containsCallId ( java.util.List < android.telephony.ims.ImsExternalCallState > externalCallStates , int callId ) { if ( externalCallStates == null ) { return false ; } for ( android.telephony.ims.ImsExternalCallState state : externalCallStates ) { if ( ( state.getCallId ( ) ) == callId ) { return true ; } } return false ; }
Source:
public int enableFirmwareRoaming ( int state ) { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "enableFirmwareRoaming: state =" + state ) ) ; try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.enableFirmwareRoaming ( state ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } return - 1 ; }

Target:
public android.net.wifi.WifiWakeReasonAndCounts getWlanWakeReasonCount ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getWlanWakeReasonCount ( ) ; } else { android.util.Log.d ( com.android.server.wifi.WifiNative.TAG , ( "getWlanWakeReasonCount " + ( com.android.server.wifi.WifiNative.sWlan0Index ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getWlanWakeReasonCountNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return null ; } } } }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.autocomplete_5 ) ; android.content.ContentResolver content = getContentResolver ( ) ; android.database.Cursor cursor = content.query ( Contacts.People.CONTENT_URI , com.example.android.apis.view.AutoComplete5.PEOPLE_PROJECTION , null , null , Contacts.People.DEFAULT_SORT_ORDER ) ; com.example.android.apis.view.AutoComplete4.ContactListAdapter adapter = new com.example.android.apis.view.AutoComplete4.ContactListAdapter ( this , cursor ) ; android.widget.AutoCompleteTextView textView = ( ( android.widget.AutoCompleteTextView ) ( findViewById ( R.id.edit ) ) ) ; textView.setAdapter ( adapter ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.autocomplete_5 ) ; android.content.ContentResolver content = getContentResolver ( ) ; android.database.Cursor cursor = content.query ( Contacts.CONTENT_URI , AutoComplete4.CONTACT_PROJECTION , null , null , null ) ; com.example.android.apis.view.AutoComplete4.ContactListAdapter adapter = new com.example.android.apis.view.AutoComplete4.ContactListAdapter ( this , cursor ) ; android.widget.AutoCompleteTextView textView = ( ( android.widget.AutoCompleteTextView ) ( findViewById ( R.id.edit ) ) ) ; textView.setAdapter ( adapter ) ; }
Source:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { com.android.sched.vfs.WriteZipFS vfs = new com.android.sched.vfs.WriteZipFS ( new com.android.sched.util.file.OutputZipFile ( string , hooks , existence , change ) ) ; return new com.android.sched.vfs.GenericOutputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { com.android.sched.vfs.WriteZipFS vfs = new com.android.sched.vfs.WriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change ) ) ; return new com.android.sched.vfs.GenericOutputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public void test2 ( ) throws java.lang.Exception { mEnabled = com.android.tools.lint.checks.IconDetectorTest.ALL ; assertEquals ( ( "res/drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png [IconDuplicates]\n" + ( ( ( ( ( " res/drawable-hdpi/appwidget_bg.9.png: <No location-specific message\n" + "res/drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png [IconDuplicates]\n" ) + " res/drawable-hdpi/ic_launcher.png: <No location-specific message\n" ) + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }

Target:
public void test2 ( ) throws java.lang.Exception { mEnabled = com.android.tools.lint.checks.IconDetectorTest.ALL ; assertEquals ( ( "res/drawable-hdpi/other.9.png: Warning: The following unrelated icon files have identical contents: appwidget_bg.9.png, other.9.png [IconDuplicates]\n" + ( ( ( ( ( " res/drawable-hdpi/appwidget_bg.9.png: <No location-specific message\n" + "res/drawable-hdpi/unrelated.png: Warning: The following unrelated icon files have identical contents: ic_launcher.png, unrelated.png [IconDuplicates]\n" ) + " res/drawable-hdpi/ic_launcher.png: <No location-specific message\n" ) + "res: Warning: Missing density variation folders in res: drawable-mdpi, drawable-xhdpi, drawable-xxhdpi [IconMissingDensityFolder]\n" ) + "0 errors, 3 warnings\n" ) + "" ) ) , lintProject ( "res/drawable-hdpi/unrelated.png" , "res/drawable-hdpi/appwidget_bg.9.png" , "res/drawable-hdpi/appwidget_bg_focus.9.png" , "res/drawable-hdpi/other.9.png" , "res/drawable-hdpi/ic_launcher.png" ) ) ; }
Source:
public void log ( java.lang.String log ) { synchronized ( mLogText ) { mLogText.append ( "=> " ) . append ( log ) ; } }

Target:
public void log ( java.lang.String log ) { if ( acceptLog ( log ) ) { if ( ( mLog ) != null ) { mLog.printf ( " %1$s" , log ) ; } else { synchronized ( mLogText ) { mLogText.append ( " " ) . append ( log ) ; } } } }
Source:
public void test_JarFile_Modified_SF_EntryAttributes ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Modified_SF_EntryAttributes.jar" ; tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( new java.io.File ( resources , modifiedJarName ) , true ) ; java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; try { jarFile.getInputStream ( zipEntry ) ; fail ( "should throw Security Exception" ) ; } catch ( java.lang.SecurityException e ) { } } }

Target:
public void test_Jar_created_before_java_5 ( ) throws java.io.IOException { java.lang.String modifiedJarName = "Created_by_1_4.jar" ; java.io.File file = tests.support.resource.Support_Resources.copyFile ( resources , null , modifiedJarName ) ; try ( java.util.jar.JarFile jarFile = new java.util.jar.JarFile ( file , true ) ) { java.util.Enumeration < java.util.jar.JarEntry > entries = jarFile.entries ( ) ; while ( entries.hasMoreElements ( ) ) { java.util.zip.ZipEntry zipEntry = entries.nextElement ( ) ; jarFile.getInputStream ( zipEntry ) ; } } }