auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static java.util.List < java.lang.String > getSignatureNameList ( @ javax.annotation.Nonnull java.util.List < ? extends com.android.jack.ir.ast.JType > types ) { int typesNumber = types.size ( ) ; java.util.List < java.lang.String > signatures = new java.util.ArrayList < java.lang.String > ( typesNumber ) ; for ( com.android.jack.ir.ast.JType type : types ) { signatures.add ( com.android.jack.jayce.v0003.NNode.getFormatter ( ) . getName ( type ) ) ; } return signatures ; }

Target:
public static java.util.List < java.lang.String > getSignatureNameList ( @ javax.annotation.Nonnull java.util.Collection < ? extends com.android.jack.ir.ast.JType > types ) { int typesNumber = types.size ( ) ; java.util.List < java.lang.String > signatures = new java.util.ArrayList < java.lang.String > ( typesNumber ) ; for ( com.android.jack.ir.ast.JType type : types ) { signatures.add ( com.android.jack.jayce.v0003.NNode.getFormatter ( ) . getName ( type ) ) ; } return signatures ; }
Source:
private void verifyMethodCanBeRunByStandardRunner ( junitparams.internal.TestMethod testMethod ) { java.util.List < java.lang.Throwable > errors = new java.util.ArrayList < java.lang.Throwable > ( ) ; testMethod.frameworkMethod ( ) . validatePublicVoidNoArg ( false , errors ) ; if ( ! ( errors.isEmpty ( ) ) ) { throw new java.lang.RuntimeException ( errors.get ( 0 ) ) ; } }

Target:
private junitparams.internal.DescribableFrameworkMethod getDescribableMethod ( org.junit.runners.model.FrameworkMethod method ) { if ( ! ( method instanceof junitparams.internal.DescribableFrameworkMethod ) ) { throw new java.lang.IllegalArgumentException ( ( ( "Unsupported FrameworkMethod class: " + ( method.getClass ( ) ) ) + ", expected a DescribableFrameworkMethod subclass" ) ) ; } return ( ( junitparams.internal.DescribableFrameworkMethod ) ( method ) ) ; }
Source:
static java.lang.String getResourceForFirstArg ( org.w3c.dom.Node method , org.w3c.dom.Node call ) { assert ( call instanceof lombok.ast.MethodInvocation ) || ( call instanceof lombok.ast.ConstructorInvocation ) ; com.android.tools.lint.checks.StringFormatDetector.StringTracker tracker = new com.android.tools.lint.checks.StringFormatDetector.StringTracker ( method , call , 0 ) ; method.accept ( tracker ) ; java.lang.String name = tracker.getFormatStringName ( ) ; return name ; }

Target:
static java.lang.String getResourceArg ( org.w3c.dom.Node method , org.w3c.dom.Node call , int argIndex ) { assert ( call instanceof lombok.ast.MethodInvocation ) || ( call instanceof lombok.ast.ConstructorInvocation ) ; com.android.tools.lint.checks.StringFormatDetector.StringTracker tracker = new com.android.tools.lint.checks.StringFormatDetector.StringTracker ( null , method , call , argIndex ) ; method.accept ( tracker ) ; java.lang.String name = tracker.getFormatStringName ( ) ; return name ; }
Source:
android.icu.text.DecimalFormat getDecimalFormat ( ) { if ( ( decimalFormat ) == null ) { decimalFormat = ( ( android.icu.text.DecimalFormat ) ( android.icu.text.NumberFormat.getInstance ( locale ) ) ) ; if ( ( decimalFormatSymbols ) != null ) { decimalFormat.setDecimalFormatSymbols ( decimalFormatSymbols ) ; } } return decimalFormat ; }

Target:
android.icu.text.NFRule getDefaultInfinityRule ( ) { if ( ( defaultInfinityRule ) == null ) { defaultInfinityRule = new android.icu.text.NFRule ( this , ( "Inf: " + ( getDecimalFormatSymbols ( ) . getInfinity ( ) ) ) ) ; } return defaultInfinityRule ; }
Source:
private void testRSA_ECB_NoPadding_GetParameters_NoneProvided_Success ( java.lang.String provider ) throws java.lang.Exception { java.security.KeyFactory kf = java.security.KeyFactory.getInstance ( "RSA" ) ; java.security.spec.RSAPublicKeySpec pubKeySpec = new java.security.spec.RSAPublicKeySpec ( libcore.javax.crypto.CipherTest.RSA_2048_modulus , libcore.javax.crypto.CipherTest.RSA_2048_publicExponent ) ; final java.security.PublicKey pubKey = kf.generatePublic ( pubKeySpec ) ; javax.crypto.Cipher c = javax.crypto.Cipher.getInstance ( "RSA/ECB/NoPadding" , provider ) ; assertNull ( "Parameters should be null" , c.getParameters ( ) ) ; }

