auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( "EAP Method " ) . append ( mEAPMethodID ) . append ( '\n' ) ; for ( java.util.Set < com.android.server.wifi.hotspot2.anqp.eap.AuthParam > paramSet : mAuthParams.values ( ) ) { for ( com.android.server.wifi.hotspot2.anqp.eap.AuthParam param : paramSet ) { sb.append ( " " ) . append ( param.toString ( ) ) ; } } return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( "EAPMethod{mEAPMethodID=" + ( mEAPMethodID ) ) + " mAuthParams=" ) + ( mAuthParams ) ) + "}" ; }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.System.loadLibrary ( "arttest" ) ; JniTest.testFindClassOnAttachedNativeThread ( ) ; JniTest.testFindFieldOnAttachedNativeThread ( ) ; JniTest.testCallStaticVoidMethodOnSubClass ( ) ; JniTest.testGetMirandaMethod ( ) ; JniTest.testZeroLengthByteBuffers ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { java.lang.System.loadLibrary ( "arttest" ) ; JniTest.testFindClassOnAttachedNativeThread ( ) ; JniTest.testFindFieldOnAttachedNativeThread ( ) ; JniTest.testCallStaticVoidMethodOnSubClass ( ) ; JniTest.testGetMirandaMethod ( ) ; JniTest.testZeroLengthByteBuffers ( ) ; JniTest.testByteMethod ( ) ; JniTest.testShortMethod ( ) ; JniTest.testBooleanMethod ( ) ; JniTest.testCharMethod ( ) ; }
Source:
public void testNotifyPrimaryForeignUse ( ) { notifyDexLoad ( mFooUser0 , mBarUser0.getBaseAndSplitDexPaths ( ) , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mBarUser0 ) ; org.junit.Assert.assertTrue ( pui.isUsedByOtherApps ( ) ) ; org.junit.Assert.assertTrue ( pui.getDexUseInfoMap ( ) . isEmpty ( ) ) ; }

Target:
public void testNotifyPrimaryForeignUse ( ) { notifyDexLoad ( mFooUser0 , mBarUser0.getBaseAndSplitDexPaths ( ) , mUser0 ) ; com.android.server.pm.dex.PackageDexUsage.PackageUseInfo pui = getPackageUseInfo ( mBarUser0 ) ; assertIsUsedByOtherApps ( mBarUser0 , pui , true ) ; org.junit.Assert.assertTrue ( pui.getDexUseInfoMap ( ) . isEmpty ( ) ) ; }
Source:
public lombok.ast.AstVisitor createJavaVisitor ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context ) { return new com.android.tools.lint.checks.DateFormatDetector.ConstructorVisitor ( context ) ; }

Target:
public void visitConstructor ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable lombok.ast.AstVisitor visitor , @ com.android.annotations.NonNull lombok.ast.ConstructorInvocation node , @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedMethod constructor ) { if ( ! ( com.android.tools.lint.checks.DateFormatDetector.specifiesLocale ( constructor ) ) ) { com.android.tools.lint.detector.api.Location location = context.getLocation ( node ) ; java.lang.String message = "To get local formatting use `getDateInstance()`, `getDateTimeInstance()`, " + ( "or `getTimeInstance()`, or use `new SimpleDateFormat(String template, " + "Locale locale)` with for example `Locale.US` for ASCII dates." ) ; context.report ( com.android.tools.lint.checks.DateFormatDetector.DATE_FORMAT , node , location , message ) ; } }
Source:
public boolean isMultipartDownload ( ) { return ( ( getSourceUri ( ) . getLastPathSegment ( ) ) != null ) && ( getSourceUri ( ) . getLastPathSegment ( ) . contains ( "*" ) ) ; }

Target:
public void writeToParcel ( android.os.Parcel out , int flags ) { out.writeString ( fileServiceId ) ; out.writeParcelable ( sourceUri , flags ) ; out.writeParcelable ( destinationUri , flags ) ; out.writeInt ( subscriptionId ) ; out.writeString ( serializedResultIntentForApp ) ; out.writeInt ( version ) ; }
Source:
public void trackingEnabled_reliabilityTrigger_afterRebootNoTriggerNeeded ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; com.android.server.timezone.PackageVersions packageVersions = configureValidApplications ( ) ; mPackageStatusStorage.forceCheckStateForTests ( PackageStatus.CHECK_COMPLETED_SUCCESS , packageVersions ) ; mPackageTracker.start ( ) ; checkIntentHelperInitializedAndReliabilityTrackingEnabled ( ) ; checkPackageStorageStatus ( PackageStatus.CHECK_COMPLETED_SUCCESS , packageVersions ) ; mFakeIntentHelper.simulateReliabilityTrigger ( ) ; mFakeIntentHelper.assertUpdateNotTriggered ( ) ; checkUpdateCheckSuccessful ( packageVersions ) ; }

Target:
public void trackingEnabled_reliabilityTrigger_afterRebootNoTriggerNeeded ( ) throws java.lang.Exception { configureTrackingEnabled ( ) ; configureReliabilityConfigSettingsOk ( ) ; com.android.server.timezone.PackageVersions packageVersions = configureValidApplications ( ) ; mPackageStatusStorage.forceCheckStateForTests ( PackageStatus.CHECK_COMPLETED_SUCCESS , packageVersions ) ; mPackageTracker.start ( ) ; checkIntentHelperInitializedAndReliabilityTrackingEnabled ( ) ; checkPackageStorageStatus ( PackageStatus.CHECK_COMPLETED_SUCCESS , packageVersions ) ; mPackageTracker.triggerUpdateIfNeeded ( false ) ; mFakeIntentHelper.assertUpdateNotTriggered ( ) ; checkUpdateCheckSuccessful ( packageVersions ) ; }
Source:
public void testBasic ( ) { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.build.gradle.model.AndroidProject model = projectData.model ; assertFalse ( "Library Project" , model.isLibrary ( ) ) ; assertEquals ( "Compile Target" , "android-15" , model.getCompileTarget ( ) ) ; assertFalse ( "Non empty bootclasspath" , model.getBootClasspath ( ) . isEmpty ( ) ) ; }

