auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String getDisplayCountry ( java.util.Locale locale ) { if ( countryCode.isEmpty ( ) ) { return "" ; } java.lang.String result = libcore.icu.ICU.getDisplayCountryNative ( getIcuLocaleId ( ) , locale.getIcuLocaleId ( ) ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayCountryNative ( getIcuLocaleId ( ) , java.util.Locale.getDefault ( ) . getIcuLocaleId ( ) ) ; } return result ; }

Target:
public java.lang.String getDisplayCountry ( java.util.Locale locale ) { if ( countryCode.isEmpty ( ) ) { return "" ; } try { java.util.Locale.Builder.normalizeAndValidateRegion ( countryCode ) ; } catch ( java.util.IllformedLocaleException ex ) { return countryCode ; } java.lang.String result = libcore.icu.ICU.getDisplayCountry ( this , locale ) ; if ( result == null ) { result = libcore.icu.ICU.getDisplayCountry ( this , java.util.Locale.getDefault ( ) ) ; } return result ; }
Source:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , float [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFrom" ) ; validateIsFloat32 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy2DRangeFrom ( int xoff , int yoff , int w , int h , byte [ ] data ) { validateIsInt8 ( ) ; copy2DRangeFromUnchecked ( xoff , yoff , w , h , data , Element.DataType.SIGNED_8 , data.length ) ; }
Source:
public void testAesCbcHmacSha512Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.getKey ( 256 ) ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }

Target:
public void testAesCbcHmacMd5Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }
Source:
public void setUninstallBlocked ( @ android.annotation.NonNull android.content.ComponentName admin , java.lang.String packageName , boolean uninstallBlocked ) { throwIfParentInstance ( "setUninstallBlocked" ) ; if ( ( mService ) != null ) { try { mService.setUninstallBlocked ( admin , packageName , uninstallBlocked ) ; } catch ( android.os.RemoteException re ) { throw re.rethrowFromSystemServer ( ) ; } } }

Target:
public void setKeepUninstalledPackages ( @ android.annotation.Nullable android.content.ComponentName admin , @ android.annotation.NonNull java.util.List < java.lang.String > packageNames ) { throwIfParentInstance ( "setKeepUninstalledPackages" ) ; if ( ( mService ) != null ) { try { mService.setKeepUninstalledPackages ( admin , mContext.getPackageName ( ) , packageNames ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
private void loadPreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode ( GlTracePlugin.PLUGIN_ID ) ; mAppPackageToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APP_PACKAGE , "" ) ; mActivityToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_ACTIVITY , "" ) ; mTraceFilePath = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , "" ) ; mLastUsedDevice = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , "" ) ; }

Target:
private void loadPreferences ( ) { org.eclipse.core.runtime.preferences.IEclipsePreferences prefs = new org.eclipse.core.runtime.preferences.InstanceScope ( ) . getNode ( GlTracePlugin.PLUGIN_ID ) ; mAppPackageToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_APP_PACKAGE , "" ) ; mActivityToTrace = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_ACTIVITY , "" ) ; mTraceFilePath = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_TRACEFILE , "" ) ; mLastUsedDevice = prefs.get ( com.android.ide.eclipse.gltrace.GLTraceOptionsDialog.PREF_DEVICE , "" ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JUnlock unlockStmt ) { com.android.jack.dx.rop.code.RegisterSpec unlockReg = getRegisterSpec ( unlockStmt.getLockExpr ( ) ) ; com.android.jack.dx.rop.code.Insn unlockInsn = new com.android.jack.dx.rop.code.ThrowingInsn ( com.android.jack.dx.rop.code.Rops.MONITOR_EXIT , com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( unlockStmt ) , com.android.jack.dx.rop.code.RegisterSpecList.make ( unlockReg ) , getCatchTypes ( ) ) ; addInstruction ( unlockInsn ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JUnlockBlockElement element ) { addInstruction ( new com.android.jack.dx.rop.code.ThrowingInsn ( com.android.jack.dx.rop.code.Rops.MONITOR_EXIT , com.android.jack.backend.dex.rop.RopHelper.getSourcePosition ( element.getSourceInfo ( ) ) , com.android.jack.dx.rop.code.RegisterSpecList.make ( getRegisterSpec ( element.getExpression ( ) ) ) , getCatchTypes ( ) ) ) ; return false ; }
Source:
public void setZoom ( double newZoom ) { com.android.hierarchyviewerlib.scene.DrawableViewNode.Point zoomPoint = null ; synchronized ( this ) { if ( ( ( tree ) != null ) && ( ( viewport ) != null ) ) { zoomPoint = new com.android.hierarchyviewerlib.scene.DrawableViewNode.Point ( ( ( viewport.x ) + ( ( viewport.width ) / 2 ) ) , ( ( viewport.y ) + ( ( viewport.height ) / 2 ) ) ) ; } } zoomOnPoint ( newZoom , zoomPoint ) ; }

Target:
public void setZoom ( double newZoom ) { com.android.hierarchyviewerlib.ui.util.DrawableViewNode.Point zoomPoint = null ; synchronized ( this ) { if ( ( ( tree ) != null ) && ( ( viewport ) != null ) ) { zoomPoint = new com.android.hierarchyviewerlib.ui.util.DrawableViewNode.Point ( ( ( viewport.x ) + ( ( viewport.width ) / 2 ) ) , ( ( viewport.y ) + ( ( viewport.height ) / 2 ) ) ) ; } } zoomOnPoint ( newZoom , zoomPoint ) ; }
Source:
private void stopService ( ) throws java.util.concurrent.TimeoutException { android.content.Intent stopIntent = new android.content.Intent ( android.support.test.InstrumentationRegistry.getTargetContext ( ) , com.android.bluetooth.a2dp.A2dpService.class ) ; stopIntent.putExtra ( AdapterService.EXTRA_ACTION , AdapterService.ACTION_SERVICE_STATE_CHANGED ) ; stopIntent.putExtra ( BluetoothAdapter.EXTRA_STATE , BluetoothAdapter.STATE_OFF ) ; mServiceRule.startService ( stopIntent ) ; verify ( mAdapterService , timeout ( com.android.bluetooth.a2dp.A2dpServiceTest.TIMEOUT_MS ) ) . onProfileServiceStateChanged ( eq ( com.android.bluetooth.a2dp.A2dpService.class . getName ( ) ) , eq ( BluetoothAdapter.STATE_OFF ) ) ; mA2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; org.junit.Assert.assertNull ( mA2dpService ) ; }

Target:
private void stopService ( ) throws java.util.concurrent.TimeoutException { com.android.bluetooth.TestUtils.stopService ( mServiceRule , com.android.bluetooth.a2dp.A2dpService.class ) ; mA2dpService = com.android.bluetooth.a2dp.A2dpService.getA2dpService ( ) ; org.junit.Assert.assertNull ( mA2dpService ) ; }
Source:
static void addAttribute ( org.w3c.dom.Document document , org.w3c.dom.Node node , java.lang.String NamespaceUri , java.lang.String attrName , java.lang.String attrValue ) { org.w3c.dom.Attr attr ; if ( NamespaceUri != null ) { attr = document.createAttributeNS ( NamespaceUri , attrName ) ; } else { attr = document.createAttribute ( attrName ) ; } attr.setValue ( attrValue ) ; if ( NamespaceUri != null ) { node.getAttributes ( ) . setNamedItemNS ( attr ) ; } else { node.getAttributes ( ) . setNamedItem ( attr ) ; } }

Target:
static void addAttribute ( org.w3c.dom.Document document , org.w3c.dom.Node node , java.lang.String namespaceUri , java.lang.String attrName , java.lang.String attrValue ) { org.w3c.dom.Attr attr ; if ( namespaceUri != null ) { attr = document.createAttributeNS ( namespaceUri , attrName ) ; } else { attr = document.createAttribute ( attrName ) ; } attr.setValue ( attrValue ) ; if ( namespaceUri != null ) { node.getAttributes ( ) . setNamedItemNS ( attr ) ; } else { node.getAttributes ( ) . setNamedItem ( attr ) ; } }
Source:
public void testWriteFiboDexFile ( ) throws java.lang.Exception { java.io.File outputDir = com.android.jack.util.FileUtils.getWorkingDirectory ( ) ; com.android.jack.Options fiboArgs = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.FibonacciThreeAddressTest.JAVA_FILEPATH ) ; fiboArgs.setOutputDir ( outputDir ) ; java.io.File outputFile = new java.io.File ( outputDir , com.android.jack.backend.dex.DexFileWriter.DEX_FILENAME ) ; java.io.File outputDirectory = outputFile.getParentFile ( ) ; com.android.jack.util.FileUtils.createIfNotExists ( outputDirectory ) ; com.android.jack.Jack.run ( fiboArgs ) ; junit.framework.Assert.assertTrue ( outputFile.exists ( ) ) ; junit.framework.Assert.assertTrue ( ( ( outputFile.length ( ) ) > 0 ) ) ; }

