auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetImeiForSlotId ( ) { java.lang.String imei = mTelephonyManager.getImei ( 0 ) ; verifyImei ( imei , mTelephonyManager.getDeviceId ( 0 ) ) ; for ( int i = - 1 ; i <= ( mTelephonyManager.getPhoneCount ( ) ) ; i ++ ) { mTelephonyManager.getImei ( i ) ; } }

Target:
public void testGetImeiForSlot ( ) { if ( ! ( mPackageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) ) { return ; } for ( int i = 0 ; i < ( mTelephonyManager.getPhoneCount ( ) ) ; i ++ ) { java.lang.String imei = mTelephonyManager.getImei ( i ) ; if ( ! ( android.text.TextUtils.isEmpty ( imei ) ) ) { android.telephony.cts.TelephonyManagerTest.assertImei ( imei ) ; } } mTelephonyManager.getImei ( ( - 1 ) ) ; mTelephonyManager.getImei ( mTelephonyManager.getPhoneCount ( ) ) ; }
Source:
private int moveDexFilesLI ( android.content.pm.PackageParser.Package newPackage ) { int retCode ; if ( ( ( newPackage.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_HAS_CODE ) ) != 0 ) { retCode = mInstaller.movedex ( newPackage.mScanPath , newPackage.mPath ) ; if ( retCode != 0 ) { if ( mNoDexOpt ) { android.util.Slog.i ( com.android.server.pm.PackageManagerService.TAG , ( "dex file doesn't exist, skipping move: " + ( newPackage.mPath ) ) ) ; } else { android.util.Slog.e ( com.android.server.pm.PackageManagerService.TAG , ( "Couldn't rename dex file: " + ( newPackage.mPath ) ) ) ; return android.content.pm.PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE ; } } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }

Target:
private int moveDexFilesLI ( android.content.pm.PackageParser.Package newPackage ) { int retCode ; if ( ( ( newPackage.applicationInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_HAS_CODE ) ) != 0 ) { retCode = mInstaller.movedex ( newPackage.mScanPath , newPackage.mPath , getAppInstructionSet ( newPackage.applicationInfo ) ) ; if ( retCode != 0 ) { if ( mNoDexOpt ) { android.util.Slog.i ( com.android.server.pm.PackageManagerService.TAG , ( "dex file doesn't exist, skipping move: " + ( newPackage.mPath ) ) ) ; } else { android.util.Slog.e ( com.android.server.pm.PackageManagerService.TAG , ( "Couldn't rename dex file: " + ( newPackage.mPath ) ) ) ; return android.content.pm.PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE ; } } } return android.content.pm.PackageManager.INSTALL_SUCCEEDED ; }
Source:
public java.util.Iterator < java.util.Map.Entry < R , java.util.Map < C , V > > > iterator ( ) { return new com.google.common.collect.TransformedIterator < R , java.util.Map.Entry < R , java.util.Map < C , V > > > ( backingMap.keySet ( ) . iterator ( ) ) { @ java.lang.Override java.util.Map.Entry < R , java.util.Map < C , V > > transform ( R rowKey ) { return new com.google.common.collect.ImmutableEntry < R , java.util.Map < C , V > > ( rowKey , row ( rowKey ) ) ; } } ; }

Target:
public java.util.Iterator < java.util.Map.Entry < R , java.util.Map < C , V > > > iterator ( ) { return com.google.common.collect.Maps.asMapEntryIterator ( backingMap.keySet ( ) , new com.google.common.base.Function < R , java.util.Map < C , V > > ( ) { @ java.lang.Override public java.util.Map < C , V > apply ( R rowKey ) { return row ( rowKey ) ; } } ) ; }
Source:
final void putUnchecked ( int pos , int [ ] src , int srcOffset , int length ) { libcore.io.Memory.pokeIntArray ( ix ( pos ) , src , srcOffset , length , ( ! ( nativeByteOrder ) ) ) ; }

Target:
final void putUnchecked ( int pos , int [ ] src , int srcOffset , int length ) { if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } libcore.io.Memory.pokeIntArray ( ix ( pos ) , src , srcOffset , length , ( ! ( nativeByteOrder ) ) ) ; }
Source:
private com.android.jack.dx.rop.type.TypeList getInterfacesList ( @ javax.annotation.Nonnull com.android.jack.dx.io.DexBuffer dexToMerge , @ javax.annotation.Nonnull com.android.jack.dx.io.ClassDef classDefToMerge ) { int interfaceCount = classDefToMerge.getInterfaces ( ) . length ; if ( interfaceCount == 0 ) { return com.android.jack.dx.rop.type.StdTypeList.EMPTY ; } com.android.jack.dx.rop.type.StdTypeList interfaceList = new com.android.jack.dx.rop.type.StdTypeList ( interfaceCount ) ; int idx = 0 ; for ( int interfaceIdx : classDefToMerge.getInterfaces ( ) ) { interfaceList.set ( ( idx ++ ) , getTypeFromTypeIndex ( dexToMerge , interfaceIdx ) ) ; } return interfaceList ; }