Target:
public void testBasic ( ) { com.android.build.gradle.model.AndroidProjectTest.ProjectData projectData = getModelForProject ( "basic" ) ; com.android.builder.model.AndroidProject model = projectData.model ; assertFalse ( "Library Project" , model.isLibrary ( ) ) ; assertEquals ( "Compile Target" , "android-15" , model.getCompileTarget ( ) ) ; assertFalse ( "Non empty bootclasspath" , model.getBootClasspath ( ) . isEmpty ( ) ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod jmethod ) { com.android.jack.ir.ast.JVariable thisVar = jmethod.getThis ( ) ; if ( thisVar != null ) { if ( ! ( thisVar.containsMarker ( com.android.jack.analysis.DefinitionMarker.class ) ) ) { thisVar.addMarkerIfAbsent ( new com.android.jack.analysis.DefinitionMarker ( thisVar ) ) ; } } return super . visit ( jmethod ) ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod jmethod ) { com.android.jack.ir.ast.JVariable thisVar = jmethod.getThis ( ) ; if ( thisVar != null ) { if ( ( thisVar.getMarker ( com.android.jack.analysis.DefinitionMarker.class ) ) == null ) { thisVar.addMarker ( new com.android.jack.analysis.DefinitionMarker ( thisVar ) ) ; } } return super . visit ( jmethod ) ; }
Source:
public void setOverlayImage ( final org.eclipse.swt.graphics.Image overlayImage ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this ) { if ( ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this . overlayImage ) != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.this . overlayImage.dispose ( ) ; } com.android.hierarchyviewerlib.models.PixelPerfectModel.this . overlayImage = overlayImage ; } } } ) ; notifyOverlayChanged ( ) ; }

Target:
public void setOverlayImage ( final org.eclipse.swt.graphics.Image overlayImage ) { final org.eclipse.swt.graphics.Image toDispose = this . overlayImage ; org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { synchronized ( com.android.hierarchyviewerlib.models.PixelPerfectModel.this ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.this . overlayImage = overlayImage ; } } } ) ; notifyOverlayChanged ( ) ; if ( toDispose != null ) { org.eclipse.swt.widgets.Display.getDefault ( ) . syncExec ( new java.lang.Runnable ( ) { public void run ( ) { toDispose.dispose ( ) ; } } ) ; } }
Source:
protected void doApply ( java.util.zip.ZipFile patchFile , java.io.File toFile ) throws java.io.IOException { com.intellij.updater.Utils.delete ( toFile ) ; }

Target:
protected void doApply ( java.util.zip.ZipFile patchFile , java.io.File toFile ) throws java.io.IOException { try { com.intellij.updater.Utils.delete ( toFile ) ; } catch ( java.io.IOException e ) { if ( ( com.intellij.updater.Utils.isWindows ( ) ) && ( toFile.exists ( ) ) ) { throw new com.intellij.updater.RetryException ( e ) ; } else { throw e ; } } }
Source:
private static void sendMulticastMessage ( java.net.InetAddress group , int port , java.lang.String msg ) throws java.io.IOException { libcore.java.nio.channels.DatagramChannelMulticastTest.sendMulticastMessage ( group , port , msg , null ) ; }

Target:
private static void sendMessage ( java.net.InetAddress targetGroup , int targetPort , java.lang.String msg , java.net.NetworkInterface sendingInterface ) throws java.io.IOException { java.nio.channels.DatagramChannel dc = java.nio.channels.DatagramChannel.open ( ) ; dc.setOption ( java.net.StandardSocketOptions.IP_MULTICAST_IF , sendingInterface ) ; libcore.java.nio.channels.DatagramChannelMulticastTest.sendMessage ( dc , msg , new java.net.InetSocketAddress ( targetGroup , targetPort ) ) ; dc.close ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.System.loadLibrary ( "arttest" ) ; Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testReflectFieldGetFromAttachedNativeThreadNative ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { java.lang.System.loadLibrary ( "arttest" ) ; Main.testFindClassOnAttachedNativeThread ( ) ; Main.testFindFieldOnAttachedNativeThread ( ) ; Main.testReflectFieldGetFromAttachedNativeThreadNative ( ) ; Main.testCallStaticVoidMethodOnSubClass ( ) ; Main.testGetMirandaMethod ( ) ; Main.testZeroLengthByteBuffers ( ) ; Main.testByteMethod ( ) ; Main.testShortMethod ( ) ; Main.testBooleanMethod ( ) ; Main.testCharMethod ( ) ; Main.testIsAssignableFromOnPrimitiveTypes ( ) ; }
Source:
public static java.io.InputStream getXsdStream ( ) { return com.android.dvlib.DeviceSchema.class . getResourceAsStream ( "devices.xsd" ) ; }

Target:
public static java.io.InputStream getXsdStream ( int version ) { assert ( version >= 1 ) && ( version <= ( com.android.dvlib.DeviceSchema.NS_LATEST_VERSION ) ) ; java.lang.String rootElement = com.android.dvlib.DeviceSchema.NODE_DEVICES ; java.lang.String filename = java.lang.String.format ( "%1$s-%2$d.xsd" , rootElement , version ) ; try { return com.android.dvlib.DeviceSchema.class . getResourceAsStream ( filename ) ; } catch ( java.lang.Exception ignore ) { } return null ; }
Source:
synchronized void nAllocationData1D ( int id , int off , int mip , int count , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData1D ( mContext , id , off , mip , count , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData2D ( int id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID ) ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( parseIntent ( ) ) { finish ( ) ; return ; } createDialog ( ) ; if ( ( getResources ( ) . getBoolean ( R.bool.auto_confirm_bluetooth_activation_dialog ) ) == true ) { onClick ( null , com.android.settings.bluetooth.BUTTON_POSITIVE ) ; dismiss ( ) ; } }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setResult ( com.android.settings.bluetooth.RESULT_CANCELED ) ; if ( ! ( parseIntent ( ) ) ) { finish ( ) ; return ; } if ( getResources ( ) . getBoolean ( R.bool.auto_confirm_bluetooth_activation_dialog ) ) { onClick ( null , com.android.settings.bluetooth.BUTTON_POSITIVE ) ; dismiss ( ) ; } createDialog ( ) ; }
Source:
public boolean startOpenGlTracing ( ) { boolean canTraceOpenGl = mClientData.hasFeature ( ClientData.FEATURE_OPENGL_TRACING ) ; if ( ! canTraceOpenGl ) { return false ; } try { com.android.ddmlib.OpenGlTraceChunkHandler.sendStartGlTracing ( this ) ; return true ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.w ( "ddms" , "Start OpenGL Tracing failed" ) ; return false ; } }

Target:
public boolean startOpenGlTracing ( ) { boolean canTraceOpenGl = mClientData.hasFeature ( ClientData.FEATURE_OPENGL_TRACING ) ; if ( ! canTraceOpenGl ) { return false ; } try { com.android.ddmlib.HandleViewDebug.sendStartGlTracing ( this ) ; return true ; } catch ( java.io.IOException e ) { com.android.ddmlib.Log.w ( "ddms" , "Start OpenGL Tracing failed" ) ; return false ; } }
Source:
protected void replaceUpdated ( java.io.File from , java.io.File dest ) throws java.io.IOException { if ( ! ( dest.delete ( ) ) ) throw new java.io.IOException ( ( "Cannot delete file " + dest ) ) ; com.intellij.updater.Utils.copy ( from , dest ) ; }

Target:
protected void replaceUpdated ( java.io.File from , java.io.File dest ) throws java.io.IOException { if ( ! ( dest.delete ( ) ) ) { if ( com.intellij.updater.Utils.isWindows ( ) ) { throw new com.intellij.updater.RetryException ( ( "Cannot delete file " + dest ) ) ; } else { throw new java.io.IOException ( ( "Cannot delete file " + dest ) ) ; } } com.intellij.updater.Utils.copy ( from , dest ) ; }
Source:
public void addChoices ( java.util.List < java.lang.String > titles , java.util.List < java.net.URL > iconUrls , java.util.List < java.lang.String > ids ) { com.android.ide.common.api.IAttributeInfo info = first.getAttributeInfo ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , com.android.ide.common.layout.LayoutConstants.ATTR_LAYOUT_GRAVITY ) ; if ( info != null ) { assert IAttributeInfo.Format.FLAG.in ( info.getFormats ( ) ) ; for ( java.lang.String name : info.getFlagValues ( ) ) { titles.add ( prettyName ( name ) ) ; ids.add ( name ) ; } } }