Target:
public void testWriteFiboDexFile ( ) throws java.lang.Exception { java.io.File outputDir = com.android.sched.util.file.FileUtils.getWorkingDirectory ( ) ; com.android.jack.Options fiboArgs = com.android.jack.TestTools.buildCommandLineArgs ( com.android.jack.FibonacciThreeAddressTest.JAVA_FILEPATH ) ; fiboArgs.setOutputDir ( outputDir ) ; java.io.File outputFile = new java.io.File ( outputDir , com.android.jack.backend.dex.DexFileWriter.DEX_FILENAME ) ; java.io.File outputDirectory = outputFile.getParentFile ( ) ; com.android.sched.util.file.FileUtils.createIfNotExists ( outputDirectory ) ; com.android.jack.Jack.run ( fiboArgs ) ; junit.framework.Assert.assertTrue ( outputFile.exists ( ) ) ; junit.framework.Assert.assertTrue ( ( ( outputFile.length ( ) ) > 0 ) ) ; }
Source:
public void requestLayout ( ) { if ( ViewDebug.TRACE_HIERARCHY ) { android.view.ViewDebug.trace ( this , ViewDebug.HierarchyTraceType.REQUEST_LAYOUT ) ; } mPrivateFlags |= android.view.View.FORCE_LAYOUT ; if ( ( ( mParent ) != null ) && ( ! ( mParent.isLayoutRequested ( ) ) ) ) { mParent.requestLayout ( ) ; } }

Target:
public void requestLayout ( ) { if ( ViewDebug.TRACE_HIERARCHY ) { android.view.ViewDebug.trace ( this , ViewDebug.HierarchyTraceType.REQUEST_LAYOUT ) ; } mPrivateFlags |= android.view.View.FORCE_LAYOUT ; mPrivateFlags |= android.view.View.INVALIDATED ; if ( ( mParent ) != null ) { if ( ( mLayoutParams ) != null ) { mLayoutParams.resolveWithDirection ( getResolvedLayoutDirection ( ) ) ; } if ( ! ( mParent.isLayoutRequested ( ) ) ) { mParent.requestLayout ( ) ; } } }
Source:
private com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode addUnknownAttribute ( java.lang.String xmlFullName , java.lang.String xmlAttrLocalName , java.lang.String xmlNsUri ) { com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor ( xmlAttrLocalName , xmlFullName , xmlNsUri , "Unknown XML attribute" ) ; com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode uiAttr = desc.createUiNode ( this ) ; mUnknownUiAttributes.add ( uiAttr ) ; return uiAttr ; }

