auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onAdvertisingParametersUpdated ( int advertiserId , int status ) { handler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { android.bluetooth.le.AdvertisingSet advertisingSet = mAdvertisingSets.get ( advertiserId ) ; callback.onAdvertisingParametersUpdated ( advertisingSet , status ) ; } } ) ; }

Target:
public void onAdvertisingParametersUpdated ( int advertiserId , int txPower , int status ) { handler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { android.bluetooth.le.AdvertisingSet advertisingSet = mAdvertisingSets.get ( advertiserId ) ; callback.onAdvertisingParametersUpdated ( advertisingSet , txPower , status ) ; } } ) ; }
Source:
public void testGetRootId ( ) { com.android.bluetooth.avrcp.BrowsedPlayerWrapper wrapper = com.android.bluetooth.avrcp.BrowsedPlayerWrapper.wrap ( null , "test" , "test" , mConnCb ) ; verify ( mMockBrowser ) . testInit ( any ( ) , any ( ) , mBrowserConnCb.capture ( ) , any ( ) ) ; com.android.bluetooth.avrcp.MediaBrowser.ConnectionCallback browserConnCb = mBrowserConnCb.getValue ( ) ; browserConnCb.onConnected ( ) ; org.junit.Assert.assertEquals ( BrowsedPlayerWrapper.ConnectionState.CONNECTED , wrapper.getConnectionState ( ) ) ; org.junit.Assert.assertEquals ( "root_folder" , wrapper.getRootId ( ) ) ; }

Target:
public void testGetRootId ( ) { com.android.bluetooth.avrcp.BrowsedPlayerWrapper wrapper = com.android.bluetooth.avrcp.BrowsedPlayerWrapper.wrap ( null , "test" , "test" ) ; wrapper.connect ( mConnCb ) ; verify ( mMockBrowser ) . testInit ( any ( ) , any ( ) , mBrowserConnCb.capture ( ) , any ( ) ) ; com.android.bluetooth.avrcp.MediaBrowser.ConnectionCallback browserConnCb = mBrowserConnCb.getValue ( ) ; browserConnCb.onConnected ( ) ; org.junit.Assert.assertEquals ( "root_folder" , wrapper.getRootId ( ) ) ; verify ( mMockBrowser ) . disconnect ( ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ! ( o instanceof org.conscrypt.OpenSSLECPointContext ) ) { return false ; } final org.conscrypt.OpenSSLECPointContext other = ( ( org.conscrypt.OpenSSLECPointContext ) ( o ) ) ; if ( ! ( org.conscrypt.NativeCrypto.EC_GROUP_cmp ( group.getNativeRef ( ) , other.group.getNativeRef ( ) ) ) ) { return false ; } return org.conscrypt.NativeCrypto.EC_POINT_cmp ( group.getNativeRef ( ) , pointCtx , other.pointCtx ) ; }

Target:
public boolean equals ( java.lang.Object o ) { throw new java.lang.IllegalArgumentException ( "OpenSSLECPointContext.equals is not defined." ) ; }
Source:
public final float getFloat ( ) { checkNotFreed ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.FLOAT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } float result = java.lang.Float.intBitsToFloat ( this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }

Target:
public final float getFloat ( ) { checkIsAccessible ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.FLOAT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } float result = java.lang.Float.intBitsToFloat ( this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ) ; position = newPosition ; return result ; }
Source:
private void persistComponentNamesToSettingLocked ( java.lang.String settingName , java.util.Set < android.content.ComponentName > componentNames ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( android.content.ComponentName componentName : componentNames ) { if ( ( builder.length ( ) ) > 0 ) { builder.append ( com.android.server.accessibility.AccessibilityManagerService.COMPONENT_NAME_SEPARATOR ) ; } builder.append ( componentName.flattenToShortString ( ) ) ; } Settings.Secure.putString ( mContext.getContentResolver ( ) , settingName , builder.toString ( ) ) ; }

Target:
private void persistComponentNamesToSettingLocked ( java.lang.String settingName , java.util.Set < android.content.ComponentName > componentNames , int userId ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; for ( android.content.ComponentName componentName : componentNames ) { if ( ( builder.length ( ) ) > 0 ) { builder.append ( com.android.server.accessibility.AccessibilityManagerService.COMPONENT_NAME_SEPARATOR ) ; } builder.append ( componentName.flattenToShortString ( ) ) ; } Settings.Secure.putStringForUser ( mContext.getContentResolver ( ) , settingName , builder.toString ( ) , userId ) ; }
Source:
private int convertCallState ( int callState , boolean isForegroundCall ) { switch ( callState ) { case CallState.NEW : case CallState.ABORTED : case CallState.DISCONNECTED : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_IDLE ; case CallState.ACTIVE : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_ACTIVE ; case CallState.CONNECTING : case CallState.SELECT_PHONE_ACCOUNT : case CallState.DIALING : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_ALERTING ; case CallState.ON_HOLD : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_HELD ; case CallState.RINGING : if ( isForegroundCall ) { return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_INCOMING ; } else { return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_WAITING ; } } return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_IDLE ; }

