auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean requestDrawGL ( android.view.HardwareCanvas canvas , android.view.ViewRootImpl viewRootImpl ) { if ( ( mDestroyRunnable.mNativeDrawGLFunctor ) == 0 ) { throw new java.lang.RuntimeException ( "requested DrawGL on already destroyed DrawGLFunctor" ) ; } mDestroyRunnable.mViewRootImpl = viewRootImpl ; if ( canvas != null ) { int ret = canvas.callDrawGLFunction ( mDestroyRunnable.mNativeDrawGLFunctor ) ; if ( ret != ( android.view.DisplayList.STATUS_DONE ) ) { android.util.Log.e ( com.android.webview.chromium.DrawGLFunctor.TAG , ( "callDrawGLFunction error: " + ret ) ) ; return false ; } } else { viewRootImpl.attachFunctor ( mDestroyRunnable.mNativeDrawGLFunctor ) ; } return true ; }

Target:
public boolean requestDrawGL ( android.view.HardwareCanvas canvas , android.view.ViewRootImpl viewRootImpl ) { if ( ( mDestroyRunnable.mNativeDrawGLFunctor ) == 0 ) { throw new java.lang.RuntimeException ( "requested DrawGL on already destroyed DrawGLFunctor" ) ; } mDestroyRunnable.mViewRootImpl = viewRootImpl ; if ( canvas != null ) { int ret = canvas.callDrawGLFunction ( mDestroyRunnable.nativeDrawGLFunctor ( ) ) ; if ( ret != ( android.view.DisplayList.STATUS_DONE ) ) { android.util.Log.e ( com.android.webview.chromium.DrawGLFunctor.TAG , ( "callDrawGLFunction error: " + ret ) ) ; return false ; } } else { viewRootImpl.attachFunctor ( mDestroyRunnable.nativeDrawGLFunctor ( ) ) ; } return true ; }
Source:
public static void lowLevelReboot ( java.lang.String reason ) { if ( reason == null ) { reason = "" ; } long duration ; if ( reason.equals ( PowerManager.REBOOT_RECOVERY ) ) { android.os.SystemProperties.set ( "ctl.start" , "pre-recovery" ) ; duration = 300 * 1000L ; } else { android.os.SystemProperties.set ( "sys.powerctl" , ( "reboot," + reason ) ) ; duration = 20 * 1000L ; } try { java.lang.Thread.sleep ( duration ) ; } catch ( java.lang.InterruptedException e ) { java.lang.Thread.currentThread ( ) . interrupt ( ) ; } }

Target:
public static void lowLevelReboot ( java.lang.String reason ) { if ( reason == null ) { reason = "" ; } if ( reason.equals ( PowerManager.REBOOT_RECOVERY ) ) { android.os.SystemProperties.set ( "ctl.start" , "pre-recovery" ) ; } else { android.os.SystemProperties.set ( "sys.powerctl" , ( "reboot," + reason ) ) ; } try { java.lang.Thread.sleep ( ( 20 * 1000L ) ) ; } catch ( java.lang.InterruptedException e ) { java.lang.Thread.currentThread ( ) . interrupt ( ) ; } android.util.Slog.wtf ( com.android.server.power.PowerManagerService.TAG , "Unexpected return from lowLevelReboot!" ) ; }
Source:
public java.lang.String getDisplayName ( java.util.Locale locale ) { java.util.Objects.requireNonNull ( locale , "locale" ) ; if ( ( displayNameKey ) == null ) { return name ; } sun.util.locale.provider.LocaleResources lr = sun.util.locale.provider.LocaleProviderAdapter.getResourceBundleBased ( ) . getLocaleResources ( locale ) ; java.util.ResourceBundle rb = lr.getJavaTimeFormatData ( ) ; java.lang.String key = "field." + ( displayNameKey ) ; return rb.containsKey ( key ) ? rb.getString ( key ) : name ; }

Target:
public java.lang.String getDisplayName ( java.util.Locale locale ) { java.util.Objects.requireNonNull ( locale , "locale" ) ; if ( ( displayNameKey ) == null ) { return name ; } android.icu.text.DateTimePatternGenerator generator = android.icu.text.DateTimePatternGenerator.getFrozenInstance ( android.icu.util.ULocale.forLocale ( locale ) ) ; java.lang.String icuName = generator.getAppendItemName ( java.time.temporal.ChronoField.getIcuFieldNumber ( this ) ) ; return ( icuName != null ) && ( ! ( icuName.isEmpty ( ) ) ) ? icuName : name ; }
Source:
public void testDeserializeNullUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200376c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( ( "3742453657269616c697a61626c65436f6e7461696e657200000000000000000200014c000e756e7" + "3657269616c697a61626c657400334c6c6962636f72652f6a6176612f696f2f53657269616c697a6" ) + "174696f6e546573742457617353657269616c697a61626c653b787070" ) ; libcore.java.io.SerializationTest.serializableContainerInitializedFlag = false ; libcore.java.io.SerializationTest.wasSerializableInitializedFlag = false ; libcore.java.io.SerializationTest.SerializableContainer sc = ( ( libcore.java.io.SerializationTest.SerializableContainer ) ( libcore.util.SerializationTester.deserializeHex ( s ) ) ) ; assertNull ( sc.unserializable ) ; assertTrue ( libcore.java.io.SerializationTest.serializableContainerInitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.wasSerializableInitializedFlag ) ; }