Target:
private com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode addUnknownAttribute ( java.lang.String xmlFullName , java.lang.String xmlAttrLocalName , java.lang.String xmlNsUri ) { com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor desc = new com.android.ide.eclipse.adt.internal.editors.descriptors.TextAttributeDescriptor ( xmlAttrLocalName , xmlFullName , xmlNsUri , "Unknown XML attribute" , new com.android.ide.eclipse.adt.internal.resources.AttributeInfo ( xmlAttrLocalName , new com.android.ide.eclipse.adt.editors.layout.gscripts.IAttributeInfo.Format [ ] { com.android.ide.eclipse.adt.editors.layout.gscripts.IAttributeInfo.Format.STRING } ) ) ; com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode uiAttr = desc.createUiNode ( this ) ; mUnknownUiAttributes.add ( uiAttr ) ; return uiAttr ; }
Source:
synchronized void nScriptSetVarD ( int id , int slot , double val ) { validate ( ) ; rsnScriptSetVarD ( mContext , id , slot , val ) ; }

Target:
synchronized void nScriptForEach ( long id , int slot , long ain , long aout , byte [ ] params ) { validate ( ) ; if ( params == null ) { rsnScriptForEach ( mContext , id , slot , ain , aout ) ; } else { rsnScriptForEach ( mContext , id , slot , ain , aout , params ) ; } }
Source:
public com.android.build.gradle.tasks.ZipAlign getZipAlign ( ) { com.android.build.gradle.internal.variant.ApkVariantOutputData variantOutputData = getApkVariantData ( ) . getOutputs ( ) . get ( 0 ) ; return variantOutputData.zipAlignTask ; }

Target:
public com.android.build.gradle.tasks.ZipAlign getZipAlign ( ) { if ( ( outputs.size ( ) ) > 1 ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "More than one output on variant '%s', cannot call getZipAlign() on it. Call it on one of its outputs instead." , getName ( ) ) ) ; } plugin.displayDeprecationWarning ( "variant.getZipAlign() is deprecated. Call it on one of variant.getOutputs() instead." ) ; return ( ( com.android.build.gradle.internal.api.ApkVariantOutputImpl ) ( outputs.get ( 0 ) ) ) . getZipAlign ( ) ; }
Source:
public final void activityDestroyed ( android.os.IBinder token ) { if ( com.android.server.am.ActivityManagerService.DEBUG_SWITCH ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( "ACTIVITY DESTROYED: " + token ) ) ; synchronized ( this ) { com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; if ( stack != null ) { stack.activityDestroyedLocked ( token ) ; } } }

Target:
public final void activityDestroyed ( android.os.IBinder token ) { if ( com.android.server.am.ActivityManagerService.DEBUG_SWITCH ) android.util.Slog.v ( com.android.server.am.ActivityManagerService.TAG , ( "ACTIVITY DESTROYED: " + token ) ) ; synchronized ( this ) { com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; if ( stack != null ) { stack.activityDestroyedLocked ( token , "activityDestroyed" ) ; } } }
Source:
public void testUpdateSchedule_noCancel ( ) throws java.lang.Exception { com.android.tv.dvr.ScheduledRecording r = com.android.tv.testing.dvr.RecordingTestUtils.createTestRecordingWithPeriod ( com.android.tv.dvr.InputTaskSchedulerTest.INPUT_ID , com.android.tv.dvr.InputTaskSchedulerTest.CHANNEL_ID , mFakeClock.currentTimeMillis ( ) , ( ( mFakeClock.currentTimeMillis ( ) ) + ( java.util.concurrent.TimeUnit.HOURS.toMillis ( 1 ) ) ) ) ; mScheduler.handleAddSchedule ( r ) ; mScheduler.handleBuildSchedule ( ) ; mScheduler.handleUpdateSchedule ( r ) ; org.mockito.Mockito.verify ( mRecordingTasks.get ( 0 ) , org.mockito.Mockito.timeout ( ( ( int ) ( com.android.tv.dvr.InputTaskSchedulerTest.LISTENER_TIMEOUT_MS ) ) ) . never ( ) ) . cancel ( ) ; }

Target:
public void testUpdateSchedule_noCancel ( ) throws java.lang.Exception { com.android.tv.dvr.ScheduledRecording r = com.android.tv.testing.dvr.RecordingTestUtils.createTestRecordingWithPeriod ( com.android.tv.dvr.InputTaskSchedulerTest.INPUT_ID , com.android.tv.dvr.InputTaskSchedulerTest.CHANNEL_ID , mFakeClock.currentTimeMillis ( ) , ( ( mFakeClock.currentTimeMillis ( ) ) + ( java.util.concurrent.TimeUnit.HOURS.toMillis ( 1 ) ) ) ) ; mScheduler.handleAddSchedule ( r ) ; mScheduler.handleBuildSchedule ( ) ; mScheduler.handleUpdateSchedule ( r ) ; org.mockito.Mockito.verify ( mRecordingTasks.get ( 0 ) , org.mockito.Mockito.after ( ( ( int ) ( com.android.tv.dvr.InputTaskSchedulerTest.LISTENER_TIMEOUT_MS ) ) ) . never ( ) ) . cancel ( ) ; }
Source:
public void testRunNormalInputCommandFailed ( ) { mTest.setDevice ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockDevice ( ) ) ; mTest.setRunUtil ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockRunUtil ( "which" , "python" , CommandStatus.FAILED ) ) ; try { mTest.run ( mMockInvocationListener ) ; fail ( ) ; } catch ( java.lang.RuntimeException e ) { if ( ! ( "Failed to run VTS test" . equals ( e.getMessage ( ) ) ) ) { fail ( ) ; } } catch ( com.android.tradefed.device.DeviceNotAvailableException e ) { fail ( ) ; e.printStackTrace ( ) ; } }

