auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testNotMergedAttr ( ) throws java.lang.Exception { com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; java.io.File folder = com.android.ide.common.res2.ResourceMergerTest.getWrittenResources ( ) ; com.android.ide.common.res2.ResourceSet writtenSet = new com.android.ide.common.res2.ResourceSet ( "unused" ) ; writtenSet.addSource ( folder ) ; writtenSet.loadFromFiles ( logger ) ; java.util.List < com.android.ide.common.res2.ResourceItem > items = writtenSet.getDataMap ( ) . get ( "attr/blah" ) ; assertEquals ( 1 , items.size ( ) ) ; assertTrue ( items.get ( 0 ) . getIgnoredFromDiskMerge ( ) ) ; checkLogger ( logger ) ; }

Target:
public void testNotMergedAttr ( ) throws java.lang.Exception { com.android.ide.common.res2.RecordingLogger logger = new com.android.ide.common.res2.RecordingLogger ( ) ; java.io.File folder = getWrittenResources ( ) ; com.android.ide.common.res2.ResourceSet writtenSet = new com.android.ide.common.res2.ResourceSet ( "unused" ) ; writtenSet.addSource ( folder ) ; writtenSet.loadFromFiles ( logger ) ; java.util.List < com.android.ide.common.res2.ResourceItem > items = writtenSet.getDataMap ( ) . get ( "attr/blah" ) ; assertEquals ( 1 , items.size ( ) ) ; assertTrue ( items.get ( 0 ) . getIgnoredFromDiskMerge ( ) ) ; checkLogger ( logger ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mHasFeature = ( ( mHasFeature ) && ( ( getMaxNumberOfUsersSupported ( ) ) > 1 ) ) && ( hasDeviceFeature ( "android.software.managed_users" ) ) ; if ( mHasFeature ) { mUserId = createManagedProfile ( ) ; installApp ( com.android.cts.devicepolicy.ManagedProfileTest.MANAGED_PROFILE_APK ) ; setProfileOwner ( ( ( ( com.android.cts.devicepolicy.ManagedProfileTest.MANAGED_PROFILE_PKG ) + "/" ) + ( com.android.cts.devicepolicy.ManagedProfileTest.ADMIN_RECEIVER_TEST_CLASS ) ) , mUserId ) ; startUser ( mUserId ) ; } }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mHasFeature = ( mHasFeature ) && ( hasDeviceFeature ( "android.software.managed_users" ) ) ; if ( mHasFeature ) { mUserId = createManagedProfile ( ) ; installApp ( com.android.cts.devicepolicy.ManagedProfileTest.MANAGED_PROFILE_APK ) ; setProfileOwner ( ( ( ( com.android.cts.devicepolicy.ManagedProfileTest.MANAGED_PROFILE_PKG ) + "/" ) + ( com.android.cts.devicepolicy.ManagedProfileTest.ADMIN_RECEIVER_TEST_CLASS ) ) , mUserId ) ; startUser ( mUserId ) ; } }
Source:
public int getRawTargetSdkVersion ( ) { com.google.common.base.Optional < com.android.manifmerger.XmlElement > usesSdk = getByTypeAndKey ( ManifestModel.NodeTypes.USES_SDK , null ) ; if ( usesSdk.isPresent ( ) ) { com.google.common.base.Optional < com.android.manifmerger.XmlAttribute > targetSdkVersion = usesSdk.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:targetSdkVersion" ) ) ; if ( targetSdkVersion.isPresent ( ) ) { return java.lang.Integer.parseInt ( targetSdkVersion.get ( ) . getValue ( ) ) ; } } return getMinSdkVersion ( ) ; }

Target:
private java.lang.String getRawTargetSdkVersion ( ) { com.google.common.base.Optional < com.android.manifmerger.XmlElement > usesSdk = getByTypeAndKey ( ManifestModel.NodeTypes.USES_SDK , null ) ; if ( usesSdk.isPresent ( ) ) { com.google.common.base.Optional < com.android.manifmerger.XmlAttribute > targetSdkVersion = usesSdk.get ( ) . getAttribute ( com.android.manifmerger.XmlNode.fromXmlName ( "android:targetSdkVersion" ) ) ; if ( targetSdkVersion.isPresent ( ) ) { return targetSdkVersion.get ( ) . getValue ( ) ; } } return getMinSdkVersion ( ) ; }
Source:
public int getBatteryLevel ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getBatteryLevel(): not allowed for non-active user" ) ; return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; return service.getBatteryLevel ( device ) ; }

Target:
public int getBatteryLevel ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getBatteryLevel(): not allowed for non-active user" ) ; return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return android.bluetooth.BluetoothDevice.BATTERY_LEVEL_UNKNOWN ; } return service.getBatteryLevel ( device ) ; }
Source:
public static com.android.calculator2.BoundedRational pow ( com.android.calculator2.BoundedRational base , com.android.calculator2.BoundedRational exp ) { if ( exp == null ) { return null ; } if ( ( exp.mNum.signum ( ) ) == 0 ) { return new com.android.calculator2.BoundedRational ( 1 ) ; } if ( base == null ) { return null ; } exp = exp.reduce ( ) . positiveDen ( ) ; if ( ! ( exp.mDen.equals ( java.math.BigInteger.ONE ) ) ) { return null ; } return base.pow ( exp.mNum ) ; }

Target:
public static com.android.calculator2.BoundedRational pow ( com.android.calculator2.BoundedRational base , com.android.calculator2.BoundedRational exp ) { if ( exp == null ) { return null ; } if ( base == null ) { return null ; } exp = exp.reduce ( ) . positiveDen ( ) ; if ( ! ( exp.mDen.equals ( java.math.BigInteger.ONE ) ) ) { return null ; } return base.pow ( exp.mNum ) ; }
Source:
public void testConfigurationUpdatesWhenRotatingToSideFromDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; rotateAndCheckSizes ( initialSizes , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }

Target:
public void testConfigurationUpdatesWhenRotatingToSideFromDocked ( ) throws java.lang.Exception { if ( ! ( supportsScreenRotation ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no rotation support" ) ; return ; } if ( ! ( supportsSplitScreenMultiWindow ( ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } setDeviceRotation ( 0 ) ; launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; launchActivityToSide ( false , false , android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; final android.server.cts.ReportedSizes initialSizes = getActivityDisplaySize ( android.server.cts.ActivityManagerAppConfigurationTests.RESIZEABLE_ACTIVITY_NAME ) ; rotateAndCheckSizes ( initialSizes ) ; }
Source:
public void add ( com.android.sdklib.internal.repository.SdkSourceCategory category , com.android.sdklib.internal.repository.SdkSource source ) { java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list = mSources.get ( category ) ; if ( list == null ) { list = new java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > ( ) ; mSources.put ( category , list ) ; } list.add ( source ) ; }

Target:
public void add ( com.android.sdklib.internal.repository.SdkSourceCategory category , com.android.sdklib.internal.repository.SdkSource source ) { synchronized ( mSources ) { java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > list = mSources.get ( category ) ; if ( list == null ) { list = new java.util.ArrayList < com.android.sdklib.internal.repository.SdkSource > ( ) ; mSources.put ( category , list ) ; } list.add ( source ) ; } }
Source:
public static org.eclipse.core.resources.IProject [ ] getReferencedProjects ( org.eclipse.core.resources.IProject project ) throws org.eclipse.core.runtime.CoreException { org.eclipse.core.resources.IProject [ ] projects = project.getReferencedProjects ( ) ; java.util.ArrayList < org.eclipse.core.resources.IProject > list = new java.util.ArrayList < org.eclipse.core.resources.IProject > ( ) ; for ( org.eclipse.core.resources.IProject p : projects ) { if ( ( p.isOpen ( ) ) && ( p.hasNature ( org.eclipse.jdt.core.JavaCore.NATURE_ID ) ) ) { list.add ( p ) ; } } return list.toArray ( new org.eclipse.core.resources.IProject [ list.size ( ) ] ) ; }

Target:
public static java.util.List < org.eclipse.core.resources.IProject > getReferencedProjects ( org.eclipse.core.resources.IProject project ) throws org.eclipse.core.runtime.CoreException { org.eclipse.core.resources.IProject [ ] projects = project.getReferencedProjects ( ) ; java.util.ArrayList < org.eclipse.core.resources.IProject > list = new java.util.ArrayList < org.eclipse.core.resources.IProject > ( ) ; for ( org.eclipse.core.resources.IProject p : projects ) { if ( ( p.isOpen ( ) ) && ( p.hasNature ( org.eclipse.jdt.core.JavaCore.NATURE_ID ) ) ) { list.add ( p ) ; } } return list ; }
Source:
public void test_run_for_SimpleTest_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest.class ; java.util.List < vogar.target.junit.VogarTest > tests = vogar.target.junit.JUnitRunnerFactory.createVogarTests ( target , null , vogar.target.JUnitRunnerTest.EMPTY_ARGS ) ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , skipPastReference , testEnvironment , 0 , tests ) ; runner.run ( null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( vogar.target.junit.JUnitRunner.class , ( ( target.getName ( ) ) + "#testSimple" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_run_for_SimpleTest_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest.class ; java.util.List < vogar.target.junit.VogarTest > tests = vogar.target.junit.JUnitRunnerFactory.createVogarTests ( target , null , vogar.target.JUnitRunnerTest.EMPTY_ARGS ) ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , skipPastReference , testEnvironment , 0 , tests ) ; runner.run ( null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( ( ( target.getName ( ) ) + "#testSimple" ) ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
public void testProcessChldReleaseActiveHold ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call heldCall = createHeldCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . unholdCall ( org.mockito.Matchers.eq ( heldCall ) ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldReleaseActiveHold ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; com.android.server.telecom.Call heldCall = createHeldCall ( ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_RELEASEACTIVE_ACCEPTHELD ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . disconnectCall ( org.mockito.Matchers.eq ( activeCall ) ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . unholdCall ( org.mockito.Matchers.eq ( heldCall ) ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
public void testGetExampleNumber ( ) { assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.DE_NUMBER , phoneUtil.getExampleNumber ( RegionCode.DE ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.DE_NUMBER , phoneUtil.getExampleNumberForType ( RegionCode.DE , PhoneNumberUtil.PhoneNumberType.FIXED_LINE ) ) ; assertEquals ( null , phoneUtil.getExampleNumberForType ( RegionCode.DE , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( RegionCode.US , PhoneNumberUtil.PhoneNumberType.FIXED_LINE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( RegionCode.US , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNull ( phoneUtil.getExampleNumberForType ( RegionCode.CS , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertEquals ( null , phoneUtil.getExampleNumber ( RegionCode.UN001 ) ) ; }

Target:
public void testGetExampleNumber ( ) { assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.DE_NUMBER , phoneUtil.getExampleNumber ( RegionCode.DE ) ) ; assertEquals ( com.google.i18n.phonenumbers.PhoneNumberUtilTest.DE_NUMBER , phoneUtil.getExampleNumberForType ( RegionCode.DE , PhoneNumberUtil.PhoneNumberType.FIXED_LINE ) ) ; assertEquals ( null , phoneUtil.getExampleNumberForType ( RegionCode.DE , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( RegionCode.US , PhoneNumberUtil.PhoneNumberType.FIXED_LINE ) ) ; assertNotNull ( phoneUtil.getExampleNumberForType ( RegionCode.US , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNull ( phoneUtil.getExampleNumberForType ( RegionCode.CS , PhoneNumberUtil.PhoneNumberType.MOBILE ) ) ; assertNull ( phoneUtil.getExampleNumber ( RegionCode.UN001 ) ) ; }
Source:
public void setBit ( int i ) throws java.lang.RuntimeException { if ( ( i < 0 ) || ( i > ( ( len ) - 1 ) ) ) { throw new java.lang.RuntimeException ( ) ; } if ( i > ( ( len ) - 1 ) ) { return ; } value [ ( i > > > 5 ) ] |= org.bouncycastle.pqc.math.linearalgebra.GF2Polynomial.bitMask [ ( i & 31 ) ] ; return ; }

Target:
public void setBit ( int i ) throws java.lang.RuntimeException { if ( ( i < 0 ) || ( i > ( ( len ) - 1 ) ) ) { throw new java.lang.RuntimeException ( ) ; } value [ ( i > > > 5 ) ] |= org.bouncycastle.pqc.math.linearalgebra.GF2Polynomial.bitMask [ ( i & 31 ) ] ; return ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_rstime s = new com.android.rs.test.ScriptC_rstime ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.setTimeZone ( "America/Los_Angeles" ) ; s.invoke_test_rstime ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_rstime s = new com.android.rs.test.ScriptC_rstime ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.setTimeZone ( "America/Los_Angeles" ) ; s.invoke_test_rstime ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
private void processConnectionEvent ( int state , android.bluetooth.BluetoothDevice device ) { switch ( state ) { case HeadsetClientHalConstants.CONNECTION_STATE_DISCONNECTED : if ( mCurrentDevice.equals ( device ) ) { processAudioEvent ( HeadsetClientHalConstants.AUDIO_STATE_DISCONNECTED , device ) ; broadcastConnectionState ( mCurrentDevice , BluetoothProfile.STATE_DISCONNECTED , BluetoothProfile.STATE_CONNECTED ) ; mCurrentDevice = null ; transitionTo ( mDisconnected ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "Disconnected from unknown device: " + device ) ) ; } break ; default : android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "Connection State Device: " + device ) + " bad state: " ) + state ) ) ; break ; } }

Target:
private void processConnectionEvent ( int state , android.bluetooth.BluetoothDevice device ) { switch ( state ) { case HeadsetClientHalConstants.CONNECTION_STATE_DISCONNECTED : if ( mCurrentDevice.equals ( device ) ) { processAudioEvent ( HeadsetClientHalConstants.AUDIO_STATE_DISCONNECTED , device ) ; broadcastConnectionState ( mCurrentDevice , BluetoothProfile.STATE_DISCONNECTED , BluetoothProfile.STATE_CONNECTED ) ; transitionTo ( mDisconnected ) ; } else { android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( "Disconnected from unknown device: " + device ) ) ; } break ; default : android.util.Log.e ( com.android.bluetooth.hfpclient.HeadsetClientStateMachine.TAG , ( ( ( "Connection State Device: " + device ) + " bad state: " ) + state ) ) ; break ; } }
Source:
private void removeMediaController ( com.android.bluetooth.avrcp.MediaController controller ) { synchronized ( mMediaPlayerInfoList ) { for ( com.android.bluetooth.avrcp.MediaPlayerInfo info : mMediaPlayerInfoList.values ( ) ) { if ( info.getMediaController ( ) . equals ( controller ) ) info.setMediaController ( null ) ; } } }

Target:
private void removeMediaController ( com.android.bluetooth.avrcp.MediaController controller ) { synchronized ( mMediaPlayerInfoList ) { for ( com.android.bluetooth.avrcp.MediaPlayerInfo info : mMediaPlayerInfoList.values ( ) ) { com.android.bluetooth.avrcp.MediaController c = info.getMediaController ( ) ; if ( ( c != null ) && ( c.equals ( controller ) ) ) info.setMediaController ( null ) ; } } }
Source:
private static int getSize ( java.lang.Class < ? > type ) { if ( ! ( type.isPrimitive ( ) ) ) { throw new java.lang.IllegalArgumentException ( ( "type.isPrimitive() == false: " + type ) ) ; } if ( dalvik.system.EmulatedStackFrame.is64BitPrimitive ( type ) ) { return 8 ; } else { return 4 ; } }

Target:
public static int getSize ( java.lang.Class < ? > type ) { if ( ! ( type.isPrimitive ( ) ) ) { throw new java.lang.IllegalArgumentException ( ( "type.isPrimitive() == false: " + type ) ) ; } if ( dalvik.system.EmulatedStackFrame.is64BitPrimitive ( type ) ) { return 8 ; } else { return 4 ; } }
Source:
public java.lang.Integer wifiAwarePublish ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "publishConfig" ) org.json.JSONObject publishConfig ) throws android.os.RemoteException , org.json.JSONException { synchronized ( mLock ) { android.net.wifi.aware.WifiAwareSession session = mSessions.get ( clientId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwarePublish before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } int discoverySessionId = getNextDiscoverySessionId ( ) ; session.publish ( null , com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.getPublishConfig ( publishConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.AwareDiscoverySessionCallbackPostsEvents ( discoverySessionId ) ) ; return discoverySessionId ; } }

Target:
public java.lang.Integer wifiAwarePublish ( @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "clientId" , description = "The client ID returned when a connection was created" ) java.lang.Integer clientId , @ com.googlecode.android_scripting.rpc.RpcParameter ( name = "publishConfig" ) org.json.JSONObject publishConfig ) throws android.os.RemoteException , org.json.JSONException { synchronized ( mLock ) { android.net.wifi.aware.WifiAwareSession session = mSessions.get ( clientId ) ; if ( session == null ) { throw new java.lang.IllegalStateException ( ( ( "Calling WifiAwarePublish before session (client ID " + clientId ) + ") is ready/or already disconnected" ) ) ; } int discoverySessionId = getNextDiscoverySessionId ( ) ; session.publish ( com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.getPublishConfig ( publishConfig ) , new com.googlecode.android_scripting.facade.wifi.WifiAwareManagerFacade.AwareDiscoverySessionCallbackPostsEvents ( discoverySessionId ) , null ) ; return discoverySessionId ; } }
Source:
private void initForReal ( ) { mAwContents = new org.chromium.android_webview.AwContents ( mFactory.getBrowserContext ( ) , mWebView , new com.android.webview.chromium.WebViewChromium.InternalAccessAdapter ( ) , mContentsClientAdapter , new org.chromium.android_webview.AwLayoutSizer ( ) , mWebSettings.getAwSettings ( ) ) ; if ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.KITKAT ) ) { org.chromium.android_webview.AwContents.setShouldDownloadFavicons ( ) ; } }

Target:
private void initForReal ( ) { mAwContents = new org.chromium.android_webview.AwContents ( mFactory.getBrowserContext ( ) , mWebView , new com.android.webview.chromium.WebViewChromium.InternalAccessAdapter ( ) , mContentsClientAdapter , mWebSettings.getAwSettings ( ) ) ; if ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.KITKAT ) ) { org.chromium.android_webview.AwContents.setShouldDownloadFavicons ( ) ; } }
Source:
public void onDestroyActionMode ( android.view.ActionMode mode ) { if ( ( activity ) != null ) { announceforAccessibility ( activity.getCurrentFocus ( ) , activity.getString ( R.string.description_leaving_bulk_action_mode ) ) ; } selectedItems.clear ( ) ; actionMode = null ; selectAllMode = false ; deselectAllMode = false ; multiSelectRemoveView.showMultiSelectRemoveView ( false ) ; actionModeStateChangedListener.onActionModeStateChanged ( false ) ; notifyDataSetChanged ( ) ; }

Target:
public void onDestroyActionMode ( android.view.ActionMode mode ) { if ( ( activity ) != null ) { announceforAccessibility ( activity.getCurrentFocus ( ) , activity.getString ( R.string.description_leaving_bulk_action_mode ) ) ; } selectedItems.clear ( ) ; actionMode = null ; selectAllMode = false ; deselectAllMode = false ; multiSelectRemoveView.showMultiSelectRemoveView ( false ) ; actionModeStateChangedListener.onActionModeStateChanged ( null , false ) ; notifyDataSetChanged ( ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassLiteral literal ) { com.android.jack.dx.rop.cst.Constant cst = com.android.jack.backend.dex.rop.RopHelper.getCstType ( literal.getRefType ( ) ) ; com.android.jack.ir.ast.JType type = literal.getType ( ) ; com.android.jack.dx.rop.code.Rop constOp = com.android.jack.dx.rop.code.Rops.opConst ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( type ) ) ; com.android.jack.dx.rop.code.SourcePosition literalSrcPos = com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( literal ) ; com.android.jack.dx.rop.code.Insn constInst = new com.android.jack.dx.rop.code.ThrowingCstInsn ( constOp , literalSrcPos , com.android.jack.dx.rop.code.RegisterSpecList.EMPTY , getCatchTypes ( ) , cst ) ; addInstruction ( constInst ) ; addMoveResultPseudoAsExtraInstruction ( destReg , literalSrcPos ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JClassLiteral literal ) { com.android.jack.dx.rop.code.Rop constOp = com.android.jack.dx.rop.code.Rops.opConst ( com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( literal.getType ( ) ) ) ; com.android.jack.dx.rop.code.SourcePosition literalSrcPos = com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( literal ) ; com.android.jack.dx.rop.code.Insn constInst = new com.android.jack.dx.rop.code.ThrowingCstInsn ( constOp , literalSrcPos , com.android.jack.dx.rop.code.RegisterSpecList.EMPTY , getCatchTypes ( ) , com.android.jack.backend.dex.rop.RopHelper.convertTypeToDx ( literal.getRefType ( ) ) ) ; addInstruction ( constInst ) ; addMoveResultPseudoAsExtraInstruction ( destReg , literalSrcPos ) ; return false ; }
Source:
public void test001 ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.String > c = ( ) -> "Hello" ; org.junit.Assert.assertEquals ( 2 , c.getClass ( ) . getDeclaredMethods ( ) . length ) ; org.junit.Assert.assertEquals ( java.lang.Object.class , c.getClass ( ) . getMethod ( "call" ) . getReturnType ( ) ) ; }

Target:
public void test001 ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.String > c = ( ) -> "Hello" ; org.junit.Assert.assertEquals ( java.lang.Object.class , c.getClass ( ) . getMethod ( "call" ) . getReturnType ( ) ) ; }
Source:
public void testConstructor_CaliperBenchmark_Profile ( ) throws java.lang.Exception { vogar.target.TestRunner runner = testRunnerRule.createTestRunner ( "-i" , "runtime" ) ; runner.run ( ) ; java.lang.String out = ios.contents ( Stream.OUT ) ; org.junit.Assert.assertTrue ( out.startsWith ( "Profiling is disabled: " ) ) ; out = out.replaceAll ( "^Profiling is disabled:[^\n]+\\n" , "" ) ; out = out.replaceAll ( "\t[^\n]+\\n" , "" ) ; org.junit.Assert.assertEquals ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "" + "//00xx{\"outcome\":\"" ) + ( vogar.target.TestRunnerTest.CaliperBenchmark.class . getName ( ) ) ) + "\"," ) + "\"runner\":\"" ) + ( vogar.target.CaliperRunner.class . getName ( ) ) ) + "\"}\n" ) + "Experiment selection: \n" ) + " Benchmark Methods: [timeMethod]\n" ) + " Instruments: [runtime]\n" ) + " User parameters: {}\n" ) + " Virtual machines: [default]\n" ) + " Selection type: Full cartesian product\n" ) + "\n" ) + "This selection yields 1 experiments.\n" ) + ( com.google.caliper.runner.UserCodeException.class . getName ( ) ) ) + ": An exception was thrown from the benchmark code\n" ) + "Caused by: " ) + ( java.lang.IllegalStateException.class . getName ( ) ) ) + ": " ) + ( vogar.target.TestRunnerTest.CaliperBenchmark.CALIPER_BENCHMARK_MESSAGE ) ) + "\n" ) + "//00xx{\"result\":\"SUCCESS\"}\n" ) + "//00xx{\"completedNormally\":true}\n" ) , out ) ; }

