auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onIconResponse ( long bssid , java.lang.String fileName , byte [ ] data ) { android.content.Intent intent = new android.content.Intent ( android.net.wifi.WifiManager.ACTION_PASSPOINT_ICON ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_BSSID_LONG , bssid ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_ICON_INFO , new android.net.wifi.IconInfo ( fileName , data ) ) ; mContext.sendBroadcastAsUser ( intent , UserHandle.ALL , android.Manifest.permission.ACCESS_WIFI_STATE ) ; }

Target:
public void onIconResponse ( long bssid , java.lang.String fileName , byte [ ] data ) { android.content.Intent intent = new android.content.Intent ( android.net.wifi.WifiManager.ACTION_PASSPOINT_ICON ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_BSSID_LONG , bssid ) ; intent.putExtra ( android.net.wifi.WifiManager.EXTRA_FILENAME , fileName ) ; if ( data != null ) { intent.putExtra ( android.net.wifi.WifiManager.EXTRA_ICON , android.graphics.drawable.Icon.createWithData ( data , 0 , data.length ) ) ; } mContext.sendBroadcastAsUser ( intent , UserHandle.ALL , android.Manifest.permission.ACCESS_WIFI_STATE ) ; }
Source:
public void testSecureActivity ( ) throws java.lang.Exception { mTestActivity.startTest ( android.assist.cts.FlagSecureTest.TEST_CASE_TYPE ) ; waitForAssistantToBeReady ( mReadyLatch ) ; mTestActivity.start3pApp ( android.assist.cts.FlagSecureTest.TEST_CASE_TYPE ) ; waitForOnResume ( ) ; startSession ( ) ; waitForContext ( ) ; verifyAssistDataNullness ( false , false , false , false ) ; verifyAssistStructure ( android.assist.common.Utils.getTestAppComponent ( android.assist.cts.FlagSecureTest.TEST_CASE_TYPE ) , true ) ; }

Target:
public void testSecureActivity ( ) throws java.lang.Exception { if ( mActivityManager.isLowRamDevice ( ) ) { android.util.Log.d ( android.assist.cts.FlagSecureTest.TAG , "Not running assist tests on low-RAM device." ) ; return ; } mTestActivity.startTest ( android.assist.cts.FlagSecureTest.TEST_CASE_TYPE ) ; waitForAssistantToBeReady ( mReadyLatch ) ; mTestActivity.start3pApp ( android.assist.cts.FlagSecureTest.TEST_CASE_TYPE ) ; waitForOnResume ( ) ; startSession ( ) ; waitForContext ( ) ; verifyAssistDataNullness ( false , false , false , false ) ; verifyAssistStructure ( android.assist.common.Utils.getTestAppComponent ( android.assist.cts.FlagSecureTest.TEST_CASE_TYPE ) , true ) ; }
Source:
com.android.internal.telephony.cat.Menu getMainMenu ( int slotId ) { com.android.internal.telephony.cat.CatLog.d ( com.android.stk.StkAppService.LOG_TAG , ( "StkAppService, getMainMenu, sim id: " + slotId ) ) ; if ( ( ( slotId >= 0 ) && ( slotId < ( mSimCount ) ) ) && ( ( mStkContext [ slotId ] . mMainCmd ) != null ) ) { return mStkContext [ slotId ] . mMainCmd.getMenu ( ) ; } else { return null ; } }

Target:
private boolean isUrlAvailableToLaunchBrowser ( com.android.internal.telephony.cat.CatCmdMessage.BrowserSettings settings ) { java.lang.String url = android.os.SystemProperties.get ( com.android.stk.StkAppService.STK_BROWSER_DEFAULT_URL_SYSPROP , "" ) ; if ( ( url == "" ) && ( ( settings.url ) == null ) ) { return false ; } return true ; }
Source:
public void init ( org.eclipse.ui.IEditorSite site , org.eclipse.ui.IEditorInput input ) throws org.eclipse.ui.PartInitException { setSite ( site ) ; useNewEditorInput ( input ) ; if ( ( mTargetListener ) == null ) { mTargetListener = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.TargetListener ( ) ; com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . addTargetListener ( mTargetListener ) ; } }

Target:
public void init ( org.eclipse.ui.IEditorSite site , org.eclipse.ui.IEditorInput input ) throws org.eclipse.ui.PartInitException { setSite ( site ) ; useNewEditorInput ( input ) ; if ( ( mTargetListener ) == null ) { mTargetListener = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.TargetListener ( ) ; com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . addTargetListener ( mTargetListener ) ; com.android.ide.eclipse.adt.AdtPlugin.getDefault ( ) . refreshSdk ( ) ; } }
Source:
protected java.util.Map < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > getDropIdMap ( com.android.ide.common.api.INode targetNode , com.android.ide.common.api.IDragElement [ ] elements , boolean createNewIds ) { java.util.Map < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > idMap = new java.util.HashMap < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > ( ) ; if ( createNewIds ) { collectIds ( idMap , elements ) ; idMap = remapIds ( targetNode , idMap ) ; } return idMap ; }

Target:
protected static java.util.Map < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > getDropIdMap ( com.android.ide.common.api.INode targetNode , com.android.ide.common.api.IDragElement [ ] elements , boolean createNewIds ) { java.util.Map < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > idMap = new java.util.HashMap < java.lang.String , com.android.ide.common.layout.Pair < java.lang.String , java.lang.String > > ( ) ; if ( createNewIds ) { com.android.ide.common.layout.BaseLayoutRule.collectIds ( idMap , elements ) ; idMap = com.android.ide.common.layout.BaseLayoutRule.remapIds ( targetNode , idMap ) ; } return idMap ; }
Source:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , @ android.support.annotation.Nullable android.view.ViewGroup container , @ android.support.annotation.Nullable android.os.Bundle savedInstanceState ) { android.view.View view = inflater.inflate ( R.layout.new_voicemail_call_log_fragment , container , false ) ; recyclerView = view.findViewById ( R.id.new_voicemail_call_log_recycler_view ) ; getLoaderManager ( ) . restartLoader ( 0 , null , this ) ; return view ; }