Target:
public void testRunNormalInputCommandFailed ( ) { mProcessHelper = com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockProcessHelper ( CommandStatus.FAILED ) ; mTest.setDevice ( com.android.tradefed.testtype.VtsMultiDeviceTestTest.createMockDevice ( ) ) ; mTest.setRunUtil ( createMockRunUtil ( "which" ) ) ; try { mTest.run ( mMockInvocationListener ) ; fail ( ) ; } catch ( java.lang.RuntimeException e ) { if ( ! ( "Failed to run VTS test" . equals ( e.getMessage ( ) ) ) ) { fail ( ) ; } } catch ( com.android.tradefed.device.DeviceNotAvailableException e ) { fail ( ) ; e.printStackTrace ( ) ; } }
Source:
public void testGetOldCall ( ) throws java.lang.Exception { assertEquals ( "setProgressBarVisibility" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use setSupportProgressBarVisibility instead of setProgressBarVisibility name" ) ) ; assertEquals ( "getActionBar" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use getSupportActionBar instead of getActionBar name" ) ) ; assertNull ( com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "No match" ) ) ; }

Target:
public void testGetOldCall ( ) throws java.lang.Exception { assertEquals ( "setProgressBarVisibility" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use setSupportProgressBarVisibility instead of setProgressBarVisibility name" , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertEquals ( "getActionBar" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use getSupportActionBar instead of getActionBar name" , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertNull ( com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "No match" , com.android.tools.lint.detector.api.TextFormat.TEXT ) ) ; assertEquals ( "setProgressBarVisibility" , com.android.tools.lint.checks.AppCompatCallDetector.getOldCall ( "Should use `setSupportProgressBarVisibility` instead of `setProgressBarVisibility` name" , com.android.tools.lint.detector.api.TextFormat.RAW ) ) ; }
Source:
public final java.lang.invoke.MethodHandle toMethodHandle ( java.lang.invoke.VarHandle.AccessMode accessMode ) { unsupported ( ) ; return null ; }

Target:
static int accessTypesToBitMask ( final java.util.EnumSet < java.lang.invoke.VarHandle.AccessType > accessTypes ) { int m = 0 ; for ( java.lang.invoke.VarHandle.AccessMode accessMode : java.lang.invoke.VarHandle.AccessMode.values ( ) ) { if ( accessTypes.contains ( accessMode.at ) ) { m |= 1 << ( accessMode.ordinal ( ) ) ; } } return m ; }
Source:
private com.android.builder.core.VariantConfiguration getVariant ( ) { com.android.builder.core.VariantConfiguration variant = new com.android.builder.core.VariantConfiguration ( mDefaultConfig , new com.android.builder.core.MockSourceProvider ( "main" ) , mBuildType , new com.android.builder.core.MockSourceProvider ( "debug" ) , VariantConfiguration.Type.DEFAULT ) ; variant.addProductFlavor ( mFlavorConfig , new com.android.builder.core.MockSourceProvider ( "custom" ) , "" ) ; return variant ; }