Target:
private com.android.jack.dx.rop.type.TypeList getInterfacesList ( @ javax.annotation.Nonnull com.android.jack.dx.io.ClassDef classDefToMerge , @ javax.annotation.Nonnull com.android.jack.dx.rop.cst.CstIndexMap cstIndexMap ) { int interfaceCount = classDefToMerge.getInterfaces ( ) . length ; if ( interfaceCount == 0 ) { return com.android.jack.dx.rop.type.StdTypeList.EMPTY ; } com.android.jack.dx.rop.type.StdTypeList interfaceList = new com.android.jack.dx.rop.type.StdTypeList ( interfaceCount ) ; int idx = 0 ; for ( int interfaceIdx : classDefToMerge.getInterfaces ( ) ) { interfaceList.set ( ( idx ++ ) , cstIndexMap.getCstType ( interfaceIdx ) . getClassType ( ) ) ; } return interfaceList ; }
Source:
protected static void printSubUsage ( java.io.PrintStream printStream ) { java.io.InputStream is = com.android.jack.Main.class . getResourceAsStream ( "/help.txt" ) ; if ( is == null ) { throw new java.lang.AssertionError ( ) ; } com.android.jack.util.CharactersStreamSucker css = new com.android.jack.util.CharactersStreamSucker ( is , printStream ) ; try { css.suck ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
protected static void printUsage ( @ javax.annotation.Nonnull java.io.PrintStream printStream ) { java.io.InputStream is = com.android.jack.Main.class . getResourceAsStream ( "/help.txt" ) ; if ( is == null ) { throw new java.lang.AssertionError ( ) ; } com.android.jack.util.CharactersStreamSucker css = new com.android.jack.util.CharactersStreamSucker ( is , printStream ) ; try { css.suck ( ) ; } catch ( java.io.IOException e ) { throw new java.lang.AssertionError ( e ) ; } finally { try { is.close ( ) ; } catch ( java.io.IOException e ) { } } }
Source:
public void testInstallSdcardUnmount ( ) { boolean origState = checkMediaState ( Environment.MEDIA_MOUNTED ) ; try { assertTrue ( unmountMedia ( ) ) ; installFromRawResource ( "install.apk" , R.raw.install , PackageManager.INSTALL_EXTERNAL , false , true , PackageManager.INSTALL_FAILED_MEDIA_UNAVAILABLE , PackageInfo.INSTALL_LOCATION_AUTO ) ; } finally { if ( origState ) { mountMedia ( ) ; } else { unmountMedia ( ) ; } } }

Target:
public void testInstallSdcardUnmount ( ) { if ( android.os.Environment.isExternalStorageEmulated ( ) ) { return ; } boolean origState = checkMediaState ( Environment.MEDIA_MOUNTED ) ; try { assertTrue ( unmountMedia ( ) ) ; installFromRawResource ( "install.apk" , R.raw.install , PackageManager.INSTALL_EXTERNAL , false , true , PackageManager.INSTALL_FAILED_MEDIA_UNAVAILABLE , PackageInfo.INSTALL_LOCATION_AUTO ) ; } finally { if ( origState ) { mountMedia ( ) ; } else { unmountMedia ( ) ; } } }
Source:
private static org.bouncycastle.math.ec.ECFieldElement hash2FieldElement ( org.bouncycastle.math.ec.ECCurve curve , byte [ ] hash ) { byte [ ] data = org.bouncycastle.util.Arrays.clone ( hash ) ; org.bouncycastle.crypto.signers.DSTU4145Signer.reverseBytes ( data ) ; java.math.BigInteger num = new java.math.BigInteger ( 1 , data ) ; while ( ( num.bitLength ( ) ) > ( curve.getFieldSize ( ) ) ) { num = num.clearBit ( ( ( num.bitLength ( ) ) - 1 ) ) ; } return curve.fromBigInteger ( num ) ; }

Target:
private static org.bouncycastle.math.ec.ECFieldElement hash2FieldElement ( org.bouncycastle.math.ec.ECCurve curve , byte [ ] hash ) { byte [ ] data = org.bouncycastle.util.Arrays.reverse ( hash ) ; return curve.fromBigInteger ( org.bouncycastle.crypto.signers.DSTU4145Signer.truncate ( new java.math.BigInteger ( 1 , data ) , curve.getFieldSize ( ) ) ) ; }
Source:
protected void onCreate ( @ android.support.annotation.Nullable android.os.Bundle bundle ) { super . onCreate ( bundle ) ; com.android.incallui.audioroute.AudioRouteSelectorDialogFragment.newInstance ( com.android.incallui.audiomode.AudioModeProvider.getInstance ( ) . getAudioState ( ) ) . show ( getSupportFragmentManager ( ) , AudioRouteSelectorDialogFragment.TAG ) ; }

Target:
protected void onCreate ( @ android.support.annotation.Nullable android.os.Bundle bundle ) { super . onCreate ( bundle ) ; shouldLogBubbleV2Impression = getIntent ( ) . getBooleanExtra ( com.android.incallui.AudioRouteSelectorActivity.SHOULD_LOG_BUBBLE_V2_IMPRESSION_EXTRA , false ) ; com.android.incallui.audioroute.AudioRouteSelectorDialogFragment.newInstance ( com.android.incallui.audiomode.AudioModeProvider.getInstance ( ) . getAudioState ( ) ) . show ( getSupportFragmentManager ( ) , AudioRouteSelectorDialogFragment.TAG ) ; }
Source:
private ResultDataProto.Result retrieveResultData ( ) throws com.android.tradefed.device.DeviceNotAvailableException { java.io.File resultFile = getDevice ( ) . pullFileFromExternal ( com.android.graphics.benchmark.testtype.GraphicsBenchmarkHostsideController.RESULT_FILE_NAME ) ; if ( resultFile != null ) { try ( java.io.InputStream inputStream = new java.io.FileInputStream ( resultFile ) ) { com.android.graphics.benchmark.proto.ResultDataProto.Result data = ResultDataProto.Result.parseFrom ( inputStream ) ; return data ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } return null ; }

Target:
private ResultDataProto.Result retrieveResultData ( ) throws com.android.tradefed.device.DeviceNotAvailableException { java.io.File resultFile = getDevice ( ) . pullFileFromExternal ( ResultData.RESULT_FILE_LOCATION ) ; if ( resultFile != null ) { try ( java.io.InputStream inputStream = new java.io.FileInputStream ( resultFile ) ) { com.android.graphics.benchmark.proto.ResultDataProto.Result data = ResultDataProto.Result.parseFrom ( inputStream ) ; return data ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } return null ; }
Source:
public com.android.sched.vfs.VPath appendPath ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) { assert ! ( path.isRoot ( ) ) ; if ( ! ( this . isRoot ( ) ) ) { pathFragments.add ( new com.android.sched.vfs.VPath.VPathFragment ( java.lang.String.valueOf ( com.android.sched.vfs.VPath.INTERNAL_SEPARATOR ) , com.android.sched.vfs.VPath.INTERNAL_SEPARATOR ) ) ; } pathFragments.addAll ( path.getPathFragments ( ) ) ; return this ; }

Target:
public com.android.sched.vfs.VPath appendPath ( @ javax.annotation.Nonnull com.android.sched.vfs.VPath path ) { assert ! ( path.isRoot ( ) ) ; if ( ! ( this . isRoot ( ) ) ) { pathFragments.add ( com.android.sched.vfs.VPath.INTERNAL_SEPARATOR_FRAGMENT ) ; } pathFragments.addAll ( path.getPathFragments ( ) ) ; return this ; }
Source:
private void addFolder ( com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config , com.android.ide.eclipse.mock.FileMock [ ] memberList ) throws java.lang.Exception { java.lang.String folderName = config.getFolderName ( ResourceFolderType.LAYOUT ) ; com.android.ide.eclipse.mock.FolderMock folder = new com.android.ide.eclipse.mock.FolderMock ( folderName , memberList ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder resFolder = _addProjectResourceFolder ( resources , config , folder ) ; for ( com.android.ide.eclipse.mock.FileMock file : memberList ) { resFolder.addFile ( new com.android.ide.eclipse.adt.internal.resources.manager.SingleResourceFile ( new com.android.ide.eclipse.adt.io.IFileWrapper ( file ) , resFolder ) ) ; } }

Target:
private void addFolder ( com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources resources , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config , org.eclipse.core.resources.IFile [ ] memberList ) throws java.lang.Exception { java.lang.String folderName = config.getFolderName ( ResourceFolderType.LAYOUT ) ; org.eclipse.core.resources.IFolder folder = com.android.ide.eclipse.mock.Mocks.createFolder ( folderName , memberList ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder resFolder = _addProjectResourceFolder ( resources , config , folder ) ; for ( org.eclipse.core.resources.IFile file : memberList ) { resFolder.addFile ( new com.android.ide.eclipse.adt.internal.resources.manager.SingleResourceFile ( new com.android.ide.eclipse.adt.io.IFileWrapper ( file ) , resFolder ) ) ; } }
Source:
public void testEnableSupplicantErrorWhenNoClientInterfaceConfigured ( ) throws java.lang.Exception { mWificondControl.setupDriverForClientMode ( ) ; org.junit.Assert.assertFalse ( mWificondControl.enableSupplicant ( ) ) ; }

Target:
public void testGetTxPacketCounters ( ) throws java.lang.Exception { android.net.wifi.IWificond wificond = org.mockito.Mockito.mock ( android.net.wifi.IWificond.class ) ; android.net.wifi.IClientInterface clientInterface = org.mockito.Mockito.mock ( android.net.wifi.IClientInterface.class ) ; org.mockito.Mockito.when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( wificond ) ; org.mockito.Mockito.when ( wificond.createClientInterface ( ) ) . thenReturn ( clientInterface ) ; mWificondControl.setupDriverForClientMode ( ) ; mWificondControl.getTxPacketCounters ( ) ; org.mockito.Mockito.verify ( clientInterface ) . getPacketCounters ( ) ; }
Source:
public boolean isMatchFor ( com.android.ide.eclipse.adt.internal.resources.configurations.ResourceQualifier qualifier ) { if ( qualifier instanceof com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) { com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier referenceQualifier = ( ( com.android.ide.eclipse.adt.internal.resources.configurations.KeyboardStateQualifier ) ( qualifier ) ) ; if ( ( ( referenceQualifier.mValue ) == ( com.android.resources.KeyboardState.SOFT ) ) && ( ( mValue ) == ( com.android.resources.KeyboardState.EXPOSED ) ) ) { return true ; } return ( referenceQualifier.mValue ) == ( mValue ) ; } return false ; }

Target:
public boolean isMatchFor ( com.android.ide.common.resources.configuration.ResourceQualifier qualifier ) { if ( qualifier instanceof com.android.ide.common.resources.configuration.KeyboardStateQualifier ) { com.android.ide.common.resources.configuration.KeyboardStateQualifier referenceQualifier = ( ( com.android.ide.common.resources.configuration.KeyboardStateQualifier ) ( qualifier ) ) ; if ( ( ( referenceQualifier.mValue ) == ( com.android.resources.KeyboardState.SOFT ) ) && ( ( mValue ) == ( com.android.resources.KeyboardState.EXPOSED ) ) ) { return true ; } return ( referenceQualifier.mValue ) == ( mValue ) ; } return false ; }
Source:
private void handleCheckComplete ( final byte [ ] token , final boolean success ) { try { mRulesManager.requestNothing ( token , success ) ; android.util.Log.i ( com.android.timezone.updater.RulesCheckReceiver.TAG , ( ( ( "requestNothing() called, token=" + ( java.util.Arrays.toString ( token ) ) ) + ", success=" ) + success ) ) ; } catch ( java.lang.Exception e ) { android.util.Log.e ( com.android.timezone.updater.RulesCheckReceiver.TAG , "Error calling requestNothing()" , e ) ; } }

Target:
private void handleCheckComplete ( final byte [ ] token , final boolean success ) { try { java.lang.String tokenString = java.util.Arrays.toString ( token ) ; com.android.timezone.updater.EventLogTags.writeTimezoneCheckRequestNothing ( tokenString , ( success ? 1 : 0 ) ) ; mRulesManager.requestNothing ( token , success ) ; android.util.Log.i ( com.android.timezone.updater.RulesCheckReceiver.TAG , ( ( ( "requestNothing() called, token=" + tokenString ) + ", success=" ) + success ) ) ; } catch ( java.lang.Exception e ) { android.util.Log.e ( com.android.timezone.updater.RulesCheckReceiver.TAG , "Error calling requestNothing()" , e ) ; } }
Source:
public void accept ( int result ) { if ( ( result & ( com.android.cts.verifier.notifications.MockListener.MockListener.HINT_HOST_DISABLE_CALL_EFFECTS ) ) == ( com.android.cts.verifier.notifications.MockListener.MockListener.HINT_HOST_DISABLE_CALL_EFFECTS ) ) { status = PASS ; } else { logFail ( ) ; status = FAIL ; } next ( ) ; }

Target:
void test ( ) { if ( ( status ) == ( READY ) ) { com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . requestListenerHints ( MockListener.HINT_HOST_DISABLE_CALL_EFFECTS ) ; status = RETEST ; } else { int result = com.android.cts.verifier.notifications.MockListener.MockListener.getInstance ( ) . getCurrentListenerHints ( ) ; if ( ( result & ( com.android.cts.verifier.notifications.MockListener.MockListener.HINT_HOST_DISABLE_CALL_EFFECTS ) ) != 0 ) { status = PASS ; next ( ) ; } else { logFail ( ) ; status = FAIL ; } } }
Source:
public void eventPublishTerminated ( short sessionId , android.hardware.wifi.V1_0.WifiNanStatus status ) { if ( com.android.server.wifi.aware.WifiAwareNativeCallback.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNativeCallback.TAG , ( ( ( "eventPublishTerminated: sessionId=" + sessionId ) + ", status=" ) + ( com.android.server.wifi.aware.WifiAwareNativeCallback.statusString ( status ) ) ) ) ; } mWifiAwareStateManager.onSessionTerminatedNotification ( sessionId , status.status , true ) ; }

Target:
public void eventSubscribeTerminated ( byte sessionId , android.hardware.wifi.V1_0.WifiNanStatus status ) { if ( com.android.server.wifi.aware.WifiAwareNativeCallback.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNativeCallback.TAG , ( ( ( "eventSubscribeTerminated: sessionId=" + sessionId ) + ", status=" ) + ( com.android.server.wifi.aware.WifiAwareNativeCallback.statusString ( status ) ) ) ) ; } mWifiAwareStateManager.onSessionTerminatedNotification ( sessionId , status.status , false ) ; }
Source:
public static void notifyShowDialogToBlockNumberAndOptionallyReportSpam ( android.content.Context context , java.lang.String normalizedNumber , java.lang.String countryIso , int callType , com.android.dialer.logging.ReportingLocation.Type reportingLocation ) { com.android.dialer.common.LogUtil.enterBlock ( "ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumberAndOptionallyReportSpam" ) ; android.content.Intent intent = new android.content.Intent ( ) ; intent.setAction ( ShowBlockReportSpamDialogReceiver.ACTION_SHOW_DIALOG_TO_BLOCK_NUMBER_AND_OPTIONALLY_REPORT_SPAM ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER , normalizedNumber ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO , countryIso ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE , callType ) ; intent.putExtra ( ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION , reportingLocation.getNumber ( ) ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( context ) . sendBroadcast ( intent ) ; }

Target:
public static void notifyShowDialogToBlockNumberAndOptionallyReportSpam ( android.content.Context context , com.android.dialer.blockreportspam.BlockReportSpamDialogInfo blockReportSpamDialogInfo ) { com.android.dialer.common.LogUtil.enterBlock ( "ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumberAndOptionallyReportSpam" ) ; android.content.Intent intent = new android.content.Intent ( ) ; intent.setAction ( ShowBlockReportSpamDialogReceiver.ACTION_SHOW_DIALOG_TO_BLOCK_NUMBER_AND_OPTIONALLY_REPORT_SPAM ) ; com.android.dialer.protos.ProtoParsers.put ( intent , ShowBlockReportSpamDialogReceiver.EXTRA_DIALOG_INFO , blockReportSpamDialogInfo ) ; android.support.v4.content.LocalBroadcastManager.getInstance ( context ) . sendBroadcast ( intent ) ; }
Source:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) { if ( ( getFieldMethodId ) == null ) { getFieldMethodId = javaLangClass.getMethodId ( com.android.jack.transformations.ast.string.parameterrefiners.GetDeclaredFieldsParameterRefiner.GETDECLAREDFIELD_METHOD_NAME , java.util.Collections.singletonList ( ( ( com.android.jack.ir.ast.JType ) ( javaLangString ) ) ) , MethodKind.INSTANCE_VIRTUAL ) ; } if ( ( call.getReceiverType ( ) . equals ( javaLangClass ) ) && ( call.getMethodId ( ) . equals ( getFieldMethodId ) ) ) { assert formatter.getName ( call.getType ( ) ) . equals ( com.android.jack.transformations.ast.string.parameterrefiners.FIELD_CLASS_SIGNATURE ) ; return true ; } return false ; }

Target:
public boolean isApplicable ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethodCall call ) { if ( ( getFieldMethodId ) == null ) { getFieldMethodId = javaLangClass.getMethodId ( com.android.jack.transformations.ast.string.parameterrefiners.GetDeclaredFieldsParameterRefiner.GETDECLAREDFIELD_METHOD_NAME , java.util.Collections.singletonList ( ( ( com.android.jack.ir.ast.JType ) ( javaLangString ) ) ) , MethodKind.INSTANCE_VIRTUAL ) ; } if ( ( call.getReceiverType ( ) . isSameType ( javaLangClass ) ) && ( call.getMethodId ( ) . equals ( getFieldMethodId ) ) ) { assert formatter.getName ( call.getType ( ) ) . equals ( com.android.jack.transformations.ast.string.parameterrefiners.FIELD_CLASS_SIGNATURE ) ; return true ; } return false ; }
Source:
private boolean hasGlobalSearchActivity ( ) { android.content.Context context = getInstrumentation ( ) . getTargetContext ( ) ; android.app.SearchManager searchManager = ( ( android.app.SearchManager ) ( context.getSystemService ( Context.SEARCH_SERVICE ) ) ) ; if ( searchManager == null ) { return false ; } try { return ( searchManager.getGlobalSearchActivity ( ) ) != null ; } catch ( java.lang.NullPointerException e ) { return false ; } }

Target:
private boolean isTelevision ( ) { android.content.Context context = getInstrumentation ( ) . getTargetContext ( ) ; android.content.pm.PackageManager pm = context.getPackageManager ( ) ; return ( pm.hasSystemFeature ( PackageManager.FEATURE_TELEVISION ) ) || ( pm.hasSystemFeature ( PackageManager.FEATURE_LEANBACK ) ) ; }
Source:
public void copyTo ( short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt16 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyTo ( short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyTo" ) ; validateIsInt16 ( ) ; mRS.validate ( ) ; mRS.nAllocationRead ( getID ( mRS ) , d , Element.DataType.SIGNED_16 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public void requestNetwork ( android.net.NetworkRequest req , android.net.ConnectivityManager.NetworkCallback cb , int timeoutMs , int legacyType ) { org.junit.Assert.assertFalse ( requested.containsKey ( cb ) ) ; requested.put ( cb , req ) ; org.junit.Assert.assertFalse ( legacyTypeMap.containsKey ( cb ) ) ; if ( legacyType != ( android.net.ConnectivityManager.TYPE_NONE ) ) { legacyTypeMap.put ( cb , legacyType ) ; } }

Target:
public void requestNetwork ( android.net.NetworkRequest req , android.net.ConnectivityManager.NetworkCallback cb , int timeoutMs , int legacyType , android.os.Handler h ) { org.junit.Assert.assertFalse ( allCallbacks.containsKey ( cb ) ) ; allCallbacks.put ( cb , h ) ; org.junit.Assert.assertFalse ( requested.containsKey ( cb ) ) ; requested.put ( cb , req ) ; org.junit.Assert.assertFalse ( legacyTypeMap.containsKey ( cb ) ) ; if ( legacyType != ( android.net.ConnectivityManager.TYPE_NONE ) ) { legacyTypeMap.put ( cb , legacyType ) ; } }
Source:
private org.eclipse.swt.widgets.Text createAppToTraceText ( org.eclipse.swt.widgets.Composite parent , java.lang.String defaultMessage ) { mActivityToTraceText = new org.eclipse.swt.widgets.Text ( parent , org.eclipse.swt.SWT.BORDER ) ; mActivityToTraceText.setMessage ( defaultMessage ) ; mActivityToTraceText.setText ( mActivityToTrace ) ; mActivityToTraceText.setLayoutData ( new org.eclipse.swt.layout.GridData ( org.eclipse.swt.layout.GridData.FILL_HORIZONTAL ) ) ; mActivityToTraceText.addModifyListener ( new org.eclipse.swt.events.ModifyListener ( ) { @ java.lang.Override public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { validateAndSetMessage ( ) ; } } ) ; return mActivityToTraceText ; }

Target:
private org.eclipse.swt.widgets.Text createAppToTraceText ( org.eclipse.swt.widgets.Composite parent , java.lang.String defaultMessage ) { mAppPackageToTraceText = new org.eclipse.swt.widgets.Text ( parent , org.eclipse.swt.SWT.BORDER ) ; mAppPackageToTraceText.setMessage ( defaultMessage ) ; mAppPackageToTraceText.setText ( mAppPackageToTrace ) ; mAppPackageToTraceText.setLayoutData ( new org.eclipse.swt.layout.GridData ( org.eclipse.swt.layout.GridData.FILL_HORIZONTAL ) ) ; mAppPackageToTraceText.addModifyListener ( new org.eclipse.swt.events.ModifyListener ( ) { @ java.lang.Override public void modifyText ( org.eclipse.swt.events.ModifyEvent e ) { validateAndSetMessage ( ) ; } } ) ; return mActivityToTraceText ; }
Source:
private static int sadShort2IntAlt ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; int sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { char s = s1 [ i ] ; char p = s2 [ i ] ; sad += ( s >= p ) ? s - p : p - s ; } return sad ; }

Target:
private static int sadChar2IntAlt ( char [ ] s1 , char [ ] s2 ) { int min_length = java.lang.Math.min ( s1.length , s2.length ) ; int sad = 0 ; for ( int i = 0 ; i < min_length ; i ++ ) { char s = s1 [ i ] ; char p = s2 [ i ] ; sad += ( s >= p ) ? s - p : p - s ; } return sad ; }
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 [ ] getPkgsInfos ( @ com.android.annotations.NonNull com.android.sdklib.repository.descriptors.PkgType filter ) { return getPkgsInfos ( java.util.EnumSet.of ( filter ) ) ; }
Source:
private boolean isIPv6ULA ( ) { if ( ( address ) instanceof java.net.Inet6Address ) { byte [ ] bytes = address.getAddress ( ) ; return ( ( bytes [ 0 ] ) & ( ( byte ) ( 254 ) ) ) == ( ( byte ) ( 252 ) ) ; } return false ; }

Target:
public boolean isIPv6 ( ) { return ( address ) instanceof java.net.Inet6Address ; }
Source:
public void testUnsupportedCallbackException04 ( ) { javax.security.auth.callback.UnsupportedCallbackException ucE ; for ( int i = 0 ; i < ( tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs.length ) ; i ++ ) { ucE = new javax.security.auth.callback.UnsupportedCallbackException ( null , tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertEquals ( "getMessage() must return: " . concat ( tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs [ i ] ) , ucE.getMessage ( ) , tests.api.javax.security.auth.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertNull ( "getCallback() must return null." , ucE.getCallback ( ) ) ; } }

Target:
public void testUnsupportedCallbackException04 ( ) { javax.security.auth.callback.UnsupportedCallbackException ucE ; for ( int i = 0 ; i < ( org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs.length ) ; i ++ ) { ucE = new javax.security.auth.callback.UnsupportedCallbackException ( null , org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertEquals ( "getMessage() must return: " . concat ( org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs [ i ] ) , ucE.getMessage ( ) , org.apache.harmony.tests.javax.security.auth.callback.UnsupportedCallbackExceptionTest.msgs [ i ] ) ; assertNull ( "getCallback() must return null." , ucE.getCallback ( ) ) ; } }
Source:
public void testAesCbcHmacMd5Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth ) ; }

Target:
public void testInterfaceCountersUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1000 ) ; }
Source:
public static synchronized void setupProjectNatures ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { if ( ( project == null ) || ( ! ( project.isOpen ( ) ) ) ) return ; if ( monitor == null ) monitor = new org.eclipse.core.runtime.NullProgressMonitor ( ) ; com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , org.eclipse.jdt.core.JavaCore.NATURE_ID , monitor ) ; com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , AndroidConstants.NATURE , monitor ) ; }