Target:
public void testConstructor_CaliperBenchmark_Profile ( ) throws java.lang.Exception { vogar.target.TestRunner runner = testRunnerRule.createTestRunner ( "-i" , "runtime" ) ; runner.run ( ) ; java.lang.String out = ios.contents ( Stream.OUT ) ; org.junit.Assert.assertTrue ( out.startsWith ( "Profiling is disabled: " ) ) ; out = out.replaceAll ( "^Profiling is disabled:[^\n]+\\n" , "" ) ; out = out.replaceAll ( "\t[^\n]+\\n" , "" ) ; org.junit.Assert.assertEquals ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "" + "//00xx{\"outcome\":\"" ) + ( vogar.target.TestRunnerTest.CaliperBenchmark.class . getName ( ) ) ) + "\"}\n" ) + "Experiment selection: \n" ) + " Benchmark Methods: [timeMethod]\n" ) + " Instruments: [runtime]\n" ) + " User parameters: {}\n" ) + " Virtual machines: [default]\n" ) + " Selection type: Full cartesian product\n" ) + "\n" ) + "This selection yields 1 experiments.\n" ) + ( com.google.caliper.runner.UserCodeException.class . getName ( ) ) ) + ": An exception was thrown from the benchmark code\n" ) + "Caused by: " ) + ( java.lang.IllegalStateException.class . getName ( ) ) ) + ": " ) + ( vogar.target.TestRunnerTest.CaliperBenchmark.CALIPER_BENCHMARK_MESSAGE ) ) + "\n" ) + "//00xx{\"result\":\"SUCCESS\"}\n" ) + "//00xx{\"completedNormally\":true}\n" ) , out ) ; }
Source:
public void setEncoding ( java.lang.String encoding ) throws java.io.UnsupportedEncodingException , java.lang.SecurityException { super . setEncoding ( encoding ) ; if ( ( output ) == null ) { return ; } flush ( ) ; if ( encoding == null ) { writer = new java.io.OutputStreamWriter ( output ) ; } else { writer = new java.io.OutputStreamWriter ( output , encoding ) ; } }

