auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void tearDown ( ) { new java.io.File ( fileName ) . delete ( ) ; }

Target:
public void test_read$B ( ) throws java.io.IOException { byte [ ] buf1 = new byte [ 100 ] ; is = new java.io.FileInputStream ( fileName ) ; is.skip ( 500 ) ; is.read ( buf1 ) ; is.close ( ) ; assertEquals ( org.apache.harmony.tests.java.io.FileInputStreamTest.INPUT.substring ( 500 , 600 ) , new java.lang.String ( buf1 , 0 , buf1.length , java.nio.charset.StandardCharsets.US_ASCII ) ) ; }
Source:
public org.bouncycastle.math.ec.ECFieldElement invert ( ) { return new org.bouncycastle.math.ec.ECFieldElement.Fp ( q , r , x.modInverse ( q ) ) ; }

Target:
public org.bouncycastle.math.ec.ECFieldElement multiplyMinusProduct ( org.bouncycastle.math.ec.ECFieldElement b , org.bouncycastle.math.ec.ECFieldElement x , org.bouncycastle.math.ec.ECFieldElement y ) { java.math.BigInteger ax = this . x ; java.math.BigInteger bx = b.toBigInteger ( ) ; java.math.BigInteger xx = x.toBigInteger ( ) ; java.math.BigInteger yx = y.toBigInteger ( ) ; java.math.BigInteger ab = ax.multiply ( bx ) ; java.math.BigInteger xy = xx.multiply ( yx ) ; return new org.bouncycastle.math.ec.ECFieldElement.Fp ( q , r , modReduce ( ab.subtract ( xy ) ) ) ; }
Source:
public java.util.Collection < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > getResources ( com.android.ide.eclipse.adt.internal.resources.ResourceType type , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources projectResources ) { java.util.Collection < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > list = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > ( ) ; if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { list.addAll ( f.getResources ( type , projectResources ) ) ; } } return list ; }

Target:
public java.util.Collection < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > getResources ( com.android.resources.ResourceType type , com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources projectResources ) { java.util.Collection < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > list = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.resources.manager.ProjectResourceItem > ( ) ; if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { list.addAll ( f.getResources ( type , projectResources ) ) ; } } return list ; }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mGLView = new com.android.graphics.benchmark.example.MyGLSurfaceView ( this ) ; setContentView ( mGLView ) ; android.os.Handler handler = new android.os.Handler ( ) ; java.lang.Runnable task = new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { broadcastIntent ( ) ; handler.postDelayed ( this , 5000 ) ; } } ; handler.postDelayed ( task , 5000 ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mGLView = new com.android.graphics.benchmark.example.MyGLSurfaceView ( this ) ; setContentView ( mGLView ) ; mHandler = new android.os.Handler ( ) ; mTask = new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { broadcastIntent ( ) ; mHandler.postDelayed ( this , com.android.graphics.benchmark.example.SampleActivity.LOOP_PERIOD_MS ) ; } } ; mHandler.postDelayed ( mTask , com.android.graphics.benchmark.example.SampleActivity.LOOP_PERIOD_MS ) ; }
Source:
public java.lang.String getDelimiter ( int type ) { android.icu.impl.ICUResourceBundle delimitersBundle = ( ( android.icu.impl.ICUResourceBundle ) ( bundle.get ( "delimiters" ) ) ) ; android.icu.impl.ICUResourceBundle stringBundle = delimitersBundle.getWithFallback ( android.icu.util.LocaleData.DELIMITER_TYPES [ type ] ) ; if ( ( noSubstitute ) && ( ( stringBundle.getLoadingStatus ( ) ) == ( android.icu.impl.ICUResourceBundle.FROM_ROOT ) ) ) return null ; return stringBundle.getString ( ) ; }

Target:
public java.lang.String getDelimiter ( int type ) { android.icu.impl.ICUResourceBundle delimitersBundle = ( ( android.icu.impl.ICUResourceBundle ) ( bundle.get ( "delimiters" ) ) ) ; android.icu.impl.ICUResourceBundle stringBundle = delimitersBundle.getWithFallback ( android.icu.util.LocaleData.DELIMITER_TYPES [ type ] ) ; if ( ( ( noSubstitute ) && ( ! ( bundle.isRoot ( ) ) ) ) && ( stringBundle.isRoot ( ) ) ) { return null ; } return stringBundle.getString ( ) ; }
Source:
public com.android.sdklib.repository.local.LocalPkgInfo getPkgInfo ( int filter , java.lang.String vendorPath ) { assert ( ( filter == ( com.android.sdklib.repository.local.LocalSdk.PKG_EXTRAS ) ) || ( filter == ( com.android.sdklib.repository.local.LocalSdk.PKG_ADDONS ) ) ) || ( filter == ( com.android.sdklib.repository.local.LocalSdk.PKG_PLATFORMS ) ) ; for ( com.android.sdklib.repository.local.LocalPkgInfo pkg : getPkgsInfos ( filter ) ) { if ( ( pkg.hasPath ( ) ) && ( vendorPath.equals ( pkg.getPath ( ) ) ) ) { return pkg ; } } return null ; }

Target:
public com.android.sdklib.repository.local.LocalPkgInfo getPkgInfo ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.PkgType filter , @ com.android.annotations.NonNull com.android.sdklib.AndroidVersion version ) { assert ( ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_PLATFORMS ) ) || ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_SAMPLES ) ) ) || ( filter == ( com.android.sdklib.repository.descriptors.PkgType.PKG_SOURCES ) ) ; for ( com.android.sdklib.repository.local.LocalPkgInfo pkg : getPkgsInfos ( filter ) ) { com.android.sdklib.repository.descriptors.IPkgDesc d = pkg.getDesc ( ) ; if ( ( d.hasAndroidVersion ( ) ) && ( d.getAndroidVersion ( ) . equals ( version ) ) ) { return pkg ; } } return null ; }
Source:
public void updateInternalIccState ( java.lang.String simStatus , java.lang.String reason , int slotId ) { int message = internalIccStateToMessage ( simStatus ) ; if ( message != ( com.android.internal.telephony.SubscriptionInfoUpdater.EVENT_INVALID ) ) { sendMessage ( obtainMessage ( message , slotId , ( - 1 ) , reason ) ) ; } }