Target:
private int convertCallState ( int callState , boolean isForegroundCall ) { switch ( callState ) { case CallState.NEW : case CallState.ABORTED : case CallState.DISCONNECTED : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_IDLE ; case CallState.ACTIVE : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_ACTIVE ; case CallState.CONNECTING : case CallState.SELECT_PHONE_ACCOUNT : case CallState.DIALING : case CallState.PULLING : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_ALERTING ; case CallState.ON_HOLD : return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_HELD ; case CallState.RINGING : if ( isForegroundCall ) { return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_INCOMING ; } else { return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_WAITING ; } } return com.android.server.telecom.BluetoothPhoneServiceImpl.CALL_STATE_IDLE ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JLambda x ) { lparen ( ) ; visitCollectionWithCommas ( x.getParameters ( ) . iterator ( ) ) ; rparen ( ) ; print ( " -> " ) ; accept ( x.getBody ( ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodIdRef x ) { printTypeName ( x.getEnclosingType ( ) ) ; print ( '.' ) ; printName ( x.getMethodId ( ) . getMethodIdWide ( ) ) ; visitCollectionJType ( x.getMethodId ( ) . getMethodIdWide ( ) . getParamTypes ( ) . iterator ( ) ) ; return false ; }
Source:
public void testXsdNamespaceBuilder ( ) throws java.lang.Exception { com.intellij.openapi.vfs.VirtualFile file = myFixture.copyFileToProject ( "web-app_2_5.xsd" ) ; final com.intellij.xml.index.XsdNamespaceBuilder builder = com.intellij.xml.index.XsdNamespaceBuilder.computeNamespace ( new java.io.InputStreamReader ( file.getInputStream ( ) ) ) ; assertEquals ( com.intellij.xml.index.XmlSchemaIndexTest.NS , builder.getNamespace ( ) ) ; assertEquals ( "2.5" , builder.getVersion ( ) ) ; assertEquals ( java.util.Arrays.asList ( "web-app" ) , builder.getTags ( ) ) ; }

Target:
public void testXsdNamespaceBuilder ( ) throws java.lang.Exception { com.intellij.openapi.vfs.VirtualFile file = myFixture.copyFileToProject ( "web-app_2_5.xsd" ) ; final com.intellij.xml.index.XsdNamespaceBuilder builder = com.intellij.xml.index.XsdNamespaceBuilder.computeNamespace ( new java.io.InputStreamReader ( file.getInputStream ( ) ) ) ; assertEquals ( com.intellij.xml.index.XmlSchemaIndexTest.NS , builder.getNamespace ( ) ) ; assertEquals ( "2.5" , builder.getVersion ( ) ) ; assertEquals ( java.util.Collections.singletonList ( "web-app" ) , builder.getTags ( ) ) ; }
Source:
private void responseSignalStrength ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.SignalStrength sigStrength ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { android.telephony.SignalStrength ret = com.android.internal.telephony.RIL.convertHalSignalStrength ( sigStrength ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseIccCardStatus ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.CardStatus cardStatus ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { com.android.internal.telephony.uicc.IccCardStatus iccCardStatus = convertHalCardStatus ( cardStatus ) ; mRil.riljLog ( ( "responseIccCardStatus: from HIDL: " + iccCardStatus ) ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , iccCardStatus ) ; } mRil.processResponseDone ( rr , responseInfo , iccCardStatus ) ; } }
Source:
public final boolean isEmpty ( ) { return false ; }

Target:
public boolean contains ( @ javax.annotation.Nullable java.lang.Object object ) { if ( object instanceof com.google.common.collect.Table.Cell ) { com.google.common.collect.Table.Cell < ? , ? , ? > cell = ( ( com.google.common.collect.Table.Cell < ? , ? , ? > ) ( object ) ) ; java.lang.Object value = get ( cell.getRowKey ( ) , cell.getColumnKey ( ) ) ; return ( value != null ) && ( value.equals ( cell.getValue ( ) ) ) ; } return false ; }
Source:
public void onResume ( ) { super . onResume ( ) ; com.android.dialer.common.LogUtil.enterBlock ( "NewCallLogFragment.onResume" ) ; registerRefreshAnnotatedCallLogReceiver ( ) ; com.android.dialer.calllog.CallLogComponent.get ( getContext ( ) ) . getRefreshAnnotatedCallLogNotifier ( ) . notify ( true ) ; if ( ( recyclerView.getAdapter ( ) ) != null ) { ( ( com.android.dialer.calllog.ui.NewCallLogAdapter ) ( recyclerView.getAdapter ( ) ) ) . clearCache ( ) ; recyclerView.getAdapter ( ) . notifyDataSetChanged ( ) ; } shouldMarkCallsRead = false ; com.android.dialer.common.concurrent.ThreadUtil.getUiThreadHandler ( ) . postDelayed ( setShouldMarkCallsReadTrue , com.android.dialer.calllog.ui.NewCallLogFragment.MARK_ALL_CALLS_READ_WAIT_MILLIS ) ; }

Target:
public void onResume ( ) { super . onResume ( ) ; boolean isHidden = isHidden ( ) ; com.android.dialer.common.LogUtil.i ( "NewCallLogFragment.onResume" , "isHidden = %s" , isHidden ) ; if ( ! isHidden ) { onFragmentShown ( ) ; } }
Source:
public byte [ ] iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String filePath ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) return telephony.iccExchangeSimIO ( fileID , command , p1 , p2 , p3 , filePath ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } return null ; }

Target:
public byte [ ] iccExchangeSimIO ( int fileID , int command , int p1 , int p2 , int p3 , java.lang.String filePath ) { return iccExchangeSimIO ( getSubId ( ) , fileID , command , p1 , p2 , p3 , filePath ) ; }
Source:
public java.util.List < java.lang.Class < ? extends org.w3c.dom.Node > > getApplicableNodeTypes ( ) { return null ; }

Target:
public void checkClass ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.NonNull com.intellij.psi.PsiClass declaration ) { if ( ! ( context.getProject ( ) . getReportIssues ( ) ) ) { return ; } java.lang.String name = declaration.getQualifiedName ( ) ; if ( name != null ) { declaration.accept ( new com.android.tools.lint.checks.OverdrawDetector.OverdrawVisitor ( name , declaration ) ) ; } }
Source:
public static void setTag ( java.lang.String tag ) { android.telecom.Log.TAG = tag ; }