Target:
private void testRSA_ECB_NoPadding_GetParameters_NoneProvided_Success ( java.lang.String provider ) throws java.lang.Exception { final java.security.PublicKey pubKey = ( ( java.security.PublicKey ) ( libcore.javax.crypto.CipherTest.getEncryptKey ( "RSA" ) ) ) ; javax.crypto.Cipher c = javax.crypto.Cipher.getInstance ( "RSA/ECB/NoPadding" , provider ) ; assertNull ( "Parameters should be null" , c.getParameters ( ) ) ; }
Source:
public java.lang.String getPropertySync ( java.lang.String name ) throws com.android.ddmlib.AdbCommandRejectedException , com.android.ddmlib.ShellCommandUnresponsiveException , com.android.ddmlib.TimeoutException , java.io.IOException { java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch ( 1 ) ; com.android.ddmlib.CollectingOutputReceiver receiver = new com.android.ddmlib.CollectingOutputReceiver ( latch ) ; executeShellCommand ( java.lang.String.format ( "getprop '%s'" , name ) , receiver , com.android.ddmlib.Device.GETPROP_TIMEOUT ) ; try { latch.await ( com.android.ddmlib.Device.GETPROP_TIMEOUT , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { return null ; } java.lang.String value = receiver.getOutput ( ) . trim ( ) ; if ( value.isEmpty ( ) ) { return null ; } return value ; }

Target:
public java.lang.String getProperty ( java.lang.String name ) { java.util.concurrent.Future < java.lang.String > future = mPropFetcher.getProperty ( name ) ; try { return future.get ( 1 , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } catch ( java.util.concurrent.ExecutionException e ) { } catch ( java.util.concurrent.TimeoutException e ) { } return null ; }
Source:
public void testRefactor1 ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT , false , true , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Rename package \'com.example.refactoringtest\' to \'my.pkg.name\'\n" ) + "\n" ) + "* MainActivity.java - /testRefactor1/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -3 +3\n" ) + " + import com.example.refactoringtest.R;\n" ) + " +\n" ) + "\n" ) + "\n" ) + "* activity_main.xml - /testRefactor1/res/layout/activity_main.xml\n" ) + " @@ -33 +33\n" ) + " - <fragment android:name=\"com.example.refactoringtest.MyFragment\"/>\n" ) + " + <fragment android:name=\"my.pkg.name.MyFragment\"/>\n" ) + "\n" ) + "\n" ) + "* AndroidManifest.xml - /testRefactor1/AndroidManifest.xml\n" ) + " @@ -16 +16\n" ) + " - android:name=\"com.example.refactoringtest.MainActivity\"\n" ) + " + android:name=\"my.pkg.name.MainActivity\"\n" ) + " @@ -25 +25\n" ) + " - android:name=\".MainActivity2\"\n" ) + " + android:name=\"my.pkg.name.MainActivity2\"" ) ) , true ) ; }

Target:
public void testRefactor1 ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.core.TEST_PROJECT , false , true , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "[x] Rename package \'com.example.refactoringtest\' to \'my.pkg.name\'\n" ) + "\n" ) + "[x] MainActivity.java - /testRefactor1/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -3 +3\n" ) + " + import com.example.refactoringtest.R;\n" ) + " +\n" ) + "\n" ) + "\n" ) + "[x] activity_main.xml - /testRefactor1/res/layout/activity_main.xml\n" ) + " @@ -33 +33\n" ) + " - <fragment android:name=\"com.example.refactoringtest.MyFragment\"/>\n" ) + " + <fragment android:name=\"my.pkg.name.MyFragment\"/>\n" ) + "\n" ) + "\n" ) + "[x] AndroidManifest.xml - /testRefactor1/AndroidManifest.xml\n" ) + " @@ -16 +16\n" ) + " - android:name=\"com.example.refactoringtest.MainActivity\"\n" ) + " + android:name=\"my.pkg.name.MainActivity\"\n" ) + " @@ -25 +25\n" ) + " - android:name=\".MainActivity2\"\n" ) + " + android:name=\"my.pkg.name.MainActivity2\"" ) ) , true ) ; }
Source:
public void testTearDown ( ) { com.android.server.wifi.WificondControl wificondControl = org.mockito.Mockito.mock ( com.android.server.wifi.WificondControl.class ) ; org.mockito.Mockito.when ( wificondControl.tearDownInterfaces ( ) ) . thenReturn ( true ) ; mWifiNative.setWificondControl ( wificondControl ) ; org.junit.Assert.assertTrue ( mWifiNative.tearDown ( ) ) ; org.mockito.Mockito.verify ( wificondControl ) . tearDownInterfaces ( ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . stopVendorHal ( ) ; }

Target:
public void testTearDown ( ) { org.mockito.Mockito.when ( mWificondControl.tearDownInterfaces ( ) ) . thenReturn ( true ) ; org.junit.Assert.assertTrue ( mWifiNative.tearDown ( ) ) ; org.mockito.Mockito.verify ( mWificondControl ) . tearDownInterfaces ( ) ; org.mockito.Mockito.verify ( mWifiVendorHal ) . stopVendorHal ( ) ; }
Source:
public void noteBluetoothScanStoppedLocked ( long elapsedRealtimeMs ) { if ( ( mBluetoothScanTimer ) != null ) { mBluetoothScanTimer.stopRunningLocked ( elapsedRealtimeMs ) ; } if ( ( ( mBluetoothUnoptimizedScanTimer ) != null ) && ( mBluetoothUnoptimizedScanTimer.isRunningLocked ( ) ) ) { mBluetoothUnoptimizedScanTimer.stopRunningLocked ( elapsedRealtimeMs ) ; } }

Target:
public void noteBluetoothScanStoppedLocked ( long elapsedRealtimeMs , boolean isUnoptimized ) { if ( ( mBluetoothScanTimer ) != null ) { mBluetoothScanTimer.stopRunningLocked ( elapsedRealtimeMs ) ; } if ( isUnoptimized && ( ( mBluetoothUnoptimizedScanTimer ) != null ) ) { mBluetoothUnoptimizedScanTimer.stopRunningLocked ( elapsedRealtimeMs ) ; } }
Source:
private char [ ] mantissa ( char [ ] v , int len ) { int i ; for ( i = 0 ; i < len ; i ++ ) { if ( ( v [ i ] ) == 'e' ) break ; } char [ ] tmp = new char [ i ] ; java.lang.System.arraycopy ( v , 0 , tmp , 0 , i ) ; return tmp ; }

Target:
private void print ( java.time.temporal.TemporalAccessor t , char c , java.util.Locale l ) throws java.io.IOException { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; print ( sb , t , c , l ) ; java.lang.String s = justify ( sb.toString ( ) ) ; if ( f.contains ( java.util.Formatter.Flags.UPPERCASE ) ) s = s.toUpperCase ( ) ; a.append ( s ) ; }
Source:
private void responseSetupDataCall ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.SetupDataCallResult dcResponse ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.dataconnection.DataCallResponse ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalDc ( dcResponse ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseVoid ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.lang.Object ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
private static java.lang.String getCounterLabel ( int counterIndex ) { switch ( counterIndex ) { case android.telecom.cts.MockConnection.ON_POST_DIAL_WAIT : return "onPostDialWait" ; case android.telecom.cts.MockConnection.ON_CALL_EVENT : return "onCallEvent" ; case android.telecom.cts.MockConnection.ON_PULL_EXTERNAL_CALL : return "onPullExternalCall" ; case android.telecom.cts.MockConnection.ON_EXTRAS_CHANGED : return "onExtrasChanged" ; default : return "Callback" ; } }

Target:
private static java.lang.String getCounterLabel ( int counterIndex ) { switch ( counterIndex ) { case android.telecom.cts.MockConnection.ON_POST_DIAL_WAIT : return "onPostDialWait" ; case android.telecom.cts.MockConnection.ON_CALL_EVENT : return "onCallEvent" ; case android.telecom.cts.MockConnection.ON_PULL_EXTERNAL_CALL : return "onPullExternalCall" ; case android.telecom.cts.MockConnection.ON_EXTRAS_CHANGED : return "onExtrasChanged" ; case android.telecom.cts.MockConnection.ON_START_RTT : return "onStartRtt" ; case android.telecom.cts.MockConnection.ON_RTT_REQUEST_RESPONSE : return "onRttRequestResponse" ; case android.telecom.cts.MockConnection.ON_STOP_RTT : return "onStopRtt" ; default : return "Callback" ; } }
Source:
public void test_copticServiceLoader ( ) { java.util.Map < java.lang.String , java.time.chrono.Chronology > chronos = new java.util.HashMap < > ( ) ; java.util.ServiceLoader < java.time.chrono.Chronology > loader = java.util.ServiceLoader.load ( java.time.chrono.Chronology.class , null ) ; for ( java.time.chrono.Chronology chrono : loader ) { chronos.put ( chrono.getId ( ) , chrono ) ; } org.testng.Assert.assertNotNull ( chronos.get ( "Coptic" ) , "CopticChronology not found" ) ; }

Target:
public void test_copticServiceLoader ( ) { java.util.Map < java.lang.String , java.time.chrono.Chronology > chronos = new java.util.HashMap < > ( ) ; java.util.ServiceLoader < java.time.chrono.Chronology > loader = java.util.ServiceLoader.load ( java.time.chrono.Chronology.class , getClass ( ) . getClassLoader ( ) ) ; for ( java.time.chrono.Chronology chrono : loader ) { chronos.put ( chrono.getId ( ) , chrono ) ; } org.testng.Assert.assertNotNull ( chronos.get ( "Coptic" ) , "CopticChronology not found" ) ; }
Source:
public void writeOnImsCallStart ( int phoneId , com.android.ims.internal.ImsCallSession session ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = startNewCallSessionIfNeeded ( phoneId ) ; callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.RilCall.Type.IMS_COMMAND ) . setCallIndex ( getCallId ( session ) ) . setImsCommand ( TelephonyCallSession.Event.ImsCommand.IMS_CMD_START ) ) ; }