Target:
public void updateInternalIccState ( java.lang.String simStatus , java.lang.String reason , int slotId ) { logd ( ( ( ( ( ( "updateInternalIccState to simStatus " + simStatus ) + " reason " ) + reason ) + " slotId " ) + slotId ) ) ; int message = internalIccStateToMessage ( simStatus ) ; if ( message != ( com.android.internal.telephony.SubscriptionInfoUpdater.EVENT_INVALID ) ) { sendMessage ( obtainMessage ( message , slotId , ( - 1 ) , reason ) ) ; } }
Source:
public void testSendUuidIntent ( ) { com.android.bluetooth.btservice.RemoteDevices remoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; remoteDevices.updateUuids ( mDevice1 ) ; android.os.Looper.myLooper ( ) . quitSafely ( ) ; android.os.Looper.loop ( ) ; org.mockito.Mockito.verify ( mAdapterService ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void setUp ( ) { org.mockito.MockitoAnnotations.initMocks ( this ) ; if ( ( android.os.Looper.myLooper ( ) ) == null ) android.os.Looper.prepare ( ) ; mDevice1 = android.bluetooth.BluetoothAdapter.getDefaultAdapter ( ) . getRemoteDevice ( com.android.bluetooth.btservice.RemoteDevicesTest.TEST_BT_ADDR_1 ) ; mRemoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; }
Source:
private void processLogLines ( java.lang.String [ ] lines ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > newMessages = mLogCatMessageParser.processLogLines ( lines , mPidToNameMapper ) ; if ( ( newMessages.size ( ) ) > 0 ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > deletedMessages ; synchronized ( mLogMessages ) { deletedMessages = mLogMessages.ensureSpace ( newMessages.size ( ) ) ; mLogMessages.appendMessages ( newMessages ) ; } sendLogChangedEvent ( newMessages , deletedMessages ) ; } }

Target:
private void processLogLines ( java.lang.String [ ] lines ) { java.util.List < com.android.ddmuilib.logcat.LogCatMessage > newMessages = mLogCatMessageParser.processLogLines ( lines , mPidToNameMapper ) ; processLogMessages ( newMessages ) ; }
Source:
public void onRecordedProgramsAdded ( com.android.tv.dvr.RecordedProgram ... recordedPrograms ) { if ( ( ! ( mDataManager.isInitialized ( ) ) ) || ( ! ( mScheduleManager.isInitialized ( ) ) ) ) { return ; } for ( com.android.tv.dvr.RecordedProgram recordedProgram : recordedPrograms ) { createSeriesRecordingForRecordedProgramIfNeeded ( recordedProgram ) ; } }

Target:
public void onRecordedProgramsAdded ( com.android.tv.dvr.data.RecordedProgram ... recordedPrograms ) { if ( ( ! ( mDataManager.isInitialized ( ) ) ) || ( ! ( mScheduleManager.isInitialized ( ) ) ) ) { return ; } for ( com.android.tv.dvr.data.RecordedProgram recordedProgram : recordedPrograms ) { createSeriesRecordingForRecordedProgramIfNeeded ( recordedProgram ) ; } }
Source:
private boolean canReadPhoneState ( java.lang.String callingPackage ) { if ( ( mContext.checkCallingOrSelfPermission ( android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { return true ; } boolean canReadPhoneState = ( mContext.checkCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE ) ) == ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ; if ( canReadPhoneState && ( ( mAppOps.noteOp ( AppOpsManager.OP_READ_PHONE_STATE , android.os.Binder.getCallingUid ( ) , callingPackage ) ) != ( android.app.AppOpsManager.MODE_ALLOWED ) ) ) { return false ; } return canReadPhoneState ; }

Target:
boolean canReadPhoneState ( ) { try { return com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState ( context , subId , callerPid , callerUid , callingPackage , "listen" ) ; } catch ( java.lang.SecurityException e ) { return false ; } }
Source:
public javax.net.ssl.SSLSession getSession ( ) { org.conscrypt.OpenSSLSessionImpl sslSession = sslParameters.getSession ( ) ; if ( sslSession == null ) { try { waitForHandshake ( ) ; sslSession = sslParameters.getSession ( ) ; } catch ( java.io.IOException e ) { return org.conscrypt.SSLSessionImpl.getNullSession ( ) ; } } return sslSession ; }

Target:
public java.lang.String [ ] getEnabledCipherSuites ( ) { return sslParameters.getEnabledCipherSuites ( ) ; }
Source:
public void onClick ( android.view.View v ) { if ( ! ( runKeyguardConfirmation ( com.android.settings.CryptKeeperSettings.KEYGUARD_REQUEST ) ) ) { new android.app.AlertDialog.Builder ( getActivity ( ) ) . setTitle ( R.string.crypt_keeper_dialog_need_password_title ) . setIcon ( android.R.drawable.ic_dialog_alert ) . setMessage ( R.string.crypt_keeper_dialog_need_password_message ) . setPositiveButton ( android.R.string.ok , null ) . create ( ) . show ( ) ; } }

Target:
public void onClick ( android.view.View v ) { if ( ! ( runKeyguardConfirmation ( com.android.settings.CryptKeeperSettings.KEYGUARD_REQUEST ) ) ) { new android.app.AlertDialog.Builder ( getActivity ( ) ) . setTitle ( R.string.crypt_keeper_dialog_need_password_title ) . setIconAttribute ( android.R.attr.alertDialogIcon ) . setMessage ( R.string.crypt_keeper_dialog_need_password_message ) . setPositiveButton ( android.R.string.ok , null ) . create ( ) . show ( ) ; } }
Source:
private void testInterruptOutputStream ( final java.io.OutputStream out ) throws java.lang.Exception { interruptMeLater ( ) ; try { while ( true ) { out.write ( new byte [ libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ] ) ; } } catch ( java.io.InterruptedIOException expected ) { } }

Target:
private void testInterruptReadableChannel ( final java.nio.channels.ReadableByteChannel channel ) throws java.lang.Exception { java.lang.Thread thread = interruptMeLater ( ) ; try { channel.read ( java.nio.ByteBuffer.allocate ( libcore.java.io.InterruptedStreamTest.BUFFER_SIZE ) ) ; fail ( ) ; } catch ( java.nio.channels.ClosedByInterruptException expected ) { } finally { libcore.java.io.InterruptedStreamTest.confirmInterrupted ( thread ) ; } }
Source:
private static boolean isBidiMark ( char c ) { return ( ( c == '‎' ) || ( c == '‏' ) ) || ( c == '؜' ) ; }

Target:
public void setMonetaryGroupingSeparatorString ( java.lang.String sep ) { if ( sep == null ) { throw new java.lang.NullPointerException ( "The input monetary grouping separator is null" ) ; } this . monetaryGroupingSeparatorString = sep ; if ( ( sep.length ( ) ) == 1 ) { this . monetaryGroupingSeparator = sep.charAt ( 0 ) ; } else { this . monetaryGroupingSeparator = android.icu.text.DecimalFormatSymbols.DEF_GROUPING_SEPARATOR ; } }
Source:
public static boolean hasValidGenericSignature ( @ javax.annotation.Nonnull org.objectweb.asm.tree.MethodNode mn ) { if ( ( mn.signature ) != null ) { try { GenericSignatureParser.PARSER.parseMethodSignature ( mn.signature ) ; return true ; } catch ( java.lang.reflect.GenericSignatureFormatError e ) { } } return false ; }

Target:
public static boolean hasValidGenericSignature ( @ javax.annotation.Nonnull org.objectweb.asm.tree.MethodNode mn ) { if ( ( mn.signature ) != null ) { try { new com.android.jill.signature.GenericSignatureParser < java.lang.Object > ( new com.android.jill.frontend.java.AsmHelper.DummyAction ( ) ) . parseMethodSignature ( mn.signature ) ; return true ; } catch ( java.lang.reflect.GenericSignatureFormatError e ) { } } return false ; }
Source:
public void findAllAsync ( final java.lang.String searchString ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { findAllAsync ( searchString ) ; } } ) ; return ; } mAwContents.findAllAsync ( searchString ) ; }

Target:
public void notifyFindDialogDismissed ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { notifyFindDialogDismissed ( ) ; } } ) ; return ; } clearMatches ( ) ; }
Source:
private static org.eclipse.core.resources.IProject getProject ( ) { org.eclipse.ui.IEditorPart editor = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getEditor ( ) ; if ( editor != null ) { org.eclipse.ui.IEditorInput input = editor.getEditorInput ( ) ; if ( input instanceof org.eclipse.ui.IFileEditorInput ) { org.eclipse.ui.IFileEditorInput fileInput = ( ( org.eclipse.ui.IFileEditorInput ) ( input ) ) ; return fileInput.getFile ( ) . getProject ( ) ; } } return null ; }