Target:
public synchronized void setEncoding ( java.lang.String encoding ) throws java.io.UnsupportedEncodingException , java.lang.SecurityException { super . setEncoding ( encoding ) ; if ( ( output ) == null ) { return ; } flush ( ) ; if ( encoding == null ) { writer = new java.io.OutputStreamWriter ( output ) ; } else { writer = new java.io.OutputStreamWriter ( output , encoding ) ; } }
Source:
public void run ( ) { try { com.intellij.openapi.externalSystem.util.ExternalSystemUtil.refreshProject ( project , myExternalSystemId , externalProjectPath , callback , false , true , false ) ; } catch ( java.lang.IllegalArgumentException e ) { exRef.set ( new com.intellij.openapi.options.ConfigurationException ( e.getMessage ( ) , com.intellij.openapi.externalSystem.util.ExternalSystemBundle.message ( "error.cannot.parse.project" , externalSystemName ) ) ) ; } }

Target:
public void run ( ) { try { com.intellij.openapi.externalSystem.util.ExternalSystemUtil.refreshProject ( project , myExternalSystemId , externalProjectPath , callback , false , true ) ; } catch ( java.lang.IllegalArgumentException e ) { exRef.set ( new com.intellij.openapi.options.ConfigurationException ( e.getMessage ( ) , com.intellij.openapi.externalSystem.util.ExternalSystemBundle.message ( "error.cannot.parse.project" , externalSystemName ) ) ) ; } }
Source:
public void test_X509_NAME_hashes ( ) { javax.security.auth.x500.X500Principal name = new javax.security.auth.x500.X500Principal ( "CN=localhost" ) ; assertEquals ( ( - 1372642656 ) , org.apache.harmony.xnet.provider.jsse.NativeCrypto.X509_NAME_hash ( name ) ) ; assertEquals ( ( - 1626170662 ) , org.apache.harmony.xnet.provider.jsse.NativeCrypto.X509_NAME_hash_old ( name ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.assertNoErrors ( ) ; }

Target:
public void test_X509_NAME_hashes ( ) { javax.security.auth.x500.X500Principal name = new javax.security.auth.x500.X500Principal ( "CN=localhost" ) ; assertEquals ( ( - 1372642656 ) , org.apache.harmony.xnet.provider.jsse.NativeCrypto.X509_NAME_hash ( name ) ) ; assertEquals ( ( - 1626170662 ) , org.apache.harmony.xnet.provider.jsse.NativeCrypto.X509_NAME_hash_old ( name ) ) ; }
Source:
protected void engineInit ( int opmode , java.security.Key key , java.security.AlgorithmParameters params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { final java.security.spec.AlgorithmParameterSpec spec ; try { spec = params.getParameterSpec ( javax.crypto.spec.IvParameterSpec.class ) ; } catch ( java.security.spec.InvalidParameterSpecException e ) { throw new java.security.InvalidAlgorithmParameterException ( e ) ; } engineInit ( opmode , key , spec , random ) ; }

Target:
protected void engineInit ( int opmode , java.security.Key key , java.security.AlgorithmParameters params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { final java.security.spec.AlgorithmParameterSpec spec ; if ( params != null ) { try { spec = params.getParameterSpec ( javax.crypto.spec.IvParameterSpec.class ) ; } catch ( java.security.spec.InvalidParameterSpecException e ) { throw new java.security.InvalidAlgorithmParameterException ( e ) ; } } else { spec = null ; } engineInit ( opmode , key , spec , random ) ; }
Source:
private void compileWithProfilesAndCheckFilter ( java.util.Set < android.cts.compilation.AdbRootDependentCompilationTest.ProfileLocation > profileLocations ) throws java.lang.Exception { for ( android.cts.compilation.AdbRootDependentCompilationTest.ProfileLocation profileLocation : profileLocations ) { writeProfile ( profileLocation ) ; } executeCompile ( false ) ; java.lang.String compilerFilter = getCompilerFilter ( odexFilePath ) ; assertEquals ( "compiler-filter" , "speed-profile" , compilerFilter ) ; }

Target:
private void compileWithProfilesAndCheckFilter ( java.util.Set < android.cts.compilation.AdbRootDependentCompilationTest.ProfileLocation > profileLocations ) throws java.lang.Exception { for ( android.cts.compilation.AdbRootDependentCompilationTest.ProfileLocation profileLocation : profileLocations ) { writeProfile ( profileLocation ) ; } executeCompile ( false , "speed-profile" ) ; java.lang.String compilerFilter = getCompilerFilter ( odexFilePath ) ; assertEquals ( "compiler-filter" , "speed-profile" , compilerFilter ) ; }
Source:
private int modifyRcFeatureFromBlacklist ( int feature , java.lang.String address ) { android.content.SharedPreferences pref = mContext.getSharedPreferences ( com.android.bluetooth.avrcp.Avrcp.ABSOLUTE_VOLUME_BLACKLIST , Context.MODE_PRIVATE ) ; if ( ! ( pref.contains ( address ) ) ) { return feature ; } if ( pref.getBoolean ( address , false ) ) { feature &= ~ ( com.android.bluetooth.avrcp.Avrcp.BTRC_FEAT_ABSOLUTE_VOLUME ) ; } return feature ; }

Target:
private int modifyRcFeatureFromBlacklist ( int feature , java.lang.String address ) { android.content.SharedPreferences pref = mContext.getSharedPreferences ( com.android.bluetooth.avrcp.Avrcp.ABSOLUTE_VOLUME_BLACKLIST , Context.MODE_PRIVATE ) ; if ( ! ( pref.contains ( address ) ) ) { return feature ; } return feature & ( ~ ( com.android.bluetooth.avrcp.Avrcp.BTRC_FEAT_ABSOLUTE_VOLUME ) ) ; }
Source:
private static int choice ( java.lang.String message , java.lang.String title , java.util.Collection < java.lang.String > choices ) { java.lang.Object [ ] possibleValues = choices.toArray ( ) ; java.lang.Object selectedValue = javax.swing.JOptionPane.showInputDialog ( null , message , title , javax.swing.JOptionPane.QUESTION_MESSAGE , null , possibleValues , possibleValues [ 0 ] ) ; for ( int x = 0 ; x < ( possibleValues.length ) ; x ++ ) { if ( possibleValues [ x ] . equals ( selectedValue ) ) { return x ; } } return - 1 ; }

Target:
public static int choice ( java.lang.String message , java.lang.String title , java.util.Collection < java.lang.String > choices ) { java.lang.Object [ ] possibleValues = choices.toArray ( ) ; java.lang.Object selectedValue = javax.swing.JOptionPane.showInputDialog ( null , message , title , javax.swing.JOptionPane.QUESTION_MESSAGE , null , possibleValues , possibleValues [ 0 ] ) ; for ( int x = 0 ; x < ( possibleValues.length ) ; x ++ ) { if ( possibleValues [ x ] . equals ( selectedValue ) ) { return x ; } } return - 1 ; }
Source:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface declaredType ) throws java.lang.Exception { if ( declaredType.isExternal ( ) ) { return ; } com.android.jack.scheduling.marker.DexFileMarker dexFileMarker = declaredType.getSession ( ) . getMarker ( com.android.jack.scheduling.marker.DexFileMarker.class ) ; assert dexFileMarker != null ; com.android.jack.dx.dex.file.DexFile dexFile = dexFileMarker.getDexFileOfType ( declaredType ) ; com.android.jack.dx.dex.file.ClassDefItem classDefItem = createClassDefItem ( declaredType ) ; dexFile.add ( classDefItem ) ; com.android.jack.scheduling.marker.ClassDefItemMarker classDefItemMarker = new com.android.jack.scheduling.marker.ClassDefItemMarker ( classDefItem ) ; declaredType.addMarker ( classDefItemMarker ) ; }

Target:
public synchronized void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface declaredType ) throws java.lang.Exception { if ( declaredType.isExternal ( ) ) { return ; } com.android.jack.dx.dex.file.ClassDefItem classDefItem = createClassDefItem ( declaredType ) ; com.android.jack.scheduling.marker.ClassDefItemMarker classDefItemMarker = new com.android.jack.scheduling.marker.ClassDefItemMarker ( classDefItem ) ; declaredType.addMarker ( classDefItemMarker ) ; }
Source:
public void addStaticField ( com.android.jack.dx.dex.file.EncodedField field , com.android.jack.dx.rop.cst.Constant value ) { if ( field == null ) { throw new java.lang.NullPointerException ( "field == null" ) ; } if ( ( staticValuesConstant ) != null ) { throw new java.lang.UnsupportedOperationException ( "static fields already sorted" ) ; } staticFields.add ( field ) ; staticValues.put ( field , value ) ; }

Target:
public void addStaticField ( com.android.jack.dx.dex.file.EncodedField field , com.android.jack.dx.rop.cst.Constant value ) { assert field != null ; if ( ( staticValuesConstant ) != null ) { throw new java.lang.UnsupportedOperationException ( "static fields already sorted" ) ; } staticFields.add ( field ) ; staticValues.put ( field , value ) ; }
Source:
public void onCreateOptionsMenu ( android.view.Menu menu , android.view.MenuInflater inflater ) { menu.add ( 0 , com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_DELETE_ALL , 0 , R.string.menu_delete_all ) . setIcon ( android.R.drawable.ic_menu_delete ) ; if ( android.os.UserManager.get ( getActivity ( ) ) . isAdminUser ( ) ) { menu.add ( 0 , com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_PREFERENCES , 0 , R.string.menu_preferences ) . setIcon ( android.R.drawable.ic_menu_preferences ) ; } }

Target:
public void onCreateOptionsMenu ( android.view.Menu menu , android.view.MenuInflater inflater ) { menu.add ( 0 , com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_DELETE_ALL , 0 , R.string.menu_delete_all ) . setIcon ( android.R.drawable.ic_menu_delete ) ; }
Source:
public byte [ ] getFwMemoryDump ( ) { try { if ( ( mWifiVendorHal ) != null ) { return mWifiVendorHal.getFwMemoryDump ( ) ; } } catch ( java.lang.UnsupportedOperationException e ) { } legacyHalWarning ( ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( com.android.server.wifi.WifiNative.getFwMemoryDumpNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ) { byte [ ] fwMemoryDump = com.android.server.wifi.WifiNative.mFwMemoryDump ; com.android.server.wifi.WifiNative.mFwMemoryDump = null ; return fwMemoryDump ; } else { return null ; } } return null ; } }

Target:
public byte [ ] getFwMemoryDump ( ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { if ( com.android.server.wifi.WifiNative.getFwMemoryDumpNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ) { byte [ ] fwMemoryDump = com.android.server.wifi.WifiNative.mFwMemoryDump ; com.android.server.wifi.WifiNative.mFwMemoryDump = null ; return fwMemoryDump ; } else { return null ; } } return null ; } }
Source:
public int getModifiers ( ) { if ( isArray ( ) ) { int componentModifiers = getComponentType ( ) . getModifiers ( ) ; if ( ( componentModifiers & ( java.lang.reflect.Modifier.INTERFACE ) ) != 0 ) { componentModifiers &= ~ ( ( java.lang.reflect.Modifier.INTERFACE ) | ( java.lang.reflect.Modifier.STATIC ) ) ; } return ( ( java.lang.reflect.Modifier.ABSTRACT ) | ( java.lang.reflect.Modifier.FINAL ) ) | componentModifiers ; } int JAVA_FLAGS_MASK = 65535 ; int modifiers = libcore.reflect.AnnotationAccess.getInnerClassFlags ( this , ( ( accessFlags ) & JAVA_FLAGS_MASK ) ) ; return modifiers & JAVA_FLAGS_MASK ; }