Target:
public static void setTag ( java.lang.String tag ) { android.telecom.Log.TAG = tag ; android.telecom.Log.DEBUG = android.telecom.Log.isLoggable ( android.util.Log.DEBUG ) ; android.telecom.Log.INFO = android.telecom.Log.isLoggable ( android.util.Log.INFO ) ; android.telecom.Log.VERBOSE = android.telecom.Log.isLoggable ( android.util.Log.VERBOSE ) ; android.telecom.Log.WARN = android.telecom.Log.isLoggable ( android.util.Log.WARN ) ; android.telecom.Log.ERROR = android.telecom.Log.isLoggable ( android.util.Log.ERROR ) ; }
Source:
public void testAesCbcHmacSha1Tcp6 ( ) 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_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha1Tcp4UdpEncap ( ) 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_SHA1 , android.net.cts.IpSecManagerTest.getKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
public void onPageScrollStateChanged ( int state ) { final int count = mOnPageChangeListeners.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { mOnPageChangeListeners.get ( i ) . onPageScrollStateChanged ( state ) ; } }

Target:
public void onPageScrollStateChanged ( int state ) { if ( state != ( android.support.v4.view.ViewPager.SCROLL_STATE_SETTLING ) ) { onPageScrolledBeforeScrollStateSettling = false ; } final int count = mOnPageChangeListeners.size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { mOnPageChangeListeners.get ( i ) . onPageScrollStateChanged ( state ) ; } }
Source:
protected java.lang.String getProposal ( ) { if ( mId.equals ( InefficientWeightDetector.BASELINE_WEIGHTS.getId ( ) ) ) { return com.android.ide.common.layout.LayoutConstants.VALUE_FALSE ; } return super . getProposal ( ) ; }

Target:
protected java.lang.String getProposal ( ) { if ( mId.equals ( InefficientWeightDetector.BASELINE_WEIGHTS.getId ( ) ) ) { return com.android.ide.common.layout.LayoutConstants.VALUE_FALSE ; } else if ( mId.equals ( TranslationDetector.MISSING.getId ( ) ) ) { return com.android.ide.common.layout.LayoutConstants.VALUE_FALSE ; } return super . getProposal ( ) ; }
Source:
private static java.io.File getNoConfigProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ) == null ) { com.android.jack.test.toolchain.Toolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getReferenceToolchain ( ) ; java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsSrcDir = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.annotation.processor.sample.processors" ) ; toolchain.srcToLib ( processorsDir , false , com.android.jack.annotation.processor.AnnotationProcessorTests.ANNOTATIONS_DIR , processorsSrcDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors = processorsDir ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ; }

Target:
private static java.io.File getNoConfigProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ) == null ) { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getReferenceToolchain ( ) ; java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsSrcDir = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.annotation.processor.sample.processors" ) ; toolchain.srcToLib ( processorsDir , false , com.android.jack.annotation.processor.AnnotationProcessorTests.ANNOTATIONS_DIR , processorsSrcDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors = processorsDir ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.noConfigProcessors ; }
Source:
public void test_setDecimalSeparatorAlwaysShownZ ( ) { java.text.DecimalFormat df = new java.text.DecimalFormat ( "###0.##" , new java.text.DecimalFormatSymbols ( java.util.Locale.US ) ) ; assertEquals ( "Wrong default result" , "5" , df.format ( 5 ) ) ; df.setDecimalSeparatorAlwaysShown ( true ) ; assertTrue ( "Not set" , df.isDecimalSeparatorAlwaysShown ( ) ) ; assertEquals ( "Wrong set result" , "7." , df.format ( 7 ) ) ; }

Target:
public void test_setDecimalSeparatorAlwaysShown ( ) { java.text.DecimalFormat df = new java.text.DecimalFormat ( "###0.##" , new java.text.DecimalFormatSymbols ( java.util.Locale.US ) ) ; assertEquals ( "Wrong default result" , "5" , df.format ( 5 ) ) ; df.setDecimalSeparatorAlwaysShown ( true ) ; assertTrue ( "Not set" , df.isDecimalSeparatorAlwaysShown ( ) ) ; assertEquals ( "Wrong set result" , "7." , df.format ( 7 ) ) ; }
Source:
private final void requestServiceBindingsLocked ( com.android.server.am.ServiceRecord r ) { java.util.Iterator < com.android.server.am.IntentBindRecord > bindings = r.bindings.values ( ) . iterator ( ) ; while ( bindings.hasNext ( ) ) { com.android.server.am.IntentBindRecord i = bindings.next ( ) ; if ( ! ( requestServiceBindingLocked ( r , i , false ) ) ) { break ; } } }

Target:
public void registerUserSwitchObserver ( android.app.IUserSwitchObserver observer ) { if ( ( checkCallingPermission ( android.Manifest.permission.INTERACT_ACROSS_USERS_FULL ) ) != ( android.content.pm.PackageManager.PERMISSION_GRANTED ) ) { java.lang.String msg = ( ( ( ( "Permission Denial: registerUserSwitchObserver() from pid=" + ( android.os.Binder.getCallingPid ( ) ) ) + ", uid=" ) + ( android.os.Binder.getCallingUid ( ) ) ) + " requires " ) + ( android.Manifest.permission.INTERACT_ACROSS_USERS_FULL ) ; android.util.Slog.w ( com.android.server.am.ActivityManagerService.TAG , msg ) ; throw new java.lang.SecurityException ( msg ) ; } mUserSwitchObservers.register ( observer ) ; }
Source:
public void selectionChanged ( org.eclipse.jface.viewers.SelectionChangedEvent event ) { org.eclipse.jface.viewers.ISelection selection = event.getSelection ( ) ; getEditor ( ) . getSite ( ) . getSelectionProvider ( ) . setSelection ( selection ) ; com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager manager = mGraphicalEditor.getCanvasControl ( ) . getSelectionManager ( ) ; manager.setSelection ( selection ) ; }

Target:
public void selectionChanged ( org.eclipse.jface.viewers.SelectionChangedEvent event ) { org.eclipse.jface.viewers.ISelection selection = event.getSelection ( ) ; getEditor ( ) . getSite ( ) . getSelectionProvider ( ) . setSelection ( selection ) ; if ( getEditor ( ) . getIgnoreXmlUpdate ( ) ) { return ; } com.android.ide.eclipse.adt.internal.editors.layout.gle2.SelectionManager manager = mGraphicalEditor.getCanvasControl ( ) . getSelectionManager ( ) ; manager.setSelection ( selection ) ; }
Source:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String instructionSet , int dexoptNeeded , boolean bootComplete ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , isPublic , instructionSet , dexoptNeeded , bootComplete ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , java.lang.String instructionSet , int dexoptNeeded , int dexFlags ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , instructionSet , dexoptNeeded , dexFlags ) ; }
Source:
private static void assertPartial ( byte [ ] expected , byte [ ] actual ) { for ( int i = 0 ; i < ( expected.length ) ; i ++ ) { if ( ( expected [ i ] ) != ( actual [ i ] ) ) { fail ( ( ( ( "Expected " + ( java.util.Arrays.toString ( expected ) ) ) + " but found " ) + ( java.util.Arrays.toString ( actual ) ) ) ) ; } } }