Target:
public android.view.View onCreateView ( android.view.LayoutInflater inflater , @ android.support.annotation.Nullable android.view.ViewGroup container , @ android.support.annotation.Nullable android.os.Bundle savedInstanceState ) { com.android.dialer.common.LogUtil.enterBlock ( "NewVoicemailFragment.onCreateView" ) ; android.view.View view = inflater.inflate ( R.layout.new_voicemail_call_log_fragment , container , false ) ; recyclerView = view.findViewById ( R.id.new_voicemail_call_log_recycler_view ) ; getLoaderManager ( ) . restartLoader ( 0 , null , this ) ; return view ; }
Source:
private static java.util.List < org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch > getBranches ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.GithubAuthData auth , @ org.jetbrains.annotations.NotNull final java.lang.String user , @ org.jetbrains.annotations.NotNull final java.lang.String repo ) throws java.io.IOException { java.util.List < org.jetbrains.plugins.github.GithubBranch > branches = org.jetbrains.plugins.github.GithubApiUtil.getRepoBranches ( auth , user , repo ) ; return com.intellij.util.containers.ContainerUtil.map ( branches , new com.intellij.util.Function < org.jetbrains.plugins.github.GithubBranch , org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch > ( ) { @ java.lang.Override public org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch fun ( org.jetbrains.plugins.github.GithubBranch branch ) { return new org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch ( user , branch.getName ( ) , repo ) ; } } ) ; }

Target:
private static java.util.List < org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch > getBranches ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.util.GithubAuthData auth , @ org.jetbrains.annotations.NotNull final java.lang.String user , @ org.jetbrains.annotations.NotNull final java.lang.String repo ) throws java.io.IOException { java.util.List < org.jetbrains.plugins.github.GithubBranch > branches = org.jetbrains.plugins.github.GithubApiUtil.getRepoBranches ( auth , user , repo ) ; return com.intellij.util.containers.ContainerUtil.map ( branches , new com.intellij.util.Function < org.jetbrains.plugins.github.GithubBranch , org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch > ( ) { @ java.lang.Override public org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch fun ( org.jetbrains.plugins.github.GithubBranch branch ) { return new org.jetbrains.plugins.github.GithubCreatePullRequestAction.RemoteBranch ( user , branch.getName ( ) , repo ) ; } } ) ; }
Source:
public void testValidationProbeEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.ValidationProbeEvent.class ) , com.android.server.connectivity.MetricsTestUtil.anInt ( 120 ) , com.android.server.connectivity.MetricsTestUtil.aLong ( 40730 ) , com.android.server.connectivity.MetricsTestUtil.anInt ( ValidationProbeEvent.PROBE_HTTP ) , com.android.server.connectivity.MetricsTestUtil.anInt ( 204 ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " time_ms: 1" , " validation_probe_event <" , " latency_ms: 40730" , " network_id <" , " network_id: 120" , " >" , " probe_result: 204" , " probe_type: 1" , " >" , ">" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }

Target:
public void testValidationProbeEventSerialization ( ) { android.net.ConnectivityMetricsEvent ev = com.android.server.connectivity.MetricsTestUtil.describeIpEvent ( com.android.server.connectivity.MetricsTestUtil.aType ( android.net.metrics.ValidationProbeEvent.class ) , com.android.server.connectivity.MetricsTestUtil.anInt ( 120 ) , com.android.server.connectivity.MetricsTestUtil.aLong ( 40730 ) , com.android.server.connectivity.MetricsTestUtil.anInt ( ValidationProbeEvent.PROBE_HTTP ) , com.android.server.connectivity.MetricsTestUtil.anInt ( 204 ) ) ; java.lang.String want = com.android.server.connectivity.IpConnectivityEventBuilderTest.joinLines ( "dropped_events: 0" , "events <" , " time_ms: 1" , " validation_probe_event <" , " latency_ms: 40730" , " network_id <" , " network_id: 120" , " >" , " probe_result: 204" , " probe_type: 1" , " >" , ">" , "version: 2" ) ; com.android.server.connectivity.IpConnectivityEventBuilderTest.verifySerialization ( want , ev ) ; }
Source:
public android.content.pm.PackageInfo getPackageInfo ( java.lang.String packageName , int flags ) { final android.content.pm.PackageInfo info = new android.content.pm.PackageInfo ( ) ; final android.content.pm.Signature signature ; if ( "android" . equals ( packageName ) ) { signature = new android.content.pm.Signature ( "F00D" ) ; } else { signature = new android.content.pm.Signature ( "DEAD" ) ; } info.signatures = new android.content.pm.Signature [ ] { signature } ; return info ; }

Target:
public android.content.pm.PackageInfo answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { final java.lang.String packageName = ( ( java.lang.String ) ( invocation.getArguments ( ) [ 0 ] ) ) ; final android.content.pm.PackageInfo info = new android.content.pm.PackageInfo ( ) ; final android.content.pm.Signature signature ; if ( "android" . equals ( packageName ) ) { signature = new android.content.pm.Signature ( "F00D" ) ; } else { signature = new android.content.pm.Signature ( "DEAD" ) ; } info.signatures = new android.content.pm.Signature [ ] { signature } ; return info ; }
Source:
public void connectionForDeprecatedGetRequest ( ) throws java.lang.Exception { com.android.volley.mock.TestRequest.DeprecatedGet request = new com.android.volley.mock.TestRequest.DeprecatedGet ( ) ; assertEquals ( request.getMethod ( ) , Method.DEPRECATED_GET_OR_POST ) ; com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest ( mMockConnection , request ) ; assertEquals ( "GET" , mMockConnection.getRequestMethod ( ) ) ; assertFalse ( mMockConnection.getDoOutput ( ) ) ; }