Target:
private static org.eclipse.core.resources.IFile getFile ( ) { org.eclipse.ui.IEditorPart editor = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getEditor ( ) ; if ( editor != null ) { org.eclipse.ui.IEditorInput input = editor.getEditorInput ( ) ; if ( input instanceof org.eclipse.ui.IFileEditorInput ) { org.eclipse.ui.IFileEditorInput fileInput = ( ( org.eclipse.ui.IFileEditorInput ) ( input ) ) ; return fileInput.getFile ( ) ; } } return null ; }
Source:
public void testTimedoutAfterUnregisteredNetworkRequest ( ) { android.net.NetworkRequest nr = new android.net.NetworkRequest.Builder ( ) . addTransportType ( NetworkCapabilities.TRANSPORT_WIFI ) . build ( ) ; final com.android.server.ConnectivityServiceTest.TestNetworkCallback networkCallback = new com.android.server.ConnectivityServiceTest.TestNetworkCallback ( ) ; mCm.requestNetwork ( nr , networkCallback , 10 ) ; mCm.unregisterNetworkCallback ( networkCallback ) ; try { java.lang.Thread.sleep ( 15 ) ; } catch ( java.lang.InterruptedException e ) { } networkCallback.assertNoCallback ( ) ; mWiFiNetworkAgent = new com.android.server.ConnectivityServiceTest.MockNetworkAgent ( TRANSPORT_WIFI ) ; mWiFiNetworkAgent.connect ( false ) ; networkCallback.assertNoCallback ( ) ; }

Target:
private static void sleepFor ( int ms ) { try { java.lang.Thread.sleep ( ms ) ; } catch ( java.lang.InterruptedException e ) { } }
Source:
public java.lang.String [ ] getPcscfAddress ( java.lang.String apnType , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , callingPackage , "getPcscfAddress" ) ) ) { return new java.lang.String [ 0 ] ; } return mPhone.getPcscfAddress ( apnType ) ; }

Target:
public java.lang.String [ ] getPcscfAddress ( java.lang.String apnType , java.lang.String callingPackage ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mApp , mPhone.getSubId ( ) , callingPackage , "getPcscfAddress" ) ) ) { return new java.lang.String [ 0 ] ; } return mPhone.getPcscfAddress ( apnType ) ; }
Source:
public void testUseStart ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( RtlDetector.USE_START ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "res/layout/rtl.xml:14: Warning: Use \"start\" instead of \"left\" to ensure correct behavior in right-to-left locales [RtlHardcoded]\n" + " android:layout_gravity=\"left\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/rtl.xml:22: Warning: Use \"end\" instead of \"right\" to ensure correct behavior in right-to-left locales [RtlHardcoded]\n" ) + " android:layout_gravity=\"right\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "res/layout/rtl.xml:30: Warning: Use \"end\" instead of \"right\" to ensure correct behavior in right-to-left locales [RtlHardcoded]\n" ) + " android:gravity=\"right\"\n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "rtl/project-api17.properties=>project.properties" , "rtl/minsdk5targetsdk17.xml=>AndroidManifest.xml" , "rtl/rtl.xml=>res/layout/rtl.xml" ) ) ; }