Target:
public void test_unlink ( ) throws java.lang.Exception { java.io.File f = java.io.File.createTempFile ( "OsTest" , "tst" ) ; assertTrue ( f.exists ( ) ) ; Libcore.os.unlink ( f.getAbsolutePath ( ) ) ; assertFalse ( f.exists ( ) ) ; try { Libcore.os.unlink ( f.getAbsolutePath ( ) ) ; fail ( ) ; } catch ( android.system.ErrnoException e ) { assertEquals ( OsConstants.ENOENT , e.errno ) ; } }
Source:
private int newBranchOffset ( int oldInstructionOffset , int oldBranchOffset ) { return ( newInstructionOffset ( ( oldInstructionOffset + oldBranchOffset ) ) ) - ( newOffset ) ; }

Target:
public void visitLookUpSwitchInstruction ( proguard.classfile.editor.Clazz clazz , proguard.classfile.editor.Method method , proguard.classfile.editor.CodeAttribute codeAttribute , int offset , proguard.classfile.editor.LookUpSwitchInstruction lookUpSwitchInstruction ) { lookUpSwitchInstruction.defaultOffset = newBranchOffset ( offset , lookUpSwitchInstruction.defaultOffset , newOffset ) ; newJumpOffsets ( offset , lookUpSwitchInstruction.jumpOffsets , newOffset ) ; instructionWriter.visitLookUpSwitchInstruction ( clazz , method , codeAttribute , newOffset , lookUpSwitchInstruction ) ; newOffset += lookUpSwitchInstruction.length ( newOffset ) ; }
Source:
public int onStartCommand ( android.content.Intent intent , int flags , int startId ) { java.lang.String action = intent.getAction ( ) ; if ( ( Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION.equals ( action ) ) || ( Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION.equals ( action ) ) ) { handleCellBroadcastIntent ( intent ) ; } else { android.util.Log.e ( com.android.cellbroadcastreceiver.CellBroadcastAlertService.TAG , ( "Unrecognized intent action: " + action ) ) ; } stopSelf ( ) ; return START_NOT_STICKY ; }

Target:
public int onStartCommand ( android.content.Intent intent , int flags , int startId ) { java.lang.String action = intent.getAction ( ) ; if ( ( Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION.equals ( action ) ) || ( Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION.equals ( action ) ) ) { handleCellBroadcastIntent ( intent ) ; } else if ( com.android.cellbroadcastreceiver.CellBroadcastAlertService.SHOW_NEW_ALERT_ACTION.equals ( action ) ) { showNewAlert ( intent ) ; } else { android.util.Log.e ( com.android.cellbroadcastreceiver.CellBroadcastAlertService.TAG , ( "Unrecognized intent action: " + action ) ) ; } return START_NOT_STICKY ; }
Source:
private void initLayout ( ) { findViewById ( R.id.fab ) . setOnClickListener ( this ) ; android.support.v4.view.ViewPager pager = findViewById ( R.id.pager ) ; com.android.dialer.main.impl.MainPagerAdapter pagerAdapter = new com.android.dialer.main.impl.MainPagerAdapter ( this , getSupportFragmentManager ( ) ) ; pager.setAdapter ( pagerAdapter ) ; android.support.design.widget.TabLayout tabLayout = findViewById ( R.id.tab_layout ) ; tabLayout.setupWithViewPager ( pager ) ; android.support.v7.widget.Toolbar toolbar = findViewById ( R.id.toolbar ) ; toolbar.setPopupTheme ( android.R.style.Theme_Material_Light ) ; setSupportActionBar ( toolbar ) ; }

Target:
public void onContactSelected ( android.widget.ImageView photo , android.net.Uri contactUri , long contactId ) { android.provider.ContactsContract.QuickContact.showQuickContact ( this , photo , contactUri , QuickContact.MODE_LARGE , null ) ; }
Source:
public java.lang.String getAttributeNamespace ( int index ) throws com.android.apksigner.AndroidBinXmlParser.XmlParserException { return getAttribute ( index ) . getNamespace ( ) ; }