Target:
public void testDeserializeNullUnserializableField ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200386c6962636f72652e6a6176612e696f2e53657269616c697a6174696f6e54657" + ( "3742453657269616c697a61626c65436f6e7461696e65723100000000000000000200014c000e7" + "56e73657269616c697a61626c657400124c6a6176612f6c616e672f4f626a6563743b787070" ) ; assertFalse ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; libcore.java.io.SerializationTest.SerializableContainer1 sc = ( ( libcore.java.io.SerializationTest.SerializableContainer1 ) ( libcore.util.SerializationTester.deserializeHex ( s ) ) ) ; assertNull ( sc.unserializable ) ; assertTrue ( libcore.java.io.SerializationTest.serializableContainer1InitializedFlag ) ; assertFalse ( libcore.java.io.SerializationTest.unserializable1InitializedFlag ) ; }
Source:
public static int getNetworkClass ( int networkType ) { switch ( networkType ) { case android.telephony.TelephonyManager.NETWORK_TYPE_GPRS : case android.telephony.TelephonyManager.NETWORK_TYPE_GSM : case android.telephony.TelephonyManager.NETWORK_TYPE_EDGE : case android.telephony.TelephonyManager.NETWORK_TYPE_CDMA : case android.telephony.TelephonyManager.NETWORK_TYPE_1xRTT : case android.telephony.TelephonyManager.NETWORK_TYPE_IDEN : return android.telephony.TelephonyManager.NETWORK_CLASS_2_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_UMTS : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_0 : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_A : case android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPA : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_B : case android.telephony.TelephonyManager.NETWORK_TYPE_EHRPD : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP : case android.telephony.TelephonyManager.NETWORK_TYPE_TD_SCDMA : return android.telephony.TelephonyManager.NETWORK_CLASS_3_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_LTE : case android.telephony.TelephonyManager.NETWORK_TYPE_IWLAN : return android.telephony.TelephonyManager.NETWORK_CLASS_4_G ; default : return android.telephony.TelephonyManager.NETWORK_CLASS_UNKNOWN ; } }

Target:
public static int getNetworkClass ( int networkType ) { switch ( networkType ) { case android.telephony.TelephonyManager.NETWORK_TYPE_GPRS : case android.telephony.TelephonyManager.NETWORK_TYPE_GSM : case android.telephony.TelephonyManager.NETWORK_TYPE_EDGE : case android.telephony.TelephonyManager.NETWORK_TYPE_CDMA : case android.telephony.TelephonyManager.NETWORK_TYPE_1xRTT : case android.telephony.TelephonyManager.NETWORK_TYPE_IDEN : return android.telephony.TelephonyManager.NETWORK_CLASS_2_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_UMTS : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_0 : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_A : case android.telephony.TelephonyManager.NETWORK_TYPE_HSDPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSUPA : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPA : case android.telephony.TelephonyManager.NETWORK_TYPE_EVDO_B : case android.telephony.TelephonyManager.NETWORK_TYPE_EHRPD : case android.telephony.TelephonyManager.NETWORK_TYPE_HSPAP : case android.telephony.TelephonyManager.NETWORK_TYPE_TD_SCDMA : return android.telephony.TelephonyManager.NETWORK_CLASS_3_G ; case android.telephony.TelephonyManager.NETWORK_TYPE_LTE : case android.telephony.TelephonyManager.NETWORK_TYPE_IWLAN : case android.telephony.TelephonyManager.NETWORK_TYPE_LTE_CA : return android.telephony.TelephonyManager.NETWORK_CLASS_4_G ; default : return android.telephony.TelephonyManager.NETWORK_CLASS_UNKNOWN ; } }
Source:
public < T extends com.android.sched.marker.Marker > T removeMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { synchronized ( lock ) { if ( ( markers ) == null ) { return null ; } } return ( ( T ) ( markers.remove ( cls ) ) ) ; }

Target:
public < T extends com.android.sched.marker.Marker > T removeMarker ( @ javax.annotation.Nonnull java.lang.Class < T > cls ) { synchronized ( lock ) { if ( ( markers ) == null ) { return null ; } T result = ( ( T ) ( markers.remove ( cls ) ) ) ; if ( markers.isEmpty ( ) ) { markers = null ; } return result ; } }
Source:
public void test_with_adjustment ( ) { final java.time.LocalDate sample = java.time.LocalDate.of ( 2012 , 3 , 4 ) ; java.time.temporal.TemporalAdjuster adjuster = new java.time.temporal.TemporalAdjuster ( ) { @ java.lang.Override public java.time.temporal.Temporal adjustInto ( java.time.temporal.Temporal dateTime ) { return sample ; } } ; org.testng.Assert.assertEquals ( TEST_2007_07_15.with ( adjuster ) , sample ) ; }

Target:
public void test_with_adjustment ( ) { final java.time.LocalDate sample = java.time.LocalDate.of ( 2012 , 3 , 4 ) ; java.time.temporal.TemporalAdjuster adjuster = new java.time.temporal.TemporalAdjuster ( ) { @ java.lang.Override public java.time.temporal.Temporal adjustInto ( java.time.temporal.Temporal dateTime ) { return sample ; } } ; org.testng.Assert.assertEquals ( tck.java.time.TCKLocalDate.TEST_2007_07_15.with ( adjuster ) , sample ) ; }
Source:
private android.telecom.PhoneAccountHandle getAnyPhoneAccount ( ) { android.telecom.PhoneAccountHandle accountHandle ; android.telecom.TelecomManager telecomManager = mContext.getSystemService ( android.telecom.TelecomManager.class ) ; accountHandle = telecomManager.getDefaultOutgoingPhoneAccount ( PhoneAccount.SCHEME_TEL ) ; if ( accountHandle == null ) { java.util.List < android.telecom.PhoneAccountHandle > accountHandles = telecomManager.getCallCapablePhoneAccounts ( ) ; if ( ! ( accountHandles.isEmpty ( ) ) ) { accountHandle = accountHandles.get ( 0 ) ; } } return accountHandle ; }