Target:
public void testSigningProductFlavorOverride ( ) { com.android.builder.signing.DefaultSigningConfig defaultConfig = new com.android.builder.signing.DefaultSigningConfig ( "defaultConfig" ) ; defaultConfig.setStorePassword ( "debug" ) ; mDefaultConfig.setSigningConfig ( defaultConfig ) ; com.android.builder.signing.DefaultSigningConfig override = new com.android.builder.signing.DefaultSigningConfig ( "override" ) ; override.setStorePassword ( "override" ) ; com.android.builder.core.VariantConfiguration variant = getVariant ( override ) ; assertEquals ( override , variant.getSigningConfig ( ) ) ; }
Source:
private com.android.ims.internal.ImsCallSession createCallSession ( com.android.ims.ImsCallProfile profile ) throws com.android.ims.ImsException { try { return new com.android.ims.internal.ImsCallSession ( mMmTelFeatureConnection.createCallSession ( profile ) ) ; } catch ( android.os.RemoteException e ) { android.telephony.Rlog.w ( com.android.ims.ImsManager.TAG , ( "CreateCallSession: Error, remote exception: " + ( e.getMessage ( ) ) ) ) ; throw new com.android.ims.ImsException ( "createCallSession()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }

Target:
private android.telephony.ims.ImsCallSession createCallSession ( android.telephony.ims.ImsCallProfile profile ) throws com.android.ims.ImsException { try { return new android.telephony.ims.ImsCallSession ( mMmTelFeatureConnection.createCallSession ( profile ) ) ; } catch ( android.os.RemoteException e ) { android.telephony.Rlog.w ( com.android.ims.ImsManager.TAG , ( "CreateCallSession: Error, remote exception: " + ( e.getMessage ( ) ) ) ) ; throw new com.android.ims.ImsException ( "createCallSession()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } }
Source:
private void createMethod ( org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration x ) { if ( x instanceof org.eclipse.jdt.internal.compiler.ast.Clinit ) { return ; } getTypeMap ( ) . get ( x.binding ) ; }

Target:
private void createMethod ( org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration x ) { try { if ( x instanceof org.eclipse.jdt.internal.compiler.ast.Clinit ) { return ; } getTypeMap ( ) . get ( x.binding ) ; } catch ( com.android.jack.ir.ast.JTypeLookupException e ) { throw translateException ( x , e ) ; } catch ( java.lang.RuntimeException e ) { throw translateException ( x , e ) ; } }
Source:
public void testInterfaceCountersUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1000 , false ) ; }

Target:
public void testAesCbcHmacMd5Tcp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV6_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV6_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { boolean matches = com.android.manifmerger.AttributeModel.BooleanValidator.PATTERN.matcher ( value ) . matches ( ) ; if ( ! matches ) { mergingReport.addError ( java.lang.String.format ( ( "Attribute %1$s at %2$s has an illegal value=(%3$s), " + "expected 'true' or 'false'" ) , attribute.getId ( ) , attribute.printPosition ( ) , value ) ) ; } return matches ; }

Target:
public boolean validates ( @ com.android.annotations.NonNull com.android.manifmerger.MergingReport.Builder mergingReport , @ com.android.annotations.NonNull com.android.manifmerger.XmlAttribute attribute , @ com.android.annotations.NonNull java.lang.String value ) { boolean matches = ( com.android.manifmerger.AttributeModel.BooleanValidator.TRUE_PATTERN.matcher ( value ) . matches ( ) ) || ( com.android.manifmerger.AttributeModel.BooleanValidator.FALSE_PATTERN.matcher ( value ) . matches ( ) ) ; if ( ! matches ) { mergingReport.addError ( java.lang.String.format ( ( "Attribute %1$s at %2$s has an illegal value=(%3$s), " + "expected 'true' or 'false'" ) , attribute.getId ( ) , attribute.printPosition ( ) , value ) ) ; } return matches ; }
Source:
public void testContextMenu ( ) { com.android.ide.common.layout.LinearLayoutRule rule = new com.android.ide.common.layout.LinearLayoutRule ( ) ; initialize ( rule , "android.widget.LinearLayout" ) ; com.android.ide.common.api.INode node = com.android.ide.common.layout.TestNode.create ( "android.widget.Button" ) . id ( "@+id/Button012" ) ; java.util.List < com.android.ide.common.api.MenuAction > contextMenu = rule.getContextMenu ( node ) ; assertEquals ( 4 , contextMenu.size ( ) ) ; assertEquals ( "Layout Width" , contextMenu.get ( 0 ) . getTitle ( ) ) ; assertEquals ( "Layout Height" , contextMenu.get ( 1 ) . getTitle ( ) ) ; assertEquals ( "Properties" , contextMenu.get ( 2 ) . getTitle ( ) ) ; assertEquals ( "Orientation" , contextMenu.get ( 3 ) . getTitle ( ) ) ; com.android.ide.common.api.MenuAction propertiesMenu = contextMenu.get ( 2 ) ; assertTrue ( propertiesMenu.getClass ( ) . getName ( ) , ( propertiesMenu instanceof com.android.ide.common.api.MenuAction.Group ) ) ; }

Target:
public void testContextMenuCustom ( ) { com.android.ide.common.layout.LinearLayoutRule rule = new com.android.ide.common.layout.LinearLayoutRule ( ) ; initialize ( rule , "android.widget.LinearLayout" ) ; com.android.ide.common.api.INode node = com.android.ide.common.layout.TestNode.create ( "android.widget.Button" ) . id ( "@+id/Button012" ) . set ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_WIDTH , "42dip" ) . set ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_HEIGHT , "50sp" ) ; java.util.List < com.android.ide.common.api.MenuAction > contextMenu = rule.getContextMenu ( node ) ; assertEquals ( 6 , contextMenu.size ( ) ) ; assertEquals ( "Layout Width" , contextMenu.get ( 2 ) . getTitle ( ) ) ; com.android.ide.common.api.MenuAction menuAction = contextMenu.get ( 2 ) ; assertTrue ( ( menuAction instanceof com.android.ide.common.api.MenuAction.Choices ) ) ; com.android.ide.common.api.MenuAction.Choices choices = ( ( com.android.ide.common.api.MenuAction.Choices ) ( menuAction ) ) ; java.util.Map < java.lang.String , java.lang.String > items = choices.getChoices ( ) ; assertTrue ( items.containsKey ( "42dip" ) ) ; assertTrue ( items.containsValue ( "42dip" ) ) ; assertEquals ( "Other..." , items.get ( "zcustom" ) ) ; assertEquals ( "Match Parent" , items.get ( "match_parent" ) ) ; assertEquals ( "42dip" , choices.getCurrent ( ) ) ; }
Source:
private void initResponseCache ( ) throws java.io.IOException { java.lang.String tmp = java.lang.System.getProperty ( "java.io.tmpdir" ) ; java.io.File cacheDir = new java.io.File ( tmp , ( "HttpCache-" + ( java.util.UUID.randomUUID ( ) ) ) ) ; cache = new libcore.net.http.HttpResponseCache ( cacheDir , java.lang.Integer.MAX_VALUE ) ; java.net.ResponseCache.setDefault ( cache ) ; }

Target:
private void initResponseCache ( ) throws java.io.IOException { java.lang.String tmp = java.lang.System.getProperty ( "java.io.tmpdir" ) ; java.io.File cacheDir = new java.io.File ( tmp , ( "HttpCache-" + ( java.util.UUID.randomUUID ( ) ) ) ) ; cache = new com.android.okhttp.internal.http.HttpResponseCache ( cacheDir , java.lang.Integer.MAX_VALUE ) ; java.net.ResponseCache.setDefault ( cache ) ; }
Source:
public com.android.sched.vfs.InputOutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { final com.android.sched.vfs.ReadWriteZipFS vfs = new com.android.sched.vfs.ReadWriteZipFS ( new com.android.sched.util.file.OutputZipFile ( string , hooks , existence , change ) ) ; return new com.android.sched.vfs.GenericInputOutputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.InputOutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { final com.android.sched.vfs.ReadWriteZipFS vfs = new com.android.sched.vfs.ReadWriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change ) ) ; return new com.android.sched.vfs.GenericInputOutputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public void onSharedPreferenceChanged ( android.content.SharedPreferences sharedPreferences , java.lang.String key ) { android.preference.Preference pref = findPreference ( key ) ; if ( pref != null ) { pref.setSummary ( checkNull ( sharedPreferences.getString ( key , "" ) ) ) ; } }

Target:
public void onSharedPreferenceChanged ( android.content.SharedPreferences sharedPreferences , java.lang.String key ) { android.preference.Preference pref = findPreference ( key ) ; if ( pref != null ) { if ( pref.equals ( mPassword ) ) { pref.setSummary ( starify ( sharedPreferences.getString ( key , "" ) ) ) ; } else { pref.setSummary ( checkNull ( sharedPreferences.getString ( key , "" ) ) ) ; } } }
Source:
private void removeTimeoutsForActivityLocked ( com.android.server.am.ActivityRecord r ) { mHandler.removeMessages ( com.android.server.am.ActivityStack.PAUSE_TIMEOUT_MSG , r ) ; mHandler.removeMessages ( com.android.server.am.ActivityStack.STOP_TIMEOUT_MSG , r ) ; mHandler.removeMessages ( com.android.server.am.ActivityStack.IDLE_TIMEOUT_MSG , r ) ; mHandler.removeMessages ( com.android.server.am.ActivityStack.DESTROY_TIMEOUT_MSG , r ) ; r.finishLaunchTickingLocked ( ) ; }

Target:
private void removeTimeoutsForActivityLocked ( com.android.server.am.ActivityRecord r ) { mStackSupervisor.removeTimeoutsForActivityLocked ( r ) ; mHandler.removeMessages ( com.android.server.am.ActivityStack.PAUSE_TIMEOUT_MSG , r ) ; mHandler.removeMessages ( com.android.server.am.ActivityStack.STOP_TIMEOUT_MSG , r ) ; mHandler.removeMessages ( com.android.server.am.ActivityStack.DESTROY_TIMEOUT_MSG , r ) ; r.finishLaunchTickingLocked ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.reset ( mContext ) ; org.mockito.Mockito.reset ( mCS ) ; mCM = org.mockito.Mockito.spy ( new com.android.server.connectivity.tethering.UpstreamNetworkMonitorTest.TestConnectivityManager ( mContext , mCS ) ) ; mUNM = new com.android.server.connectivity.tethering.UpstreamNetworkMonitor ( null , com.android.server.connectivity.tethering.UpstreamNetworkMonitorTest.EVENT_UNM_UPDATE , ( ( android.net.ConnectivityManager ) ( mCM ) ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; org.mockito.Mockito.reset ( mContext ) ; org.mockito.Mockito.reset ( mCS ) ; mCM = org.mockito.Mockito.spy ( new com.android.server.connectivity.tethering.UpstreamNetworkMonitorTest.TestConnectivityManager ( mContext , mCS ) ) ; mSM = new com.android.server.connectivity.tethering.UpstreamNetworkMonitorTest.TestStateMachine ( ) ; mUNM = new com.android.server.connectivity.tethering.UpstreamNetworkMonitor ( mSM , com.android.server.connectivity.tethering.UpstreamNetworkMonitorTest.EVENT_UNM_UPDATE , ( ( android.net.ConnectivityManager ) ( mCM ) ) ) ; }
Source:
public android.content.pm.UserInfo createUser ( java.lang.String name , int flags ) { com.android.server.pm.PackageManagerService.enforceSystemOrRoot ( "Only the system can create users" ) ; android.content.pm.UserInfo userInfo = com.android.server.pm.PackageManagerService.sUserManager.createUser ( name , flags ) ; if ( userInfo != null ) { android.content.Intent addedIntent = new android.content.Intent ( android.content.Intent.ACTION_USER_ADDED ) ; addedIntent.putExtra ( Intent.EXTRA_USERID , userInfo.id ) ; mContext.sendBroadcast ( addedIntent , android.Manifest.permission.MANAGE_ACCOUNTS ) ; } return userInfo ; }

Target:
public int getComponentEnabledSetting ( android.content.ComponentName componentName , int userId ) { if ( ! ( com.android.server.pm.PackageManagerService.sUserManager.exists ( userId ) ) ) return android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED ; int uid = android.os.Binder.getCallingUid ( ) ; enforceCrossUserPermission ( uid , userId , false , "get component enabled" ) ; synchronized ( mPackages ) { return mSettings.getComponentEnabledSettingLPr ( componentName , userId ) ; } }
Source:
public final byte get ( ) { if ( ( position ) == ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } return this . block.peekByte ( ( ( offset ) + ( ( position ) ++ ) ) ) ; }

Target:
public final short getShort ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.SHORT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } short result = this . block.peekShort ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }
Source:
public void convertLibraryToJack ( @ com.android.annotations.NonNull java.io.File inputFile , @ com.android.annotations.NonNull java.io.File outFile , @ com.android.annotations.NonNull com.android.builder.core.DexOptions dexOptions ) throws com.android.ide.common.process.ProcessException , java.io.IOException , java.lang.InterruptedException { com.google.common.base.Preconditions.checkState ( ( ( mTargetInfo ) != null ) , "Cannot call preJackLibrary() before setTargetInfo() is called." ) ; com.android.sdklib.BuildToolInfo buildToolInfo = mTargetInfo.getBuildTools ( ) ; com.android.builder.internal.compiler.JackConversionCache.getCache ( ) . convertLibrary ( inputFile , outFile , dexOptions , buildToolInfo , mVerboseExec , mJavaProcessExecutor , mProcessOutputHandler ) ; }

Target:
public void convertLibraryToJack ( @ com.android.annotations.NonNull java.io.File inputFile , @ com.android.annotations.NonNull java.io.File outFile , @ com.android.annotations.NonNull com.android.builder.core.DexOptions dexOptions ) throws com.android.ide.common.process.ProcessException , java.io.IOException , java.lang.InterruptedException { com.google.common.base.Preconditions.checkState ( ( ( mTargetInfo ) != null ) , "Cannot call preJackLibrary() before setTargetInfo() is called." ) ; com.android.sdklib.BuildToolInfo buildToolInfo = mTargetInfo.getBuildTools ( ) ; com.android.builder.internal.compiler.JackConversionCache.getCache ( ) . convertLibrary ( inputFile , outFile , dexOptions , buildToolInfo , mVerboseExec , mJavaProcessExecutor , mProcessOutputHandler , mLogger ) ; }
Source:
public void testRefactor2 ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.renamepackage.TEST_PROJECT2 , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "* Refactoring Application package name\n" ) + "\n" ) + " * MyFragment.java - /testRefactor2/src/com/example/refactoringtest/MyFragment.java\n" ) + " @@ -3 +3\n" ) + " + import my.pkg.name.R;\n" ) + "\n" ) + "\n" ) + " * MainActivity.java - /testRefactor2/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -7 +7\n" ) + " + import my.pkg.name.R;\n" ) + "\n" ) + "\n" ) + " * CustomView1.java - /testRefactor2/src/com/example/refactoringtest/CustomView1.java\n" ) + " @@ -5 +5\n" ) + " + import my.pkg.name.R;\n" ) + "\n" ) + "\n" ) + " * Make Manifest edits - /testRefactor2/AndroidManifest.xml\n" ) + " @@ -3 +3\n" ) + " - package=\"com.example.refactoringtest\"\n" ) + " + package=\"my.pkg.name\"\n" ) + " @@ -25 +25\n" ) + " - android:name=\".MainActivity2\"\n" ) + " + android:name=\"com.example.refactoringtest.MainActivity2\"" ) ) ) ; }