Target:
public int getResourceId ( long index ) { if ( ( index < 0 ) || ( index >= ( mEntryCount ) ) ) { return 0 ; } int idx = ( ( int ) ( index ) ) ; return mChunkContents.getInt ( ( idx * 4 ) ) ; }
Source:
public com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult isPossibleNumberWithReason ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number ) { java.lang.String nationalNumber = getNationalSignificantNumber ( number ) ; int countryCode = number.getCountryCode ( ) ; if ( ! ( hasValidCountryCallingCode ( countryCode ) ) ) { return com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_COUNTRY_CODE ; } java.lang.String regionCode = getRegionCodeForCountryCode ( countryCode ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; return testNumberLength ( nationalNumber , metadata.getGeneralDesc ( ) ) ; }

Target:
public com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult isPossibleNumberForTypeWithReason ( com.google.i18n.phonenumbers.Phonenumber.PhoneNumber number , com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberType type ) { java.lang.String nationalNumber = getNationalSignificantNumber ( number ) ; int countryCode = number.getCountryCode ( ) ; if ( ! ( hasValidCountryCallingCode ( countryCode ) ) ) { return com.google.i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_COUNTRY_CODE ; } java.lang.String regionCode = getRegionCodeForCountryCode ( countryCode ) ; com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadata metadata = getMetadataForRegionOrCallingCode ( countryCode , regionCode ) ; return testNumberLength ( nationalNumber , metadata , type ) ; }
Source:
private java.io.InputStream fetchUrl ( java.lang.String urlString , com.android.sdklib.internal.repository.DownloadCache cache , com.android.sdklib.internal.repository.ITaskMonitor monitor , java.lang.Exception [ ] outException ) { try { return cache.openCachedUrl ( urlString , monitor ) ; } catch ( java.lang.Exception e ) { if ( outException != null ) { outException [ 0 ] = e ; } } return null ; }

Target:
private java.io.InputStream fetchXmlUrl ( java.lang.String urlString , com.android.sdklib.internal.repository.DownloadCache cache , com.android.sdklib.internal.repository.ITaskMonitor monitor , java.lang.Exception [ ] outException ) { try { java.io.InputStream xml = cache.openCachedUrl ( urlString , monitor ) ; if ( xml != null ) { xml.mark ( 500000 ) ; xml = new com.android.sdklib.io.NonClosingInputStream ( xml ) . setCloseBehavior ( CloseBehavior.RESET ) ; } return xml ; } catch ( java.lang.Exception e ) { if ( outException != null ) { outException [ 0 ] = e ; } } return null ; }
Source:
public void developerOptionsEnabled ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; if ( ! ( com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.isDeveloperOptionsEnabled ( instrumentation ) ) ) { com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.enableDeveloperOptions ( instrumentation ) ; } assertTrue ( "Developer options not enabled." , com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.isDeveloperOptionsEnabled ( instrumentation ) ) ; }

Target:
public void developerOptionsEnabled ( ) throws java.lang.Exception { android.app.Instrumentation instrumentation = testFramework.getInstrumentation ( ) ; if ( ! ( com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.isDeveloperOptionsEnabled ( instrumentation ) ) ) { com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.enableDeveloperOptions ( instrumentation ) ; } else { return ; } assertTrue ( "Failed to enable Developer options." , com.android.devtools.systemimage.uitest.utils.DeveloperOptionsManager.isDeveloperOptionsEnabled ( instrumentation ) ) ; }
Source:
public void destruction ( java.lang.Thread t ) throws java.io.IOException , java.lang.InterruptedException { com.android.builder.png.AaptProcess aaptProcess = mAaptProcesses.get ( java.lang.Thread.currentThread ( ) . getName ( ) ) ; if ( aaptProcess != null ) { mLogger.verbose ( "Thread(%1$s): notify aapt slave shutdown" , java.lang.Thread.currentThread ( ) . getName ( ) ) ; aaptProcess.shutdown ( ) ; mAaptProcesses.remove ( aaptProcess ) ; } }

Target:
public void destruction ( java.lang.Thread t ) throws java.io.IOException , java.lang.InterruptedException { com.android.builder.png.AaptProcess aaptProcess = mAaptProcesses.get ( java.lang.Thread.currentThread ( ) . getName ( ) ) ; if ( aaptProcess != null ) { mLogger.verbose ( "Thread(%1$s): notify aapt slave shutdown" , java.lang.Thread.currentThread ( ) . getName ( ) ) ; aaptProcess.shutdown ( ) ; mAaptProcesses.remove ( t.getName ( ) ) ; mLogger.verbose ( "Thread(%1$s): after shutdown queue_size=%2$d" , java.lang.Thread.currentThread ( ) . getName ( ) , mAaptProcesses.size ( ) ) ; } }
Source:
public void test_getDisplayName_raw ( ) throws java.lang.Exception { java.util.Locale weird = new java.util.Locale ( "AaBbCc" , "DdEeFf" , "GgHhIi" ) ; assertEquals ( "aabbcc" , weird.getLanguage ( ) ) ; assertEquals ( "" , weird.getDisplayLanguage ( ) ) ; assertEquals ( "DDEEFF" , weird.getCountry ( ) ) ; assertEquals ( "" , weird.getDisplayCountry ( ) ) ; assertEquals ( "GgHhIi" , weird.getVariant ( ) ) ; assertEquals ( "" , weird.getDisplayVariant ( ) ) ; assertEquals ( "aabbcc (DDEEFF,GgHhIi)" , weird.getDisplayName ( ) ) ; }