Target:
public void onAudioStateChanged ( android.telecom.CallAudioState audioState ) { if ( ( com.android.incallui.call.CallList.getInstance ( ) . getActiveOrBackgroundCall ( ) ) == null ) { return ; } updateNotification ( ) ; }
Source:
public java.lang.String uninstallPackage ( java.lang.String packageName ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { com.android.ddmlib.Device.InstallReceiver receiver = new com.android.ddmlib.Device.InstallReceiver ( ) ; executeShellCommand ( ( "pm uninstall " + packageName ) , receiver , com.android.ddmlib.Device.INSTALL_TIMEOUT ) ; return receiver.getErrorMessage ( ) ; }

Target:
public java.lang.String uninstallPackage ( java.lang.String packageName ) throws com.android.ddmlib.InstallException { try { com.android.ddmlib.Device.InstallReceiver receiver = new com.android.ddmlib.Device.InstallReceiver ( ) ; executeShellCommand ( ( "pm uninstall " + packageName ) , receiver , com.android.ddmlib.Device.INSTALL_TIMEOUT ) ; return receiver.getErrorMessage ( ) ; } catch ( com.android.ddmlib.TimeoutException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( com.android.ddmlib.ShellCommandUnresponsiveException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } catch ( java.io.IOException e ) { throw new com.android.ddmlib.InstallException ( e ) ; } }
Source:
public void notifyLost ( java.net.InetAddress ip , java.lang.String logMsg ) { sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_IP_REACHABILITY_LOST , logMsg ) ; }

Target:
public void enter ( ) { ( mRssiPollToken ) ++ ; if ( mEnableRssiPolling ) { sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_RSSI_POLL , mRssiPollToken , 0 ) ; } if ( ( mNetworkAgent ) != null ) { loge ( "Have NetworkAgent when entering L2Connected" ) ; setNetworkDetailedState ( DetailedState.DISCONNECTED ) ; } setNetworkDetailedState ( DetailedState.CONNECTING ) ; mNetworkAgent = new com.android.server.wifi.WifiStateMachine.WifiNetworkAgent ( getHandler ( ) . getLooper ( ) , mContext , "WifiNetworkAgent" , mNetworkInfo , mNetworkCapabilitiesFilter , mLinkProperties , 60 , mNetworkMisc ) ; clearTargetBssid ( "L2ConnectedState" ) ; mCountryCode.setReadyForChange ( false ) ; mWifiMetrics.setWifiState ( WifiMetricsProto.WifiLog.WIFI_ASSOCIATED ) ; }
Source:
public void onDestroy ( ) { stop ( ) ; mTelephonyManager.listen ( mPhoneStateListener , 0 ) ; if ( ( mTts ) != null ) { try { mTts.shutdown ( ) ; } catch ( java.lang.IllegalStateException e ) { com.android.cellbroadcastreceiver.CellBroadcastAlertAudio.loge ( "exception trying to shutdown text-to-speech" ) ; } } if ( mEnableAudio ) { mAudioManager.abandonAudioFocus ( null ) ; } com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.releaseCpuLock ( ) ; }

Target:
public void onDestroy ( ) { stop ( ) ; mTelephonyManager.listen ( mPhoneStateListener , 0 ) ; if ( ( mTts ) != null ) { try { mTts.shutdown ( ) ; } catch ( java.lang.IllegalStateException e ) { com.android.cellbroadcastreceiver.CellBroadcastAlertAudio.loge ( "exception trying to shutdown text-to-speech" ) ; } } if ( mEnableAudio ) { mAudioManager.abandonAudioFocus ( null ) ; } com.android.cellbroadcastreceiver.CellBroadcastAlertWakeLock.releaseScreenBrightWakeLock ( ) ; }
Source:
public com.android.ide.common.process.ProcessResult execute ( @ com.android.annotations.NonNull com.android.ide.common.process.ProcessInfo processInfo , @ com.android.annotations.NonNull com.android.ide.common.process.ProcessOutputHandler processOutputHandler ) { com.android.ide.common.process.ProcessOutput output = processOutputHandler.createOutput ( ) ; org.gradle.process.ExecResult result = project.exec ( com.android.build.gradle.internal.process.GradleProcessExecutor.getExecClosure ( processInfo , output ) ) ; processOutputHandler.handleOutput ( output ) ; return new com.android.build.gradle.internal.process.GradleProcessResult ( result ) ; }

Target:
public com.android.ide.common.process.ProcessResult execute ( @ com.android.annotations.NonNull com.android.ide.common.process.ProcessInfo processInfo , @ com.android.annotations.NonNull com.android.ide.common.process.ProcessOutputHandler processOutputHandler ) { com.android.ide.common.process.ProcessOutput output = processOutputHandler.createOutput ( ) ; final org.gradle.process.ExecResult result = project.exec ( new com.android.build.gradle.internal.process.GradleProcessExecutor.ExecAction ( processInfo , output ) ) ; try { processOutputHandler.handleOutput ( output ) ; } catch ( final com.android.ide.common.process.ProcessException e ) { return new com.android.build.gradle.internal.process.OutputHandlerFailedGradleProcessResult ( e ) ; } return new com.android.build.gradle.internal.process.GradleProcessResult ( result ) ; }
Source:
public void pullFile ( java.lang.String remote , java.lang.String local ) throws java.io.IOException { try { iDevice.pullFile ( remote , local ) ; } catch ( com.android.ddmlib.TimeoutException e ) { throw new java.io.IOException ( e ) ; } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { throw new java.io.IOException ( e ) ; } catch ( com.android.ddmlib.SyncException e ) { throw new java.io.IOException ( e ) ; } }

Target:
public void pullFile ( java.lang.String remote , java.lang.String local ) throws java.io.IOException { try { iDevice.pullFile ( remote , local ) ; } catch ( com.android.ddmlib.TimeoutException e ) { throw new java.io.IOException ( java.lang.String.format ( "Failed to pull %s from device" , remote ) , e ) ; } catch ( com.android.ddmlib.AdbCommandRejectedException e ) { throw new java.io.IOException ( java.lang.String.format ( "Failed to pull %s from device" , remote ) , e ) ; } catch ( com.android.ddmlib.SyncException e ) { throw new java.io.IOException ( java.lang.String.format ( "Failed to pull %s from device" , remote ) , e ) ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JBinaryOperation expr ) { if ( expr instanceof com.android.jack.ir.ast.JConditionalOperation ) { throw new com.android.jack.ir.JNodeInternalError ( expr , "JConditionalOperation is not allowed on this level" ) ; } if ( ! ( expr instanceof com.android.jack.ir.ast.JAsgOperation ) ) { return expr.canThrow ( ) ? visitThrowingRValue ( expr ) : visitNonThrowingOperation ( expr ) ; } confirmBlockElement ( expr ) ; confirmParent ( expr , com.android.jack.ir.ast.cfg.JVariableAsgBlockElement.class , com.android.jack.ir.ast.cfg.JStoreBlockElement.class ) ; return true ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JBinaryOperation expr ) { if ( expr instanceof com.android.jack.ir.ast.JConditionalOperation ) { throw new com.android.jack.ir.JNodeInternalError ( expr , "JConditionalOperation is not allowed in cfg-IR" ) ; } if ( expr instanceof com.android.jack.ir.ast.JAsgOperation ) { confirmBlockElement ( expr ) ; confirmParent ( expr , com.android.jack.ir.ast.cfg.JVariableAsgBlockElement.class , com.android.jack.ir.ast.cfg.JStoreBlockElement.class ) ; } else { if ( expr.canThrow ( ) ) { visitThrowingRValue ( expr ) ; } else { visitNonThrowingOperation ( expr ) ; } } return true ; }
Source:
public static int $noinline$returnInt ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 100000000 ; ++ i ) { } while ( ! ( Main.ensureInOsrCode ( ) ) ) { } java.lang.System.out.println ( i ) ; return 53 ; }