Target:
public void testRefactor2 ( ) throws java.lang.Exception { renamePackage ( com.android.ide.eclipse.adt.internal.refactorings.renamepackage.TEST_PROJECT2 , "my.pkg.name" , ( "CHANGES:\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "-------\n" + "[x] MyFragment.java - /testRefactor2/src/com/example/refactoringtest/MyFragment.java\n" ) + " @@ -3 +3\n" ) + " + import my.pkg.name.R;\n" ) + "\n" ) + "\n" ) + "[x] MainActivity.java - /testRefactor2/src/com/example/refactoringtest/MainActivity.java\n" ) + " @@ -7 +7\n" ) + " + import my.pkg.name.R;\n" ) + "\n" ) + "\n" ) + "[x] CustomView1.java - /testRefactor2/src/com/example/refactoringtest/CustomView1.java\n" ) + " @@ -5 +5\n" ) + " + import my.pkg.name.R;\n" ) + "\n" ) + "\n" ) + "[x] Make Manifest edits - /testRefactor2/AndroidManifest.xml\n" ) + " @@ -3 +3\n" ) + " - package=\"com.example.refactoringtest\"\n" ) + " + package=\"my.pkg.name\"\n" ) + " @@ -25 +25\n" ) + " - android:name=\".MainActivity2\"\n" ) + " + android:name=\"com.example.refactoringtest.MainActivity2\"" ) ) ) ; }
Source:
public void testE1 ( ) { dot.junit.opcodes.aput_object.d.T_aput_object_1 t = new dot.junit.opcodes.aput_object.d.T_aput_object_1 ( ) ; java.lang.String [ ] arr = new java.lang.String [ 2 ] ; try { t.run ( arr , arr.length , "abc" ) ; fail ( "expected ArrayIndexOutOfBoundsException" ) ; } catch ( java.lang.ArrayIndexOutOfBoundsException aie ) { } }