Target:
public void test_getDisplayName_invalid ( ) throws java.lang.Exception { java.util.Locale invalid = new java.util.Locale ( "AaBbCc" , "DdEeFf" , "GgHhIi" ) ; assertEquals ( "aabbcc" , invalid.getLanguage ( ) ) ; assertEquals ( "DDEEFF" , invalid.getCountry ( ) ) ; assertEquals ( "GgHhIi" , invalid.getVariant ( ) ) ; assertEquals ( "aabbcc" , invalid.getDisplayLanguage ( ) ) ; assertEquals ( "" , invalid.getDisplayCountry ( ) ) ; assertEquals ( "DDEEFF_GGHHII" , invalid.getDisplayVariant ( ) ) ; assertEquals ( "aabbcc (DDEEFF,DDEEFF_GGHHII)" , invalid.getDisplayName ( ) ) ; }
Source:
public void moveCompleteApp ( java.lang.String fromUuid , java.lang.String toUuid , java.lang.String packageName , java.lang.String dataAppName , int appId , java.lang.String seInfo , int targetSdkVersion ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.moveCompleteApp ( fromUuid , toUuid , packageName , dataAppName , appId , seInfo , targetSdkVersion ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void destroyAppData ( java.lang.String uuid , java.lang.String packageName , int userId , int flags , long ceDataInode ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.destroyAppData ( uuid , packageName , userId , flags , ceDataInode ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public static com.android.jack.dx.rop.cst.CstFieldRef createFieldRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JFieldId field , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface receiverType ) { com.android.jack.dx.rop.cst.CstType definingClass = com.android.jack.backend.dex.rop.RopHelper.getCstType ( receiverType ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( field.getName ( ) ) ; com.android.jack.dx.rop.cst.CstFieldRef fieldRef = new com.android.jack.dx.rop.cst.CstFieldRef ( definingClass , name , com.android.jack.backend.dex.rop.RopHelper.getCstType ( field.getType ( ) ) ) ; return fieldRef ; }

Target:
public static com.android.jack.dx.rop.cst.CstFieldRef createFieldRef ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JFieldId field , @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassOrInterface receiverType ) { com.android.jack.dx.rop.type.Type definingClass = com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( receiverType ) ; com.android.jack.dx.rop.cst.CstString name = new com.android.jack.dx.rop.cst.CstString ( field.getName ( ) ) ; com.android.jack.dx.rop.cst.CstFieldRef fieldRef = new com.android.jack.dx.rop.cst.CstFieldRef ( definingClass , name , com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( field.getType ( ) ) ) ; return fieldRef ; }
Source:
public void testSort_delegatesToListSort ( ) { libcore.java.util.CollectionsTest.ArrayListInheritor < java.lang.String > list = new libcore.java.util.CollectionsTest.ArrayListInheritor < > ( java.util.Arrays.asList ( "a" , "c" , "b" ) ) ; assertEquals ( 0 , list.numSortCalls ( ) ) ; java.util.Collections.sort ( list ) ; assertEquals ( 1 , list.numSortCalls ( ) ) ; }

Target:
public void testSort_postNougat_delegatesToListSort ( ) { libcore.java.util.CollectionsTest.runOnTargetSdkAtLeast ( 26 , ( ) -> { libcore.java.util.CollectionsTest.ArrayListInheritor < java.lang.String > list = new libcore.java.util.CollectionsTest.ArrayListInheritor < > ( java.util.Arrays.asList ( "a" , "c" , "b" ) ) ; assertEquals ( 0 , list.numSortCalls ( ) ) ; java.util.Collections.sort ( list ) ; assertEquals ( 1 , list.numSortCalls ( ) ) ; } ) ; }
Source:
public void testAllFilesInSysAreNotWritable ( ) throws java.lang.Exception { java.util.Set < java.io.File > writable = android.permission.cts.FileSystemPermissionTest.getAllWritableFilesInDirAndSubDir ( new java.io.File ( "/sys" ) ) ; writable.removeAll ( android.permission.cts.FileSystemPermissionTest.SYS_EXCEPTIONS ) ; assertTrue ( ( "Found writable: " + ( writable.toString ( ) ) ) , writable.isEmpty ( ) ) ; }

Target:
public void testAllFilesInSysAreNotWritable ( ) throws java.lang.Exception { java.util.Set < java.io.File > writable = android.permission.cts.FileSystemPermissionTest.getAllWritableFilesInDirAndSubDir ( new java.io.File ( "/sys" ) ) ; java.util.Set < java.io.File > ignorables = android.permission.cts.FileSystemPermissionTest.getIgnorablesFromPaths ( android.permission.cts.FileSystemPermissionTest.SYS_EXCEPTIONS ) ; writable.removeAll ( ignorables ) ; assertTrue ( ( "Found writable: " + ( writable.toString ( ) ) ) , writable.isEmpty ( ) ) ; }
Source:
public void setUp ( ) { org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.when ( mActivity.getSystemService ( Context.MEDIA_ROUTER_SERVICE ) ) . thenReturn ( mMediaRouter ) ; mSummaryProvider = WifiDisplaySettings.SUMMARY_PROVIDER_FACTORY.createSummaryProvider ( mActivity , mSummaryLoader ) ; }

Target:
public void setUp ( ) { org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.when ( mActivity.getSystemService ( Context.MEDIA_ROUTER_SERVICE ) ) . thenReturn ( mMediaRouter ) ; org.mockito.Mockito.when ( mActivity.getPackageManager ( ) ) . thenReturn ( mPackageManager ) ; org.mockito.Mockito.when ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_WIFI_DIRECT ) ) . thenReturn ( true ) ; mSummaryProvider = WifiDisplaySettings.SUMMARY_PROVIDER_FACTORY.createSummaryProvider ( mActivity , mSummaryLoader ) ; }
Source:
public void terminate ( ) { mCallback = null ; if ( mIsPublishSession ) { com.android.server.wifi.aware.WifiAwareNative.getInstance ( ) . stopPublish ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } else { com.android.server.wifi.aware.WifiAwareNative.getInstance ( ) . stopSubscribe ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } }

Target:
public void terminate ( ) { mCallback = null ; if ( mIsPublishSession ) { mWifiAwareNative.stopPublish ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } else { mWifiAwareNative.stopSubscribe ( ( ( short ) ( 0 ) ) , mPubSubId ) ; } }
Source:
public void testDensityOnlyWithMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( ) ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 160 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getDensityOutput ( 320 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }

Target:
public void testSingleOutput ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "foo" ) ; assertEquals ( match , result ) ; }
Source:
protected void onDetachedFromWindow ( ) { mPrivateFlags &= ~ ( android.view.View.CANCEL_NEXT_UP_EVENT ) ; removeUnsetPressCallback ( ) ; removeLongPressCallback ( ) ; destroyDrawingCache ( ) ; }