Target:
public void addChoices ( java.util.List < java.lang.String > titles , java.util.List < java.net.URL > iconUrls , java.util.List < java.lang.String > ids ) { com.android.ide.common.api.IAttributeInfo info = first.getAttributeInfo ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI , attributeName ) ; if ( info != null ) { assert IAttributeInfo.Format.FLAG.in ( info.getFormats ( ) ) ; for ( java.lang.String name : info.getFlagValues ( ) ) { titles.add ( prettyName ( name ) ) ; ids.add ( name ) ; } } }
Source:
public void testOneSystemOneUserOneDeleted ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.installCertificate ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa2 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa2 ( ) ) ; }

Target:
public void testUserMaskingSystem ( ) throws java.lang.Exception { install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa1 ( ) ) ; assertMasked ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertRootCa ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa1 ( ) ) ; assertAliases ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasUserCa1 ( ) ) ; }
Source:
private void cmdDumpsys ( java.io.FileDescriptor fd , java.io.PrintWriter pw , java.lang.String [ ] args ) { final android.net.ConnectivityMetricsEvent [ ] events ; synchronized ( mLock ) { events = mEventLog.toArray ( ) ; } for ( android.net.ConnectivityMetricsEvent ev : events ) { pw.println ( ev.toString ( ) ) ; } if ( ( mNetdListener ) != null ) { mNetdListener.list ( pw ) ; } }

Target:
private java.util.List < android.net.ConnectivityMetricsEvent > getEvents ( ) { synchronized ( mLock ) { return java.util.Arrays.asList ( mEventLog.toArray ( ) ) ; } }
Source:
public int read ( byte [ ] b , int off , int len ) throws java.io.IOException { if ( ( closed ) && ( len > 0 ) ) { throw new java.io.IOException ( "Stream Closed" ) ; } java.lang.Object traceContext = sun.misc.IoTrace.fileReadBegin ( path ) ; int bytesRead = 0 ; try { bytesRead = libcore.io.IoBridge.read ( fd , b , off , len ) ; } finally { sun.misc.IoTrace.fileReadEnd ( traceContext , ( bytesRead == ( - 1 ) ? 0 : bytesRead ) ) ; } return bytesRead ; }

Target:
public int read ( byte [ ] b , int off , int len ) throws java.io.IOException { if ( ( closed ) && ( len > 0 ) ) { throw new java.io.IOException ( "Stream Closed" ) ; } tracker.trackIo ( len ) ; return libcore.io.IoBridge.read ( fd , b , off , len ) ; }
Source:
public static java.lang.String getNexusLabel ( @ com.android.annotations.NonNull com.android.sdklib.devices.Device device ) { java.lang.String name = device.getName ( ) ; com.android.sdklib.devices.Screen screen = device.getDefaultHardware ( ) . getScreen ( ) ; float length = ( ( float ) ( screen.getDiagonalLength ( ) ) ) ; length = ( java.lang.Math.round ( ( 10 * length ) ) ) / 10.0F ; return java.lang.String.format ( java.util.Locale.US , "%1$s (%3$s\", %2$s)" , name , com.android.ide.common.rendering.HardwareConfigHelper.getResolutionString ( device ) , java.lang.Float.toString ( length ) ) ; }