Target:
public void testE2 ( ) { loadAndRun ( "dot.junit.opcodes.aput_object.d.T_aput_object_1" , java.lang.ArrayIndexOutOfBoundsException.class , new java.lang.String [ 2 ] , ( - 1 ) , "abc" ) ; }
Source:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onPageSelected" ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( getActivity ( ) ) instanceof com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ) { ( ( com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ( getActivity ( ) ) ) . enableFloatingButton ( ( ! ( isModalAlertVisible ( ) ) ) ) ; } }

Target:
public void onVisible ( ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFragment.onPageSelected" ) ; if ( ( ( getActivity ( ) ) != null ) && ( ( getActivity ( ) ) instanceof com.android.dialer.app.calllog.CallLogFragment.HostInterface ) ) { com.android.dialer.common.FragmentUtils.getParentUnsafe ( this , com.android.dialer.app.calllog.CallLogFragment.HostInterface.class ) . enableFloatingButton ( ( ! ( isModalAlertVisible ( ) ) ) ) ; } }
Source:
private void postMessage ( int messageCode ) { synchronized ( this ) { if ( ( mHandler ) == null ) { mHandler = getNewHandler ( ) ; } if ( ( mHandler ) == null ) { android.telecom.Log.d ( this , "Message %d skipped because there is no handler." , messageCode ) ; } else { mHandler.obtainMessage ( messageCode , null ) . sendToTarget ( ) ; } } }

Target:
public com.android.server.telecom.DtmfLocalTonePlayer.ToneHandler getHandler ( ) { if ( ( mHandler ) == null ) { android.os.HandlerThread thread = new android.os.HandlerThread ( "tonegenerator-dtmf" ) ; thread.start ( ) ; mHandler = new com.android.server.telecom.DtmfLocalTonePlayer.ToneHandler ( thread.getLooper ( ) ) ; } return mHandler ; }
Source:
public final void testPkgTypeAddon ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_ADDONS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeAddon ( ) throws java.lang.Exception { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_ADDONS ; assertTrue ( p.hasMajorRevision ( ) ) ; assertFalse ( p.hasFullRevision ( ) ) ; assertTrue ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
private android.net.RecommendationResult verifyAndCaptureResult ( android.net.RecommendationRequest request ) { mProvider.doOnRequestRecommendation ( request , mCallback ) ; org.mockito.ArgumentCaptor < android.net.RecommendationResult > resultCaptor = org.mockito.ArgumentCaptor.forClass ( android.net.RecommendationResult.class ) ; org.mockito.Mockito.verify ( mCallback ) . onResult ( resultCaptor.capture ( ) ) ; return resultCaptor.getValue ( ) ; }

Target:
private android.net.RecommendationResult verifyAndCaptureResult ( android.net.RecommendationRequest request ) { mProvider.onRequestRecommendation ( request , mCallback ) ; org.mockito.ArgumentCaptor < android.net.RecommendationResult > resultCaptor = org.mockito.ArgumentCaptor.forClass ( android.net.RecommendationResult.class ) ; org.mockito.Mockito.verify ( mCallback ) . onResult ( resultCaptor.capture ( ) ) ; return resultCaptor.getValue ( ) ; }
Source:
public void validateUserCredentialWithoutAuthMethod ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.userCredential = new android.net.wifi.hotspot2.pps.Credential.UserCredential ( ) ; cred.userCredential.username = "username" ; cred.userCredential.password = "password" ; cred.userCredential.eapType = android.net.wifi.EAPConstants.EAP_TTLS ; cred.caCertificate = android.net.wifi.FakeKeys.CA_CERT0 ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }

Target:
public void validateUserCredentialWithoutAuthMethod ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.Credential cred = android.net.wifi.hotspot2.pps.CredentialTest.createCredentialWithUserCredential ( ) ; cred.getUserCredential ( ) . setNonEapInnerMethod ( null ) ; org.junit.Assert.assertFalse ( cred.validate ( ) ) ; }
Source:
static void packageObfuscationDictionary ( @ javax.annotation.Nonnull com.android.jack.shrob.spec.Flags flags , java.lang.String baseDir , java.lang.String fileName ) { assert fileName != null ; assert baseDir != null ; java.io.File dictionary = com.android.jack.shrob.proguard.GrammarActions.getFileFromBaseDir ( baseDir , fileName ) ; if ( ! ( dictionary.exists ( ) ) ) { throw new java.lang.AssertionError ( ( ( dictionary.getAbsolutePath ( ) ) + " not found" ) ) ; } flags.setPackageObfuscationDictionary ( dictionary ) ; }