Target:
protected java.net.HttpURLConnection createConnection ( java.net.URL url ) { return mMockConnection ; }
Source:
public void testSoftApFailureWhenActive ( ) throws java.lang.Exception { enterSoftApActiveMode ( ) ; mSoftApListener.onStateChanged ( WifiManager.WIFI_AP_STATE_FAILED , 0 ) ; mLooper.dispatchNext ( ) ; org.junit.Assert.assertEquals ( "SoftAPModeState" , mWifiStateMachinePrime.getCurrentMode ( ) ) ; verify ( mSoftApManager ) . stop ( ) ; }

Target:
public void testAPInterfaceFailedWhenSwitchingToApMode ( ) throws java.lang.Exception { when ( mWifiInjector.makeWificond ( ) ) . thenReturn ( mWificond ) ; when ( mWificond.createApInterface ( ) ) . thenReturn ( null ) ; mWifiStateMachinePrime.enterSoftAPMode ( null ) ; mLooper.dispatchAll ( ) ; org.junit.Assert.assertEquals ( com.android.server.wifi.WifiStateMachinePrimeTest.SOFT_AP_MODE_STATE_STRING , mWifiStateMachinePrime.getCurrentMode ( ) ) ; }
Source:
public static void setup ( ) throws java.lang.Exception { com.android.jack.ToolchainTest.CORE_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "core" ) ; com.android.jack.ToolchainTest.BOUNCY_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "bouncycastle" ) ; com.android.jack.ToolchainTest.JUNIT_SOURCELIST = com.android.jack.TestTools.getHostLibSourcelist ( "junit4-jack" ) ; java.io.File coreOut = com.android.jack.TestTools.createTempFile ( "core" , ".zip" ) ; com.android.jack.TestTools.compileSourceToJack ( new com.android.jack.Options ( ) , com.android.jack.ToolchainTest.CORE_SOURCELIST , null , coreOut , true ) ; com.android.jack.ToolchainTest.corePath = coreOut ; }

Target:
public static void setup ( ) throws java.lang.Exception { com.android.jack.ToolchainTest.CORE_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "core-libart" ) ; com.android.jack.ToolchainTest.BOUNCY_SOURCELIST = com.android.jack.TestTools.getTargetLibSourcelist ( "bouncycastle" ) ; com.android.jack.ToolchainTest.JUNIT_SOURCELIST = com.android.jack.TestTools.getHostLibSourcelist ( "junit4-hostdex-jack" ) ; java.io.File coreOut = com.android.jack.TestTools.createTempFile ( "core" , ".zip" ) ; com.android.jack.Options options = new com.android.jack.Options ( ) ; options.addProperty ( Options.JAVA_SOURCE_VERSION.getName ( ) , JavaVersion.JAVA_7.toString ( ) ) ; com.android.jack.TestTools.compileSourceToJack ( options , com.android.jack.ToolchainTest.CORE_SOURCELIST , null , coreOut , true ) ; com.android.jack.ToolchainTest.corePath = coreOut ; }
Source:
protected void computeResult ( ) { org.eclipse.jface.viewers.TreePath treeSelection = getSelection ( ) ; if ( treeSelection != null ) { if ( ( treeSelection.getSegmentCount ( ) ) == 2 ) { com.android.resources.ResourceType resourceType = ( ( com.android.resources.ResourceType ) ( treeSelection.getFirstSegment ( ) ) ) ; com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem resourceItem = ( ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceItem ) ( treeSelection.getLastSegment ( ) ) ) ; mCurrentResource = resourceItem.getXmlString ( resourceType , false ) ; } } }