Target:
public static java.lang.String getNexusLabel ( @ com.android.annotations.NonNull com.android.sdklib.devices.Device device ) { java.lang.String name = device.getDisplayName ( ) ; com.android.sdklib.devices.Screen screen = device.getDefaultHardware ( ) . getScreen ( ) ; float length = ( ( float ) ( screen.getDiagonalLength ( ) ) ) ; length = ( java.lang.Math.round ( ( 10 * length ) ) ) / 10.0F ; return java.lang.String.format ( java.util.Locale.US , "%1$s (%3$s\", %2$s)" , name , com.android.ide.common.rendering.HardwareConfigHelper.getResolutionString ( device ) , java.lang.Float.toString ( length ) ) ; }
Source:
private boolean scanWithParams ( java.lang.String freqList , java.lang.String hiddenNetworkSSIDList ) { java.lang.StringBuilder scanCommand = new java.lang.StringBuilder ( ) ; scanCommand.append ( "SCAN TYPE=ONLY" ) ; if ( freqList != null ) { scanCommand.append ( ( " freq=" + freqList ) ) ; } if ( hiddenNetworkSSIDList != null ) { scanCommand.append ( ( " ssid " + hiddenNetworkSSIDList ) ) ; } return doBooleanCommand ( scanCommand.toString ( ) ) ; }

Target:
public void setSupplicantLogLevel ( boolean turnOnVerbose ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { int logLevel = ( turnOnVerbose ) ? SupplicantStaIfaceHal.LOG_LEVEL_DEBUG : SupplicantStaIfaceHal.LOG_LEVEL_INFO ; mSupplicantStaIfaceHal.setLogLevel ( logLevel ) ; } else { doStringCommand ( ( "LOG_LEVEL " + ( turnOnVerbose ? "DEBUG" : "INFO" ) ) ) ; } }
Source:
protected void onLayout ( boolean changed , int l , int t , int r , int b ) { super . onLayout ( changed , l , t , r , b ) ; mIsLayoutDirty = false ; if ( ( ( mChildToScrollTo ) != null ) && ( isViewDescendantOf ( mChildToScrollTo , this ) ) ) { scrollToChild ( mChildToScrollTo ) ; } mChildToScrollTo = null ; scrollTo ( mScrollX , mScrollY ) ; }

Target:
protected void onLayout ( boolean changed , int l , int t , int r , int b ) { super . onLayout ( changed , l , t , r , b ) ; mIsLayoutDirty = false ; if ( ( ( mChildToScrollTo ) != null ) && ( android.widget.HorizontalScrollView.isViewDescendantOf ( mChildToScrollTo , this ) ) ) { scrollToChild ( mChildToScrollTo ) ; } mChildToScrollTo = null ; scrollTo ( mScrollX , mScrollY ) ; }
Source:
private java.lang.ref.Reference < ? extends T > reallyPollLocked ( ) { if ( ( head ) != null ) { java.lang.ref.Reference < ? extends T > r = head ; if ( ( head ) == ( tail ) ) { tail = null ; head = null ; } else { head = head.queueNext ; } r.queueNext = null ; return r ; } return null ; }

Target:
private boolean enqueueLocked ( java.lang.ref.Reference < ? extends T > r ) { if ( ( r.queueNext ) != null ) { return false ; } if ( r instanceof sun.misc.Cleaner ) { sun.misc.Cleaner cl = ( ( sun.misc.Cleaner ) ( r ) ) ; cl.clean ( ) ; r.queueNext = java.lang.ref.ReferenceQueue.sQueueNextUnenqueued ; return true ; } if ( ( tail ) == null ) { head = r ; } else { tail.queueNext = r ; } tail = r ; tail.queueNext = r ; return true ; }
Source:
private static java.io.File getAutoProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ) == null ) { com.android.jack.test.toolchain.Toolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getReferenceToolchain ( ) ; java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsSrcDir = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.annotation.processor.sample.processors" ) ; toolchain.srcToLib ( processorsDir , false , com.android.jack.annotation.processor.AnnotationProcessorTests.ANNOTATIONS_DIR , processorsSrcDir ) ; com.android.jack.test.toolchain.AbstractTestTools.copyFileToDir ( new java.io.File ( processorsSrcDir , "javax.annotation.processing.Processor" ) , "META-INF/services/javax.annotation.processing.Processor" , processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors = processorsDir ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ; }

Target:
private static java.io.File getAutoProcessors ( ) throws java.lang.Exception { if ( ( com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ) == null ) { com.android.jack.test.toolchain.IToolchain toolchain = com.android.jack.test.toolchain.AbstractTestTools.getReferenceToolchain ( ) ; java.io.File processorsDir = com.android.jack.test.toolchain.AbstractTestTools.createTempDir ( ) ; java.io.File processorsSrcDir = com.android.jack.test.toolchain.AbstractTestTools.getTestRootDir ( "com.android.jack.annotation.processor.sample.processors" ) ; toolchain.srcToLib ( processorsDir , false , com.android.jack.annotation.processor.AnnotationProcessorTests.ANNOTATIONS_DIR , processorsSrcDir ) ; com.android.jack.test.toolchain.AbstractTestTools.copyFileToDir ( new java.io.File ( processorsSrcDir , "javax.annotation.processing.Processor" ) , "META-INF/services/javax.annotation.processing.Processor" , processorsDir ) ; com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors = processorsDir ; } return com.android.jack.annotation.processor.AnnotationProcessorTests.autoProcessors ; }
Source:
public void testHasCategories ( ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ; intent.addCategory ( "category" ) ; intent.addCategory ( "category1" ) ; intent.addCategory ( "category2" ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasCategories ( intent.getCategories ( ) ) . matches ( intent ) ) ; assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasCategories ( org.hamcrest.Matchers.hasItems ( "category" , "category1" , "category2" ) ) . matches ( intent ) ) ; }

Target:
public void hasCategoriesTesting ( ) { android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_VIEW ) ; intent.addCategory ( "category" ) ; intent.addCategory ( "category1" ) ; intent.addCategory ( "category2" ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasCategories ( intent.getCategories ( ) ) . matches ( intent ) ) ; org.junit.Assert.assertTrue ( android.support.test.espresso.intent.matcher.IntentMatchers.hasCategories ( org.hamcrest.Matchers.hasItems ( "category" , "category1" , "category2" ) ) . matches ( intent ) ) ; }
Source:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.nan.WifiNanManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.nan.WifiNanDiscoveryBaseSession.TAG , "startRanging: called post GC on WifiNanManager" ) ; return ; } mgr.startRanging ( mClientId , mSessionId , params , listener ) ; } }