Target:
public static synchronized void setupProjectNatures ( org.eclipse.core.resources.IProject project , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { if ( ( project == null ) || ( ! ( project.isOpen ( ) ) ) ) return ; if ( monitor == null ) monitor = new org.eclipse.core.runtime.NullProgressMonitor ( ) ; com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , org.eclipse.jdt.core.JavaCore.NATURE_ID , monitor ) ; com.android.ide.eclipse.adt.internal.project.AndroidNature.addNatureToProjectDescription ( project , AndroidConstants.NATURE_DEFAULT , monitor ) ; }
Source:
private boolean getBuildModelForIde ( org.gradle.api.Project project ) { boolean flagValue = false ; if ( project.hasProperty ( com.android.builder.model.AndroidProject.PROPERTY_BUILD_MODEL_ONLY ) ) { java.lang.Object value = project.getProperties ( ) . get ( com.android.builder.model.AndroidProject.PROPERTY_BUILD_MODEL_ONLY ) ; if ( value instanceof java.lang.String ) { flagValue = java.lang.Boolean.parseBoolean ( ( ( java.lang.String ) ( value ) ) ) ; } } return flagValue ; }

Target:
private static boolean isPropertyTrue ( @ com.android.annotations.NonNull org.gradle.api.Project project , @ com.android.annotations.NonNull java.lang.String propertyName ) { if ( project.hasProperty ( propertyName ) ) { java.lang.Object value = project.getProperties ( ) . get ( propertyName ) ; if ( value instanceof java.lang.String ) { return java.lang.Boolean.parseBoolean ( ( ( java.lang.String ) ( value ) ) ) ; } } return false ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( type instanceof com.android.jack.ir.ast.JDefinedClass ) { ( ( com.android.jack.ir.ast.JDefinedClass ) ( type ) ) . setEnclosingMethod ( null ) ; } }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface type ) throws java.lang.Exception { if ( type instanceof com.android.jack.ir.ast.JDefinedClass ) { com.android.jack.transformations.request.TransformationRequest tr = new com.android.jack.transformations.request.TransformationRequest ( type.getEnclosingPackage ( ) ) ; tr.append ( new com.android.jack.transformations.request.RemoveEnclosingMethod ( ( ( com.android.jack.ir.ast.JDefinedClass ) ( type ) ) ) ) ; tr.commit ( ) ; } }
Source:
public void answer ( int networkType , android.net.INetworkScoreCache scoreCache ) { mScoreCache = ( ( com.android.server.wifi.WifiNetworkScoreCache ) ( scoreCache ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { mResource = getResource ( ) ; mScoreManager = mock ( android.net.NetworkScoreManager.class ) ; mContext = getContext ( ) ; mScoreCache = new com.android.server.wifi.WifiNetworkScoreCache ( mContext ) ; mWifiConfigManager = getWifiConfigManager ( ) ; when ( mClock.getElapsedSinceBootMillis ( ) ) . thenReturn ( android.os.SystemClock.elapsedRealtime ( ) ) ; mThresholdQualifiedRssi2G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_24GHz ) ; mThresholdQualifiedRssi5G = mResource.getInteger ( R.integer.config_wifi_framework_wifi_score_low_rssi_threshold_5GHz ) ; mExternalScoreEvaluator = new com.android.server.wifi.ExternalScoreEvaluator ( mContext , mWifiConfigManager , mScoreCache , mClock , null ) ; }
Source:
public boolean updateNetworkAfterConnect ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Update network after connect for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.lastConnected = mClock.getWallClockMillis ( ) ; ( config.numAssociation ) ++ ; config.getNetworkSelectionStatus ( ) . clearDisableReasonCounter ( ) ; config.getNetworkSelectionStatus ( ) . setHasEverConnected ( true ) ; setNetworkStatus ( config , WifiConfiguration.Status.CURRENT ) ; return true ; }

Target:
public boolean updateNetworkAfterConnect ( int networkId ) { if ( mVerboseLoggingEnabled ) { android.util.Log.v ( com.android.server.wifi.WifiConfigManager.TAG , ( "Update network after connect for " + networkId ) ) ; } android.net.wifi.WifiConfiguration config = getInternalConfiguredNetwork ( networkId ) ; if ( config == null ) { return false ; } config.lastConnected = mClock.getWallClockMillis ( ) ; ( config.numAssociation ) ++ ; config.getNetworkSelectionStatus ( ) . clearDisableReasonCounter ( ) ; config.getNetworkSelectionStatus ( ) . setHasEverConnected ( true ) ; setNetworkStatus ( config , WifiConfiguration.Status.CURRENT ) ; saveToStore ( false ) ; return true ; }
Source:
public boolean matches ( final java.lang.Object set ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.Set < com.android.messaging.datamodel.data.MessagePartData > actualSet = ( ( java.util.Set < com.android.messaging.datamodel.data.MessagePartData > ) ( set ) ) ; if ( ( actualSet.size ( ) ) != ( mGivenParts.size ( ) ) ) { return false ; } return ( mGivenParts.containsAll ( actualSet ) ) && ( actualSet.containsAll ( mGivenParts ) ) ; }

Target:
public boolean matchesObject ( final java.lang.Object set ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.Set < com.android.messaging.datamodel.data.MessagePartData > actualSet = ( ( java.util.Set < com.android.messaging.datamodel.data.MessagePartData > ) ( set ) ) ; if ( ( actualSet.size ( ) ) != ( mGivenParts.size ( ) ) ) { return false ; } return ( mGivenParts.containsAll ( actualSet ) ) && ( actualSet.containsAll ( mGivenParts ) ) ; }
Source:
public void checkLink ( java.lang.String lib ) { if ( ( isRelevant ( ) ) && ( ( ( lib.indexOf ( '/' ) ) != ( - 1 ) ) || ( ( lib.indexOf ( '\\' ) ) != ( - 1 ) ) ) ) { throw com.android.ide.common.rendering.RenderSecurityException.create ( "Link" , lib ) ; } }

Target:
public void checkLink ( java.lang.String lib ) { if ( ( isRelevant ( ) ) && ( ( ( lib.indexOf ( '/' ) ) != ( - 1 ) ) || ( ( lib.indexOf ( '\\' ) ) != ( - 1 ) ) ) ) { if ( lib.startsWith ( java.lang.System.getProperty ( "java.home" ) ) ) { return ; } throw com.android.ide.common.rendering.RenderSecurityException.create ( "Link" , lib ) ; } }
Source:
public java.lang.String getField ( java.lang.String field ) throws android.os.RemoteException { waitForReady ( ) ; final com.android.server.NativeDaemonEvent event ; try { final java.lang.String [ ] contents = com.android.server.NativeDaemonEvent.filterMessageList ( mCryptConnector.executeForList ( "cryptfs" , "getfield" , field ) , com.android.server.MountService.VoldResponseCode.CryptfsGetfieldResult ) ; java.lang.String result = new java.lang.String ( ) ; for ( java.lang.String content : contents ) { result += content ; } return result ; } catch ( com.android.server.NativeDaemonConnectorException e ) { throw e.rethrowAsParcelableException ( ) ; } }

Target:
public java.lang.String getField ( java.lang.String field ) throws android.os.RemoteException { mContext.enforceCallingOrSelfPermission ( Manifest.permission.STORAGE_INTERNAL , "no permission to access the crypt keeper" ) ; waitForReady ( ) ; final com.android.server.NativeDaemonEvent event ; try { final java.lang.String [ ] contents = com.android.server.NativeDaemonEvent.filterMessageList ( mCryptConnector.executeForList ( "cryptfs" , "getfield" , field ) , com.android.server.MountService.VoldResponseCode.CryptfsGetfieldResult ) ; java.lang.String result = new java.lang.String ( ) ; for ( java.lang.String content : contents ) { result += content ; } return result ; } catch ( com.android.server.NativeDaemonConnectorException e ) { throw e.rethrowAsParcelableException ( ) ; } }
Source:
public com.android.sched.vfs.InputVFile 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 { com.android.sched.vfs.VPath clonedPath = typePath.clone ( ) ; clonedPath.addSuffix ( fileType.getFileExtension ( ) ) ; return vfs.getRootDir ( ) . getInputVFile ( clonedPath ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public com.android.sched.vfs.InputVFile 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 { com.android.sched.vfs.VPath clonedPath = typePath.clone ( ) ; clonedPath.addSuffix ( fileType.getFileExtension ( ) ) ; return vfs.getRootInputVDir ( ) . getInputVFile ( clonedPath ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public void copyFrom ( short [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFromUnchecked ( byte [ ] d ) { copyFromUnchecked ( d , Element.DataType.SIGNED_8 , d.length ) ; }
Source:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { if ( ( api ) == 24 ) { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . description ( ( "Sign in " + email ) ) ) . exists ( ) ; } else { return device.findObject ( new android.support.test.uiautomator.UiSelector ( ) . text ( ( "Sign in " + email ) ) ) . exists ( ) ; } }

Target:
public boolean isTrue ( ) throws android.support.test.uiautomator.UiObjectNotFoundException { return moreButton.exists ( ) ; }
Source:
public java.util.List < com.android.ide.common.api.MenuAction > callGetContextMenu ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy selectedNode ) { com.android.ide.common.api.IViewRule rule = loadRule ( selectedNode.getNode ( ) ) ; if ( rule != null ) { try { return rule.getContextMenu ( selectedNode ) ; } catch ( java.lang.Exception e ) { logError ( "%s.getContextMenu() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }

Target:
public java.util.List < com.android.ide.common.api.MenuAction > callGetContextMenu ( com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy selectedNode ) { com.android.ide.common.api.IViewRule rule = loadRule ( selectedNode.getNode ( ) ) ; if ( rule != null ) { try { mInsertType = com.android.ide.common.api.InsertType.CREATE ; return rule.getContextMenu ( selectedNode ) ; } catch ( java.lang.Exception e ) { logError ( "%s.getContextMenu() failed: %s" , rule.getClass ( ) . getSimpleName ( ) , e.toString ( ) ) ; } } return null ; }
Source:
public java.lang.CharSequence getAndroidCarrierNameForSubscription ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; return service.getSubscriptionCarrierName ( getSubId ( ) ) ; } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.IllegalStateException ( "Telephony service unavailable" ) ; } return null ; }

Target:
public java.lang.CharSequence getSimCarrierIdName ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getSubscriptionCarrierName ( getSubId ( ) ) ; } } catch ( android.os.RemoteException ex ) { ex.rethrowAsRuntimeException ( ) ; } return null ; }
Source:
public boolean apply ( java.util.Map.Entry < K , java.util.Collection < V > > entry ) { return ! ( c.contains ( entry.getKey ( ) ) ) ; }

Target:
public static < K , V > com.google.common.collect.SetMultimap < K , V > filterEntries ( com.google.common.collect.SetMultimap < K , V > unfiltered , com.google.common.base.Predicate < ? super java.util.Map.Entry < K , V > > entryPredicate ) { com.google.common.base.Preconditions.checkNotNull ( entryPredicate ) ; return unfiltered instanceof com.google.common.collect.FilteredSetMultimap ? com.google.common.collect.Multimaps.filterFiltered ( ( ( com.google.common.collect.FilteredSetMultimap < K , V > ) ( unfiltered ) ) , entryPredicate ) : new com.google.common.collect.FilteredEntrySetMultimap < K , V > ( com.google.common.base.Preconditions.checkNotNull ( unfiltered ) , entryPredicate ) ; }
Source:
public java.lang.String getText ( java.lang.Object element ) { if ( element instanceof com.android.sdklib.internal.repository.SdkSource ) { java.lang.String name = ( ( com.android.sdklib.internal.repository.SdkSource ) ( element ) ) . getUiName ( ) ; if ( name != null ) { return name ; } return ( ( com.android.sdklib.internal.repository.SdkSource ) ( element ) ) . getShortDescription ( ) ; } return super . getText ( element ) ; }

Target:
public java.lang.String getText ( java.lang.Object element ) { if ( element instanceof com.android.sdklib.internal.repository.sources.SdkSource ) { java.lang.String name = ( ( com.android.sdklib.internal.repository.sources.SdkSource ) ( element ) ) . getUiName ( ) ; if ( name != null ) { return name ; } return ( ( com.android.sdklib.internal.repository.sources.SdkSource ) ( element ) ) . getShortDescription ( ) ; } return super . getText ( element ) ; }
Source:
com.android.ahat.heapdump.ReferenceIterator getReferences ( ) { java.util.List < com.android.ahat.heapdump.Reference > refs = new java.util.AbstractList < com.android.ahat.heapdump.Reference > ( ) { @ java.lang.Override public int size ( ) { return mRoots.size ( ) ; } @ java.lang.Override public com.android.ahat.heapdump.Reference get ( int index ) { java.lang.String field = ( ".roots[" + ( java.lang.Integer.toString ( index ) ) ) + "]" ; return new com.android.ahat.heapdump.Reference ( null , field , mRoots.get ( index ) , true ) ; } } ; return new com.android.ahat.heapdump.ReferenceIterator ( refs ) ; }

Target:
java.lang.Iterable < com.android.ahat.heapdump.Reference > getReferences ( ) { return new java.util.AbstractList < com.android.ahat.heapdump.Reference > ( ) { @ java.lang.Override public int size ( ) { return mRoots.size ( ) ; } @ java.lang.Override public com.android.ahat.heapdump.Reference get ( int index ) { java.lang.String field = ( ".roots[" + ( java.lang.Integer.toString ( index ) ) ) + "]" ; return new com.android.ahat.heapdump.Reference ( null , field , mRoots.get ( index ) , true ) ; } } ; }
Source:
private void notifyAudioTrackInitializationError ( final com.google.android.exoplayer.audio.AudioTrack.InitializationException e ) { if ( ( ( mEventHandler ) == null ) || ( ( mEventListener ) == null ) ) { return ; } mEventHandler.post ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { mEventListener.onAudioTrackInitializationError ( e ) ; } } ) ; }

Target:
private void setStatus ( boolean enabled ) { if ( enabled == ( com.android.tv.tuner.exoplayer.ac3.Ac3DefaultTrackRenderer.AUDIO_TRACK.isEnabled ( ) ) ) { return ; } if ( ! enabled ) { mAudioClock.setPositionUs ( getPositionUs ( ) ) ; } com.android.tv.tuner.exoplayer.ac3.Ac3DefaultTrackRenderer.AUDIO_TRACK.setStatus ( enabled ) ; if ( enabled ) { seekTo ( mAudioClock.getPositionUs ( ) ) ; } }
Source:
public boolean putAll ( com.google.common.collect.Multimap < ? extends K , ? extends V > multimap ) { boolean changed = false ; for ( java.util.Map.Entry < ? extends K , ? extends V > entry : multimap.entries ( ) ) { changed |= put ( entry.getKey ( ) , entry.getValue ( ) ) ; } return changed ; }

Target:
public boolean containsValue ( @ javax.annotation.Nullable java.lang.Object value ) { return values ( ) . contains ( value ) ; }
Source:
private void onRadioOffOrNotAvailable ( ) { mReregisterOnReconnectFailure = false ; if ( ( mPhone.getSimulatedRadioControl ( ) ) != null ) { log ( "We're on the simulator; assuming radio off is meaningless" ) ; } else { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRadioOffOrNotAvailable: is off and clean up all connections" ) ; cleanUpAllConnections ( false , Phone.REASON_RADIO_TURNED_OFF ) ; } notifyOffApnsOfAvailability ( null ) ; }

Target:
private void onRadioOffOrNotAvailable ( ) { mReregisterOnReconnectFailure = false ; mAutoAttachOnCreation.set ( false ) ; if ( ( mPhone.getSimulatedRadioControl ( ) ) != null ) { log ( "We're on the simulator; assuming radio off is meaningless" ) ; } else { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( "onRadioOffOrNotAvailable: is off and clean up all connections" ) ; cleanUpAllConnections ( false , Phone.REASON_RADIO_TURNED_OFF ) ; } notifyOffApnsOfAvailability ( null ) ; }
Source:
protected android.app.Dialog onCreateDialog ( int id ) { switch ( id ) { case com.android.settings.quicklaunch.QuickLaunchSettings.DIALOG_CLEAR_SHORTCUT : { return new android.app.AlertDialog.Builder ( this ) . setTitle ( getString ( R.string.quick_launch_clear_dialog_title ) ) . setIcon ( android.R.drawable.ic_dialog_alert ) . setMessage ( getString ( R.string.quick_launch_clear_dialog_message , mClearDialogShortcut , mClearDialogBookmarkTitle ) ) . setPositiveButton ( R.string.quick_launch_clear_ok_button , this ) . setNegativeButton ( R.string.quick_launch_clear_cancel_button , this ) . create ( ) ; } } return super . onCreateDialog ( id ) ; }

Target:
protected android.app.Dialog onCreateDialog ( int id ) { switch ( id ) { case com.android.settings.quicklaunch.QuickLaunchSettings.DIALOG_CLEAR_SHORTCUT : { return new android.app.AlertDialog.Builder ( this ) . setTitle ( getString ( R.string.quick_launch_clear_dialog_title ) ) . setIconAttribute ( android.R.attr.alertDialogIcon ) . setMessage ( getString ( R.string.quick_launch_clear_dialog_message , mClearDialogShortcut , mClearDialogBookmarkTitle ) ) . setPositiveButton ( R.string.quick_launch_clear_ok_button , this ) . setNegativeButton ( R.string.quick_launch_clear_cancel_button , this ) . create ( ) ; } } return super . onCreateDialog ( id ) ; }