Target:
public int getModifiers ( ) { if ( isArray ( ) ) { int componentModifiers = getComponentType ( ) . getModifiers ( ) ; if ( ( componentModifiers & ( java.lang.reflect.Modifier.INTERFACE ) ) != 0 ) { componentModifiers &= ~ ( ( java.lang.reflect.Modifier.INTERFACE ) | ( java.lang.reflect.Modifier.STATIC ) ) ; } return ( ( java.lang.reflect.Modifier.ABSTRACT ) | ( java.lang.reflect.Modifier.FINAL ) ) | componentModifiers ; } int JAVA_FLAGS_MASK = 65535 ; int modifiers = this . getInnerClassFlags ( ( ( accessFlags ) & JAVA_FLAGS_MASK ) ) ; return modifiers & JAVA_FLAGS_MASK ; }
Source:
void onTargetPackageAdded ( @ android.annotation.NonNull final java.lang.String packageName , final int userId ) { if ( com.android.server.om.OverlayManagerService.DEBUG ) { android.util.Slog.d ( com.android.server.om.OverlayManagerService.TAG , ( ( ( "onTargetPackageAdded packageName=" + packageName ) + " userId=" ) + userId ) ) ; } final android.content.pm.PackageInfo targetPackage = mPackageManager.getPackageInfo ( packageName , userId ) ; updateAllOverlaysForTarget ( packageName , userId , targetPackage ) ; mListener.onOverlaysChanged ( packageName , userId ) ; }