Target:
protected void onDetachedFromWindow ( ) { mPrivateFlags &= ~ ( android.view.View.CANCEL_NEXT_UP_EVENT ) ; removeUnsetPressCallback ( ) ; removeLongPressCallback ( ) ; removePerformClickCallback ( ) ; removeSendViewScrolledAccessibilityEventCallback ( ) ; destroyDrawingCache ( ) ; destroyLayer ( ) ; if ( ( mDisplayList ) != null ) { mDisplayList.invalidate ( ) ; } if ( ( mAttachInfo ) != null ) { mAttachInfo.mHandler.removeMessages ( android.view.View.AttachInfo.INVALIDATE_MSG , this ) ; } mCurrentAnimation = null ; resetResolvedLayoutDirection ( ) ; resetResolvedTextDirection ( ) ; }
Source:
public void testMissingDataDirDistroVersionFile ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; libcore.tzdata.shared2.TimeZoneDistro distroWithoutAVersionFile = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distroWithoutAVersionFile ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 3 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }

Target:
public void testMissingDataDirDistroVersionFile ( ) throws java.lang.Exception { createSystemTzDataFileOnHost ( com.android.cts.tzdata.TzDataCheckTest.VALID_RULES_VERSION ) ; com.android.cts.tzdata.TzDataCheckTest.PathPair dataCurrentDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.CURRENT_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro distroWithoutAVersionFile = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . clearVersionForTests ( ) . buildUnvalidated ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataCurrentDir , distroWithoutAVersionFile ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 3 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataCurrentDir ) ; }
Source:
public void onComplete ( ) { com.android.dialer.blockreportspam.BlockReportSpamDialogs.DialogFragmentForBlockingNumberAndOptionallyReportingAsSpam.newInstance ( displayNumber , com.android.dialer.spam.SpamComponent.get ( this ) . spam ( ) . isDialogReportSpamCheckedByDefault ( ) , new com.android.dialer.blockreportspam.BlockReportSpamDialogs.OnSpamDialogClickListener ( ) { @ java.lang.Override public void onClick ( boolean isSpamChecked ) { blockReportNumberAndFinish ( number , isSpamChecked , contactLookupResultType ) ; } } , dismissListener ) . show ( getFragmentManager ( ) , BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG ) ; }

Target:
public void onComplete ( ) { com.android.dialer.blockreportspam.BlockReportSpamDialogs.DialogFragmentForBlockingNumberAndOptionallyReportingAsSpam.newInstance ( displayNumber , com.android.dialer.spam.SpamComponent.get ( this ) . spamSettings ( ) . isDialogReportSpamCheckedByDefault ( ) , new com.android.dialer.blockreportspam.BlockReportSpamDialogs.OnSpamDialogClickListener ( ) { @ java.lang.Override public void onClick ( boolean isSpamChecked ) { blockReportNumberAndFinish ( number , isSpamChecked , contactLookupResultType ) ; } } , dismissListener ) . show ( getFragmentManager ( ) , BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG ) ; }
Source:
public int arrayBaseOffset ( java.lang.Class clazz ) { java.lang.Class < ? > component = clazz.getComponentType ( ) ; if ( component == null ) { throw new java.lang.IllegalArgumentException ( ( "Valid for array classes only: " + clazz ) ) ; } int offset = 12 ; if ( ( component == ( long . class ) ) || ( component == ( double . class ) ) ) { offset += 4 ; } return offset ; }

Target:
public int arrayBaseOffset ( java.lang.Class clazz ) { java.lang.Class < ? > component = clazz.getComponentType ( ) ; if ( component == null ) { throw new java.lang.IllegalArgumentException ( ( "Valid for array classes only: " + clazz ) ) ; } return sun.misc.Unsafe.getArrayBaseOffsetForComponentType ( component ) ; }
Source:
private static boolean overridesIsValidFragment ( com.android.tools.lint.client.api.JavaParser.ResolvedClass resolvedClass ) { java.lang.Iterable < com.android.tools.lint.client.api.JavaParser.ResolvedMethod > resolvedMethods = resolvedClass.getMethods ( com.android.tools.lint.checks.PreferenceActivityDetector.IS_VALID_FRAGMENT , false ) ; for ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod resolvedMethod : resolvedMethods ) { if ( ( ( resolvedMethod.getArgumentCount ( ) ) == 1 ) && ( resolvedMethod.getArgumentType ( 0 ) . getName ( ) . equals ( com.android.tools.lint.client.api.JavaParser.TYPE_STRING ) ) ) { return true ; } } return false ; }

Target:
private static boolean overridesIsValidFragment ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaEvaluator evaluator , @ com.android.annotations.NonNull com.intellij.psi.PsiClass resolvedClass ) { for ( com.intellij.psi.PsiMethod method : resolvedClass.findMethodsByName ( com.android.tools.lint.checks.PreferenceActivityDetector.IS_VALID_FRAGMENT , false ) ) { if ( evaluator.parametersMatch ( method , com.android.tools.lint.client.api.JavaParser.TYPE_STRING ) ) { return true ; } } return false ; }
Source:
public boolean isCspPlmnEnabled ( ) { com.android.internal.telephony.IccRecords r = mIccRecords.get ( ) ; return r != null ? r.isCspPlmnEnabled ( ) : false ; }