Target:
public void startRanging ( android.net.wifi.RttManager [ ] params , android.net.wifi.RttManager.RttListener listener ) { if ( mTerminated ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "startRanging: called on terminated session" ) ; return ; } else { android.net.wifi.aware.WifiAwareManager mgr = mMgr.get ( ) ; if ( mgr == null ) { android.util.Log.w ( android.net.wifi.aware.WifiAwareDiscoveryBaseSession.TAG , "startRanging: called post GC on WifiAwareManager" ) ; return ; } mgr.startRanging ( mClientId , mSessionId , params , listener ) ; } }
Source:
public void test_totalMemory ( ) { assertTrue ( "totalMemory returned nonsense value" , ( ( r.totalMemory ( ) ) >= ( r.freeMemory ( ) ) ) ) ; }

Target:
public void test_freeMemory ( ) { long freeBefore = r.freeMemory ( ) ; java.util.List < byte [ ] > arrays = new java.util.ArrayList < byte [ ] > ( ) ; for ( int i = 1 ; i < 10 ; i ++ ) { arrays.add ( new byte [ 10000 ] ) ; } long freeAfter = r.freeMemory ( ) ; assertTrue ( "free memory must change with allocations" , ( freeAfter != freeBefore ) ) ; }
Source:
public com.android.dx.io.EncodedValue readEncodedValue ( ) { int start = position ; new com.android.dx.io.EncodedValueReader ( this ) . skipValue ( ) ; int end = position ; return new com.android.dx.io.EncodedValue ( java.util.Arrays.copyOfRange ( data , start , end ) ) ; }

Target:
public com.android.dx.io.Annotation readAnnotation ( ) { byte visibility = readByte ( ) ; int start = position ; new com.android.dx.io.EncodedValueReader ( this , EncodedValueReader.ENCODED_ANNOTATION ) . skipValue ( ) ; int end = position ; return new com.android.dx.io.Annotation ( this , visibility , new com.android.dx.io.EncodedValue ( java.util.Arrays.copyOfRange ( data , start , end ) ) ) ; }
Source:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mNsm = ( ( android.app.usage.NetworkStatsManager ) ( getInstrumentation ( ) . getContext ( ) . getSystemService ( Context.NETWORK_STATS_SERVICE ) ) ) ; mCm = ( ( android.net.ConnectivityManager ) ( getInstrumentation ( ) . getContext ( ) . getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; mWriteSettingsMode = getAppOpsMode ( AppOpsManager.OPSTR_WRITE_SETTINGS ) ; setAppOpsMode ( AppOpsManager.OPSTR_WRITE_SETTINGS , "allow" ) ; mUsageStatsMode = getAppOpsMode ( AppOpsManager.OPSTR_GET_USAGE_STATS ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; mNsm = ( ( android.app.usage.NetworkStatsManager ) ( getInstrumentation ( ) . getContext ( ) . getSystemService ( Context.NETWORK_STATS_SERVICE ) ) ) ; mCm = ( ( android.net.ConnectivityManager ) ( getInstrumentation ( ) . getContext ( ) . getSystemService ( Context.CONNECTIVITY_SERVICE ) ) ) ; mPm = getInstrumentation ( ) . getContext ( ) . getPackageManager ( ) ; mWriteSettingsMode = getAppOpsMode ( AppOpsManager.OPSTR_WRITE_SETTINGS ) ; setAppOpsMode ( AppOpsManager.OPSTR_WRITE_SETTINGS , "allow" ) ; mUsageStatsMode = getAppOpsMode ( AppOpsManager.OPSTR_GET_USAGE_STATS ) ; }
Source:
public void done ( org.eclipse.core.runtime.jobs.IJobChangeEvent event ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart graphicalEditor = getGraphicalEditor ( ) ; if ( graphicalEditor != null ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutActionBar bar = graphicalEditor.getLayoutActionBar ( ) ; if ( ! ( bar.isDisposed ( ) ) ) { bar.updateErrorIndicator ( ) ; } } }

Target:
public void done ( org.eclipse.core.runtime.jobs.IJobChangeEvent event ) { com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutActionBar bar = mEditor.getLayoutActionBar ( ) ; if ( ! ( bar.isDisposed ( ) ) ) { bar.updateErrorIndicator ( ) ; } if ( ! ( mCanvas.isDisposed ( ) ) ) { mCanvas.getDisplay ( ) . asyncExec ( this ) ; } }
Source:
private void activate ( ) { java.io.File binDir = new java.io.File ( mVenvDir , "bin" ) ; mRunUtil.setWorkingDir ( binDir ) ; java.lang.String path = java.lang.System.getenv ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH ) ; mRunUtil.setEnvVariable ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH , ( ( binDir + ":" ) + path ) ) ; java.io.File pipFile = new java.io.File ( binDir , com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PIP ) ; pipFile.setExecutable ( true ) ; mPip = pipFile.getAbsolutePath ( ) ; }

Target:
private void activate ( ) { java.io.File binDir = new java.io.File ( mVenvDir , ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.isOnWindows ( ) ? "Scripts" : "bin" ) ) ; mRunUtil.setWorkingDir ( binDir ) ; java.lang.String path = java.lang.System.getenv ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH ) ; mRunUtil.setEnvVariable ( com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PATH , ( ( binDir + ( java.io.File.pathSeparator ) ) + path ) ) ; java.io.File pipFile = new java.io.File ( binDir , com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.PIP ) ; pipFile.setExecutable ( true ) ; mPip = pipFile.getAbsolutePath ( ) ; }
Source:
private int deleteAttribute ( int attributesCount , proguard.classfile.editor.Attribute [ ] attributes , java.lang.String attributeName ) { int index = findAttribute ( attributesCount , attributes , attributeName ) ; if ( index < 0 ) { return attributesCount ; } java.lang.System.arraycopy ( attributes , ( index + 1 ) , attributes , index , ( ( attributesCount - index ) - 1 ) ) ; attributes [ ( -- attributesCount ) ] = null ; return attributesCount ; }