Target:
void onTargetPackageAdded ( @ android.annotation.NonNull final java.lang.String packageName , final int userId ) { if ( com.android.server.om.OverlayManagerService.DEBUG ) { android.util.Slog.d ( com.android.server.om.OverlayManagerService.TAG , ( ( ( "onTargetPackageAdded packageName=" + packageName ) + " userId=" ) + userId ) ) ; } final android.content.pm.PackageInfo targetPackage = mPackageManager.getPackageInfo ( packageName , userId ) ; if ( updateAllOverlaysForTarget ( packageName , userId , targetPackage ) ) { mListener.onOverlaysChanged ( packageName , userId ) ; } }
Source:
private void showPbapDialog ( int id ) { final com.android.internal.app.AlertController.AlertParams p = mAlertParams ; switch ( id ) { case com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH : p.mIconId = android.R.drawable.ic_dialog_info ; p.mTitle = getString ( R.string.pbap_session_key_dialog_header ) ; p.mView = createView ( com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH ) ; p.mPositiveButtonText = getString ( android.R.string.ok ) ; p.mPositiveButtonListener = this ; p.mNegativeButtonText = getString ( android.R.string.cancel ) ; p.mNegativeButtonListener = this ; setupAlert ( ) ; mOkButton = mAlert.getButton ( DialogInterface.BUTTON_POSITIVE ) ; mOkButton.setEnabled ( false ) ; break ; default : break ; } }