Target:
public static int $noinline$returnInt ( ) { if ( Main.doThrow ) throw new java.lang.Error ( "" ) ; int i = 0 ; for ( ; i < 100000 ; ++ i ) { } while ( ! ( Main.ensureInOsrCode ( ) ) ) { } java.lang.System.out.println ( i ) ; return 53 ; }
Source:
public static java.util.List < com.android.internal.telephony.gsm.stk.ComprehensionTlv > decodeMany ( byte [ ] data , int startIndex ) throws com.android.internal.telephony.gsm.stk.ResultException { java.util.ArrayList < com.android.internal.telephony.gsm.stk.ComprehensionTlv > items = new java.util.ArrayList < com.android.internal.telephony.gsm.stk.ComprehensionTlv > ( ) ; int endIndex = data.length ; while ( startIndex < endIndex ) { com.android.internal.telephony.gsm.stk.ComprehensionTlv ctlv = com.android.internal.telephony.gsm.stk.ComprehensionTlv.decode ( data , startIndex ) ; items.add ( ctlv ) ; startIndex = ( ctlv.mValueIndex ) + ( ctlv.mLength ) ; } return items ; }

Target:
public static java.util.List < com.android.internal.telephony.cat.ComprehensionTlv > decodeMany ( byte [ ] data , int startIndex ) throws com.android.internal.telephony.cat.ResultException { java.util.ArrayList < com.android.internal.telephony.cat.ComprehensionTlv > items = new java.util.ArrayList < com.android.internal.telephony.cat.ComprehensionTlv > ( ) ; int endIndex = data.length ; while ( startIndex < endIndex ) { com.android.internal.telephony.cat.ComprehensionTlv ctlv = com.android.internal.telephony.cat.ComprehensionTlv.decode ( data , startIndex ) ; items.add ( ctlv ) ; startIndex = ( ctlv.mValueIndex ) + ( ctlv.mLength ) ; } return items ; }
Source:
public final int getInt ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } int result = this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }

Target:
public final byte get ( ) { if ( ( position ) == ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } return this . block.peekByte ( ( ( offset ) + ( ( position ) ++ ) ) ) ; }
Source:
public com.google.gct.testing.GoogleCloudTestingPersistentConfiguration getPersistentConfiguration ( ) { com.google.gct.testing.GoogleCloudTestingPersistentConfiguration persistentConfiguration = new com.google.gct.testing.GoogleCloudTestingPersistentConfiguration ( ) ; persistentConfiguration.id = id ; persistentConfiguration.name = name ; persistentConfiguration.devices = getEnabledTypes ( deviceDimension ) ; persistentConfiguration.apiLevels = getEnabledTypes ( apiDimension ) ; persistentConfiguration.languages = getEnabledTypes ( languageDimension ) ; persistentConfiguration.orientations = getEnabledTypes ( orientationDimension ) ; return persistentConfiguration ; }

Target:
public com.google.gct.testing.CloudPersistentConfiguration getPersistentConfiguration ( ) { com.google.gct.testing.CloudPersistentConfiguration persistentConfiguration = new com.google.gct.testing.CloudPersistentConfiguration ( ) ; persistentConfiguration.id = id ; persistentConfiguration.name = name ; persistentConfiguration.kind = kind ; persistentConfiguration.devices = getEnabledTypes ( deviceDimension ) ; persistentConfiguration.apiLevels = getEnabledTypes ( apiDimension ) ; persistentConfiguration.languages = getEnabledTypes ( languageDimension ) ; persistentConfiguration.orientations = getEnabledTypes ( orientationDimension ) ; return persistentConfiguration ; }
Source:
private static java.lang.String getCacheKey ( java.lang.String url , int maxWidth , int maxHeight ) { return new java.lang.StringBuilder ( ( ( url.length ( ) ) + 12 ) ) . append ( "#W" ) . append ( maxWidth ) . append ( "#H" ) . append ( maxHeight ) . append ( url ) . toString ( ) ; }

Target:
private static java.lang.String getCacheKey ( java.lang.String url , int maxWidth , int maxHeight , android.widget.ImageView.ScaleType scaleType ) { return new java.lang.StringBuilder ( ( ( url.length ( ) ) + 12 ) ) . append ( "#W" ) . append ( maxWidth ) . append ( "#H" ) . append ( maxHeight ) . append ( "#S" ) . append ( scaleType.ordinal ( ) ) . append ( url ) . toString ( ) ; }
Source:
public static < E extends java.lang.Comparable < ? super E > > com.google.common.collect.ImmutableSortedSet < E > of ( E e1 , E e2 , E e3 , E e4 ) { return com.google.common.collect.ImmutableSortedSet.copyOf ( com.google.common.collect.Ordering.natural ( ) , java.util.Arrays.asList ( e1 , e2 , e3 , e4 ) ) ; }