Target:
private int deleteAttribute ( int attributesCount , proguard.classfile.editor.Attribute [ ] attributes , java.lang.String attributeName ) { int index = findAttributeIndex ( attributesCount , attributes , attributeName ) ; if ( index < 0 ) { return attributesCount ; } java.lang.System.arraycopy ( attributes , ( index + 1 ) , attributes , index , ( ( attributesCount - index ) - 1 ) ) ; attributes [ ( -- attributesCount ) ] = null ; return attributesCount ; }
Source:
static com.android.bluetooth.a2dp.A2dpStateMachine make ( com.android.bluetooth.a2dp.A2dpService svc , android.content.Context context ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , "make" ) ; com.android.bluetooth.a2dp.A2dpStateMachine a2dpSm = new com.android.bluetooth.a2dp.A2dpStateMachine ( svc , context ) ; a2dpSm.start ( ) ; return a2dpSm ; }

Target:
static com.android.bluetooth.a2dp.A2dpStateMachine make ( com.android.bluetooth.a2dp.A2dpService svc , android.content.Context context , com.android.bluetooth.a2dp.A2dpNativeInterface a2dpNativeInterface , android.os.Looper looper ) { if ( com.android.bluetooth.a2dp.A2dpStateMachine.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpStateMachine.TAG , "make" ) ; } com.android.bluetooth.a2dp.A2dpStateMachine a2dpSm = new com.android.bluetooth.a2dp.A2dpStateMachine ( svc , context , a2dpNativeInterface , looper ) ; a2dpSm.start ( ) ; return a2dpSm ; }
Source:
public void fatal ( java.lang.String id ) { severities.put ( id , Severity.FATAL ) ; }

Target:
public java.util.Map < java.lang.String , java.lang.Integer > getSeverityOverrides ( ) { if ( ( ( severities ) == null ) || ( severities.isEmpty ( ) ) ) { return null ; } java.util.Map < java.lang.String , java.lang.Integer > map = com.google.common.collect.Maps.newHashMapWithExpectedSize ( severities.size ( ) ) ; for ( java.util.Map.Entry < java.lang.String , com.android.tools.lint.detector.api.Severity > entry : severities.entrySet ( ) ) { map.put ( entry.getKey ( ) , com.android.build.gradle.internal.dsl.LintOptions.convert ( entry.getValue ( ) ) ) ; } return map ; }
Source:
public static java.lang.String getOutputDirectoryName ( org.gradle.nativeplatform.NativeBinarySpec binary ) { return com.google.common.base.Joiner.on ( java.io.File.separator ) . join ( AndroidProject.FD_INTERMEDIATES , "binaries" , binary.getName ( ) , binary.getBuildType ( ) . getName ( ) , binary.getFlavor ( ) . getName ( ) , "lib" , binary.getTargetPlatform ( ) . getName ( ) ) ; }

Target:
public static java.lang.String getOutputDirectoryName ( java.lang.String buildType , java.lang.String productFlavor , java.lang.String abi ) { return com.google.common.base.Joiner.on ( java.io.File.separator ) . join ( com.android.builder.model.AndroidProject.FD_INTERMEDIATES , "binaries" , buildType , productFlavor , "lib" , abi ) ; }
Source:
protected void readResponseHeaders ( javax.obex.HeaderSet headerset ) { android.util.Log.v ( com.android.bluetooth.pbapclient.BluetoothPbapRequestPullPhoneBook.TAG , "readResponseHeaders" ) ; com.android.bluetooth.pbapclient.ObexAppParameters oap = com.android.bluetooth.pbapclient.ObexAppParameters.fromHeaderSet ( headerset ) ; if ( oap.exists ( com.android.bluetooth.pbapclient.OAP_TAGID_NEW_MISSED_CALLS ) ) { mNewMissedCalls = oap.getByte ( com.android.bluetooth.pbapclient.OAP_TAGID_NEW_MISSED_CALLS ) ; } }

Target:
protected void readResponseHeaders ( javax.obex.HeaderSet headerset ) { if ( com.android.bluetooth.pbapclient.BluetoothPbapRequestPullPhoneBook.VDBG ) android.util.Log.v ( com.android.bluetooth.pbapclient.BluetoothPbapRequestPullPhoneBook.TAG , "readResponseHeaders" ) ; com.android.bluetooth.pbapclient.ObexAppParameters oap = com.android.bluetooth.pbapclient.ObexAppParameters.fromHeaderSet ( headerset ) ; if ( oap.exists ( com.android.bluetooth.pbapclient.OAP_TAGID_NEW_MISSED_CALLS ) ) { mNewMissedCalls = oap.getByte ( com.android.bluetooth.pbapclient.OAP_TAGID_NEW_MISSED_CALLS ) ; } }
Source:
public void testPinEntryPinFailure ( ) throws java.lang.Exception { java.lang.String shortEntry = "*.google.com=true|" + ( shortPin ) ; org.conscrypt.PinListEntry e = new org.conscrypt.PinListEntry ( shortEntry , new org.conscrypt.TrustedCertificateStore ( ) ) ; assertTrue ( "Not enforcing!" , e.getEnforcing ( ) ) ; boolean retval = e.chainIsNotPinned ( longChain ) ; assertTrue ( "Accepted an incorrect pinning, this is very bad" , retval ) ; }

Target:
public void testPinEntryPinFailure ( ) throws java.lang.Exception { java.lang.String shortEntry = "*.google.com=true|" + ( shortPin ) ; org.conscrypt.PinListEntry e = new org.conscrypt.PinListEntry ( shortEntry , new org.conscrypt.TrustedCertificateStore ( ) ) ; assertTrue ( "Not enforcing!" , e.getEnforcing ( ) ) ; boolean retval = e.isChainValid ( longChain ) ; assertFalse ( "Accepted an incorrect pinning, this is very bad" , retval ) ; }
Source:
public static int advance ( java.util.Iterator < ? > iterator , int numberToAdvance ) { com.google.common.base.Preconditions.checkNotNull ( iterator ) ; com.google.common.base.Preconditions.checkArgument ( ( numberToAdvance >= 0 ) , "number to advance cannot be negative" ) ; int i ; for ( i = 0 ; ( i < numberToAdvance ) && ( iterator.hasNext ( ) ) ; i ++ ) { iterator.next ( ) ; } return i ; }