Target:
private void showPbapDialog ( int id ) { final com.android.internal.app.AlertController.AlertParams p = mAlertParams ; switch ( id ) { case com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH : p.mTitle = getString ( R.string.pbap_session_key_dialog_header ) ; p.mView = createView ( com.android.bluetooth.pbap.BluetoothPbapActivity.DIALOG_YES_NO_AUTH ) ; p.mPositiveButtonText = getString ( android.R.string.ok ) ; p.mPositiveButtonListener = this ; p.mNegativeButtonText = getString ( android.R.string.cancel ) ; p.mNegativeButtonListener = this ; setupAlert ( ) ; mOkButton = mAlert.getButton ( DialogInterface.BUTTON_POSITIVE ) ; mOkButton.setEnabled ( false ) ; break ; default : break ; } }
Source:
public void add ( com.android.jack.dx.dex.file.OffsettedItem item ) { throwIfPrepared ( ) ; try { if ( ( item.getAlignment ( ) ) > ( getAlignment ( ) ) ) { throw new java.lang.IllegalArgumentException ( "incompatible item alignment" ) ; } } catch ( java.lang.NullPointerException ex ) { throw new java.lang.NullPointerException ( "item == null" ) ; } items.add ( item ) ; }

Target:
public void add ( com.android.jack.dx.dex.file.OffsettedItem item ) { assert item != null ; throwIfPrepared ( ) ; if ( ( item.getAlignment ( ) ) > ( getAlignment ( ) ) ) { throw new java.lang.IllegalArgumentException ( "incompatible item alignment" ) ; } items.add ( item ) ; }
Source:
private com.android.jack.ir.ast.JDefinedClassOrInterface create ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws com.android.jack.jayce.JayceFormatException , com.android.jack.jayce.JayceVersionException , java.io.IOException { com.android.jack.jayce.DeclaredTypeNode type = getNNode ( NodeLevel.TYPES , session.getUserLogger ( ) ) ; java.lang.String packageQualifiedName = com.android.jack.util.NamingTools.getPackageNameFromBinaryName ( com.android.jack.util.NamingTools.getClassBinaryNameFromDescriptor ( type.getSignature ( ) ) ) ; com.android.jack.ir.ast.JPackage pack = session.getLookup ( ) . getOrCreatePackage ( packageQualifiedName ) ; com.android.jack.ir.ast.JDefinedClassOrInterface jType = type.create ( pack , this ) ; return jType ; }