Target:
static void packageObfuscationDictionary ( @ javax.annotation.Nonnull com.android.jack.shrob.spec.Flags flags , java.lang.String baseDir , java.lang.String fileName ) { assert fileName != null ; assert baseDir != null ; java.io.File dictionary = com.android.jack.shrob.proguard.GrammarActions.getFileFromBaseDir ( baseDir , fileName ) ; if ( ! ( dictionary.exists ( ) ) ) { throw new java.lang.AssertionError ( ( ( dictionary.getPath ( ) ) + " not found" ) ) ; } flags.setPackageObfuscationDictionary ( dictionary ) ; }
Source:
void queryRemoteConnectionServices ( com.android.internal.telecom.RemoteServiceCallback callback ) { if ( ( mAdapters.size ( ) ) == 1 ) { try { mAdapters.iterator ( ) . next ( ) . queryRemoteConnectionServices ( callback ) ; } catch ( android.os.RemoteException e ) { android.telecom.Log.e ( this , e , "Exception trying to query for remote CSs" ) ; } } }

Target:
void queryRemoteConnectionServices ( com.android.internal.telecom.RemoteServiceCallback callback ) { if ( ( mAdapters.size ( ) ) == 1 ) { try { mAdapters.iterator ( ) . next ( ) . queryRemoteConnectionServices ( callback , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException e ) { android.telecom.Log.e ( this , e , "Exception trying to query for remote CSs" ) ; } } }
Source:
public void finalize ( ) { debugLog ( ( "finalize() - clean up object " + ( this ) ) ) ; cleanup ( ) ; if ( com.android.bluetooth.btservice.AdapterService.TRACE_REF ) { synchronized ( com.android.bluetooth.btservice.AdapterService.class ) { ( com.android.bluetooth.btservice.AdapterService.sRefCount ) -- ; debugLog ( ( "finalize() - REFCOUNT: FINALIZED. INSTANCE_COUNT= " + ( com.android.bluetooth.btservice.AdapterService.sRefCount ) ) ) ; } } }

Target:
public int getMaxConnectedAudioDevices ( ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; return mAdapterProperties.getMaxConnectedAudioDevices ( ) ; }
Source:
public void addHandler ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JBasicBlock handler ) { catchBlocks.add ( handler ) ; handler.addPredecessor ( this ) ; }

Target:
public void resetCatchBlocks ( ) { for ( com.android.jack.ir.ast.cfg.JBasicBlock block : catchBlocks ) { this . removeSuccessor ( block ) ; } catchBlocks.clear ( ) ; catchBlocks.addAll ( getLastElement ( ) . getEHContext ( ) . getCatchBlocks ( ) ) ; for ( com.android.jack.ir.ast.cfg.JBasicBlock block : catchBlocks ) { block.addPredecessor ( this ) ; } }
Source:
public void onClick ( android.view.View widget ) { android.net.Uri uri = android.net.Uri.parse ( getURL ( ) ) ; android.content.Context context = widget.getContext ( ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW , uri ) ; intent.putExtra ( Browser.EXTRA_APPLICATION_ID , context.getPackageName ( ) ) ; context.startActivity ( intent ) ; }

Target:
public void onClick ( android.view.View widget ) { android.net.Uri uri = android.net.Uri.parse ( getURL ( ) ) ; android.content.Context context = widget.getContext ( ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW , uri ) ; intent.putExtra ( Browser.EXTRA_APPLICATION_ID , context.getPackageName ( ) ) ; try { context.startActivity ( intent ) ; } catch ( android.content.ActivityNotFoundException e ) { android.util.Log.w ( "URLSpan" , ( "Actvity was not found for intent, " + ( intent.toString ( ) ) ) ) ; } }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final java.lang.String action = intent.getAction ( ) ; if ( TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals ( action ) ) { if ( IccCardConstants.INTENT_VALUE_ICC_LOADED.equals ( intent.getStringExtra ( IccCardConstants.INTENT_KEY_ICC_STATE ) ) ) { sendEmptyMessage ( com.android.internal.telephony.CarrierActionAgent.CARRIER_ACTION_RESET ) ; } } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final java.lang.String action = intent.getAction ( ) ; final java.lang.String iccState = intent.getStringExtra ( IccCardConstants.INTENT_KEY_ICC_STATE ) ; if ( TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals ( action ) ) { if ( ( IccCardConstants.INTENT_VALUE_ICC_LOADED.equals ( iccState ) ) || ( IccCardConstants.INTENT_VALUE_ICC_ABSENT.equals ( iccState ) ) ) { sendEmptyMessage ( com.android.internal.telephony.CarrierActionAgent.CARRIER_ACTION_RESET ) ; } } }