Target:
public void testUseStart ( ) throws java.lang.Exception { mEnabled = java.util.Collections.singleton ( RtlDetector.USE_START ) ; assertEquals ( ( "" + ( ( ( ( ( ( ( ( ( "res/layout/rtl.xml:14: Warning: Use \"start\" instead of \"left\" to ensure correct behavior in right-to-left locales [RtlHardcoded]\n" + " android:layout_gravity=\"left\"\n" ) + " ~~~~\n" ) + "res/layout/rtl.xml:22: Warning: Use \"end\" instead of \"right\" to ensure correct behavior in right-to-left locales [RtlHardcoded]\n" ) + " android:layout_gravity=\"right\"\n" ) + " ~~~~~\n" ) + "res/layout/rtl.xml:30: Warning: Use \"end\" instead of \"right\" to ensure correct behavior in right-to-left locales [RtlHardcoded]\n" ) + " android:gravity=\"right\"\n" ) + " ~~~~~\n" ) + "0 errors, 3 warnings\n" ) ) , lintProject ( "rtl/project-api17.properties=>project.properties" , "rtl/minsdk5targetsdk17.xml=>AndroidManifest.xml" , "rtl/rtl.xml=>res/layout/rtl.xml" ) ) ; }
Source:
static boolean get24HourMode ( final android.content.Context context ) { return android.text.format.DateFormat.is24HourFormat ( context ) ; }

Target:
static synchronized boolean get24HourMode ( final android.content.Context context ) { if ( ( ( com.android.mms.ui.MessageUtils.s24HourLastContext ) != null ) && ( ( com.android.mms.ui.MessageUtils.s24HourLastContext.get ( ) ) == context ) ) { return com.android.mms.ui.MessageUtils.sCached24HourMode ; } com.android.mms.ui.MessageUtils.s24HourLastContext = new java.lang.ref.WeakReference < android.content.Context > ( context ) ; com.android.mms.ui.MessageUtils.sCached24HourMode = android.text.format.DateFormat.is24HourFormat ( context ) ; return com.android.mms.ui.MessageUtils.sCached24HourMode ; }
Source:
public java.lang.String getDebugString ( ) { }

Target:
public java.lang.String getDebugString ( ) { java.lang.String debug = "" ; if ( ( canvasClient ) != null ) { debug += "CanvasClient : " ; if ( ( canvasClientDebugString ) != null ) { debug += canvasClientDebugString ; } else { debug += "no debug string given" ; } } else { debug += "Layout resource : " + ( getActivity ( ) . getResources ( ) . getResourceName ( layoutID ) ) ; } debug += ( ( "\nTest ran in " + ( useHardware ? "hardware" : "software" ) ) + ( usePicture ? " with picture" : " without picture" ) ) + "\n" ; return debug ; }
Source:
private void createProfile ( java.lang.String profileName ) { com.android.managedprovisioning.ProvisionLogger.logd ( ( "Creating managed profile with name " + profileName ) ) ; mManagedProfileUserInfo = mUserManager.createProfileForUser ( profileName , ( ( android.content.pm.UserInfo.FLAG_MANAGED_PROFILE ) | ( android.content.pm.UserInfo.FLAG_DISABLED ) ) , java.lang.Process.myUserHandle ( ) . getIdentifier ( ) ) ; if ( ( mManagedProfileUserInfo ) == null ) { if ( ( android.os.UserManager.getMaxSupportedUsers ( ) ) == ( mUserManager.getUserCount ( ) ) ) { error ( "Profile creation failed, maximum number of users reached." ) ; } else { error ( "Couldn't create profile. Reason unknown." ) ; } } }

Target:
private void createProfile ( java.lang.String profileName ) { com.android.managedprovisioning.ProvisionLogger.logd ( ( "Creating managed profile with name " + profileName ) ) ; mManagedProfileUserInfo = mUserManager.createProfileForUser ( profileName , ( ( android.content.pm.UserInfo.FLAG_MANAGED_PROFILE ) | ( android.content.pm.UserInfo.FLAG_DISABLED ) ) , java.lang.Process.myUserHandle ( ) . getIdentifier ( ) ) ; if ( ( mManagedProfileUserInfo ) == null ) { error ( "Couldn't create profile." ) ; } }
Source:
protected void copyFrom ( android.telephony.SignalStrength s ) { mGsmSignalStrength = s.mGsmSignalStrength ; mGsmBitErrorRate = s.mGsmBitErrorRate ; mCdmaDbm = s.mCdmaDbm ; mCdmaEcio = s.mCdmaEcio ; mEvdoDbm = s.mEvdoDbm ; mEvdoEcio = s.mEvdoEcio ; mEvdoSnr = s.mEvdoSnr ; mLteSignalStrength = s.mLteSignalStrength ; mLteRsrp = s.mLteRsrp ; mLteRsrq = s.mLteRsrq ; mLteRssnr = s.mLteRssnr ; mLteCqi = s.mLteCqi ; mLteRsrpBoost = s.mLteRsrpBoost ; mTdScdmaRscp = s.mTdScdmaRscp ; isGsm = s.isGsm ; }

Target:
protected void copyFrom ( android.telephony.SignalStrength s ) { mGsmSignalStrength = s.mGsmSignalStrength ; mGsmBitErrorRate = s.mGsmBitErrorRate ; mCdmaDbm = s.mCdmaDbm ; mCdmaEcio = s.mCdmaEcio ; mEvdoDbm = s.mEvdoDbm ; mEvdoEcio = s.mEvdoEcio ; mEvdoSnr = s.mEvdoSnr ; mLteSignalStrength = s.mLteSignalStrength ; mLteRsrp = s.mLteRsrp ; mLteRsrq = s.mLteRsrq ; mLteRssnr = s.mLteRssnr ; mLteCqi = s.mLteCqi ; mLteRsrpBoost = s.mLteRsrpBoost ; mTdScdmaRscp = s.mTdScdmaRscp ; isGsm = s.isGsm ; mUseOnlyRsrpForLteLevel = s.mUseOnlyRsrpForLteLevel ; }
Source:
private static void assertMultipleInstanceCharacteristics ( java.lang.Object r1 , java.lang.Object r2 ) throws java.lang.Exception { assertNotSame ( r1 , r2 ) ; assertTrue ( ( ! ( r1.equals ( r2 ) ) ) ) ; java.lang.Class < ? > lambda1Class = r1.getClass ( ) ; java.lang.Class < ? > lambda2Class = r2.getClass ( ) ; assertNotSame ( lambda1Class , lambda2Class ) ; }