Target:
public static < E extends java.lang.Comparable < ? super E > > com.google.common.collect.ImmutableSortedSet < E > of ( E e1 , E e2 , E e3 , E e4 ) { return com.google.common.collect.ImmutableSortedSet.construct ( com.google.common.collect.Ordering.natural ( ) , 4 , e1 , e2 , e3 , e4 ) ; }
Source:
public static void setupDefaultConfig ( @ com.android.annotations.NonNull org.gradle.api.Project project , @ com.android.annotations.NonNull org.gradle.api.artifacts.Configuration configuration ) { org.gradle.api.artifacts.Configuration defaultConfig = project.configurations [ "default" ] ; defaultConfig.setExtendsFrom ( com.android.build.gradle.internal.variant.Collections.singleton ( configuration ) ) ; com.android.build.gradle.internal.variant.Set < org.gradle.api.artifacts.Configuration > flattenedConfigs = com.android.build.gradle.internal.variant.VariantHelper.flattenConfigurations ( configuration ) ; project.plugins.withType ( org.gradle.api.plugins.MavenPlugin ) ; }

Target:
public void execute ( org.gradle.api.artifacts.maven.MavenDeployer mavenDeployer ) { for ( org.gradle.api.artifacts.Configuration config : flattenedConfigs ) { mavenDeployer.getPom ( ) . getScopeMappings ( ) . addMapping ( 300 , project.getConfigurations ( ) . getByName ( config.getName ( ) ) , "compile" ) ; } }
Source:
private java.lang.String getTestResultString ( int testResult ) { int resId = 0 ; switch ( testResult ) { case TestResult.TEST_RESULT_PASSED : resId = R.string.pass_result ; break ; case TestResult.TEST_RESULT_FAILED : resId = R.string.fail_result ; break ; case TestResult.TEST_RESULT_NOT_EXECUTED : resId = R.string.not_executed_result ; break ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown test result: " + testResult ) ) ; } return mContext.getString ( resId ) ; }

Target:
private java.lang.String getTestResultString ( int testResult ) { switch ( testResult ) { case TestResult.TEST_RESULT_PASSED : return "pass" ; case TestResult.TEST_RESULT_FAILED : return "fail" ; case TestResult.TEST_RESULT_NOT_EXECUTED : return "not-executed" ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown test result: " + testResult ) ) ; } }
Source:
public void testRedo_setText ( ) { initTextViewForTyping ( ) ; mInstrumentation.sendStringSync ( "abc" ) ; mActivity.runOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { mTextView.onTextContextMenuItem ( android.R.id.undo ) ; mTextView.setText ( "Hello" , BufferType.EDITABLE ) ; mTextView.onTextContextMenuItem ( android.R.id.redo ) ; assertEquals ( "Hello" , mTextView.getText ( ) . toString ( ) ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; }

Target:
public void testRedo_setText ( ) { initTextViewForTyping ( ) ; mKeyEventUtil.sendString ( mTextView , "abc" ) ; mActivity.runOnUiThread ( new java.lang.Runnable ( ) { public void run ( ) { mTextView.onTextContextMenuItem ( android.R.id.undo ) ; mTextView.setText ( "Hello" , BufferType.EDITABLE ) ; mTextView.onTextContextMenuItem ( android.R.id.redo ) ; assertEquals ( "Hello" , mTextView.getText ( ) . toString ( ) ) ; } } ) ; mInstrumentation.waitForIdleSync ( ) ; }
Source:
public void onReceivedHttpAuthRequest ( org.chromium.android_webview.AwHttpAuthHandler handler , java.lang.String host , java.lang.String realm ) { org.chromium.base.TraceEvent.begin ( ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedHttpAuthRequest=" + host ) ) ; mWebViewClient.onReceivedHttpAuthRequest ( mWebView , new com.android.webview.chromium.WebViewContentsClientAdapter.AwHttpAuthHandlerAdapter ( handler ) , host , realm ) ; org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onReceivedHttpAuthRequest ( org.chromium.android_webview.AwHttpAuthHandler handler , java.lang.String host , java.lang.String realm ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onReceivedHttpAuthRequest" ) ; if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , ( "onReceivedHttpAuthRequest=" + host ) ) ; mWebViewClient.onReceivedHttpAuthRequest ( mWebView , new com.android.webview.chromium.WebViewContentsClientAdapter.AwHttpAuthHandlerAdapter ( handler ) , host , realm ) ; } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onReceivedHttpAuthRequest" ) ; } }
Source:
public static void computeExp10 ( android.renderscript.cts.TestExp10.ArgumentsFloatFloat args ) { args.ulf = 3 ; args.ulfRelaxed = 16 ; args.out = ( ( float ) ( java.lang.StrictMath.pow ( 10.0 , args.in ) ) ) ; }

Target:
private static float length ( float [ ] array ) { float sum = 0.0F ; for ( int i = 0 ; i < ( array.length ) ; i ++ ) { sum += ( array [ i ] ) * ( array [ i ] ) ; } return ( ( float ) ( java.lang.StrictMath.sqrt ( sum ) ) ) ; }
Source:
public void getSmscAddress ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GET_SMSC_ADDRESS , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }

Target:
public void resetRadio ( android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_RESET_RADIO , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; send ( rr ) ; }
Source:
private boolean simpleLaunch ( com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo launchInfo , com.android.ddmlib.IDevice device ) { if ( ( checkBuildInfo ( launchInfo , device ) ) == false ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , "Launch canceled!" ) ; stopLaunch ( launchInfo ) ; return false ; } if ( ( syncApp ( launchInfo , device ) ) == false ) { com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , "Launch canceled!" ) ; stopLaunch ( launchInfo ) ; return false ; } launchApp ( launchInfo , device ) ; return true ; }

Target:
private void multiLaunch ( com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo launchInfo , java.util.Collection < com.android.ddmlib.IDevice > devices ) { for ( com.android.ddmlib.IDevice d : devices ) { boolean success = doPreLaunchActions ( launchInfo , d ) ; if ( ! success ) { java.lang.String deviceName = ( d.isEmulator ( ) ) ? d.getAvdName ( ) : d.getSerialNumber ( ) ; com.android.ide.eclipse.adt.AdtPlugin.printErrorToConsole ( launchInfo.getProject ( ) , ( "Launch failed on device: " + deviceName ) ) ; continue ; } doLaunchAction ( launchInfo , d ) ; } stopLaunch ( launchInfo ) ; }
Source:
public void pass ( ) { log ( "OK!\n" , Color.GREEN ) ; mLocationVerifier = null ; nextTest ( ) ; }

Target:
public void pass ( ) { log ( "OK!\n" , Color.GREEN ) ; try { java.lang.Thread.sleep ( 2000 ) ; log ( "(Sleep 2 second) \n" , Color.GREEN ) ; } catch ( java.lang.InterruptedException e ) { fail ( "unexpected InterruptedException when sleep" ) ; } mLocationVerifier = null ; nextTest ( ) ; }
Source:
void removeClient ( com.android.ddmlib.Client client , boolean notify ) { mMonitor.addPortToAvailableList ( client.getDebuggerListenPort ( ) ) ; synchronized ( mClients ) { mClients.remove ( client ) ; } if ( notify ) { mMonitor.getServer ( ) . deviceChanged ( this , com.android.ddmlib.CHANGE_CLIENT_LIST ) ; } }

Target:
void removeClient ( com.android.ddmlib.Client client , boolean notify ) { mMonitor.addPortToAvailableList ( client.getDebuggerListenPort ( ) ) ; synchronized ( mClients ) { mClients.remove ( client ) ; } if ( notify ) { mMonitor.getServer ( ) . deviceChanged ( this , com.android.ddmlib.CHANGE_CLIENT_LIST ) ; } removeClientInfo ( client ) ; }
Source:
static com.android.jack.shrob.spec.NameSpecification name ( java.lang.String name , @ javax.annotation.Nonnull com.android.jack.shrob.proguard.GrammarActions.FilterSeparator separator ) { assert name != null ; java.lang.String transformedName = ( "^" + ( com.android.jack.shrob.proguard.GrammarActions.convertNameToPattern ( name , separator ) ) ) + "$" ; java.util.regex.Pattern pattern = java.util.regex.Pattern.compile ( transformedName ) ; return new com.android.jack.shrob.spec.NameSpecification ( pattern ) ; }

Target:
static com.android.jack.shrob.spec.NameSpecification name ( java.lang.String name , @ javax.annotation.Nonnull com.android.jack.shrob.proguard.GrammarActions.FilterSeparator separator ) { assert name != null ; java.lang.String transformedName = ( "^" + ( com.android.jack.shrob.proguard.GrammarActions.convertNameToRegex ( name , separator ) ) ) + "$" ; java.util.regex.Pattern pattern = java.util.regex.Pattern.compile ( transformedName ) ; return new com.android.jack.shrob.spec.NameSpecification ( pattern ) ; }
Source:
private void loadProviders ( ) { synchronized ( mLock ) { if ( com.android.server.LocationManagerService.sProvidersLoaded ) { return ; } loadProvidersLocked ( ) ; com.android.server.LocationManagerService.sProvidersLoaded = true ; } }

Target:
private void checkCallerIsProvider ( ) { if ( ( mContext.checkCallingOrSelfPermission ( com.android.server.LocationManagerService.INSTALL_LOCATION_PROVIDER ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return ; } int uid = android.os.Binder.getCallingUid ( ) ; if ( ( mGeocodeProvider ) != null ) { if ( doesPackageHaveUid ( uid , mGeocodeProvider.getConnectedPackageName ( ) ) ) return ; } for ( com.android.server.location.LocationProviderProxy proxy : mProxyProviders ) { if ( doesPackageHaveUid ( uid , proxy.getConnectedPackageName ( ) ) ) return ; } throw new java.lang.SecurityException ( ( "need INSTALL_LOCATION_PROVIDER permission, " + "or UID of a currently bound location provider" ) ) ; }
Source:
public void testParseInfinityBigDecimalFalse ( ) { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.DecimalFormat.getInstance ( ) ) ) ; java.text.DecimalFormatSymbols symbols = new java.text.DecimalFormatSymbols ( ) ; java.lang.Number number = format.parse ( symbols.getInfinity ( ) , new java.text.ParsePosition ( 0 ) ) ; assertTrue ( ( number instanceof java.lang.Double ) ) ; assertTrue ( java.lang.Double.isInfinite ( number.doubleValue ( ) ) ) ; }

Target:
public void test_parse_infinityBigDecimalFalse ( ) { java.text.DecimalFormat format = ( ( java.text.DecimalFormat ) ( java.text.NumberFormat.getInstance ( ) ) ) ; java.text.DecimalFormatSymbols symbols = new java.text.DecimalFormatSymbols ( ) ; java.lang.Number number = format.parse ( symbols.getInfinity ( ) , new java.text.ParsePosition ( 0 ) ) ; assertTrue ( ( number instanceof java.lang.Double ) ) ; assertTrue ( java.lang.Double.isInfinite ( number.doubleValue ( ) ) ) ; }
Source:
public void TestFixedDecimalMarkup ( ) { com.ibm.icu.util.ULocale en = new com.ibm.icu.util.ULocale ( "en" ) ; com.ibm.icu.text.DecimalFormat decfmt = ( ( com.ibm.icu.text.DecimalFormat ) ( com.ibm.icu.text.NumberFormat.getInstance ( en ) ) ) ; java.text.AttributedCharacterIterator iterator = decfmt.formatToCharacterIterator ( 123456.0 ) ; com.ibm.icu.text.ScientificFormatHelper helper = com.ibm.icu.text.ScientificFormatHelper.getInstance ( decfmt.getDecimalFormatSymbols ( ) ) ; try { helper.insertMarkup ( iterator , "<sup>" , "</sup>" ) ; fail ( "expected illegal argument exception" ) ; } catch ( java.lang.IllegalArgumentException expected ) { } }

Target:
public void TestFixedDecimalMarkup ( ) { com.ibm.icu.util.ULocale en = new com.ibm.icu.util.ULocale ( "en" ) ; com.ibm.icu.text.DecimalFormat decfmt = ( ( com.ibm.icu.text.DecimalFormat ) ( com.ibm.icu.text.NumberFormat.getInstance ( en ) ) ) ; java.text.AttributedCharacterIterator iterator = decfmt.formatToCharacterIterator ( 123456.0 ) ; com.ibm.icu.text.ScientificFormatHelper helper = com.ibm.icu.text.ScientificFormatHelper.getInstance ( decfmt.getDecimalFormatSymbols ( ) ) ; assertEquals ( "" , "123,456" , helper.insertMarkup ( iterator , "<sup>" , "</sup>" ) ) ; }
Source:
public com.android.ide.common.api.DropFeedback callOnDropEnter ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.IDragElement [ ] elements ) { com.android.ide.common.api.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.onDropEnter ( targetNode , elements ) ; } catch ( java.lang.Exception e ) { logError ( "%s.onDropEnter() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }

Target:
public com.android.ide.common.api.DropFeedback callOnDropEnter ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy targetNode , com.android.ide.common.api.IDragElement [ ] elements ) { com.android.ide.common.api.IViewRule rule = loadRule ( targetNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.onDropEnter ( targetNode , elements ) ; } catch ( java.lang.Exception e ) { com.android.ide.eclipse.adt.AdtPlugin.log ( e , "%s.onDropEnter() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }
Source:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return false ; return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothPbap.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }

Target:
public boolean isConnected ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "isConnected " + device ) ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) { return false ; } return ( ( service.getState ( ) ) == ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( service.getRemoteDevice ( ) . equals ( device ) ) ; }
Source:
private void startVibrate ( ) { if ( ! ( mIsVibrating ) ) { mVibrator.vibrate ( com.android.services.telephony.EmergencyTonePlayer.VIBRATE_PATTERN , 0 , com.android.services.telephony.EmergencyTonePlayer.VIBRATION_ATTRIBUTES ) ; mIsVibrating = true ; } }

Target:
private void startVibrate ( ) { int ringerMode = mAudioManager.getRingerMode ( ) ; if ( ringerMode == ( android.media.AudioManager.RINGER_MODE_SILENT ) ) { com.android.services.telephony.Log.i ( this , "startVibrate: skipping vibrate tone due to ringer mode %d" , ringerMode ) ; return ; } if ( ! ( mIsVibrating ) ) { mVibrator.vibrate ( com.android.services.telephony.EmergencyTonePlayer.VIBRATE_PATTERN , 0 , com.android.services.telephony.EmergencyTonePlayer.VIBRATION_ATTRIBUTES ) ; mIsVibrating = true ; } }
Source:
public java.lang.Boolean getHandleProfiling ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { config = getTestedConfig ( ) ; } java.lang.Boolean handleProfiling = config.mMergedFlavor.getTestHandleProfiling ( ) ; return handleProfiling != null ? handleProfiling : com.android.builder.core.VariantConfiguration.DEFAULT_HANDLE_PROFILING ; }

Target:
public int getVersionCode ( ) { int versionCode = ( ( mMergedFlavor.getVersionCode ( ) ) != null ) ? mMergedFlavor.getVersionCode ( ) : - 1 ; if ( ( versionCode == ( - 1 ) ) && ( ! ( mType.isForTesting ( ) ) ) ) { versionCode = getVersionCodeFromManifest ( ) ; } return versionCode ; }
Source:
protected void sendUrgentData ( int value ) throws java.io.IOException { try { byte [ ] buffer = new byte [ ] { ( ( byte ) ( value ) ) } ; Libcore.os.sendto ( fd , buffer , 0 , 1 , java.net.MSG_OOB , null , 0 ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }

Target:
protected void sendUrgentData ( int value ) throws java.io.IOException { try { byte [ ] buffer = new byte [ ] { ( ( byte ) ( value ) ) } ; Libcore.os.sendto ( fd , buffer , 0 , 1 , java.net.MSG_OOB , null , 0 ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
public void exiting ( java.lang.String sourceClass , java.lang.String sourceMethod ) { if ( ( java.util.logging.Level.FINER.intValue ( ) ) < ( levelValue ) ) { return ; } logp ( java.util.logging.Level.FINER , sourceClass , sourceMethod , "RETURN" ) ; }

Target:
public void logrb ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String bundleName , java.lang.String msg , java.lang.Object [ ] params ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; lr.setParameters ( params ) ; doLog ( lr , bundleName ) ; }
Source:
public void ctorDoesNotCrashEvenIfReleaseFileIsMissing ( ) throws java.lang.Exception { mTraceReleaseFile.delete ( ) ; new com.android.server.wifi.LastMileLogger ( mWifiInjector , mTraceDataFile.getPath ( ) , mTraceEnableFile.getPath ( ) , mTraceReleaseFile.getPath ( ) ) ; org.mockito.Mockito.verify ( mLog ) . warn ( org.mockito.Matchers.contains ( "Failed" ) ) ; }

Target:
public void connectionEventStartedDoesNotEnableTracingForInvalidConnectionId ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( ( - 1 ) , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; org.junit.Assert.assertEquals ( "0" , libcore.io.IoUtils.readFileAsString ( mTraceEnableFile.getPath ( ) ) ) ; }
Source:
public com.android.sdklib.internal.repository.UserCredentials displayLoginCredentialsPrompt ( final java.lang.String title , final java.lang.String message ) { org.eclipse.swt.widgets.Display display = mDialogShell.getDisplay ( ) ; com.android.sdkuilib.internal.tasks.ProgressTaskDialog.GetUserCredentialsTask task = new com.android.sdkuilib.internal.tasks.ProgressTaskDialog.GetUserCredentialsTask ( mDialogShell , title , message ) ; display.syncExec ( task ) ; return new com.android.sdklib.internal.repository.UserCredentials ( task.userName , task.password , task.workstation , task.domain ) ; }

Target:
public com.android.sdklib.internal.repository.UserCredentials displayLoginCredentialsPrompt ( final java.lang.String title , final java.lang.String message ) { org.eclipse.swt.widgets.Display display = mDialogShell.getDisplay ( ) ; com.android.sdkuilib.internal.tasks.ProgressTaskDialog.GetUserCredentialsTask task = new com.android.sdkuilib.internal.tasks.ProgressTaskDialog.GetUserCredentialsTask ( mDialogShell , title , message ) ; display.syncExec ( task ) ; return task.getUserCredentials ( ) ; }
Source:
public void test_useLocale_LLocale ( ) { s = new java.util.Scanner ( "test" ) ; try { s.useLocale ( null ) ; fail ( "Should throw NullPointerException" ) ; } catch ( java.lang.NullPointerException e ) { } s.useLocale ( new java.util.Locale ( "test" , "test" ) ) ; assertEquals ( new java.util.Locale ( "test" , "test" ) , s.locale ( ) ) ; }

Target:
public void test_useDelimiter_String ( ) { s = new java.util.Scanner ( "test" ) ; try { s.useDelimiter ( ( ( java.lang.String ) ( null ) ) ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } s = new java.util.Scanner ( "test" ) ; s.useDelimiter ( "\\w+" ) ; assertEquals ( "\\w+" , s.delimiter ( ) . toString ( ) ) ; }
Source:
private com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder processFolder ( com.android.io.IAbstractFolder folder , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources project ) { java.lang.String [ ] folderSegments = folder.getName ( ) . split ( AndroidConstants.RES_QUALIFIER_SEP ) ; com.android.resources.ResourceFolderType type = com.android.resources.ResourceFolderType.getTypeByName ( folderSegments [ 0 ] ) ; if ( type != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = getConfig ( folderSegments ) ; if ( config != null ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder configuredFolder = project.add ( type , config , folder ) ; return configuredFolder ; } } return null ; }

Target:
private com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder processFolder ( com.android.io.IAbstractFolder folder , com.android.ide.eclipse.adt.internal.resources.manager.ResourceRepository resources ) { java.lang.String [ ] folderSegments = folder.getName ( ) . split ( AndroidConstants.RES_QUALIFIER_SEP ) ; com.android.resources.ResourceFolderType type = com.android.resources.ResourceFolderType.getTypeByName ( folderSegments [ 0 ] ) ; if ( type != null ) { com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = getConfig ( folderSegments ) ; if ( config != null ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder configuredFolder = resources.add ( type , config , folder ) ; return configuredFolder ; } } return null ; }
Source:
private void sendAck ( ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_RESPONSE_ACKNOWLEDGEMENT , null , mRILDefaultWorkSource ) ; acquireWakeLock ( rr , com.android.internal.telephony.RIL.FOR_ACK_WAKELOCK ) ; android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( null ) ; if ( radioProxy != null ) { try { radioProxy.responseAcknowledgement ( ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { resetProxyAndRequestList ( ) ; riljLoge ( "sendAck" , e ) ; } } else { android.telephony.Rlog.e ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , "Error trying to send ack, radioProxy = null" ) ; } rr.release ( ) ; }

Target:
private void sendAck ( ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_RESPONSE_ACKNOWLEDGEMENT , null , mRILDefaultWorkSource ) ; acquireWakeLock ( rr , com.android.internal.telephony.RIL.FOR_ACK_WAKELOCK ) ; android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( null ) ; if ( radioProxy != null ) { try { radioProxy.responseAcknowledgement ( ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { resetProxyAndRequestList ( ) ; riljLoge ( ( "sendAck: " + e ) ) ; } } else { android.telephony.Rlog.e ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , "Error trying to send ack, radioProxy = null" ) ; } rr.release ( ) ; }
Source:
private void generateMessageFromNative ( android.bluetooth.BluetoothDevice device , int newConnectionState , int oldConnectionState ) { com.android.bluetooth.a2dp.A2dpStackEvent stackEvent = new com.android.bluetooth.a2dp.A2dpStackEvent ( A2dpStackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED ) ; stackEvent.device = device ; stackEvent.valueInt = newConnectionState ; mA2dpService.messageFromNative ( stackEvent ) ; verifyConnectionStateIntent ( com.android.bluetooth.a2dp.A2dpServiceTest.TIMEOUT_MS , device , newConnectionState , oldConnectionState ) ; }

Target:
private void generateConnectionMessageFromNative ( android.bluetooth.BluetoothDevice device , int newConnectionState , int oldConnectionState ) { com.android.bluetooth.a2dp.A2dpStackEvent stackEvent = new com.android.bluetooth.a2dp.A2dpStackEvent ( A2dpStackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED ) ; stackEvent.device = device ; stackEvent.valueInt = newConnectionState ; mA2dpService.messageFromNative ( stackEvent ) ; verifyConnectionStateIntent ( com.android.bluetooth.a2dp.A2dpServiceTest.TIMEOUT_MS , device , newConnectionState , oldConnectionState ) ; }
Source:
public void dumpDisplayListForCurrentNode ( ) { final com.android.hierarchyviewerlib.ui.util.DrawableViewNode selectedNode = com.android.hierarchyviewerlib.models.TreeViewModel.getModel ( ) . getSelection ( ) ; if ( selectedNode != null ) { executeInBackground ( "Dump displaylist" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { com.android.hierarchyviewerlib.device.DeviceBridge.outputDisplayList ( selectedNode.viewNode ) ; } } ) ; } }

Target:
private void loadViewRecursive ( com.android.hierarchyviewerlib.models.ViewNode viewNode ) { com.android.hierarchyviewerlib.device.IHvDevice hvDevice = getHvDevice ( viewNode.window.getDevice ( ) ) ; org.eclipse.swt.graphics.Image image = hvDevice.loadCapture ( viewNode.window , viewNode ) ; if ( image == null ) { return ; } viewNode.image = image ; final int N = viewNode.children.size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { loadViewRecursive ( viewNode.children.get ( i ) ) ; } }
Source:
public boolean selectNext ( ) throws java.io.IOException { if ( ! ( mService.isConnected ( ) ) ) { throw new java.lang.IllegalStateException ( "service not connected to system" ) ; } try { synchronized ( mLock ) { return mChannel.selectNext ( ) ; } } catch ( android.os.RemoteException e ) { throw new java.io.IOException ( e.getMessage ( ) ) ; } }

Target:
public boolean selectNext ( ) throws java.io.IOException { if ( ! ( mService.isConnected ( ) ) ) { throw new java.lang.IllegalStateException ( "service not connected to system" ) ; } try { synchronized ( mLock ) { return mChannel.selectNext ( ) ; } } catch ( android.os.ServiceSpecificException e ) { throw new java.io.IOException ( e.getMessage ( ) ) ; } catch ( android.os.RemoteException e ) { throw new java.lang.IllegalStateException ( e.getMessage ( ) ) ; } }