Target:
public static int advance ( java.util.Iterator < ? > iterator , int numberToAdvance ) { com.google.common.base.Preconditions.checkNotNull ( iterator ) ; com.google.common.base.Preconditions.checkArgument ( ( numberToAdvance >= 0 ) , "numberToAdvance must be nonnegative" ) ; int i ; for ( i = 0 ; ( i < numberToAdvance ) && ( iterator.hasNext ( ) ) ; i ++ ) { iterator.next ( ) ; } return i ; }
Source:
private void addConfigurationToTree ( int index , com.google.gct.testing.GoogleCloudTestingConfigurationImpl configuration , boolean makeSelected ) { configuration.addConfigurationChangeListener ( this ) ; final javax.swing.tree.DefaultMutableTreeNode newChild = new javax.swing.tree.DefaultMutableTreeNode ( configuration ) ; if ( configuration.isEditable ( ) ) { addChildToNode ( index , newChild , customRoot ) ; } else { addChildToNode ( index , newChild , defaultsRoot ) ; } if ( makeSelected ) { selectTreeNode ( newChild ) ; } }

Target:
private void addConfigurationToTree ( int index , com.google.gct.testing.CloudTestConfigurationImpl configuration , boolean makeSelected ) { configuration.addConfigurationChangeListener ( this ) ; final javax.swing.tree.DefaultMutableTreeNode newChild = new javax.swing.tree.DefaultMutableTreeNode ( configuration ) ; if ( configuration.isEditable ( ) ) { addChildToNode ( index , newChild , customRoot ) ; } else { addChildToNode ( index , newChild , defaultsRoot ) ; } if ( makeSelected ) { selectTreeNode ( newChild ) ; } }
Source:
public final void setConferenceableConnections ( java.lang.String callId , java.util.List < java.lang.String > conferenceableConnectionIds ) { java.util.List < android.telecom.RemoteConnection > conferenceable = new java.util.ArrayList < > ( ) ; for ( java.lang.String id : conferenceableConnectionIds ) { if ( mConnectionById.containsKey ( id ) ) { conferenceable.add ( mConnectionById.get ( id ) ) ; } } if ( hasConnection ( callId ) ) { findConnectionForAction ( callId , "setConferenceableConnections" ) . setConferenceableConnections ( conferenceable ) ; } else { findConferenceForAction ( callId , "setConferenceableConnections" ) . setConferenceableConnections ( conferenceable ) ; } }

Target:
public final void setConferenceableConnections ( java.lang.String callId , java.util.List < java.lang.String > conferenceableConnectionIds , android.telecom.Logging.Session.Info sessionInfo ) { java.util.List < android.telecom.RemoteConnection > conferenceable = new java.util.ArrayList < > ( ) ; for ( java.lang.String id : conferenceableConnectionIds ) { if ( mConnectionById.containsKey ( id ) ) { conferenceable.add ( mConnectionById.get ( id ) ) ; } } if ( hasConnection ( callId ) ) { findConnectionForAction ( callId , "setConferenceableConnections" ) . setConferenceableConnections ( conferenceable ) ; } else { findConferenceForAction ( callId , "setConferenceableConnections" ) . setConferenceableConnections ( conferenceable ) ; } }
Source:
public void testTranslucentActivityOnTopOfHome ( ) throws java.lang.Exception { executeShellCommand ( android.server.cts.AM_START_HOME_ACTIVITY_COMMAND ) ; executeShellCommand ( getAmStartCmd ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY ) ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY } ) ; mAmWmState.assertFrontStack ( "Fullscreen stack must be the front stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertVisibility ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY , true ) ; mAmWmState.assertHomeActivityVisible ( true ) ; }

Target:
public void testTranslucentActivityOnTopOfHome ( ) throws java.lang.Exception { if ( noHomeScreen ( ) ) { return ; } executeShellCommand ( android.server.cts.AM_START_HOME_ACTIVITY_COMMAND ) ; executeShellCommand ( getAmStartCmd ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY ) ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY } ) ; mAmWmState.assertFrontStack ( "Fullscreen stack must be the front stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertVisibility ( android.server.cts.ActivityManagerActivityVisiblityTests.TRANSLUCENT_ACTIVITY , true ) ; mAmWmState.assertHomeActivityVisible ( true ) ; }
Source:
public android.telephony.ModemActivityInfo getModemActivityInfo ( ) { try { com.android.internal.telephony.ITelephony service = getITelephony ( ) ; if ( service != null ) { return service.getModemActivityInfo ( ) ; } } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.TelephonyManager.TAG , "Error calling ITelephony#getModemActivityInfo" , e ) ; } return null ; }

Target:
public com.android.ims.internal.IImsServiceController getImsServiceControllerAndListen ( int slotIndex , @ android.telephony.TelephonyManager.Feature int feature , com.android.ims.internal.IImsServiceFeatureListener callback ) { try { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony != null ) { return telephony.getImsServiceControllerAndListen ( slotIndex , feature , callback ) ; } } catch ( android.os.RemoteException e ) { android.telephony.Rlog.e ( android.telephony.TelephonyManager.TAG , ( "getImsServiceControllerAndListen, RemoteException: " + ( e.getMessage ( ) ) ) ) ; } return null ; }
Source:
protected void setUp ( ) { mFOp = new com.android.sdklib.io.MockFileOp ( ) ; mLS = new com.android.sdklib.repository.local.LocalSdk ( mFOp ) ; mRemotePkgs = com.google.common.collect.TreeMultimap.create ( ) ; mSource = new com.android.sdklib.internal.repository.IDescription ( ) { @ java.lang.Override public java.lang.String getShortDescription ( ) { return "source" ; } @ java.lang.Override public java.lang.String getLongDescription ( ) { return "mock sdk repository source" ; } } ; mLS.setLocation ( new java.io.File ( "/sdk" ) ) ; }