Target:
private static void assertMultipleDefinitionCharacteristics ( java.util.concurrent.Callable < java.lang.String > r1 , java.util.concurrent.Callable < java.lang.String > r2 ) throws java.lang.Exception { assertEquals ( r1.call ( ) , r2.call ( ) ) ; assertNotSame ( r1 , r2 ) ; assertTrue ( ( ! ( r1.equals ( r2 ) ) ) ) ; }
Source:
public com.android.sched.vfs.InputOutputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { return getSectionVFS ( fileType ) . getRootInputOutputVDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public void delete ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException , com.android.sched.util.file.CannotDeleteFileException { assert ! ( isClosed ( ) ) ; try { getSectionVFS ( fileType ) . getRootDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) . delete ( ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public com.android.server.wifi.WifiNative.TdlsStatus getTdlsStatus ( java.lang.String macAdd ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getTdlsStatusNative ( com.android.server.wifi.WifiNative.sWlan0Index , macAdd ) ; } else { return null ; } } }

Target:
public com.android.server.wifi.WifiNative.TdlsStatus getTdlsStatus ( java.lang.String macAdd ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "getTdlsStatus not supported" ) ; return null ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getTdlsStatusNative ( com.android.server.wifi.WifiNative.sWlan0Index , macAdd ) ; } else { return null ; } } } }
Source:
public java.lang.Boolean getFunctionalTest ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( ( mType ) == ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) { config = getTestedConfig ( ) ; } java.lang.Boolean functionalTest = config.mMergedFlavor.getTestFunctionalTest ( ) ; return functionalTest != null ? functionalTest : com.android.builder.core.VariantConfiguration.DEFAULT_FUNCTIONAL_TEST ; }

Target:
public java.lang.String getInstrumentationRunner ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( mType.isForTesting ( ) ) { config = getTestedConfig ( ) ; com.google.common.base.Preconditions.checkState ( ( config != null ) ) ; } java.lang.String runner = config.mMergedFlavor.getTestInstrumentationRunner ( ) ; return runner != null ? runner : com.android.builder.core.VariantConfiguration.DEFAULT_TEST_RUNNER ; }
Source:
private void initializeTimeline ( ) { com.android.tv.data.Program program = mTimeShiftManager.getProgramAt ( mTimeShiftManager.getCurrentPositionMs ( ) ) ; mProgramStartTimeMs = program.getStartTimeUtcMillis ( ) ; mProgramEndTimeMs = program.getEndTimeUtcMillis ( ) ; com.android.tv.common.SoftPreconditions.checkArgument ( ( ( mProgramStartTimeMs ) <= ( mProgramEndTimeMs ) ) ) ; }

Target:
private void initializeTimeline ( ) { com.android.tv.data.Program program = mTimeShiftManager.getProgramAt ( mTimeShiftManager.getCurrentPositionMs ( ) ) ; mProgramStartTimeMs = program.getStartTimeUtcMillis ( ) ; mProgramEndTimeMs = program.getEndTimeUtcMillis ( ) ; mProgress.setMax ( ( ( mProgramEndTimeMs ) - ( mProgramStartTimeMs ) ) ) ; updateRecTimeText ( ) ; com.android.tv.common.SoftPreconditions.checkArgument ( ( ( mProgramStartTimeMs ) <= ( mProgramEndTimeMs ) ) ) ; }
Source:
public long toEpochMilli ( ) { long millis = java.lang.Math.multiplyExact ( seconds , 1000 ) ; return millis + ( ( nanos ) / 1000000 ) ; }

Target:
public long toEpochMilli ( ) { if ( ( ( seconds ) < 0 ) && ( ( nanos ) > 0 ) ) { long millis = java.lang.Math.multiplyExact ( ( ( seconds ) + 1 ) , 1000 ) ; long adjustment = ( ( nanos ) / 1000000 ) - 1000 ; return java.lang.Math.addExact ( millis , adjustment ) ; } else { long millis = java.lang.Math.multiplyExact ( seconds , 1000 ) ; return java.lang.Math.addExact ( millis , ( ( nanos ) / 1000000 ) ) ; } }
Source:
public static void stopDeoptimization ( ) { try { DeoptimizationController.VMDebug.stopMethodTracing ( ) ; if ( ( DeoptimizationController.VMDebug.getMethodTracingMode ( ) ) != 0 ) { throw new java.lang.IllegalStateException ( "Still tracing." ) ; } } catch ( java.lang.Exception exc ) { exc.printStackTrace ( java.lang.System.err ) ; } }

Target:
public static void stopDeoptimization ( ) { try { DeoptimizationController.VMDebug.stopMethodTracing ( ) ; if ( ( DeoptimizationController.VMDebug.getMethodTracingMode ( ) ) != 0 ) { throw new java.lang.IllegalStateException ( "Still tracing." ) ; } } catch ( java.lang.Exception exc ) { exc.printStackTrace ( java.lang.System.out ) ; } }
Source:
public void testCannotSetDeviceOwnerWhenSecondaryUserPresent ( ) throws java.lang.Exception { if ( ( ! ( mHasFeature ) ) || ( ( getMaxNumberOfUsersSupported ( ) ) < 2 ) ) { return ; } int userId = - 1 ; installApp ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_APK ) ; try { userId = createUser ( ) ; assertFalse ( setDeviceOwner ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_ADMIN_COMPONENT ) ) ; } finally { removeUser ( userId ) ; runDeviceTests ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_PKG , com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_CLEAR ) ; } }