Target:
public void writeOnImsCommand ( int phoneId , android.telephony.ims.ImsCallSession session , int command ) { com.android.internal.telephony.metrics.InProgressCallSession callSession = mInProgressCallSessions.get ( phoneId ) ; if ( callSession == null ) { android.telephony.Rlog.e ( com.android.internal.telephony.metrics.TelephonyMetrics.TAG , "Call session is missing" ) ; } else { callSession.addEvent ( new com.android.internal.telephony.metrics.CallSessionEventBuilder ( com.android.internal.telephony.nano.TelephonyProto.TelephonyCallSession.Event.RilCall.Type.IMS_COMMAND ) . setCallIndex ( getCallId ( session ) ) . setImsCommand ( command ) ) ; } }
Source:
public void beginPostLayoutPolicyLw ( int displayWidth , int displayHeight ) { mTopFullscreenOpaqueWindowState = null ; mAppsToBeHidden.clear ( ) ; mForceStatusBar = false ; mForceStatusBarFromKeyguard = false ; mForcingShowNavBar = false ; mForcingShowNavBarLayer = - 1 ; mHideLockScreen = false ; mAllowLockscreenWhenOn = false ; mDismissKeyguard = com.android.internal.policy.impl.PhoneWindowManager.DISMISS_KEYGUARD_NONE ; mShowingLockscreen = false ; mShowingDream = false ; }

Target:
public void beginPostLayoutPolicyLw ( int displayWidth , int displayHeight ) { mTopFullscreenOpaqueWindowState = null ; mAppsToBeHidden.clear ( ) ; mAppsThatDismissKeyguard.clear ( ) ; mForceStatusBar = false ; mForceStatusBarFromKeyguard = false ; mForcingShowNavBar = false ; mForcingShowNavBarLayer = - 1 ; mHideLockScreen = false ; mAllowLockscreenWhenOn = false ; mDismissKeyguard = com.android.internal.policy.impl.PhoneWindowManager.DISMISS_KEYGUARD_NONE ; mShowingLockscreen = false ; mShowingDream = false ; mWinShowWhenLocked = null ; }
Source:
final void get ( float [ ] dst , int dstOffset , int floatCount ) { int byteCount = checkGetBounds ( SizeOf.FLOAT , dst.length , dstOffset , floatCount ) ; this . block.peekFloatArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , floatCount , order.needsSwap ) ; position += byteCount ; }

Target:
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 ; }
Source:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeLong ( mNetworkCapabilities ) ; dest.writeLong ( mTransportTypes ) ; dest.writeInt ( mLinkUpBandwidthKbps ) ; dest.writeInt ( mLinkDownBandwidthKbps ) ; dest.writeString ( mNetworkSpecifier ) ; dest.writeInt ( mSignalStrength ) ; }

Target:
public void writeToParcel ( android.os.Parcel dest , int flags ) { dest.writeLong ( mNetworkCapabilities ) ; dest.writeLong ( mTransportTypes ) ; dest.writeInt ( mLinkUpBandwidthKbps ) ; dest.writeInt ( mLinkDownBandwidthKbps ) ; dest.writeParcelable ( ( ( android.os.Parcelable ) ( mNetworkSpecifier ) ) , flags ) ; dest.writeInt ( mSignalStrength ) ; }
Source:
private void verifyStandardDeviation ( ) throws java.lang.Throwable { android.hardware.cts.helpers.sensorTestOperations.VerifyStandardDeviationOperation verifyStdDev = new android.hardware.cts.helpers.sensorTestOperations.VerifyStandardDeviationOperation ( this . getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 2.0F ) ; verifyStdDev.execute ( ) ; logSuccess ( ) ; }

Target:
private void verifyStandardDeviation ( ) throws java.lang.Throwable { android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation verifyStdDev = new android.hardware.cts.helpers.sensorTestOperations.VerifySensorOperation ( this . getApplicationContext ( ) , android.hardware.Sensor.TYPE_MAGNETIC_FIELD , android.hardware.SensorManager.SENSOR_DELAY_FASTEST , 0 , 100 ) ; verifyStdDev.verifyStandardDeviation ( new float [ ] { 2.0F , 2.0F , 2.0F } ) ; verifyStdDev.execute ( ) ; logSuccess ( ) ; }
Source:
public void menuAboutToShow ( org.eclipse.jface.action.IMenuManager manager ) { for ( org.eclipse.jface.action.IContributionItem contrib : manager.getItems ( ) ) { if ( contrib instanceof org.eclipse.jface.action.ActionContributionItem ) { org.eclipse.jface.action.IAction action = ( ( org.eclipse.jface.action.ActionContributionItem ) ( contrib ) ) . getAction ( ) ; if ( action instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage2.DelegateAction ) { ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage2.DelegateAction ) ( action ) ) . updateFromEditorPart ( mGraphicalEditorPart ) ; } } } }