Target:
protected void setUp ( ) { mFOp = new com.android.sdklib.io.MockFileOp ( ) ; mLS = new com.android.sdklib.repository.local.LocalSdk ( mFOp ) ; mRemotePkgs = com.google.common.collect.TreeMultimap.create ( ) ; mSource = new com.android.sdklib.repository.IDescription ( ) { @ java.lang.Override public java.lang.String getShortDescription ( ) { return "source" ; } @ java.lang.Override public java.lang.String getLongDescription ( ) { return "mock sdk repository source" ; } } ; mLS.setLocation ( new java.io.File ( "/sdk" ) ) ; }
Source:
private void checkActivity ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Element element ) { if ( ( ( getExported ( element ) ) && ( isUnprotectedByPermission ( element ) ) ) && ( ! ( isLauncher ( element ) ) ) ) { context.report ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_ACTIVITY , element , context.getLocation ( element ) , "Exported activity does not require permission" , null ) ; } }

Target:
private static void checkActivity ( com.android.tools.lint.detector.api.XmlContext context , org.w3c.dom.Element element ) { if ( ( ( com.android.tools.lint.checks.SecurityDetector.getExported ( element ) ) && ( com.android.tools.lint.checks.SecurityDetector.isUnprotectedByPermission ( element ) ) ) && ( ! ( com.android.tools.lint.checks.SecurityDetector.isLauncher ( element ) ) ) ) { context.report ( com.android.tools.lint.checks.SecurityDetector.EXPORTED_ACTIVITY , element , context.getLocation ( element ) , "Exported activity does not require permission" , null ) ; } }
Source:
public void test_unmodifiableList_replaceAll ( ) { try { java.util.Collections.unmodifiableList ( new java.util.ArrayList < > ( ) ) . replaceAll ( ( k ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } try { java.util.ArrayList l = new java.util.ArrayList ( ) ; l.add ( 1 ) ; l.add ( 2 ) ; java.util.Collections.unmodifiableList ( l ) . replaceAll ( ( k ) -> 1 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } }

Target:
public void test_SingletonMap_compute ( ) { try { java.util.Collections.singletonMap ( 1 , 11.0 ) . compute ( 1 , ( k , v ) -> 5.0 ) ; fail ( ) ; } catch ( java.lang.UnsupportedOperationException expected ) { } }
Source:
private void checkScoAudioState ( ) { if ( ( ( ( ( mBluetoothHeadset ) != null ) && ( ( mBluetoothHeadsetDevice ) != null ) ) && ( ( mScoAudioState ) == ( com.android.server.audio.AudioService.SCO_STATE_INACTIVE ) ) ) && ( ( mBluetoothHeadset.getAudioState ( mBluetoothHeadsetDevice ) ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ) ) ) { mScoAudioState = com.android.server.audio.AudioService.SCO_STATE_ACTIVE_EXTERNAL ; } }

Target:
private void checkScoAudioState ( ) { synchronized ( mScoClients ) { if ( ( ( ( ( mBluetoothHeadset ) != null ) && ( ( mBluetoothHeadsetDevice ) != null ) ) && ( ( mScoAudioState ) == ( com.android.server.audio.AudioService.SCO_STATE_INACTIVE ) ) ) && ( ( mBluetoothHeadset.getAudioState ( mBluetoothHeadsetDevice ) ) != ( android.bluetooth.BluetoothHeadset.STATE_AUDIO_DISCONNECTED ) ) ) { mScoAudioState = com.android.server.audio.AudioService.SCO_STATE_ACTIVE_EXTERNAL ; } } }
Source:
public static < T > java.util.Iterator < T > concat ( java.util.Iterator < ? extends T > a , java.util.Iterator < ? extends T > b ) { com.google.common.base.Preconditions.checkNotNull ( a ) ; com.google.common.base.Preconditions.checkNotNull ( b ) ; return com.google.common.collect.Iterators.concat ( java.util.Arrays.asList ( a , b ) . iterator ( ) ) ; }

Target:
public static int frequency ( java.util.Iterator < ? > iterator , @ javax.annotation.Nullable java.lang.Object element ) { return com.google.common.collect.Iterators.size ( com.google.common.collect.Iterators.filter ( iterator , com.google.common.base.Predicates.equalTo ( element ) ) ) ; }
Source:
private void bondService ( ) throws java.util.concurrent.TimeoutException { android.os.IBinder binder = mServiceRule.bindService ( new android.content.Intent ( mTargetContext , com.android.bluetooth.a2dp.A2dpService.class ) ) ; mA2dpService = ( ( com.android.bluetooth.a2dp.A2dpService.BluetoothA2dpBinder ) ( binder ) ) . getServiceForTesting ( ) ; org.junit.Assert.assertNotNull ( mA2dpService ) ; }

Target:
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 ) ; }
Source:
public static synchronized void clearCachedDefault ( ) { com.ibm.icu.util.TimeZone.defaultZone = null ; }

Target:
public static com.ibm.icu.util.TimeZone getDefault ( ) { if ( ( com.ibm.icu.util.TimeZone.defaultZone ) == null ) { synchronized ( com.ibm.icu.util.TimeZone.class ) { if ( ( com.ibm.icu.util.TimeZone.defaultZone ) == null ) { if ( ( com.ibm.icu.util.TimeZone.TZ_IMPL ) == ( com.ibm.icu.util.TimeZone.TIMEZONE_JDK ) ) { com.ibm.icu.util.TimeZone.defaultZone = new com.ibm.icu.impl.JavaTimeZone ( ) ; } else { java.util.TimeZone temp = java.util.TimeZone.getDefault ( ) ; com.ibm.icu.util.TimeZone.defaultZone = com.ibm.icu.util.TimeZone.getFrozenTimeZone ( temp.getID ( ) ) ; } } } } return com.ibm.icu.util.TimeZone.defaultZone.cloneAsThawed ( ) ; }