Target:
public void testIsProvisioningAllowed ( ) throws java.lang.Exception { installAppAsUser ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_APK , mPrimaryUserId ) ; try { assertTrue ( runDeviceTestsAsUser ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_PKG , ".PreDeviceOwnerTest" , "testIsProvisioningAllowedFalse" , 0 ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.CustomDeviceOwnerTest.DEVICE_OWNER_PKG ) ; } }
Source:
public boolean dispatchKeyEvent ( final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return dispatchKeyEvent ( event ) ; } } ) ; return ret ; } return mAwContents.dispatchKeyEvent ( event ) ; }

Target:
public boolean onKeyUp ( final int keyCode , final android.view.KeyEvent event ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return onKeyUp ( keyCode , event ) ; } } ) ; return ret ; } return mAwContents.onKeyUp ( keyCode , event ) ; }
Source:
public java.lang.String getDisplayCountry ( java.util.Locale locale ) { if ( countryCode.isEmpty ( ) ) { return "" ; } java.lang.String result = libcore.icu.ICU.getDisplayCountryNative ( toString ( ) , locale.toString ( ) ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayCountryNative ( toString ( ) , java.util.Locale.getDefault ( ) . toString ( ) ) ; } return result ; }

Target:
public java.lang.String getDisplayVariant ( java.util.Locale locale ) { if ( ( variantCode.length ( ) ) == 0 ) { return variantCode ; } java.lang.String result = libcore.icu.ICU.getDisplayVariantNative ( getIcuLocaleId ( ) , locale.getIcuLocaleId ( ) ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayVariantNative ( getIcuLocaleId ( ) , java.util.Locale.getDefault ( ) . getIcuLocaleId ( ) ) ; } return result ; }
Source:
public void testGetCodeName ( ) { assertNull ( com.android.sdklib.SdkVersionInfo.getCodeName ( 1 ) ) ; assertNull ( com.android.sdklib.SdkVersionInfo.getCodeName ( 2 ) ) ; assertEquals ( "Cupcake" , com.android.sdklib.SdkVersionInfo.getCodeName ( 3 ) ) ; assertEquals ( "KitKat" , com.android.sdklib.SdkVersionInfo.getCodeName ( 19 ) ) ; }

Target:
public void testGetCodeName ( ) { assertNull ( com.android.sdklib.SdkVersionInfo.getCodeName ( 1 ) ) ; assertNull ( com.android.sdklib.SdkVersionInfo.getCodeName ( 2 ) ) ; assertEquals ( "Cupcake" , com.android.sdklib.SdkVersionInfo.getCodeName ( 3 ) ) ; assertEquals ( "KitKat" , com.android.sdklib.SdkVersionInfo.getCodeName ( 19 ) ) ; assertEquals ( "Lollipop" , com.android.sdklib.SdkVersionInfo.getCodeName ( 21 ) ) ; }
Source:
public java.util.List < java.lang.String > contactsGetAttributes ( ) { java.util.List < java.lang.String > result = new java.util.ArrayList < java.lang.String > ( ) ; android.database.Cursor cursor = mContentResolver.query ( com.googlecode.android_scripting.facade.ContactsFacade.CONTACTS_URI , null , null , null , null ) ; if ( cursor != null ) { java.lang.String [ ] columns = cursor.getColumnNames ( ) ; for ( int i = 0 ; i < ( columns.length ) ; i ++ ) { result.add ( columns [ i ] ) ; } cursor.close ( ) ; } return result ; }

Target:
public java.util.List < java.lang.String > contactsGetAttributes ( ) { java.util.List < java.lang.String > attributes = new java.util.ArrayList < java.lang.String > ( ) ; android.database.Cursor cursor = mContentResolver.query ( com.googlecode.android_scripting.facade.ContactsFacade.CONTACTS_URI , null , null , null , null ) ; if ( cursor != null ) { java.lang.String [ ] columns = cursor.getColumnNames ( ) ; for ( int i = 0 ; i < ( columns.length ) ; i ++ ) { attributes.add ( columns [ i ] ) ; } cursor.close ( ) ; } return attributes ; }
Source:
private boolean isUidOwnerOfPackageOrSystem ( java.lang.String packageName , int callerUid ) { if ( callerUid == ( android.os.Process.SYSTEM_UID ) ) { return true ; } if ( packageName == null ) { return false ; } final int packageUid = mPms.getPackageUid ( packageName , android.os.UserHandle.getUserId ( callerUid ) ) ; if ( com.android.server.MountService.DEBUG_OBB ) { android.util.Slog.d ( com.android.server.MountService.TAG , ( ( ( ( ( "packageName = " + packageName ) + ", packageUid = " ) + packageUid ) + ", callerUid = " ) + callerUid ) ) ; } return callerUid == packageUid ; }

Target:
private boolean isUidOwnerOfPackageOrSystem ( java.lang.String packageName , int callerUid ) { if ( callerUid == ( android.os.Process.SYSTEM_UID ) ) { return true ; } if ( packageName == null ) { return false ; } final int packageUid = mPms.getPackageUid ( packageName , PackageManager.MATCH_DEBUG_TRIAGED_MISSING , android.os.UserHandle.getUserId ( callerUid ) ) ; if ( com.android.server.MountService.DEBUG_OBB ) { android.util.Slog.d ( com.android.server.MountService.TAG , ( ( ( ( ( "packageName = " + packageName ) + ", packageUid = " ) + packageUid ) + ", callerUid = " ) + callerUid ) ) ; } return callerUid == packageUid ; }
Source:
public com.android.dialer.historyitemactions.HistoryItemActionModulesBuilder addModuleForSendingTextMessage ( ) { if ( ( ( moduleInfo.getIsVoicemailCall ( ) ) || ( moduleInfo.getIsBlocked ( ) ) ) || ( android.text.TextUtils.isEmpty ( moduleInfo.getNormalizedNumber ( ) ) ) ) { return this ; } modules.add ( com.android.dialer.historyitemactions.IntentModule.newModuleForSendingTextMessage ( context , moduleInfo.getNormalizedNumber ( ) ) ) ; return this ; }