Target:
private com.android.jack.ir.ast.JDefinedClassOrInterface create ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JSession session ) throws com.android.jack.jayce.JayceFormatException , com.android.jack.jayce.JayceVersionException , java.io.IOException { com.android.jack.jayce.DeclaredTypeNode type = getNNode ( NodeLevel.TYPES ) ; java.lang.String packageQualifiedName = com.android.jack.util.NamingTools.getPackageNameFromBinaryName ( com.android.jack.util.NamingTools.getClassBinaryNameFromDescriptor ( type.getSignature ( ) ) ) ; com.android.jack.ir.ast.JPackage pack = session.getLookup ( ) . getOrCreatePackage ( packageQualifiedName ) ; com.android.jack.ir.ast.JDefinedClassOrInterface jType = type.create ( pack , this ) ; return jType ; }
Source:
public void test_getSymbol_38622 ( ) throws java.lang.Exception { java.util.Locale pt_BR = new java.util.Locale ( "pt" , "BR" ) ; java.util.Locale pt_PT = new java.util.Locale ( "pt" , "PT" ) ; assertEquals ( "R$" , java.util.Currency.getInstance ( pt_BR ) . getSymbol ( pt_BR ) ) ; assertEquals ( "BR$" , java.util.Currency.getInstance ( pt_BR ) . getSymbol ( pt_PT ) ) ; assertEquals ( "€" , java.util.Currency.getInstance ( pt_PT ) . getSymbol ( pt_BR ) ) ; assertEquals ( "€" , java.util.Currency.getInstance ( pt_PT ) . getSymbol ( pt_PT ) ) ; }