Target:
protected void computeResult ( ) { org.eclipse.jface.viewers.TreePath treeSelection = getSelection ( ) ; if ( treeSelection != null ) { if ( ( treeSelection.getSegmentCount ( ) ) == 2 ) { com.android.resources.ResourceType resourceType = ( ( com.android.resources.ResourceType ) ( treeSelection.getFirstSegment ( ) ) ) ; com.android.ide.common.resources.ResourceItem resourceItem = ( ( com.android.ide.common.resources.ResourceItem ) ( treeSelection.getLastSegment ( ) ) ) ; mCurrentResource = resourceItem.getXmlString ( resourceType , false ) ; } } }
Source:
public void uselessMovInstructions ( ) throws java.lang.Exception { java.io.File out = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "uselessMovInstructions" , ".dex" ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.srcToExe ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( toolchain.getDefaultBootClasspath ( ) ) , out , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.trycatch.test004" ) ) ; org.jf.dexlib.DexFile dexFile = new org.jf.dexlib.DexFile ( out ) ; org.jf.dexlib.CodeItem ci = com.android.jack.TestTools.getEncodedMethod ( dexFile , "Lcom/android/jack/trycatch/test004/jack/TryCatch;" , "setIconAndText" , "(IIILjava/lang/String;II)V" ) . codeItem ; junit.framework.Assert.assertFalse ( hasOpcode ( ci , Opcode.MOVE_OBJECT ) ) ; }

Target:
public void uselessMovInstructions ( ) throws java.lang.Exception { java.io.File out = com.android.jack.test.toolchain.AbstractTestTools.createTempFile ( "uselessMovInstructions" , ".dex" ) ; com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; toolchain.addToClasspath ( toolchain.getDefaultBootClasspath ( ) ) . srcToExe ( out , false , com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.trycatch.test004" ) ) ; org.jf.dexlib.DexFile dexFile = new org.jf.dexlib.DexFile ( out ) ; org.jf.dexlib.CodeItem ci = com.android.jack.TestTools.getEncodedMethod ( dexFile , "Lcom/android/jack/trycatch/test004/jack/TryCatch;" , "setIconAndText" , "(IIILjava/lang/String;II)V" ) . codeItem ; junit.framework.Assert.assertFalse ( hasOpcode ( ci , Opcode.MOVE_OBJECT ) ) ; }
Source:
protected boolean canMutate ( dexfuzz.program.MutatableCode mutatableCode ) { if ( ( mutatableCode.triesSize ) > 0 ) { return true ; } dexfuzz.Log.debug ( "Method contains no tries." ) ; return false ; }

Target:
protected boolean canMutate ( dexfuzz.program.MutatableCode mutatableCode ) { if ( ( mutatableCode.triesSize ) == 0 ) { dexfuzz.Log.debug ( "Method contains no tries." ) ; return false ; } if ( ( mutatableCode.getInstructionCount ( ) ) <= 1 ) { dexfuzz.Log.debug ( "Not enough instructions to shift try block." ) ; return false ; } return true ; }
Source:
private static com.android.jack.dx.rop.type.Type putIntern ( com.android.jack.dx.rop.type.Type type ) { synchronized ( com.android.jack.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.getDescriptor ( ) ; com.android.jack.dx.rop.type.Type already = com.android.jack.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.jack.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }

Target:
private static com.android.jack.dx.rop.type.Type putIntern ( com.android.jack.dx.rop.type.Type type ) { synchronized ( com.android.jack.dx.rop.type.Type.internTable ) { java.lang.String descriptor = type.descriptor ; com.android.jack.dx.rop.type.Type already = com.android.jack.dx.rop.type.Type.internTable.get ( descriptor ) ; if ( already != null ) { return already ; } com.android.jack.dx.rop.type.Type.internTable.put ( descriptor , type ) ; return type ; } }
Source:
public boolean mayThrowExceptions ( proguard.optimize.info.Clazz clazz , proguard.optimize.info.Method method , proguard.classfile.attribute.CodeAttribute codeAttribute , int offset , proguard.optimize.info.Instruction instruction ) { mayThrowExceptions = false ; instruction.accept ( clazz , method , codeAttribute , offset , this ) ; return mayThrowExceptions ; }

Target:
public boolean mayThrowExceptions ( proguard.optimize.info.Clazz clazz , proguard.optimize.info.Method method , proguard.classfile.attribute.CodeAttribute codeAttribute , int startOffset , int endOffset ) { byte [ ] code = codeAttribute.code ; int offset = startOffset ; while ( offset < endOffset ) { proguard.optimize.info.Instruction instruction = proguard.optimize.info.InstructionFactory.create ( code , offset ) ; if ( mayThrowExceptions ( clazz , method , codeAttribute , offset , instruction ) ) { return true ; } offset += instruction.length ( offset ) ; } return false ; }
Source:
public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel ( int subId , java.lang.String AID ) { enforceModifyPermissionOrCarrierPrivilege ( subId ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( "iccOpenLogicalChannel: subId=" + subId ) + " aid=" ) + AID ) ) ; android.telephony.IccOpenLogicalChannelResponse response = ( ( android.telephony.IccOpenLogicalChannelResponse ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_OPEN_CHANNEL , AID , subId ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "iccOpenLogicalChannel: " + response ) ) ; return response ; }

Target:
public boolean isConcurrentVoiceAndDataAllowed ( int subId ) { final com.android.internal.telephony.Phone phone = getPhone ( subId ) ; return phone == null ? false : phone.isConcurrentVoiceAndDataAllowed ( ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( ! ( intent.getAction ( ) . equals ( com.android.pmc.A2dpReceiver.A2DP_INTENT ) ) ) return ; boolean alarm = intent.hasExtra ( com.android.pmc.A2dpReceiver.A2DP_ALARM ) ; if ( alarm ) { android.util.Log.d ( com.android.pmc.A2dpReceiver.TAG , "Received Alarm broadcast message" ) ; handleAlarm ( intent ) ; } else { android.util.Log.d ( com.android.pmc.A2dpReceiver.TAG , "Received PMC command message" ) ; processParameters ( intent ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { if ( ! ( intent.getAction ( ) . equals ( com.android.pmc.A2dpReceiver.A2DP_INTENT ) ) ) return ; boolean alarm = intent.hasExtra ( com.android.pmc.A2dpReceiver.A2DP_ALARM ) ; if ( alarm ) { android.util.Log.v ( com.android.pmc.A2dpReceiver.TAG , "Alarm Message to Stop playing" ) ; mPMCStatusLogger.logStatus ( "SUCCEED" ) ; mPlayer.stop ( ) ; mPlayer.release ( ) ; } else { android.util.Log.d ( com.android.pmc.A2dpReceiver.TAG , "Received PMC command message" ) ; processParameters ( intent ) ; } }
Source:
private int getClientId ( final int globalId ) { for ( int i = 0 , nSize = mClientIds.size ( ) ; i < nSize ; i ++ ) { int mDnsId = mClientIds.valueAt ( i ) ; if ( globalId == mDnsId ) { return mClientIds.keyAt ( i ) ; } } return - 1 ; }

Target:
private int getClientId ( final int globalId ) { int idx = mClientIds.indexOfValue ( globalId ) ; if ( idx < 0 ) { return idx ; } return mClientIds.keyAt ( idx ) ; }
Source:
public void interfaceRemoved ( java.lang.String iface ) { if ( com.android.server.connectivity.Tethering.VDBG ) android.util.Log.d ( com.android.server.connectivity.Tethering.TAG , ( "interfaceRemoved " + iface ) ) ; synchronized ( mPublicSync ) { com.android.server.connectivity.Tethering.TetherState tetherState = mTetherStates.get ( iface ) ; if ( tetherState == null ) { if ( com.android.server.connectivity.Tethering.VDBG ) { android.util.Log.e ( com.android.server.connectivity.Tethering.TAG , ( ( "attempting to remove unknown iface (" + iface ) + "), ignoring" ) ) ; } return ; } tetherState.mStateMachine.sendMessage ( TetherInterfaceStateMachine.CMD_INTERFACE_DOWN ) ; mTetherStates.remove ( iface ) ; } }

Target:
public void interfaceRemoved ( java.lang.String iface ) { if ( com.android.server.connectivity.Tethering.VDBG ) android.util.Log.d ( com.android.server.connectivity.Tethering.TAG , ( "interfaceRemoved " + iface ) ) ; synchronized ( mPublicSync ) { com.android.server.connectivity.Tethering.TetherState tetherState = mTetherStates.get ( iface ) ; if ( tetherState == null ) { if ( com.android.server.connectivity.Tethering.VDBG ) { android.util.Log.e ( com.android.server.connectivity.Tethering.TAG , ( ( "attempting to remove unknown iface (" + iface ) + "), ignoring" ) ) ; } return ; } tetherState.stateMachine.sendMessage ( TetherInterfaceStateMachine.CMD_INTERFACE_DOWN ) ; mTetherStates.remove ( iface ) ; } }
Source:
private void cancelUserTimeoutAlarm ( ) { if ( com.android.bluetooth.sap.SapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.sap.SapService.TAG , "cancelUserTimeOutAlarm()" ) ; android.content.Intent timeoutIntent = new android.content.Intent ( com.android.bluetooth.sap.SapService.USER_CONFIRM_TIMEOUT_ACTION ) ; android.app.PendingIntent sender = android.app.PendingIntent.getBroadcast ( this , 0 , timeoutIntent , 0 ) ; android.app.AlarmManager alarmManager = ( ( android.app.AlarmManager ) ( this . getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarmManager.cancel ( sender ) ; mRemoveTimeoutMsg = false ; }

Target:
private void cancelUserTimeoutAlarm ( ) { if ( com.android.bluetooth.sap.SapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.sap.SapService.TAG , "cancelUserTimeOutAlarm()" ) ; if ( ( mAlarmManager ) == null ) { mAlarmManager = ( ( android.app.AlarmManager ) ( this . getSystemService ( Context.ALARM_SERVICE ) ) ) ; } if ( mRemoveTimeoutMsg ) { android.content.Intent timeoutIntent = new android.content.Intent ( com.android.bluetooth.sap.SapService.USER_CONFIRM_TIMEOUT_ACTION ) ; android.app.PendingIntent sender = android.app.PendingIntent.getBroadcast ( this , 0 , timeoutIntent , 0 ) ; mAlarmManager.cancel ( sender ) ; mRemoveTimeoutMsg = false ; } }
Source:
public void run ( ) { mCanvas = new android.view.cts.SurfaceViewStubActivity.MockCanvas ( android.graphics.Bitmap.createBitmap ( android.view.cts.SurfaceViewStubActivity.MockSurfaceView.BITMAP_WIDTH , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.BITMAP_HEIGHT , Bitmap.Config.ARGB_8888 ) ) ; draw ( mCanvas ) ; android.graphics.Canvas canvas = mHolder.lockCanvas ( ) ; android.graphics.Paint paint = new android.graphics.Paint ( android.graphics.Paint.ANTI_ALIAS_FLAG ) ; paint.setColor ( Color.BLUE ) ; canvas.drawRect ( android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_LEFT , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_TOP , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_RIGHT , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_BOTTOM , paint ) ; mHolder.unlockCanvasAndPost ( canvas ) ; }

Target:
public void surfaceCreated ( android.view.SurfaceHolder holder ) { mCanvas = new android.view.cts.SurfaceViewStubActivity.MockCanvas ( android.graphics.Bitmap.createBitmap ( android.view.cts.SurfaceViewStubActivity.MockSurfaceView.BITMAP_WIDTH , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.BITMAP_HEIGHT , Bitmap.Config.ARGB_8888 ) ) ; draw ( mCanvas ) ; android.graphics.Canvas canvas = mHolder.lockCanvas ( ) ; android.graphics.Paint paint = new android.graphics.Paint ( android.graphics.Paint.ANTI_ALIAS_FLAG ) ; paint.setColor ( Color.BLUE ) ; canvas.drawRect ( android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_LEFT , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_TOP , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_RIGHT , android.view.cts.SurfaceViewStubActivity.MockSurfaceView.RECT_BOTTOM , paint ) ; mHolder.unlockCanvasAndPost ( canvas ) ; }
Source:
protected void transform ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JNode newNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.Transformation transformation ) throws java.lang.UnsupportedOperationException { if ( ! ( transform ( params , existingNode , ( ( com.android.jack.ir.ast.JParameter ) ( newNode ) ) , transformation ) ) ) { if ( ! ( annotations.transform ( existingNode , newNode , transformation ) ) ) { super . transform ( existingNode , newNode , transformation ) ; } } }

Target:
protected void transform ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JNode newNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.Transformation transformation ) throws java.lang.UnsupportedOperationException { if ( ! ( transform ( params , existingNode , ( ( com.android.jack.ir.ast.JParameter ) ( newNode ) ) , transformation ) ) ) { if ( ! ( transform ( annotations , existingNode , ( ( com.android.jack.ir.ast.JAnnotation ) ( newNode ) ) , transformation ) ) ) { super . transform ( existingNode , newNode , transformation ) ; } } }
Source:
private boolean isSecure ( ) { com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode unlockMode = getUnlockMode ( ) ; if ( unlockMode == ( com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode.Pattern ) ) { return mLockPatternUtils.isLockPatternEnabled ( ) ; } else if ( unlockMode == ( com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode.SimPin ) ) { return ( ( mUpdateMonitor.getSimState ( ) ) == ( SimCard.State.PIN_REQUIRED ) ) || ( ( mUpdateMonitor.getSimState ( ) ) == ( SimCard.State.PUK_REQUIRED ) ) ; } else if ( unlockMode == ( com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode.Account ) ) { return true ; } else { throw new java.lang.IllegalStateException ( ( "unknown unlock mode " + unlockMode ) ) ; } }

Target:
private boolean isSecure ( ) { com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode unlockMode = getUnlockMode ( ) ; if ( unlockMode == ( com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode.Pattern ) ) { return mLockPatternUtils.isLockPatternEnabled ( ) ; } else if ( unlockMode == ( com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode.SimPin ) ) { return ( ( mUpdateMonitor.getSimState ( ) ) == ( IccCard.State.PIN_REQUIRED ) ) || ( ( mUpdateMonitor.getSimState ( ) ) == ( IccCard.State.PUK_REQUIRED ) ) ; } else if ( unlockMode == ( com.android.internal.policy.impl.LockPatternKeyguardView.UnlockMode.Account ) ) { return true ; } else { throw new java.lang.IllegalStateException ( ( "unknown unlock mode " + unlockMode ) ) ; } }
Source:
public void testDeregistration ( ) throws java.lang.Exception { android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback callback = new android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback ( android.telephony.mbms.DownloadStateCallback.ALL_UPDATES ) ; android.telephony.mbms.DownloadRequest request = android.telephony.embms.cts.DOWNLOAD_REQUEST_TEMPLATE.build ( ) ; mDownloadSession.registerStateCallback ( request , callback , mCallbackHandler ) ; mDownloadSession.unregisterStateCallback ( request , callback ) ; mMiddlewareControl.fireOnStateUpdated ( null , null , 0 ) ; assertNull ( callback.waitOnStateUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; mMiddlewareControl.fireOnProgressUpdated ( null , null , 0 , 0 , 0 , 0 ) ; assertNull ( callback.waitOnProgressUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; }

Target:
public void testDeregistration ( ) throws java.lang.Exception { android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback callback = new android.telephony.embms.cts.MbmsDownloadStateCallbackTest.TestDSCallback ( android.telephony.mbms.DownloadStateCallback.ALL_UPDATES ) ; android.telephony.mbms.DownloadRequest request = downloadRequestTemplate.build ( ) ; mDownloadSession.registerStateCallback ( request , mCallbackExecutor , callback ) ; mDownloadSession.unregisterStateCallback ( request , callback ) ; mMiddlewareControl.fireOnStateUpdated ( null , null , 0 ) ; assertNull ( callback.waitOnStateUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; mMiddlewareControl.fireOnProgressUpdated ( null , null , 0 , 0 , 0 , 0 ) ; assertNull ( callback.waitOnProgressUpdated ( android.telephony.embms.cts.MbmsDownloadStateCallbackTest.SHORT_TIMEOUT ) ) ; }
Source:
public void dragEnter ( org.eclipse.swt.dnd.DropTargetEvent event ) { if ( ( mCurrentGesture ) == null ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.Gesture newGesture = mZombieGesture ; if ( newGesture == null ) { newGesture = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.MoveGesture ( mCanvas ) ; } else { mZombieGesture = null ; } startGesture ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( mCanvas , event ) , newGesture , 0 ) ; } if ( ( mCurrentGesture ) instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) { ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) ( mCurrentGesture ) ) . dragEnter ( event ) ; } }

Target:
public void dragEnter ( org.eclipse.swt.dnd.DropTargetEvent event ) { mCanvas.showInvisibleViews ( true ) ; if ( ( mCurrentGesture ) == null ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.Gesture newGesture = mZombieGesture ; if ( newGesture == null ) { newGesture = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.MoveGesture ( mCanvas ) ; } else { mZombieGesture = null ; } startGesture ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.ControlPoint.create ( mCanvas , event ) , newGesture , 0 ) ; } if ( ( mCurrentGesture ) instanceof com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) { ( ( com.android.ide.eclipse.adt.internal.editors.layout.gle2.DropGesture ) ( mCurrentGesture ) ) . dragEnter ( event ) ; } }
Source:
char [ ] getDigitsLocal ( ) { if ( ( digits ) != null ) { return digits ; } else { char [ ] digitArray = new char [ 10 ] ; for ( int i = 0 ; i < 10 ; i ++ ) { digitArray [ i ] = ( ( char ) ( ( zeroDigit ) + i ) ) ; } return digitArray ; } }

Target:
public java.lang.String getPerMillString ( ) { return perMillString ; }
Source:
public static void initialize ( com.android.utils.ILogger logger , java.io.File out ) throws java.io.IOException { synchronized ( com.android.builder.profile.ProcessRecorderFactory.LOCK ) { if ( ( com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.isInitialized ( ) ) || ( ! ( com.android.builder.profile.ProcessRecorderFactory.isEnabled ( ) ) ) ) { return ; } com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setLogger ( logger ) ; com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setRecordWriter ( new com.android.builder.profile.ProcessRecorder.JsonRecordWriter ( new java.io.FileWriter ( out ) ) ) ; } }

Target:
public static void initialize ( com.android.utils.ILogger logger , java.io.File out ) throws java.io.IOException { synchronized ( com.android.builder.profile.ProcessRecorderFactory.LOCK ) { if ( ( com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.isInitialized ( ) ) || ( ! ( com.android.builder.profile.ProcessRecorderFactory.isEnabled ( ) ) ) ) { return ; } com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setLogger ( logger ) ; com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setOutputFile ( out ) ; com.android.builder.profile.ProcessRecorderFactory.sINSTANCE.setRecordWriter ( new com.android.builder.profile.ProcessRecorder.JsonRecordWriter ( new java.io.FileWriter ( out ) ) ) ; com.android.builder.profile.ProcessRecorderFactory.publishInitialRecords ( ) ; } }
Source:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod method , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.MethodInfo m = findMethod ( method ) ; if ( m == null ) { return null ; } if ( ( m.annotations ) != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : m.annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }

Target:
public com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation getAnnotation ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedField field , @ com.android.annotations.NonNull java.lang.String type ) { com.android.tools.lint.ExternalAnnotationRepository.FieldInfo f = findField ( field ) ; if ( f == null ) { return null ; } java.util.List < com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation > annotations = f.getAnnotations ( ) ; if ( annotations != null ) { for ( com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation : annotations ) { if ( type.equals ( annotation.getSignature ( ) ) ) { return annotation ; } } } return null ; }
Source:
protected void setUp ( ) throws java.lang.Exception { mMockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IDevice.class ) ; org.easymock.EasyMock.expect ( mMockDevice.getName ( ) ) . andStubReturn ( "serial" ) ; mMockListener = org.easymock.EasyMock.createNiceMock ( com.android.ddmlib.testrunner.ITestRunListener.class ) ; mRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_PACKAGE , com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_RUNNER , mMockDevice ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { mMockDevice = org.easymock.EasyMock.createMock ( com.android.ddmlib.IShellEnabledDevice.class ) ; org.easymock.EasyMock.expect ( mMockDevice.getName ( ) ) . andStubReturn ( "serial" ) ; mMockListener = org.easymock.EasyMock.createNiceMock ( com.android.ddmlib.testrunner.ITestRunListener.class ) ; mRunner = new com.android.ddmlib.testrunner.RemoteAndroidTestRunner ( com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_PACKAGE , com.android.ddmlib.testrunner.RemoteAndroidTestRunnerTest.TEST_RUNNER , mMockDevice ) ; }
Source:
private void setAndBroadcastNetworkSetTimeZone ( java.lang.String zoneId ) { if ( DBG ) log ( ( "setAndBroadcastNetworkSetTimeZone: setTimeZone=" + zoneId ) ) ; android.app.AlarmManager alarm = ( ( android.app.AlarmManager ) ( phone.getContext ( ) . getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarm.setTimeZone ( zoneId ) ; android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_NETWORK_SET_TIMEZONE ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time-zone" , zoneId ) ; phone.getContext ( ) . sendStickyBroadcast ( intent ) ; }

Target:
private void setAndBroadcastNetworkSetTimeZone ( java.lang.String zoneId ) { if ( DBG ) log ( ( "setAndBroadcastNetworkSetTimeZone: setTimeZone=" + zoneId ) ) ; android.app.AlarmManager alarm = ( ( android.app.AlarmManager ) ( phone.getContext ( ) . getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarm.setTimeZone ( zoneId ) ; android.content.Intent intent = new android.content.Intent ( com.android.internal.telephony.TelephonyIntents.ACTION_NETWORK_SET_TIMEZONE ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time-zone" , zoneId ) ; phone.getContext ( ) . sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }
Source:
public void untrackSignificantWifiChange ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , "untrackSignificantWifiChange not supported" ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( ( com.android.server.wifi.WifiNative.sSignificantWifiChangeCmdId ) != 0 ) { com.android.server.wifi.WifiNative.untrackSignificantWifiChangeNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sSignificantWifiChangeCmdId ) ; com.android.server.wifi.WifiNative.sSignificantWifiChangeCmdId = 0 ; com.android.server.wifi.WifiNative.sSignificantWifiChangeHandler = null ; } } } } }

Target:
public void untrackSignificantWifiChange ( ) { android.util.Log.e ( mTAG , "untrackSignificantWifiChange not supported" ) ; }
Source:
public boolean hasResources ( com.android.ide.eclipse.adt.internal.resources.ResourceType type ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType [ ] folderTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedFolders ( type ) ; boolean valid = false ; for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType rft : folderTypes ) { if ( rft == ( mType ) ) { valid = true ; break ; } } if ( valid ) { if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { if ( f.hasResources ( type ) ) { return true ; } } } } return false ; }

Target:
public boolean hasResources ( com.android.resources.ResourceType type ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType [ ] folderTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedFolders ( type ) ; boolean valid = false ; for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType rft : folderTypes ) { if ( rft == ( mType ) ) { valid = true ; break ; } } if ( valid ) { if ( ( mFiles ) != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFile f : mFiles ) { if ( f.hasResources ( type ) ) { return true ; } } } } return false ; }
Source:
private static char [ ] getCharArrayField ( com.android.tools.perflib.heap.Instance inst , java.lang.String fieldName ) { java.lang.Object value = com.android.ahat.InstanceUtils.getField ( inst , fieldName ) ; if ( ! ( value instanceof com.android.tools.perflib.heap.Instance ) ) { return null ; } return com.android.ahat.InstanceUtils.asCharArray ( ( ( com.android.tools.perflib.heap.Instance ) ( value ) ) ) ; }

Target:
private static int getIntField ( com.android.tools.perflib.heap.Instance inst , java.lang.String fieldName , int def ) { java.lang.Integer value = com.android.ahat.InstanceUtils.getIntField ( inst , fieldName ) ; return value == null ? def : value ; }
Source:
public void testKill ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testKill" ) ; fail ( "Expected remote failure" ) ; } catch ( java.lang.AssertionError expected ) { } }

Target:
public void testFail ( ) throws java.lang.Exception { assertNull ( getDevice ( ) . installPackage ( com.android.cts.migration.MigrationHelper.getTestFile ( mCtsBuild , android.appsecurity.cts.PermissionsHostTest.APK_23 ) , false , false ) ) ; try { runDeviceTests ( android.appsecurity.cts.PermissionsHostTest.USES_PERMISSION_PKG , "com.android.cts.usepermission.UsePermissionTest23" , "testFail" ) ; fail ( "Expected remote failure" ) ; } catch ( java.lang.AssertionError expected ) { } }
Source:
public void testStaging_install_noCurrent ( ) 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.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; libcore.tzdata.shared2.TimeZoneDistro stagedDistro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataStagedDir , stagedDistro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDeviceDirContainsDistro ( dataCurrentDir , stagedDistro ) ; }

Target:
public void testStaging_install_noCurrent ( ) 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.cts.tzdata.TzDataCheckTest.PathPair dataStagedDir = mDataDir.createSubPath ( com.android.cts.tzdata.TzDataCheckTest.STAGED_DIR_NAME ) ; com.android.timezone.distro.TimeZoneDistro stagedDistro = com.android.cts.tzdata.TzDataCheckTest.createValidDistroBuilder ( ) . build ( ) ; com.android.cts.tzdata.TzDataCheckTest.unpackOnHost ( dataStagedDir , stagedDistro ) ; pushHostTestDirToDevice ( ) ; assertEquals ( 0 , runTzDataCheckOnDevice ( ) ) ; assertDevicePathDoesNotExist ( dataStagedDir ) ; assertDeviceDirContainsDistro ( dataCurrentDir , stagedDistro ) ; }
Source:
private java.util.List < java.io.File > getGeneratedResFolders ( ) { java.util.List < java.io.File > generatedResFolders = com.google.common.collect.Lists.newArrayList ( renderscriptCompileTask.getResOutputDir ( ) , generateResValuesTask.getResOutputDir ( ) ) ; if ( ( extraGeneratedResFolders ) != null ) { generatedResFolders.addAll ( extraGeneratedResFolders ) ; } if ( ( ( generateApkDataTask ) != null ) && ( getVariantConfiguration ( ) . getBuildType ( ) . isEmbedMicroApp ( ) ) ) { generatedResFolders.add ( generateApkDataTask.getResOutputDir ( ) ) ; } return generatedResFolders ; }