Target:
public com.android.dialer.historyitemactions.HistoryItemActionModulesBuilder addModuleForSendingTextMessage ( ) { if ( ( ( ( isEmergencyNumber ( ) ) || ( moduleInfo.getIsVoicemailCall ( ) ) ) || ( moduleInfo.getIsBlocked ( ) ) ) || ( android.text.TextUtils.isEmpty ( moduleInfo.getNormalizedNumber ( ) ) ) ) { return this ; } modules.add ( com.android.dialer.historyitemactions.IntentModule.newModuleForSendingTextMessage ( context , moduleInfo.getNormalizedNumber ( ) ) ) ; return this ; }
Source:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; int bc = in.read ( ) ; int b = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( bc ) ; int literal = ( ( byte ) ( com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( bc ) ) ) ; return new com.android.jack.dx.io.instructions.TwoRegisterDecodedInstruction ( this , opcode , 0 , null , 0 , literal , a , b ) ; }

Target:
public com.android.jack.dx.io.instructions.DecodedInstruction decode ( int opcodeUnit , com.android.jack.dx.io.instructions.CodeInput in ) throws java.io.EOFException { int opcode = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( opcodeUnit ) ; int a = com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( opcodeUnit ) ; int bc = in.read ( ) ; int b = com.android.jack.dx.io.instructions.InstructionCodec.byte0 ( bc ) ; int literal = ( ( byte ) ( com.android.jack.dx.io.instructions.InstructionCodec.byte1 ( bc ) ) ) ; return new com.android.jack.dx.io.instructions.TwoRegisterDecodedInstruction ( this , opcode , 0 , com.android.jack.dx.io.IndexType.NONE , 0 , literal , a , b ) ; }
Source:
public void getPackageStatus_missingRowBehavior ( ) { org.junit.Assert.assertNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; com.android.server.timezone.CheckToken token1 = mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageStatusStorageTest.VALID_PACKAGE_VERSIONS ) ; org.junit.Assert.assertNotNull ( token1 ) ; org.junit.Assert.assertNotNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; mPackageStatusStorage.deleteRowForTests ( ) ; org.junit.Assert.assertNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; }