Target:
public void menuAboutToShow ( org.eclipse.jface.action.IMenuManager manager ) { for ( org.eclipse.jface.action.IContributionItem contrib : manager.getItems ( ) ) { if ( contrib instanceof org.eclipse.jface.action.ActionContributionItem ) { org.eclipse.jface.action.IAction action = ( ( org.eclipse.jface.action.ActionContributionItem ) ( contrib ) ) . getAction ( ) ; if ( action instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage.DelegateAction ) { ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.OutlinePage.DelegateAction ) ( action ) ) . updateFromEditorPart ( mGraphicalEditorPart ) ; } } } }
Source:
public void tearDown ( ) throws java.lang.Exception { mService = null ; mAdapter = null ; }

Target:
public void tearDown ( ) throws java.lang.Exception { if ( ! ( mTargetContext.getResources ( ) . getBoolean ( R.bool.profile_supported_hfpclient ) ) ) { return ; } com.android.bluetooth.TestUtils.stopService ( mServiceRule , com.android.bluetooth.hfpclient.HeadsetClientService.class ) ; mService = com.android.bluetooth.hfpclient.HeadsetClientService.getHeadsetClientService ( ) ; org.junit.Assert.assertNull ( mService ) ; com.android.bluetooth.TestUtils.clearAdapterService ( mAdapterService ) ; }
Source:
public int interceptMotionBeforeQueueingWhenScreenOff ( int policyFlags ) { int result = 0 ; final boolean isWakeMotion = ( policyFlags & ( ( android.view.WindowManagerPolicy.FLAG_WAKE ) | ( android.view.WindowManagerPolicy.FLAG_WAKE_DROPPED ) ) ) != 0 ; if ( isWakeMotion ) { if ( ( ( mKeyguardMediator ) != null ) && ( mKeyguardMediator.isShowing ( ) ) ) { mKeyguardMediator.onWakeMotionWhenKeyguardShowingTq ( ) ; } else { result |= ACTION_POKE_USER_ACTIVITY ; } } return result ; }

Target:
public int interceptMotionBeforeQueueingWhenScreenOff ( int policyFlags ) { int result = 0 ; final boolean isWakeMotion = ( policyFlags & ( ( android.view.WindowManagerPolicy.FLAG_WAKE ) | ( android.view.WindowManagerPolicy.FLAG_WAKE_DROPPED ) ) ) != 0 ; if ( isWakeMotion ) { if ( ( ( mKeyguardMediator ) != null ) && ( mKeyguardMediator.isShowing ( ) ) ) { mKeyguardMediator.onWakeMotionWhenKeyguardShowingTq ( ) ; } else { result |= ACTION_WAKE_UP ; } } return result ; }
Source:
public void testInnerClassGenericParameter ( ) throws java.lang.Exception { java.lang.reflect.Constructor < ? > constructor = libcore.java.lang.reflect.ParameterTest.InnerClass.class . getDeclaredConstructor ( libcore.java.lang.reflect.ParameterTest.class , java.util.function.Function.class ) ; libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper helper = new libcore.java.lang.reflect.ParameterTest.ExecutableTestHelper ( constructor ) ; helper.checkStandardParametersBehavior ( ) . checkParametersToString ( ( "[libcore.java.lang.reflect.ParameterTest arg0, " + "java.util.function.Function arg1]" ) ) . checkParametersMetadataNotAvailable ( ) . checkParametersNoVarArgs ( ) ; helper.getParameterTestHelper ( 0 ) . checkGetType ( libcore.java.lang.reflect.ParameterTest.class ) . checkGetParameterizedType ( "class libcore.java.lang.reflect.ParameterTest" ) ; helper.getParameterTestHelper ( 1 ) . checkGetType ( java.util.function.Function.class ) . checkGetParameterizedType ( "interface java.util.function.Function" ) ; }

Target:
public void testGenericParameterMethod_withMetadata ( ) throws java.lang.Exception { java.lang.Class < ? > clazz = loadTestInnerClassWithMetadata ( "GenericParameter" ) ; java.lang.reflect.Method method = clazz.getDeclaredMethod ( "genericParameter" , java.util.function.Function.class ) ; libcore.java.lang.reflect.ParameterTest.checkGenericParameter_withMetadata ( method ) ; }
Source:
public static java.lang.String fromXmlAttributeValue ( @ com.android.annotations.NonNull java.lang.String escapedAttrValue ) { java.lang.String workingString = escapedAttrValue.replace ( com.android.SdkConstants.QUOT_ENTITY , "\"" ) ; workingString = workingString.replace ( com.android.SdkConstants.LT_ENTITY , "<" ) ; workingString = workingString.replace ( com.android.SdkConstants.APOS_ENTITY , "'" ) ; workingString = workingString.replace ( com.android.SdkConstants.AMP_ENTITY , "&" ) ; return workingString ; }

Target:
public static java.lang.String fromXmlAttributeValue ( @ com.android.annotations.NonNull java.lang.String escapedAttrValue ) { java.lang.String workingString = escapedAttrValue.replace ( com.android.SdkConstants.QUOT_ENTITY , "\"" ) ; workingString = workingString.replace ( com.android.SdkConstants.LT_ENTITY , "<" ) ; workingString = workingString.replace ( com.android.SdkConstants.APOS_ENTITY , "'" ) ; workingString = workingString.replace ( com.android.SdkConstants.AMP_ENTITY , "&" ) ; workingString = workingString.replace ( com.android.SdkConstants.GT_ENTITY , ">" ) ; return workingString ; }
Source:
public static < T > boolean any ( java.util.Iterator < T > iterator , com.google.common.base.Predicate < ? super T > predicate ) { com.google.common.base.Preconditions.checkNotNull ( predicate ) ; while ( iterator.hasNext ( ) ) { T element = iterator.next ( ) ; if ( predicate.apply ( element ) ) { return true ; } } return false ; }