Target:
private java.util.List < java.io.File > getGeneratedResFolders ( ) { java.util.List < java.io.File > generatedResFolders = com.google.common.collect.Lists.newArrayList ( scope.getRenderscriptResOutputDir ( ) , scope.getGeneratedResOutputDir ( ) ) ; if ( ( extraGeneratedResFolders ) != null ) { generatedResFolders.addAll ( extraGeneratedResFolders ) ; } if ( ( ( generateApkDataTask ) != null ) && ( getVariantConfiguration ( ) . getBuildType ( ) . isEmbedMicroApp ( ) ) ) { generatedResFolders.add ( generateApkDataTask.getResOutputDir ( ) ) ; } return generatedResFolders ; }
Source:
public boolean handlePinMmi ( java.lang.String dialString ) { com.android.internal.telephony.gsm.GsmMmiCode mmi = com.android.internal.telephony.gsm.GsmMmiCode.newFromDialString ( dialString , this , mUiccApplication.get ( ) ) ; if ( ( mmi != null ) && ( mmi.isPinCommand ( ) ) ) { mPendingMMIs.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.processCode ( ) ; return true ; } return false ; }

Target:
public boolean handlePinMmi ( java.lang.String dialString ) { com.android.internal.telephony.gsm.GsmMmiCode mmi = com.android.internal.telephony.gsm.GsmMmiCode.newFromDialString ( dialString , this , mUiccApplication.get ( ) ) ; if ( ( mmi != null ) && ( mmi.isPinPukCommand ( ) ) ) { mPendingMMIs.add ( mmi ) ; mMmiRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , mmi , null ) ) ; mmi.processCode ( ) ; return true ; } return false ; }
Source:
public void reloadAvds ( com.android.sdklib.ISdkLog log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { java.util.ArrayList < com.android.sdklib.internal.avd.AvdManager.AvdInfo > allList = new java.util.ArrayList < com.android.sdklib.internal.avd.AvdManager.AvdInfo > ( ) ; buildAvdList ( allList , log ) ; synchronized ( mAllAvdList ) { mAllAvdList.clear ( ) ; mAllAvdList.addAll ( allList ) ; mValidAvdList = mBrokenAvdList = null ; } }

Target:
public void reloadAvds ( com.android.sdklib.ISdkLog log ) throws com.android.prefs.AndroidLocation.AndroidLocationException { java.util.ArrayList < com.android.sdklib.internal.avd.AvdInfo > allList = new java.util.ArrayList < com.android.sdklib.internal.avd.AvdInfo > ( ) ; buildAvdList ( allList , log ) ; synchronized ( mAllAvdList ) { mAllAvdList.clear ( ) ; mAllAvdList.addAll ( allList ) ; mValidAvdList = mBrokenAvdList = null ; } }
Source:
public boolean setPhonebookAccessPermission ( int value ) { if ( ( android.bluetooth.BluetoothDevice.sService ) == null ) { return false ; } try { return android.bluetooth.BluetoothDevice.sService.setPhonebookAccessPermission ( this , value ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public int getSimAccessPermission ( ) { final android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( service == null ) { return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; } try { return service.getSimAccessPermission ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return android.bluetooth.BluetoothDevice.ACCESS_UNKNOWN ; }