Target:
public void getPackageStatus_missingFileBehavior ( ) { org.junit.Assert.assertNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; com.android.server.timezone.CheckToken token1 = mPackageStatusStorage.generateCheckToken ( com.android.server.timezone.PackageStatusStorageTest.VALID_PACKAGE_VERSIONS ) ; org.junit.Assert.assertNotNull ( token1 ) ; org.junit.Assert.assertNotNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; mPackageStatusStorage.deleteFileForTests ( ) ; org.junit.Assert.assertNull ( mPackageStatusStorage.getPackageStatus ( ) ) ; }
Source:
public java.lang.String iccTransmitApduBasicChannel ( int subId , int cla , int instruction , int p1 , int p2 , int p3 , java.lang.String data ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccTransmitApduBasicChannel ( subId , cla , instruction , p1 , p2 , p3 , data ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return "" ; }

Target:
public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel ( int subId , java.lang.String AID , int p2 ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccOpenLogicalChannel ( subId , getOpPackageName ( ) , AID , p2 ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }
Source:
public void run ( ) { java.awt.Image image = java.awt.Toolkit.getDefaultToolkit ( ) . getImage ( newUrl ) ; pictureCallback.setProperty ( image ) ; }

Target:
public void run ( ) { java.awt.Image image = java.awt.Toolkit.getDefaultToolkit ( ) . getImage ( newUrl ) ; java.awt.Toolkit.getDefaultToolkit ( ) . prepareImage ( image , ( - 1 ) , ( - 1 ) , null ) ; pictureCallback.setProperty ( image ) ; }
Source:
protected void readSourceFolder ( java.io.File sourceFolder ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { java.io.File [ ] files = sourceFolder.listFiles ( ) ; if ( ( files != null ) && ( ( files.length ) > 0 ) ) { for ( java.io.File file : files ) { if ( ( ! ( file.isFile ( ) ) ) || ( ! ( checkFileForAndroidRes ( file ) ) ) ) { continue ; } handleNewFile ( sourceFolder , file ) ; } } }

Target:
protected void readSourceFolder ( java.io.File sourceFolder , com.android.utils.ILogger logger ) throws com.android.builder.resources.DuplicateDataException , java.io.IOException { java.io.File [ ] files = sourceFolder.listFiles ( ) ; if ( ( files != null ) && ( ( files.length ) > 0 ) ) { for ( java.io.File file : files ) { if ( ( ! ( file.isFile ( ) ) ) || ( ! ( checkFileForAndroidRes ( file ) ) ) ) { continue ; } handleNewFile ( sourceFolder , file , logger ) ; } } }
Source:
public void onCharacteristicChanged ( android.bluetooth.BluetoothGatt gatt , android.bluetooth.BluetoothGattCharacteristic characteristic ) { if ( com.android.cts.verifier.bluetooth.BleClientService.DEBUG ) android.util.Log.d ( com.android.cts.verifier.bluetooth.BleClientService.TAG , "onCharacteristicChanged" ) ; if ( ( ( characteristic.getUuid ( ) ) != null ) && ( characteristic.getUuid ( ) . equals ( com.android.cts.verifier.bluetooth.BleClientService.UPDATE_CHARACTERISTIC_UUID ) ) ) { notifyCharacteristicChanged ( characteristic.getStringValue ( 0 ) ) ; setNotification ( false ) ; sleep ( 1000 ) ; mBluetoothGatt.readRemoteRssi ( ) ; } }

Target:
private void notifyError ( java.lang.String message ) { showMessage ( message ) ; android.util.Log.i ( com.android.cts.verifier.bluetooth.BleClientService.TAG , message ) ; android.content.Intent intent = new android.content.Intent ( com.android.cts.verifier.bluetooth.BleClientService.BLE_CLIENT_ERROR ) ; sendBroadcast ( intent ) ; }
Source:
public int getScanMode ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; try { synchronized ( mManagerCallback ) { if ( ( mService ) != null ) return mService.getScanMode ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; }

Target:
public int getScanMode ( ) { if ( ( getState ( ) ) != ( android.bluetooth.BluetoothAdapter.STATE_ON ) ) return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; try { mServiceLock.readLock ( ) . lock ( ) ; if ( ( mService ) != null ) return mService.getScanMode ( ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAdapter.TAG , "" , e ) ; } finally { mServiceLock.readLock ( ) . unlock ( ) ; } return android.bluetooth.BluetoothAdapter.SCAN_MODE_NONE ; }
Source:
public void testInstall_withBadlyFormedBundleVersion ( ) throws java.lang.Exception { java.lang.String invalidBundleVersion = "A01.001" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( invalidBundleVersion , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withNewerBundleVersion ( ) throws java.lang.Exception { libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createValidTimeZoneBundleBuilder ( libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) . replaceFormatVersionForTests ( 2 , 1 ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_FORMAT_VERSION , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
private void initialize ( android.content.Context context , @ javax.annotation.Nullable android.util.AttributeSet attrs , int defStyleAttr , int defStyleRes ) { android.content.res.TypedArray typedArray = context.getTheme ( ) . obtainStyledAttributes ( attrs , R.styleable.AutoResizeTextView , defStyleAttr , defStyleRes ) ; readAttrs ( typedArray ) ; textPaint.set ( getPaint ( ) ) ; }

Target:
private void initialize ( android.content.Context context , @ android.support.annotation.Nullable android.util.AttributeSet attrs , int defStyleAttr , int defStyleRes ) { android.content.res.TypedArray typedArray = context.getTheme ( ) . obtainStyledAttributes ( attrs , R.styleable.AutoResizeTextView , defStyleAttr , defStyleRes ) ; readAttrs ( typedArray ) ; typedArray.recycle ( ) ; textPaint.set ( getPaint ( ) ) ; }
Source:
public com.android.jack.cfg.ControlFlowGraph getCfg ( ) { com.android.sched.util.log.Event optEvent = com.android.sched.util.log.TracerFactory.getTracer ( ) . start ( JackEventType.REMOVE_DEAD_CODE ) ; try { com.android.jack.cfg.CfgBuilder.removeUnaccessibleNode ( blocks , entryBlock , exitBlock , basicBlockId ) ; } finally { optEvent.end ( ) ; } return new com.android.jack.cfg.ControlFlowGraph ( method , basicBlockId , entryBlock , exitBlock , blocks ) ; }

Target:
public com.android.jack.cfg.ControlFlowGraph getCfg ( ) { com.android.sched.util.log.Event optEvent = tracer.start ( JackEventType.REMOVE_DEAD_CODE ) ; try { com.android.jack.cfg.CfgBuilder.removeUnaccessibleNode ( blocks , entryBlock , exitBlock , basicBlockId ) ; } finally { optEvent.end ( ) ; } return new com.android.jack.cfg.ControlFlowGraph ( method , basicBlockId , entryBlock , exitBlock , blocks ) ; }
Source:
public static int fromKeymaster ( int algorithm ) { switch ( algorithm ) { case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_AES : return android.security.KeyStoreKeyConstraints.Algorithm.AES ; case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_HMAC : return android.security.KeyStoreKeyConstraints.Algorithm.HMAC ; case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_RSA : return android.security.KeyStoreKeyConstraints.Algorithm.RSA ; case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_ECDSA : return android.security.KeyStoreKeyConstraints.Algorithm.EC ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown algorithm: " + algorithm ) ) ; } }

Target:
public static int fromKeymaster ( int algorithm ) { switch ( algorithm ) { case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_AES : return android.security.KeyStoreKeyConstraints.Algorithm.AES ; case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_HMAC : return android.security.KeyStoreKeyConstraints.Algorithm.HMAC ; case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_RSA : return android.security.KeyStoreKeyConstraints.Algorithm.RSA ; case android.security.keymaster.KeymasterDefs.KM_ALGORITHM_EC : return android.security.KeyStoreKeyConstraints.Algorithm.EC ; default : throw new java.lang.IllegalArgumentException ( ( "Unknown algorithm: " + algorithm ) ) ; } }
Source:
public void removeNotificationFromList ( java.lang.String cardId , int seqNumber , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . removeNotificationFromList ( mContext.getOpPackageName ( ) , cardId , seqNumber , new com.android.internal.telephony.euicc.IRemoveNotificationFromListCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { callback.onComplete ( resultCode , null ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling removeNotificationFromList" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void removeNotificationFromList ( java.lang.String cardId , int seqNumber , java.util.concurrent.Executor executor , android.telephony.euicc.EuiccCardManager.ResultCallback < java.lang.Void > callback ) { try { getIEuiccCardController ( ) . removeNotificationFromList ( mContext.getOpPackageName ( ) , cardId , seqNumber , new com.android.internal.telephony.euicc.IRemoveNotificationFromListCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode ) { executor.execute ( ( ) -> callback.onComplete ( resultCode , null ) ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling removeNotificationFromList" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
public synchronized java.lang.Throwable [ ] getSuppressed ( java.lang.Throwable receiver ) { java.util.List < java.lang.Throwable > list = map.get ( receiver ) ; if ( ( list == null ) || ( list.isEmpty ( ) ) ) { return com.google.devtools.build.android.desugar.runtime.ThrowableExtension.AbstractDesugaringStrategy.EMPTY_THROWABLE_ARRAY ; } return list.toArray ( new java.lang.Throwable [ 0 ] ) ; }

Target:
public void printStackTrace ( java.lang.Throwable receiver ) { receiver.printStackTrace ( ) ; java.util.List < java.lang.Throwable > suppressedList = map.get ( receiver , false ) ; if ( suppressedList == null ) { return ; } synchronized ( suppressedList ) { for ( java.lang.Throwable suppressed : suppressedList ) { java.lang.System.err.print ( com.google.devtools.build.android.desugar.runtime.ThrowableExtension.MimicDesugaringStrategy.SUPPRESSED_PREFIX ) ; suppressed.printStackTrace ( ) ; } } }