Target:
public static < T > java.util.Iterator < T > concat ( java.util.Iterator < ? extends T > a , java.util.Iterator < ? extends T > b , java.util.Iterator < ? extends T > c ) { return com.google.common.collect.Iterators.concat ( com.google.common.collect.ImmutableList.of ( a , b , c ) . iterator ( ) ) ; }
Source:
public void testAesCbcHmacMd5Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1000 ) ; }
Source:
private void appendDayOfWeek ( java.lang.StringBuffer buffer , int count , java.lang.String [ ] longs , java.lang.String [ ] shorts ) { boolean isLong = count > 3 ; java.lang.String [ ] days = ( isLong ) ? longs : shorts ; buffer.append ( days [ calendar.get ( java.util.Calendar.DAY_OF_WEEK ) ] ) ; }

Target:
private void appendDayOfWeek ( java.lang.StringBuffer buffer , int count , boolean standAlone ) { java.lang.String [ ] days ; libcore.icu.LocaleData ld = formatData.localeData ; if ( count == 4 ) { days = ( standAlone ) ? ld.longStandAloneWeekdayNames : formatData.weekdays ; } else if ( count == 5 ) { days = ( standAlone ) ? ld.tinyStandAloneWeekdayNames : formatData.localeData.tinyWeekdayNames ; } else { days = ( standAlone ) ? ld.shortStandAloneWeekdayNames : formatData.shortWeekdays ; } buffer.append ( days [ calendar.get ( java.util.Calendar.DAY_OF_WEEK ) ] ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.io.IOException { com.android.monkeyrunner.adb.AdbBackend backend = new com.android.monkeyrunner.adb.AdbBackend ( ) ; com.android.monkeyrunner.MonkeyDevice device = backend.waitForConnection ( ) ; com.android.monkeyrunner.adb.AdbMonkeyImage snapshot = ( ( com.android.monkeyrunner.adb.AdbMonkeyImage ) ( device.takeSnapshot ( ) ) ) ; snapshot.writeToFile ( "output.png" , "png" ) ; com.android.monkeyrunner.adb.image.CaptureRawAndConvertedImage.writeOutImage ( snapshot.getRawImage ( ) , "output.raw" ) ; java.lang.System.exit ( 0 ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.io.IOException { com.android.monkeyrunner.core.IMonkeyBackend backend = new com.android.monkeyrunner.adb.AdbBackend ( ) ; com.android.monkeyrunner.core.IMonkeyDevice device = backend.waitForConnection ( ) ; com.android.monkeyrunner.core.IMonkeyImage snapshot = ( ( com.android.monkeyrunner.core.IMonkeyImage ) ( device.takeSnapshot ( ) ) ) ; snapshot.writeToFile ( "output.png" , "png" ) ; com.android.monkeyrunner.adb.image.CaptureRawAndConvertedImage.writeOutImage ( ( ( com.android.monkeyrunner.adb.AdbMonkeyImage ) ( snapshot ) ) . getRawImage ( ) , "output.raw" ) ; java.lang.System.exit ( 0 ) ; }
Source:
public boolean performHapticFeedback ( android.view.IWindow window , int effectId , boolean always ) { synchronized ( mWindowMap ) { long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return mPolicy.performHapticFeedbackLw ( windowForClientLocked ( this , window ) , effectId , always ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }

Target:
public android.os.Bundle sendWallpaperCommand ( android.os.IBinder window , java.lang.String action , int x , int y , int z , android.os.Bundle extras , boolean sync ) { synchronized ( mWindowMap ) { long ident = android.os.Binder.clearCallingIdentity ( ) ; try { return sendWindowWallpaperCommandLocked ( windowForClientLocked ( this , window , true ) , action , x , y , z , extras , sync ) ; } finally { android.os.Binder.restoreCallingIdentity ( ident ) ; } } }
Source:
public static com.intellij.psi.PsiMethod [ ] generateGetterSetters ( com.intellij.psi.PsiField field , boolean generateGetter ) { for ( com.intellij.codeInsight.generation.GetterSetterPrototypeProvider provider : com.intellij.openapi.extensions.Extensions.getExtensions ( com.intellij.codeInsight.generation.GetterSetterPrototypeProvider.EP_NAME ) ) { if ( provider.canGeneratePrototypeFor ( field ) ) { return generateGetter ? provider.generateGetters ( field ) : provider.generateSetters ( field ) ; } } return new com.intellij.psi.PsiMethod [ ] { generateGetter ? com.intellij.psi.util.PropertyUtil.generateGetterPrototype ( field ) : com.intellij.psi.util.PropertyUtil.generateSetterPrototype ( field ) } ; }

Target:
public static com.intellij.psi.PsiMethod [ ] generateGetterSetters ( com.intellij.psi.PsiField field , boolean generateGetter ) { for ( com.intellij.codeInsight.generation.GetterSetterPrototypeProvider provider : com.intellij.openapi.extensions.Extensions.getExtensions ( com.intellij.codeInsight.generation.GetterSetterPrototypeProvider.EP_NAME ) ) { if ( provider.canGeneratePrototypeFor ( field ) ) { return generateGetter ? provider.generateGetters ( field ) : provider.generateSetters ( field ) ; } } return new com.intellij.psi.PsiMethod [ ] { generateGetter ? com.intellij.codeInsight.generation.GenerateMembersUtil.generateGetterPrototype ( field ) : com.intellij.codeInsight.generation.GenerateMembersUtil.generateSetterPrototype ( field ) } ; }
Source:
public java.lang.String getDeviceIdForPhone ( int phoneId , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getDeviceId" ) ) ) { return null ; } if ( ! ( android.telephony.SubscriptionManager.isValidPhoneId ( phoneId ) ) ) { phoneId = 0 ; } final com.android.internal.telephony.Phone phone = mPhone [ phoneId ] ; if ( phone != null ) { return phone.getDeviceId ( ) ; } else { loge ( ( ( "getDeviceIdForPhone phone " + phoneId ) + " is null" ) ) ; return null ; } }

Target:
public java.lang.String getDeviceIdForPhone ( int phoneId , java.lang.String callingPackage ) { if ( ! ( android.telephony.SubscriptionManager.isValidPhoneId ( phoneId ) ) ) { phoneId = 0 ; } final com.android.internal.telephony.Phone phone = mPhone [ phoneId ] ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , phone.getSubId ( ) , callingPackage , "getDeviceId" ) ) ) { return null ; } return phone.getDeviceId ( ) ; } else { loge ( ( ( "getDeviceIdForPhone phone " + phoneId ) + " is null" ) ) ; return null ; } }
Source:
private java.lang.CharSequence getErrorMessage ( com.android.internal.telephony.gsm.AsyncResult ar ) { if ( ( ar.exception ) instanceof com.android.internal.telephony.gsm.CommandException ) { com.android.internal.telephony.gsm.CommandException.Error err = ( ( com.android.internal.telephony.gsm.CommandException ) ( ar.exception ) ) . getCommandError ( ) ; if ( err == ( CommandException.Error.FDN_CHECK_FAILURE ) ) { android.util.Log.i ( com.android.internal.telephony.gsm.GsmMmiCode.LOG_TAG , "FDN_CHECK_FAILURE" ) ; return context.getText ( com.android.internal.R.string.mmiFdnError ) ; } } return context.getText ( com.android.internal.R.string.mmiError ) ; }

Target:
private java.lang.CharSequence getErrorMessage ( com.android.internal.telephony.gsm.AsyncResult ar ) { if ( ( ar.exception ) instanceof com.android.internal.telephony.gsm.CommandException ) { com.android.internal.telephony.gsm.CommandException.Error err = ( ( com.android.internal.telephony.gsm.CommandException ) ( ar.exception ) ) . getCommandError ( ) ; if ( err == ( CommandException.Error.FDN_CHECK_FAILURE ) ) { android.telephony.Rlog.i ( com.android.internal.telephony.gsm.GsmMmiCode.LOG_TAG , "FDN_CHECK_FAILURE" ) ; return context.getText ( com.android.internal.R.string.mmiFdnError ) ; } } return context.getText ( com.android.internal.R.string.mmiError ) ; }
Source:
private java.util.Set < java.lang.Integer > getProfileIdsLocked ( int userId ) { java.util.Set < java.lang.Integer > userIds = new java.util.HashSet < java.lang.Integer > ( ) ; final java.util.List < android.content.pm.UserInfo > profiles = getUserManagerLocked ( ) . getProfiles ( userId , false ) ; for ( android.content.pm.UserInfo user : profiles ) { userIds.add ( java.lang.Integer.valueOf ( user.id ) ) ; } return userIds ; }

Target:
void onUserStoppedLocked ( int userId ) { mRecentTasks.unloadUserDataFromMemoryLocked ( userId ) ; }
Source:
public void test_getISO3Language ( ) { java.util.Locale l = new java.util.Locale ( "ae" ) ; assertEquals ( "ave" , l.getISO3Language ( ) ) ; java.util.Locale l_CountryCS = new java.util.Locale ( "" , "CS" ) ; assertEquals ( "SCG" , l_CountryCS.getISO3Country ( ) ) ; l = new java.util.Locale ( "ak" , "" ) ; assertEquals ( "aka" , l.getISO3Language ( ) ) ; }

Target:
public void test_getISO3Language ( ) { assertTrue ( ( "Returned incorrect ISO3 language: " + ( testLocale.getISO3Language ( ) ) ) , testLocale.getISO3Language ( ) . equals ( "eng" ) ) ; java.util.Locale l = new java.util.Locale ( "ae" ) ; assertEquals ( "ave" , l.getISO3Language ( ) ) ; java.util.Locale l_CountryCS = new java.util.Locale ( "" , "CS" ) ; assertEquals ( "SCG" , l_CountryCS.getISO3Country ( ) ) ; l = new java.util.Locale ( "ak" , "" ) ; assertEquals ( "aka" , l.getISO3Language ( ) ) ; }
Source:
private static com.google.gson.JsonElement parseResponse ( @ org.jetbrains.annotations.NotNull java.io.InputStream githubResponse ) throws java.io.IOException { java.io.Reader reader = new java.io.InputStreamReader ( githubResponse ) ; try { return new com.google.gson.JsonParser ( ) . parse ( reader ) ; } catch ( com.google.gson.JsonSyntaxException jse ) { throw new org.jetbrains.plugins.github.api.JsonException ( java.lang.String.format ( "Couldn't parse GitHub response:%n%s" , githubResponse ) , jse ) ; } finally { reader.close ( ) ; } }

Target:
private static com.google.gson.JsonElement parseResponse ( @ org.jetbrains.annotations.NotNull java.io.InputStream githubResponse ) throws java.io.IOException { java.io.Reader reader = new java.io.InputStreamReader ( githubResponse ) ; try { return new com.google.gson.JsonParser ( ) . parse ( reader ) ; } catch ( com.google.gson.JsonSyntaxException jse ) { throw new org.jetbrains.plugins.github.exceptions.GithubJsonException ( "Couldn't parse GitHub response" , jse ) ; } finally { reader.close ( ) ; } }
Source:
private void notifyInterfaceStatusChanged ( java.lang.String iface , boolean up ) { final int length = mObservers.beginBroadcast ( ) ; try { for ( int i = 0 ; i < length ; i ++ ) { try { mObservers.getBroadcastItem ( i ) . interfaceStatusChanged ( iface , up ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { } } } finally { mObservers.finishBroadcast ( ) ; } }

Target:
private void notifyInterfaceLinkStateChanged ( java.lang.String iface , boolean up ) { invokeForAllObservers ( ( o ) -> o.interfaceLinkStateChanged ( iface , up ) ) ; }
Source:
public void testFormatDurationSeconds ( ) throws java.lang.Exception { assertEquals ( "0 seconds" , android.text.format.DateUtils.formatDuration ( 0 ) ) ; assertEquals ( "0 seconds" , android.text.format.DateUtils.formatDuration ( 1 ) ) ; assertEquals ( "0 seconds" , android.text.format.DateUtils.formatDuration ( 499 ) ) ; assertEquals ( "1 second" , android.text.format.DateUtils.formatDuration ( 500 ) ) ; assertEquals ( "1 second" , android.text.format.DateUtils.formatDuration ( 1000 ) ) ; assertEquals ( "2 seconds" , android.text.format.DateUtils.formatDuration ( 1500 ) ) ; }

Target:
public void test_formatDuration_seconds ( ) throws java.lang.Exception { assertEquals ( "0 seconds" , android.text.format.DateUtils.formatDuration ( 0 ) ) ; assertEquals ( "0 seconds" , android.text.format.DateUtils.formatDuration ( 1 ) ) ; assertEquals ( "0 seconds" , android.text.format.DateUtils.formatDuration ( 499 ) ) ; assertEquals ( "1 second" , android.text.format.DateUtils.formatDuration ( 500 ) ) ; assertEquals ( "1 second" , android.text.format.DateUtils.formatDuration ( 1000 ) ) ; assertEquals ( "2 seconds" , android.text.format.DateUtils.formatDuration ( 1500 ) ) ; }
Source:
public void onCreateActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { mPriorityGuidedAction = new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.SeriesSettingsFragment.ACTION_ID_PRIORITY ) . title ( mProrityActionTitle ) . build ( ) ; updatePriorityGuidedAction ( false ) ; actions.add ( mPriorityGuidedAction ) ; mChannelsGuidedAction = new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.SeriesSettingsFragment.ACTION_ID_CHANNEL ) . title ( mChannelsActionTitle ) . subActions ( buildChannelSubAction ( ) ) . build ( ) ; actions.add ( mChannelsGuidedAction ) ; updateChannelsGuidedAction ( false ) ; }

Target:
public void onCreateActions ( java.util.List < android.support.v17.leanback.widget.GuidedAction > actions , android.os.Bundle savedInstanceState ) { mPriorityGuidedAction = new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.DvrSeriesSettingsFragment.ACTION_ID_PRIORITY ) . title ( mProrityActionTitle ) . build ( ) ; actions.add ( mPriorityGuidedAction ) ; mChannelsGuidedAction = new android.support.v17.leanback.widget.GuidedAction.Builder ( getActivity ( ) ) . id ( com.android.tv.dvr.ui.DvrSeriesSettingsFragment.ACTION_ID_CHANNEL ) . title ( mChannelsActionTitle ) . subActions ( buildChannelSubAction ( ) ) . build ( ) ; actions.add ( mChannelsGuidedAction ) ; updateChannelsGuidedAction ( false ) ; }
Source:
public void setOverScrollMode ( final int mode ) { if ( ( mAwContents ) == null ) return ; if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setOverScrollMode ( mode ) ; } } ) ; return ; } mAwContents.setOverScrollMode ( mode ) ; }