Target:
private void registerForSimRecordEvents ( ) { com.android.internal.telephony.uicc.IccRecords r = mIccRecords.get ( ) ; if ( r == null ) { return ; } r.registerForNetworkSelectionModeAutomatic ( this , com.android.internal.telephony.gsm.EVENT_SET_NETWORK_AUTOMATIC , null ) ; r.registerForNewSms ( this , com.android.internal.telephony.gsm.EVENT_NEW_ICC_SMS , null ) ; r.registerForRecordsEvents ( this , com.android.internal.telephony.gsm.EVENT_ICC_RECORD_EVENTS , null ) ; r.registerForRecordsLoaded ( this , com.android.internal.telephony.gsm.EVENT_SIM_RECORDS_LOADED , null ) ; }
Source:
private void onRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRoamingOff" ) ; setInitialAttachApn ( ) ; setDataProfilesAsNeeded ( ) ; if ( ! ( mDataEnabledSettings.isUserDataEnabled ( ) ) ) return ; if ( ( getDataOnRoamingEnabled ( ) ) == false ) { notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }

Target:
private void onDataRoamingOff ( ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onDataRoamingOff" ) ; if ( ! ( getDataRoamingEnabled ( ) ) ) { setInitialAttachApn ( ) ; setDataProfilesAsNeeded ( ) ; notifyOffApnsOfAvailability ( Phone.REASON_ROAMING_OFF ) ; setupDataOnConnectableApns ( Phone.REASON_ROAMING_OFF ) ; } else { notifyDataConnection ( Phone.REASON_ROAMING_OFF ) ; } }
Source:
public void test_getResourceAsStreamLjava_lang_String ( ) { java.io.InputStream is = null ; assertNotNull ( "Failed to find resource: hyts_Foo.c" , ( is = java.lang.ClassLoader.getSystemClassLoader ( ) . getResourceAsStream ( "hyts_Foo.c" ) ) ) ; try { is.close ( ) ; } catch ( java.io.IOException e ) { fail ( ( "Exception during getResourceAsStream: " + ( e.toString ( ) ) ) ) ; } }

Target:
public void test_getSystemClassLoader ( ) { java.lang.ClassLoader cl = java.lang.ClassLoader.getSystemClassLoader ( ) ; assertNotNull ( cl ) ; assertNotNull ( cl.getParent ( ) ) ; java.lang.Class < ? > libcoreClass = java.lang.Integer.class ; assertSame ( cl.getParent ( ) , libcoreClass.getClassLoader ( ) ) ; }
Source:
private static int log10Floor ( int x ) { int y = com.google.common.math.IntMath.MAX_LOG10_FOR_LEADING_ZEROS [ java.lang.Integer.numberOfLeadingZeros ( x ) ] ; int sgn = ( x - ( com.google.common.math.IntMath.POWERS_OF_10 [ y ] ) ) > > > ( ( java.lang.Integer.SIZE ) - 1 ) ; return y - sgn ; }

Target:
static int lessThanBranchFree ( int x , int y ) { return ( ~ ( ~ ( x - y ) ) ) > > > ( ( java.lang.Integer.SIZE ) - 1 ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mMockInvocationListener = org.easymock.EasyMock.createMock ( com.android.tradefed.result.ITestInvocationListener.class ) ; mTest = new com.android.tradefed.testtype.VtsMultiDeviceTest ( ) ; mTest.setBuild ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockBuildInfo ( ) ) ; mTest.setTestCasePath ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.TEST_CASE_PATH ) ; mTest.setTestConfigPath ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.TEST_CONFIG_PATH ) ; }

Target:
protected com.android.tradefed.util.ProcessHelper createProcessHelper ( java.lang.String [ ] cmd ) { assertCommand ( cmd ) ; try { createResult ( cmd [ 3 ] ) ; } catch ( java.lang.Exception e ) { throw new java.lang.RuntimeException ( e ) ; } return mProcessHelper ; }
Source:
public void createNewSession ( com.intellij.openapi.project.Project project , org.jetbrains.plugins.terminal.AbstractTerminalRunner terminalRunner ) { com.intellij.openapi.wm.ToolWindow terminal = com.intellij.openapi.wm.ToolWindowManager.getInstance ( project ) . getToolWindow ( "Terminal" ) ; openSession ( terminal , terminalRunner ) ; terminal.activate ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { } } , true ) ; }

Target:
public void createNewSession ( com.intellij.openapi.project.Project project , final org.jetbrains.plugins.terminal.AbstractTerminalRunner terminalRunner ) { final com.intellij.openapi.wm.ToolWindow toolWindow = com.intellij.openapi.wm.ToolWindowManager.getInstance ( project ) . getToolWindow ( "Terminal" ) ; toolWindow.activate ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { openSession ( toolWindow , terminalRunner ) ; } } , true ) ; }
Source:
private void onCloseTab ( com.android.browser.Tab tab ) { if ( tab != null ) { if ( tab == ( mUiController.getCurrentTab ( ) ) ) { mUiController.closeCurrentTab ( ) ; } else { mUiController.closeTab ( tab ) ; } } }

Target:
private void onCloseTab ( com.android.browser.Tab tab ) { if ( tab != null ) { if ( tab == ( mUiController.getCurrentTab ( ) ) ) { mUiController.closeCurrentTab ( ) ; } else { mUiController.closeTab ( tab ) ; } mTabViews.remove ( tab ) ; } }