Target:
public void test_getSymbol_38622 ( ) throws java.lang.Exception { java.util.Locale pt_BR = new java.util.Locale ( "pt" , "BR" ) ; java.util.Locale pt_PT = new java.util.Locale ( "pt" , "PT" ) ; assertEquals ( "R$" , java.util.Currency.getInstance ( pt_BR ) . getSymbol ( pt_BR ) ) ; assertEquals ( "R$" , java.util.Currency.getInstance ( pt_BR ) . getSymbol ( pt_PT ) ) ; assertEquals ( "€" , java.util.Currency.getInstance ( pt_PT ) . getSymbol ( pt_BR ) ) ; assertEquals ( "€" , java.util.Currency.getInstance ( pt_PT ) . getSymbol ( pt_PT ) ) ; }
Source:
public void canForgetNetworkConfigInClientMode ( ) throws java.lang.Exception { when ( mWifiConfigManager.removeNetwork ( eq ( 0 ) , anyInt ( ) ) ) . thenReturn ( true ) ; addNetworkAndVerifySuccess ( ) ; mWsm.sendMessage ( WifiManager.FORGET_NETWORK , 0 , com.android.server.wifi.WifiStateMachineTest.MANAGED_PROFILE_UID ) ; mLooper.dispatchAll ( ) ; }

Target:
public void canForgetNetworkConfigInClientMode ( ) throws java.lang.Exception { when ( mWifiConfigManager.removeNetwork ( eq ( 0 ) , anyInt ( ) ) ) . thenReturn ( true ) ; addNetworkAndVerifySuccess ( ) ; mWsm.sendMessage ( WifiManager.FORGET_NETWORK , 0 , com.android.server.wifi.WifiStateMachineTest.MANAGED_PROFILE_UID ) ; mLooper.dispatchAll ( ) ; verify ( mWifiConfigManager ) . removeNetwork ( anyInt ( ) , anyInt ( ) ) ; }
Source:
private void generateCertificates_PKCS7_PEM ( java.security.cert.CertificateFactory f ) throws java.lang.Exception { java.util.Collection < ? extends java.security.cert.X509Certificate > certs = getCertificates ( f , libcore.java.security.cert.X509CertificateTest.CERTS_PKCS7_PEM ) ; assertNotNull ( certs ) ; if ( "BC" . equals ( f.getProvider ( ) . getName ( ) ) ) { assertEquals ( 0 , certs.size ( ) ) ; } else { assertEquals ( 2 , certs.size ( ) ) ; } }

Target:
private void generateCertificates_PKCS7_PEM ( java.security.cert.CertificateFactory f ) throws java.lang.Exception { java.util.Collection < ? extends java.security.cert.X509Certificate > certs = getCertificates ( f , libcore.java.security.cert.X509CertificateTest.CERTS_PKCS7_PEM ) ; assertNotNull ( certs ) ; assertEquals ( 2 , certs.size ( ) ) ; }
Source:
private void onAudioConfigChanged ( byte [ ] address , int sampleRate , int channelCount ) { com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.StackEvent event = new com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.StackEvent ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.EVENT_TYPE_AUDIO_CONFIG_CHANGED ) ; int channelConfig = ( channelCount == 1 ) ? android.media.AudioFormat.CHANNEL_IN_MONO : android.media.AudioFormat.CHANNEL_IN_STEREO ; event.audioConfig = new android.bluetooth.BluetoothAudioConfig ( sampleRate , channelConfig , android.media.AudioFormat.ENCODING_PCM_16BIT ) ; event.device = getDevice ( address ) ; sendMessage ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.STACK_EVENT , event ) ; }

Target:
private void onAudioConfigChanged ( byte [ ] address , int sampleRate , int channelCount ) { com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.StackEvent event = new com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.StackEvent ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.EVENT_TYPE_AUDIO_CONFIG_CHANGED ) ; event.device = getDevice ( address ) ; int channelConfig = ( channelCount == 1 ) ? android.media.AudioFormat.CHANNEL_IN_MONO : android.media.AudioFormat.CHANNEL_IN_STEREO ; event.audioConfig = new android.bluetooth.BluetoothAudioConfig ( sampleRate , channelConfig , android.media.AudioFormat.ENCODING_PCM_16BIT ) ; sendMessage ( com.android.bluetooth.a2dpsink.A2dpSinkStateMachine.STACK_EVENT , event ) ; }