Target:
public void setScrollBarStyle ( final int style ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setScrollBarStyle ( style ) ; } } ) ; return ; } mAwContents.setScrollBarStyle ( style ) ; }
Source:
public void onChange ( boolean selfUpdate ) { refreshMessageList ( ) ; }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals ( intent.getAction ( ) ) ) { java.lang.String stateExtra = intent.getStringExtra ( IccCardConstants.INTENT_KEY_ICC_STATE ) ; if ( ( stateExtra != null ) && ( ( IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals ( stateExtra ) ) || ( IccCardConstants.INTENT_VALUE_ICC_UNKNOWN.equals ( stateExtra ) ) ) ) { updateState ( com.android.mms.ui.ManageSimMessages.SHOW_EMPTY ) ; } } }
Source:
public void setUsbDataUnlocked ( boolean unlocked ) { if ( com.android.server.usb.UsbDeviceManager.DEBUG ) android.util.Slog.d ( com.android.server.usb.UsbDeviceManager.TAG , ( ( "setUsbDataUnlocked(" + unlocked ) + ")" ) ) ; mHandler.sendMessage ( com.android.server.usb.UsbDeviceManager.MSG_SET_USB_DATA_UNLOCKED , unlocked ) ; }

Target:
public void setCurrentFunctions ( java.lang.String functions , boolean usbDataUnlocked ) { if ( com.android.server.usb.UsbDeviceManager.DEBUG ) android.util.Slog.d ( com.android.server.usb.UsbDeviceManager.TAG , ( ( ( ( "setCurrentFunctions(" + functions ) + ", " ) + usbDataUnlocked ) + ")" ) ) ; mHandler.sendMessage ( com.android.server.usb.UsbDeviceManager.MSG_SET_CURRENT_FUNCTIONS , functions , usbDataUnlocked ) ; }
Source:
private void loadInternalData ( java.util.List < android.net.wifi.WifiConfiguration > sharedConfigurations , java.util.List < android.net.wifi.WifiConfiguration > userConfigurations , java.util.Set < java.lang.String > deletedEphemeralSSIDs ) { clearInternalData ( ) ; loadInternalDataFromSharedStore ( sharedConfigurations ) ; loadInternalDataFromUserStore ( userConfigurations , deletedEphemeralSSIDs ) ; if ( ( mConfiguredNetworks.sizeForAllUsers ( ) ) == 0 ) { android.util.Log.w ( com.android.server.wifi.WifiConfigManager.TAG , "No stored networks found." ) ; } sendConfiguredNetworksChangedBroadcast ( ) ; }

Target:
private void loadInternalData ( java.util.List < android.net.wifi.WifiConfiguration > sharedConfigurations , java.util.List < android.net.wifi.WifiConfiguration > userConfigurations , java.util.Set < java.lang.String > deletedEphemeralSSIDs ) { clearInternalData ( ) ; loadInternalDataFromSharedStore ( sharedConfigurations ) ; loadInternalDataFromUserStore ( userConfigurations , deletedEphemeralSSIDs ) ; if ( ( mConfiguredNetworks.sizeForAllUsers ( ) ) == 0 ) { android.util.Log.w ( com.android.server.wifi.WifiConfigManager.TAG , "No stored networks found." ) ; } sendConfiguredNetworksChangedBroadcast ( ) ; mPendingStoreRead = false ; }
Source:
public boolean setNetworkSelectionModeManual ( int subId , com.android.internal.telephony.OperatorInfo operator , boolean persistSelection ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.setNetworkSelectionModeManual ( subId , operator , persistSelection ) ; } catch ( android.os.RemoteException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual RemoteException" , ex ) ; } catch ( java.lang.NullPointerException ex ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , "setNetworkSelectionModeManual NPE" , ex ) ; } return false ; }

Target:
public boolean isImsRegistered ( int subId ) { try { return getITelephony ( ) . isImsRegistered ( subId ) ; } catch ( android.os.RemoteException | java.lang.NullPointerException ex ) { return false ; } }
Source:
public boolean deliverSelfNotifications ( ) { return true ; }

Target:
public void onChange ( boolean selfChange ) { super . onChange ( selfChange ) ; boolean developerOptionsEnabled = 1 == ( Settings.Global.getInt ( context.getContentResolver ( ) , Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0 ) ) ; if ( ! developerOptionsEnabled ) { android.content.SharedPreferences prefs = android.preference.PreferenceManager.getDefaultSharedPreferences ( context ) ; prefs.edit ( ) . putBoolean ( context.getString ( R.string.pref_key_quick_setting ) , false ) . apply ( ) ; com.android.traceur.Receiver.updateQuickSettings ( context ) ; } }
Source:
void assertByteArray ( java.nio.ByteBuffer out , byte [ ] expected ) { out = out.duplicate ( ) ; if ( ( out.position ( ) ) > 0 ) { out.flip ( ) ; } try { assertEquals ( tests.api.java.nio.charset.UTF16CharsetEncoderTest.decoder.decode ( out ) , tests.api.java.nio.charset.UTF16CharsetEncoderTest.decoder.decode ( java.nio.ByteBuffer.wrap ( expected ) ) ) ; } catch ( java.nio.charset.CharacterCodingException e ) { fail ( e.toString ( ) ) ; } }

Target:
void assertByteArray ( java.nio.ByteBuffer out , byte [ ] expected ) { out = out.duplicate ( ) ; if ( ( out.position ( ) ) > 0 ) { out.flip ( ) ; } try { assertEquals ( org.apache.harmony.tests.java.nio.charset.UTF16CharsetEncoderTest.decoder.decode ( out ) , org.apache.harmony.tests.java.nio.charset.UTF16CharsetEncoderTest.decoder.decode ( java.nio.ByteBuffer.wrap ( expected ) ) ) ; } catch ( java.nio.charset.CharacterCodingException e ) { fail ( e.toString ( ) ) ; } }
Source:
public static void atraceStop ( ) { java.lang.String cmd = "echo 0 > /d/tracing/tracing_on" ; android.util.Log.v ( com.android.traceur.AtraceUtils.TAG , ( "Stopping async atrace: " + cmd ) ) ; try { java.lang.Process atrace = com.android.traceur.AtraceUtils.exec ( cmd ) ; if ( ( atrace.waitFor ( ) ) != 0 ) { android.util.Log.e ( com.android.traceur.AtraceUtils.TAG , ( "atraceStop failed with: " + ( atrace.exitValue ( ) ) ) ) ; } } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
public static void clearSavedTraces ( ) { java.lang.String cmd = ( "rm -f " + ( com.android.traceur.AtraceUtils.TRACE_DIRECTORY ) ) + "trace-*.ctrace" ; android.util.Log.v ( com.android.traceur.AtraceUtils.TAG , ( "Clearing trace directory: " + cmd ) ) ; try { java.lang.Process rm = com.android.traceur.AtraceUtils.exec ( cmd ) ; if ( ( rm.waitFor ( ) ) != 0 ) { android.util.Log.e ( com.android.traceur.AtraceUtils.TAG , ( "clearSavedTraces failed with: " + ( rm.exitValue ( ) ) ) ) ; } } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void setActivePasswordState ( int quality , int length , int letters , int uppercase , int lowercase , int numbers , int symbols , int nonletter , int userHandle ) { if ( ( mService ) != null ) { try { mService.setActivePasswordState ( quality , length , letters , uppercase , lowercase , numbers , symbols , nonletter , userHandle ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }

Target:
public void setActivePasswordState ( android.app.admin.PasswordMetrics metrics , int userHandle ) { if ( ( mService ) != null ) { try { mService.setActivePasswordState ( metrics , userHandle ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
private static boolean areEqual ( java.lang.Object o1 , java.lang.Object o2 ) { if ( ( o1 == null ) || ( o2 == null ) ) { return ( o1 == null ) && ( o2 == null ) ; } else if ( org.hamcrest.core.IsEqual.isArray ( o1 ) ) { return ( org.hamcrest.core.IsEqual.isArray ( o2 ) ) && ( org.hamcrest.core.IsEqual.areArraysEqual ( o1 , o2 ) ) ; } else { return o1.equals ( o2 ) ; } }

Target:
private static boolean areEqual ( java.lang.Object actual , java.lang.Object expected ) { if ( actual == null ) { return expected == null ; } if ( ( expected != null ) && ( org.hamcrest.core.IsEqual.isArray ( actual ) ) ) { return ( org.hamcrest.core.IsEqual.isArray ( expected ) ) && ( org.hamcrest.core.IsEqual.areArraysEqual ( actual , expected ) ) ; } return actual.equals ( expected ) ; }
Source:
public static void write ( java.io.FileDescriptor fd , byte [ ] bytes , int byteOffset , int byteCount ) throws java.io.IOException { java.util.Arrays.checkOffsetAndCount ( bytes.length , byteOffset , byteCount ) ; if ( byteCount == 0 ) { return ; } try { while ( byteCount > 0 ) { int bytesWritten = Libcore.os.write ( fd , bytes , byteOffset , byteCount ) ; byteCount -= bytesWritten ; byteOffset += bytesWritten ; } } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } }

Target:
public static void write ( java.io.FileDescriptor fd , byte [ ] bytes , int byteOffset , int byteCount ) throws java.io.IOException { java.util.Arrays.checkOffsetAndCount ( bytes.length , byteOffset , byteCount ) ; if ( byteCount == 0 ) { return ; } try { while ( byteCount > 0 ) { int bytesWritten = Libcore.os.write ( fd , bytes , byteOffset , byteCount ) ; byteCount -= bytesWritten ; byteOffset += bytesWritten ; } } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsIOException ( ) ; } }
Source:
private static void printBitmap ( com.android.ahat.Doc doc , com.android.ahat.heapdump.AhatInstance inst ) { com.android.ahat.heapdump.AhatInstance bitmap = inst.getAssociatedBitmapInstance ( ) ; if ( bitmap != null ) { doc.section ( "Bitmap Image" ) ; doc.println ( com.android.ahat.DocString.image ( com.android.ahat.DocString.formattedUri ( "bitmap?id=%d" , bitmap.getId ( ) ) , "bitmap image" ) ) ; } }

Target:
private static void printBitmap ( com.android.ahat.Doc doc , com.android.ahat.heapdump.AhatInstance inst ) { com.android.ahat.heapdump.AhatInstance bitmap = inst.getAssociatedBitmapInstance ( ) ; if ( bitmap != null ) { doc.section ( "Bitmap Image" ) ; doc.println ( com.android.ahat.DocString.image ( com.android.ahat.DocString.formattedUri ( "bitmap?id=0x%x" , bitmap.getId ( ) ) , "bitmap image" ) ) ; } }