auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean cleanup ( ) { if ( com.android.bluetooth.a2dp.A2dpService.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpService.TAG , "cleanup()" ) ; } if ( ( mConnectionStateChangedReceiver ) != null ) { unregisterReceiver ( mConnectionStateChangedReceiver ) ; mConnectionStateChangedReceiver = null ; } if ( ( mStateMachine ) != null ) { mStateMachine.cleanup ( ) ; mStateMachine = null ; } if ( ( mAvrcp ) != null ) { mAvrcp.cleanup ( ) ; mAvrcp = null ; } com.android.bluetooth.a2dp.A2dpService.clearA2dpService ( ) ; return true ; }

Target:
protected void cleanup ( ) { if ( com.android.bluetooth.a2dp.A2dpService.DBG ) { android.util.Log.d ( com.android.bluetooth.a2dp.A2dpService.TAG , "cleanup()" ) ; } if ( ( mConnectionStateChangedReceiver ) != null ) { unregisterReceiver ( mConnectionStateChangedReceiver ) ; mConnectionStateChangedReceiver = null ; } if ( ( mStateMachine ) != null ) { mStateMachine.cleanup ( ) ; mStateMachine = null ; } if ( ( mAvrcp ) != null ) { mAvrcp.cleanup ( ) ; mAvrcp = null ; } com.android.bluetooth.a2dp.A2dpService.clearA2dpService ( ) ; }
Source:
void addInputMethodWindowToListLocked ( com.android.server.WindowManagerService.WindowState win ) { int pos = findDesiredInputMethodWindowIndexLocked ( true ) ; if ( pos >= 0 ) { win.mTargetAppToken = mInputMethodTarget.mAppToken ; if ( com.android.server.WindowManagerService.DEBUG_WINDOW_MOVEMENT ) android.util.Log.v ( com.android.server.WindowManagerService.TAG , ( ( ( "Adding input method window " + win ) + " at " ) + pos ) ) ; mWindows.add ( pos , win ) ; moveInputMethodDialogsLocked ( ( pos + 1 ) ) ; return ; } win.mTargetAppToken = null ; addWindowToListInOrderLocked ( win , true ) ; moveInputMethodDialogsLocked ( pos ) ; }

Target:
void addInputMethodWindowToListLocked ( com.android.server.WindowManagerService.WindowState win ) { int pos = findDesiredInputMethodWindowIndexLocked ( true ) ; if ( pos >= 0 ) { win.mTargetAppToken = mInputMethodTarget.mAppToken ; if ( com.android.server.WindowManagerService.DEBUG_WINDOW_MOVEMENT ) android.util.Slog.v ( com.android.server.WindowManagerService.TAG , ( ( ( "Adding input method window " + win ) + " at " ) + pos ) ) ; mWindows.add ( pos , win ) ; moveInputMethodDialogsLocked ( ( pos + 1 ) ) ; return ; } win.mTargetAppToken = null ; addWindowToListInOrderLocked ( win , true ) ; moveInputMethodDialogsLocked ( pos ) ; }
Source:
protected final void waitForHandlerAction ( android.os.Handler h , long timeoutMillis ) { final java.util.concurrent.CountDownLatch lock = new java.util.concurrent.CountDownLatch ( 1 ) ; h.post ( lock :: countDown ) ; while ( ( lock.getCount ( ) ) > 0 ) { try { lock.await ( timeoutMillis , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } } }

Target:
protected static void waitForHandlerAction ( android.os.Handler h , long timeoutMillis ) { final java.util.concurrent.CountDownLatch lock = new java.util.concurrent.CountDownLatch ( 1 ) ; h.post ( lock :: countDown ) ; while ( ( lock.getCount ( ) ) > 0 ) { try { lock.await ( timeoutMillis , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } } }
Source:
public boolean requestDrawGL ( android.graphics.Canvas canvas ) { if ( ( mGLfunctor ) == null ) { mGLfunctor = new com.android.webview.chromium.DrawGLFunctor ( mAwContents.getAwDrawGLViewContext ( ) ) ; } return mGLfunctor.requestDrawGL ( ( ( android.view.HardwareCanvas ) ( canvas ) ) , mWebView.getViewRootImpl ( ) ) ; }

Target:
public void run ( ) { }
Source:
public void cleanup ( ) { mRemoteDevices = null ; if ( ( mProfileConnectionState ) != null ) { mProfileConnectionState.clear ( ) ; mProfileConnectionState = null ; } mService = null ; if ( ! ( mBondedDevices.isEmpty ( ) ) ) mBondedDevices.clear ( ) ; }

Target:
public void cleanup ( ) { mRemoteDevices = null ; if ( ( mProfileConnectionState ) != null ) { mProfileConnectionState.clear ( ) ; mProfileConnectionState = null ; } mService = null ; mBondedDevices.clear ( ) ; }
Source:
public void sayHi ( java.lang.Runnable r , java.util.function.Consumer < java.lang.String > reporter ) { reporter.accept ( "Pre Start private method call" ) ; Start ( reporter ) ; reporter.accept ( "Post Start private method call" ) ; Main.doCall ( r ) ; reporter.accept ( "Pre Finish private method call" ) ; Finish ( reporter ) ; reporter.accept ( "Post Finish private method call" ) ; }

Target:
public void sayHi ( java.lang.Runnable r , java.util.function.Consumer < java.lang.String > reporter ) { reporter.accept ( "Pre Start private method call" ) ; Start ( reporter ) ; reporter.accept ( "Post Start private method call" ) ; r.run ( ) ; reporter.accept ( "Pre Finish private method call" ) ; Finish ( reporter ) ; reporter.accept ( "Post Finish private method call" ) ; }
Source:
public ScriptGroup2.Closure prepInit ( android.renderscript.ScriptGroup2.Builder b ) { return b.addInvoke ( s.getInvokeID_initialize ( ) , new java.lang.Object [ ] { new java.lang.Float ( mInBlack ) , new java.lang.Float ( mOutBlack ) , new java.lang.Float ( mInWMinInB ) , new java.lang.Float ( mOutWMinOutB ) , new java.lang.Float ( mOverInWMinInB ) , mSatMatrix } , new java.util.HashMap < android.renderscript.Script.FieldID , java.lang.Object > ( ) ) ; }

Target:
public ScriptGroup2.Closure prepInit ( android.renderscript.ScriptGroup2.Builder b ) { return b.addInvoke ( s.getInvokeID_initialize ( ) , mInBlack , mOutBlack , mInWMinInB , mOutWMinOutB , mOverInWMinInB , mSatMatrix ) ; }
Source:
public void testGetSupportedClientKeyTypes ( ) throws java.lang.Exception { byte [ ] allClientCertificateTypes = new byte [ 512 ] ; for ( int i = 0 ; i < ( allClientCertificateTypes.length ) ; i ++ ) { allClientCertificateTypes [ i ] = ( ( byte ) ( i ) ) ; } assertEquals ( new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( "RSA" , "DSA" , "DH_RSA" , "DH_DSA" , "EC" , "EC_RSA" , "EC_EC" ) ) , org.conscrypt.SSLParametersImpl.getSupportedClientKeyTypes ( allClientCertificateTypes ) ) ; }

Target:
public void testGetSupportedClientKeyTypes ( ) throws java.lang.Exception { byte [ ] allClientCertificateTypes = new byte [ 512 ] ; for ( int i = 0 ; i < ( allClientCertificateTypes.length ) ; i ++ ) { allClientCertificateTypes [ i ] = ( ( byte ) ( i ) ) ; } assertEquals ( new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( "RSA" , "DH_RSA" , "EC" , "EC_RSA" , "EC_EC" ) ) , org.conscrypt.SSLParametersImpl.getSupportedClientKeyTypes ( allClientCertificateTypes ) ) ; }
Source:
public java.lang.Object get ( int index ) throws org.json.JSONException { try { java.lang.Object value = values.get ( index ) ; if ( value == null ) { throw new org.json.JSONException ( ( ( "Value at " + index ) + " is null." ) ) ; } return value ; } catch ( java.lang.IndexOutOfBoundsException e ) { throw new org.json.JSONException ( ( ( ( ( "Index " + index ) + " out of range [0.." ) + ( values.size ( ) ) ) + ")" ) ) ; } }

Target:
public java.lang.Object get ( int index ) throws org.json.JSONException { try { java.lang.Object value = values.get ( index ) ; if ( value == null ) { throw new org.json.JSONException ( ( ( "Value at " + index ) + " is null." ) ) ; } return value ; } catch ( java.lang.IndexOutOfBoundsException e ) { throw new org.json.JSONException ( ( ( ( ( "Index " + index ) + " out of range [0.." ) + ( values.size ( ) ) ) + ")" ) , e ) ; } }
Source:
protected boolean dependsOnLibrary ( @ com.android.annotations.NonNull java.lang.String pkg ) { if ( ! ( isAndroidProject ( ) ) ) { return false ; } if ( pkg.equals ( mProject.getPackage ( ) ) ) { return true ; } for ( com.android.tools.gradle.eclipse.EclipseProject project : mProject.getAllLibraries ( ) ) { if ( pkg.equals ( project.getPackage ( ) ) ) { return true ; } } return false ; }

Target:
protected boolean dependsOnLibrary ( @ com.android.annotations.NonNull java.lang.String pkg ) { if ( ! ( isAndroidProject ( ) ) ) { return false ; } if ( pkg.equals ( mProject.getPackage ( ) ) ) { return true ; } for ( com.android.tools.gradle.eclipse.EclipseProject project : mProject.getAllLibraries ( ) ) { if ( ( project.isAndroidProject ( ) ) && ( pkg.equals ( project.getPackage ( ) ) ) ) { return true ; } } return false ; }
Source:
public void testGetTestCaseNamesForTestSuiteWithSuiteMethod ( ) throws java.lang.Exception { junit.framework.TestSuite testSuite = new android.test.TestCaseUtilTest.TwoTestsInTestSuite ( ) ; java.util.List < java.lang.String > testCaseNames = android.test.TestCaseUtil.getTestCaseNames ( testSuite , false ) ; assertEquals ( 2 , testCaseNames.size ( ) ) ; assertTrue ( testCaseNames.get ( 0 ) . endsWith ( "OneTestTestCase" ) ) ; assertTrue ( testCaseNames.get ( 1 ) . endsWith ( "OneTestTestSuite" ) ) ; }

Target:
public void testGetTestCaseNamesForTestSuiteWithSuiteMethod ( ) throws java.lang.Exception { junit.framework.TestSuite testSuite = new android.test.TestCaseUtilTest.TwoTestsInTestSuite ( ) ; java.util.List < java.lang.String > testCaseNames = android.test.TestCaseUtil.getTestCaseNames ( testSuite , false ) ; assertEquals ( 0 , testCaseNames.size ( ) ) ; }
Source:
public void setRemoteFeatureMask ( int supportedFeatures ) { if ( com.android.bluetooth.map.BluetoothMapMasInstance.V ) android.util.Log.v ( TAG , ( "setRemoteFeatureMask : Curr: " + ( mRemoteFeatureMask ) ) ) ; mRemoteFeatureMask = supportedFeatures ; if ( ( ( mObserver ) != null ) && ( ( mObserver.getObserverRemoteFeatureMask ( ) ) != ( mRemoteFeatureMask ) ) ) { mObserver.setObserverRemoteFeatureMask ( mRemoteFeatureMask ) ; if ( com.android.bluetooth.map.BluetoothMapMasInstance.V ) android.util.Log.v ( TAG , ( "setRemoteFeatureMask : set: " + ( mRemoteFeatureMask ) ) ) ; } }

Target:
public void setRemoteFeatureMask ( int supportedFeatures ) { if ( com.android.bluetooth.map.BluetoothMapMasInstance.V ) android.util.Log.v ( TAG , ( "setRemoteFeatureMask : Curr: " + ( mRemoteFeatureMask ) ) ) ; mRemoteFeatureMask = supportedFeatures ; if ( ( mObserver ) != null ) { mObserver.setObserverRemoteFeatureMask ( mRemoteFeatureMask ) ; if ( com.android.bluetooth.map.BluetoothMapMasInstance.V ) android.util.Log.v ( TAG , ( "setRemoteFeatureMask : set: " + ( mRemoteFeatureMask ) ) ) ; } }
Source:
static boolean native_isRect ( int nPath , android.graphics.RectF rect ) { android.graphics.Path_Delegate pathDelegate = android.graphics.Path_Delegate.sManager.getDelegate ( nPath ) ; if ( pathDelegate == null ) { return false ; } java.awt.geom.Area area = new java.awt.geom.Area ( pathDelegate.mPath ) ; if ( area.isRectangular ( ) ) { if ( rect != null ) { pathDelegate.fillBounds ( rect ) ; } return true ; } return false ; }

Target:
static boolean native_isRect ( long nPath , android.graphics.RectF rect ) { android.graphics.Path_Delegate pathDelegate = android.graphics.Path_Delegate.sManager.getDelegate ( nPath ) ; if ( pathDelegate == null ) { return false ; } java.awt.geom.Area area = new java.awt.geom.Area ( pathDelegate.mPath ) ; if ( area.isRectangular ( ) ) { if ( rect != null ) { pathDelegate.fillBounds ( rect ) ; } return true ; } return false ; }
Source:
private java.lang.String loadText ( android.content.pm.PackageItemInfo pii , int res , java.lang.CharSequence nonLocalized ) { if ( nonLocalized != null ) { return nonLocalized.toString ( ) ; } if ( res != 0 ) { android.content.res.Resources r = getResources ( pii ) ; if ( r != null ) { return r.getString ( res ) ; } } return null ; }

Target:
private java.lang.String loadText ( android.content.pm.PackageItemInfo pii , int res , java.lang.CharSequence nonLocalized ) { if ( nonLocalized != null ) { return nonLocalized.toString ( ) ; } if ( res != 0 ) { android.content.res.Resources r = getResources ( pii ) ; if ( r != null ) { try { return r.getString ( res ) ; } catch ( android.content.res.Resources e ) { } } } return null ; }
Source:
public void afterHandshake ( int session , int s , int c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { long time = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_SESSION_get_time ( session ) ; assertTrue ( ( time != 0 ) ) ; assertTrue ( ( time < ( java.lang.System.currentTimeMillis ( ) ) ) ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }

Target:
public void afterHandshake ( long session , long s , long c , java.net.Socket sock , java.io.FileDescriptor fd , org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSLHandshakeCallbacks callback ) throws java.lang.Exception { long time = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_SESSION_get_time ( session ) ; assertTrue ( ( time != 0 ) ) ; assertTrue ( ( time < ( java.lang.System.currentTimeMillis ( ) ) ) ) ; super . afterHandshake ( session , s , c , sock , fd , callback ) ; }
Source:
java.lang.String getBasePattern ( ) { java.lang.StringBuilder result = new java.lang.StringBuilder ( ) ; for ( int i = 0 ; i < ( android.icu.text.DateTimePatternGenerator.TYPE_LIMIT ) ; ++ i ) { if ( ( baseOriginal [ i ] . length ( ) ) != 0 ) result.append ( baseOriginal [ i ] ) ; } return result.toString ( ) ; }

Target:
java.lang.String getBasePattern ( ) { return baseOriginal.toString ( ) ; }
Source:
public static final < T extends com.android.jack.test.toolchain.IToolchain > T getCandidateToolchain ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > clazz ) { T result = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; org.junit.Assume.assumeTrue ( clazz.isAssignableFrom ( result.getClass ( ) ) ) ; return result ; }

Target:
public static final < T extends com.android.jack.test.toolchain.IToolchain > T getCandidateToolchain ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.jack.test.toolchain.IToolchain > clazz ) { com.android.jack.test.toolchain.IToolchain result = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( ) ; org.junit.Assume.assumeTrue ( clazz.isAssignableFrom ( result.getClass ( ) ) ) ; return ( ( T ) ( result ) ) ; }
Source:
void stopComposition ( ) { try { if ( ( mLooper ) != null ) { mLooper.quit ( ) ; mCompositionThread.join ( ) ; } } catch ( java.lang.InterruptedException e ) { } cleanupGl ( ) ; mCompositionThread = null ; mSurface = null ; mStartCompletionSemaphore = null ; }

Target:
void stopComposition ( ) { try { if ( ( mLooper ) != null ) { mLooper.quit ( ) ; mCompositionThread.join ( ) ; } } catch ( java.lang.InterruptedException e ) { } mCompositionThread = null ; mSurface = null ; mStartCompletionSemaphore = null ; }
Source:
public static void runJillToZip ( @ javax.annotation.Nonnull java.io.File inputFile , @ javax.annotation.Nonnull java.io.File outputFile ) throws java.lang.Exception { java.lang.String [ ] args = new java.lang.String [ ] { "--output" , outputFile.getAbsolutePath ( ) , inputFile.getAbsolutePath ( ) , "-v" } ; com.android.jill.Options options = com.android.jill.Main.getOptions ( args ) ; new com.android.jill.Jill ( options , "" ) . process ( options.getBinaryFile ( ) ) ; }

Target:
public static void runJillToZip ( @ javax.annotation.Nonnull java.io.File inputFile , @ javax.annotation.Nonnull java.io.File outputFile ) throws java.lang.Exception { java.lang.String [ ] args = new java.lang.String [ ] { "--output" , outputFile.getAbsolutePath ( ) , inputFile.getAbsolutePath ( ) } ; com.android.jill.Options options = com.android.jill.Main.getOptions ( args ) ; new com.android.jill.Jill ( options , "" ) . process ( options.getBinaryFile ( ) ) ; }
Source:
public void testTwoSystemTwoDeleted ( ) throws java.lang.Exception { org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; org.conscrypt.TrustedCertificateStoreTest.install ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; assertEmpty ( ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; }

Target:
public void testTwoSystemTwoDeleted ( ) throws java.lang.Exception { install ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; install ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; store.deleteCertificateEntry ( org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; assertEmpty ( ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa1 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa1 ( ) ) ; assertDeleted ( org.conscrypt.TrustedCertificateStoreTest.getCa2 ( ) , org.conscrypt.TrustedCertificateStoreTest.getAliasSystemCa2 ( ) ) ; }
Source:
static boolean nativeSetRect ( int native_dst , int left , int top , int right , int bottom ) { android.graphics.Region_Delegate dstRegion = android.graphics.Region_Delegate.sManager.getDelegate ( native_dst ) ; if ( dstRegion == null ) { return true ; } dstRegion.mArea = new java.awt.geom.Area ( new java.awt.geom.Rectangle2D.Float ( left , top , ( right - left ) , ( bottom - top ) ) ) ; return ( dstRegion.mArea.getBounds ( ) . isEmpty ( ) ) == false ; }

Target:
static boolean nativeSetRect ( long native_dst , int left , int top , int right , int bottom ) { android.graphics.Region_Delegate dstRegion = android.graphics.Region_Delegate.sManager.getDelegate ( native_dst ) ; if ( dstRegion == null ) { return true ; } dstRegion.mArea = new java.awt.geom.Area ( new java.awt.geom.Rectangle2D.Float ( left , top , ( right - left ) , ( bottom - top ) ) ) ; return ( dstRegion.mArea.getBounds ( ) . isEmpty ( ) ) == false ; }
Source:
public boolean createBondOutOfBand ( android.bluetooth.BluetoothDevice device , int transport , android.bluetooth.OobData oobData ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "createBondOutOfBand() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.createBond ( device , transport , oobData ) ; }

Target:
public boolean createBondOutOfBand ( android.bluetooth.BluetoothDevice device , int transport , android.bluetooth.OobData oobData ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "createBondOutOfBand() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return false ; } return service.createBond ( device , transport , oobData ) ; }
Source:
private static void assertCns ( java.lang.String dn , java.lang.String ... expected ) { java.lang.String [ ] result = org.apache.http.conn.ssl.AbstractVerifier.getCNs ( org.apache.http.conn.ssl.cts.AbstractVerifierTest.createStubCertificate ( dn ) ) ; java.lang.System.out.println ( ( "Expected is: " + ( expected.length ) ) ) ; if ( ( expected.length ) == 0 ) { assertNull ( result ) ; } else { assertNotNull ( dn , result ) ; assertEquals ( dn , java.util.Arrays.asList ( expected ) , java.util.Arrays.asList ( result ) ) ; } }

Target:
private static void assertCns ( java.lang.String dn , java.lang.String ... expected ) { java.lang.String [ ] result = org.apache.http.conn.ssl.AbstractVerifier.getCNs ( org.apache.http.conn.ssl.cts.AbstractVerifierTest.createStubCertificate ( dn ) ) ; if ( ( expected.length ) == 0 ) { assertNull ( result ) ; } else { assertNotNull ( dn , result ) ; assertEquals ( dn , java.util.Arrays.asList ( expected ) , java.util.Arrays.asList ( result ) ) ; } }
Source:
public void visitDocument ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Document document ) { org.w3c.dom.Element root = document.getDocumentElement ( ) ; if ( ( root != null ) && ( root.getTagName ( ) . equals ( com.android.SdkConstants.TAG_RESOURCES ) ) ) { context.report ( com.android.tools.lint.checks.WrongLocationDetector.ISSUE , root , context.getLocation ( root ) , "This file should be placed in a `values`/ folder, not a `layout`/ folder" , null ) ; } }

Target:
public void visitDocument ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Document document ) { org.w3c.dom.Element root = document.getDocumentElement ( ) ; if ( ( root != null ) && ( root.getTagName ( ) . equals ( com.android.SdkConstants.TAG_RESOURCES ) ) ) { context.report ( com.android.tools.lint.checks.WrongLocationDetector.ISSUE , root , context.getLocation ( root ) , "This file should be placed in a `values`/ folder, not a `layout`/ folder" ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mIccCardStatus.mApplications = new com.android.internal.telephony.uicc.IccCardApplicationStatus [ ] { } ; mIccCardStatus.mCdmaSubscriptionAppIndex = mIccCardStatus.mImsSubscriptionAppIndex = mIccCardStatus.mGsmUmtsSubscriptionAppIndex = - 1 ; mIccIoResult = new com.android.internal.telephony.uicc.IccIoResult ( 144 , 0 , com.android.internal.telephony.uicc.IccUtils.hexStringToBytes ( "FF40" ) ) ; mSimulatedCommands.setIccIoResultForApduLogicalChannel ( mIccIoResult ) ; mTestHandlerThread = new com.android.internal.telephony.uicc.UiccCardTest.UiccCardHandlerThread ( TAG ) ; mTestHandlerThread.start ( ) ; waitUntilReady ( ) ; replaceInstance ( com.android.internal.telephony.uicc.UiccCard.class , "mCatService" , mUicccard , mCAT ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( getClass ( ) . getSimpleName ( ) ) ; mIccCardStatus.mApplications = new com.android.internal.telephony.uicc.IccCardApplicationStatus [ ] { } ; mIccCardStatus.mCdmaSubscriptionAppIndex = mIccCardStatus.mImsSubscriptionAppIndex = mIccCardStatus.mGsmUmtsSubscriptionAppIndex = - 1 ; mIccIoResult = new com.android.internal.telephony.uicc.IccIoResult ( 144 , 0 , com.android.internal.telephony.uicc.IccUtils.hexStringToBytes ( "FF40" ) ) ; mSimulatedCommands.setIccIoResultForApduLogicalChannel ( mIccIoResult ) ; mTestHandlerThread = new com.android.internal.telephony.uicc.UiccCardTest.UiccCardHandlerThread ( getClass ( ) . getSimpleName ( ) ) ; mTestHandlerThread.start ( ) ; waitUntilReady ( ) ; replaceInstance ( com.android.internal.telephony.uicc.UiccCard.class , "mCatService" , mUicccard , mCAT ) ; }
Source:
private void prepareTune ( com.android.tv.tuner.data.TunerChannel channel , java.lang.String recording ) { mChannelBlocked = false ; mUnblockedContentRating = null ; mRetryCount = 0 ; mChannel = channel ; mRecordingId = recording ; mRecordingDuration = ( recording != null ) ? getDurationForRecording ( recording ) : null ; mProgram = null ; mPrograms = null ; mBufferStartTimeMs = mRecordStartTimeMs = ( ( mRecordingId ) != null ) ? 0 : java.lang.System.currentTimeMillis ( ) ; mLastPositionMs = 0 ; mCaptionTrack = null ; mHandler.sendEmptyMessage ( com.android.tv.tuner.tvinput.TunerSessionWorker.MSG_PARENTAL_CONTROLS ) ; }

Target:
private void prepareTune ( com.android.tv.tuner.data.TunerChannel channel , java.lang.String recording ) { mChannelBlocked = false ; mUnblockedContentRating = null ; mRetryCount = 0 ; mChannel = channel ; mRecordingId = recording ; mRecordingDuration = ( recording != null ) ? getDurationForRecording ( recording ) : null ; mProgram = null ; mPrograms = null ; if ( ( mRecordingId ) != null ) { mBufferStartTimeMs = mRecordStartTimeMs = 1 ; } else { mBufferStartTimeMs = mRecordStartTimeMs = java.lang.System.currentTimeMillis ( ) ; } mLastPositionMs = 0 ; mCaptionTrack = null ; mHandler.sendEmptyMessage ( com.android.tv.tuner.tvinput.TunerSessionWorker.MSG_PARENTAL_CONTROLS ) ; }
Source:
public java.io.InputStream openDirectUrl ( java.lang.String urlString , com.android.sdklib.internal.repository.ITaskMonitor monitor ) throws com.android.sdklib.internal.repository.UrlOpener.CanceledByUserException , java.io.IOException { if ( com.android.sdklib.internal.repository.DownloadCache.DEBUG ) { java.lang.System.out.println ( java.lang.String.format ( "%s : Direct download" , urlString ) ) ; } com.android.util.Pair < java.io.InputStream , org.apache.http.HttpResponse > result = com.android.sdklib.internal.repository.UrlOpener.openUrl ( urlString , monitor , null ) ; return result.getFirst ( ) ; }

Target:
public java.io.InputStream openDirectUrl ( java.lang.String urlString , com.android.sdklib.internal.repository.ITaskMonitor monitor ) throws com.android.sdklib.internal.repository.UrlOpener.CanceledByUserException , java.io.IOException { if ( com.android.sdklib.internal.repository.DownloadCache.DEBUG ) { java.lang.System.out.println ( java.lang.String.format ( "%s : Direct download" , urlString ) ) ; } com.android.util.Pair < java.io.InputStream , org.apache.http.HttpResponse > result = com.android.sdklib.internal.repository.UrlOpener.openUrl ( urlString , false , monitor , null ) ; return result.getFirst ( ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String [ ] pkgs = intent.getStringArrayExtra ( Intent.EXTRA_PACKAGES ) ; if ( pkgs != null ) { for ( java.lang.String pkg : pkgs ) { synchronized ( this ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false ) ) { setResultCode ( Activity.RESULT_OK ) ; return ; } } } } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { java.lang.String [ ] pkgs = intent.getStringArrayExtra ( Intent.EXTRA_PACKAGES ) ; if ( pkgs != null ) { for ( java.lang.String pkg : pkgs ) { if ( forceStopPackageLocked ( pkg , ( - 1 ) , false , false , false ) ) { setResultCode ( Activity.RESULT_OK ) ; return ; } } } }
Source:
private static com.android.jack.ir.ast.JMethodCall makeMethodCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodId methodId = targetMethod.getMethodId ( ) ; assert ( ( methodId.getKind ( ) ) == ( com.android.jack.ir.ast.MethodKind.STATIC ) ) || ( instance != null ) ; com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , methodId , targetMethod.getType ( ) , methodId.canBeVirtual ( ) ) ; call.addMarker ( new com.android.jack.ir.impl.ResolutionTargetMarker ( targetMethod ) ) ; return call ; }

Target:
private static com.android.jack.ir.ast.JMethodCall makeMethodCall ( @ javax.annotation.Nonnull com.android.jack.ir.sourceinfo.SourceInfo info , @ javax.annotation.CheckForNull com.android.jack.ir.ast.JExpression instance , @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface receiverType , @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod targetMethod ) { com.android.jack.ir.ast.JMethodId methodId = targetMethod.getMethodId ( ) ; assert ( ( methodId.getKind ( ) ) == ( com.android.jack.ir.ast.MethodKind.STATIC ) ) || ( instance != null ) ; com.android.jack.ir.ast.JMethodCall call = new com.android.jack.ir.ast.JMethodCall ( info , instance , receiverType , methodId , targetMethod.getType ( ) , methodId.canBeVirtual ( ) ) ; return call ; }
Source:
private android.telecom.Connection findConnectionForAction ( java.lang.String callId , java.lang.String action ) { if ( mConnectionById.containsKey ( callId ) ) { return mConnectionById.get ( callId ) ; } android.telecom.Log.w ( this , "%s - Cannot find Connection %s" , action , callId ) ; return android.telecom.ConnectionService.getNullConnection ( ) ; }

Target:
private android.telecom.Connection findConnectionForAction ( java.lang.String callId , java.lang.String action ) { if ( ( callId != null ) && ( mConnectionById.containsKey ( callId ) ) ) { return mConnectionById.get ( callId ) ; } android.telecom.Log.w ( this , "%s - Cannot find Connection %s" , action , callId ) ; return android.telecom.ConnectionService.getNullConnection ( ) ; }
Source:
public org.objectweb.asm.FieldVisitor visitField ( int access , java.lang.String name , java.lang.String desc , java.lang.String signature , java.lang.Object value ) { return new org.objectweb.asm.FieldVisitor ( Opcodes.ASM4 , super . visitField ( access , name , desc , signature , value ) ) { @ java.lang.Override public org.objectweb.asm.AnnotationVisitor visitAnnotation ( java.lang.String desc , boolean visible ) { return new org.objectweb.asm.ClassAdapterTest.AnnotationAdapter ( super . visitAnnotation ( desc , visible ) ) ; } } ; }

Target:
public org.objectweb.asm.AnnotationVisitor visitAnnotation ( java.lang.String desc , boolean visible ) { return new org.objectweb.asm.ClassAdapterTest.AnnotationAdapter ( super . visitAnnotation ( desc , visible ) ) ; }
Source:
private static java.util.List < com.android.ide.eclipse.gltrace.state.transforms.IStateTransform > transformsForGlActiveTexture ( com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg ) { com.android.ide.eclipse.gltrace.GLEnum texture = com.android.ide.eclipse.gltrace.GLEnum.valueOf ( msg.getArgs ( 0 ) . getIntValue ( 0 ) ) ; java.lang.Integer textureIndex = java.lang.Integer.valueOf ( ( ( texture.value ) - ( GLEnum.GL_TEXTURE0.value ) ) ) ; com.android.ide.eclipse.gltrace.state.transforms.IStateTransform transform = new com.android.ide.eclipse.gltrace.state.transforms.PropertyChangeTransform ( com.android.ide.eclipse.gltrace.state.transforms.GLPropertyAccessor.makeAccessor ( msg.getContextId ( ) , GLStateType.TEXTURE_STATE , GLStateType.ACTIVE_TEXTURE_UNIT ) , textureIndex ) ; return java.util.Collections.singletonList ( transform ) ; }

Target:
private static java.util.List < com.android.ide.eclipse.gltrace.state.transforms.IStateTransform > transformsForGlActiveTexture ( com.android.ide.eclipse.gltrace.GLProtoBuf.GLMessage msg ) { com.android.ide.eclipse.gltrace.GLEnum texture = com.android.ide.eclipse.gltrace.GLEnum.valueOf ( msg.getArgs ( 0 ) . getIntValue ( 0 ) ) ; java.lang.Integer textureIndex = java.lang.Integer.valueOf ( ( ( int ) ( ( texture.value ) - ( GLEnum.GL_TEXTURE0.value ) ) ) ) ; com.android.ide.eclipse.gltrace.state.transforms.IStateTransform transform = new com.android.ide.eclipse.gltrace.state.transforms.PropertyChangeTransform ( com.android.ide.eclipse.gltrace.state.transforms.GLPropertyAccessor.makeAccessor ( msg.getContextId ( ) , GLStateType.TEXTURE_STATE , GLStateType.ACTIVE_TEXTURE_UNIT ) , textureIndex ) ; return java.util.Collections.singletonList ( transform ) ; }
Source:
public android.net.LinkAddress createFromParcel ( android.os.Parcel in ) { java.net.InetAddress address = null ; int prefixLength = 0 ; if ( ( in.readByte ( ) ) == 1 ) { try { address = java.net.InetAddress.getByAddress ( in.createByteArray ( ) ) ; prefixLength = in.readInt ( ) ; } catch ( java.net.UnknownHostException e ) { } } return new android.net.LinkAddress ( address , prefixLength ) ; }

Target:
public android.net.LinkAddress createFromParcel ( android.os.Parcel in ) { java.net.InetAddress address = null ; try { address = java.net.InetAddress.getByAddress ( in.createByteArray ( ) ) ; } catch ( java.net.UnknownHostException e ) { } int prefixLength = in.readInt ( ) ; return new android.net.LinkAddress ( address , prefixLength ) ; }
Source:
public static void testSendEtwsMessageTest ( android.app.Activity activity , int serialNumber ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdu ( com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageTest , serialNumber , 0 ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_EMERGENCY_BROADCAST , AppOpsManager.OP_RECEIVE_EMERGECY_SMS , null , null , Activity.RESULT_OK , null , null ) ; }

Target:
public static void testSendEtwsMessageTest ( android.app.Activity activity , int serialNumber ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_EMERGENCY_CB_RECEIVED_ACTION ) ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdu ( activity , com.android.cellbroadcastreceiver.tests.SendTestMessages.etwsMessageTest , serialNumber , 0 ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_EMERGENCY_BROADCAST , AppOpsManager.OP_RECEIVE_EMERGECY_SMS , null , null , Activity.RESULT_OK , null , null ) ; }
Source:
public void test_getReuseAddress ( ) throws java.lang.Exception { java.net.Socket theSocket = new java.net.Socket ( ) ; theSocket.setReuseAddress ( true ) ; assertTrue ( "getReuseAddress false when it should be true" , theSocket.getReuseAddress ( ) ) ; theSocket.setReuseAddress ( false ) ; assertFalse ( "getReuseAddress true when it should be False" , theSocket.getReuseAddress ( ) ) ; }

Target:
public void test_getReuseAddress ( ) throws java.lang.Exception { try ( java.net.Socket theSocket = new java.net.Socket ( ) ) { theSocket.setReuseAddress ( true ) ; assertTrue ( "getReuseAddress false when it should be true" , theSocket.getReuseAddress ( ) ) ; theSocket.setReuseAddress ( false ) ; assertFalse ( "getReuseAddress true when it should be False" , theSocket.getReuseAddress ( ) ) ; } }
Source:
public void testCreate ( ) { org.eclipse.core.resources.IProject projectMock = org.easymock.EasyMock.createMock ( org.eclipse.core.resources.IProject.class ) ; org.easymock.EasyMock.expect ( projectMock.findMember ( RulesEngine.FD_GSCRIPTS ) ) . andReturn ( null ) ; org.easymock.EasyMock.replay ( projectMock ) ; com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine r = new com.android.ide.eclipse.adt.internal.editors.layout.gre.RulesEngine ( projectMock ) ; assertNotNull ( r ) ; org.easymock.EasyMock.verify ( projectMock ) ; }

Target:
public void testCreate ( ) { }
Source:
public void onCreate ( ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog dialog = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog ( mParent.getShell ( ) , mEditedFile.getName ( ) , com.android.ide.eclipse.adt.internal.sdk.Sdk.getCurrent ( ) . getTarget ( mEditedFile.getProject ( ) ) , mConfigComposite.getCurrentConfig ( ) ) ; if ( ( dialog.open ( ) ) == ( org.eclipse.jface.dialogs.Dialog.OK ) ) { final com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = new com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration ( ) ; dialog.getConfiguration ( config ) ; createAlternateLayout ( config ) ; } }

Target:
public void onCreate ( ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog dialog = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.LayoutCreatorDialog ( mParent.getShell ( ) , mEditedFile.getName ( ) , mConfigComposite.getCurrentConfig ( ) ) ; if ( ( dialog.open ( ) ) == ( org.eclipse.jface.dialogs.Dialog.OK ) ) { final com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config = new com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration ( ) ; dialog.getConfiguration ( config ) ; createAlternateLayout ( config ) ; } }
Source:
public void testDisconnectSelfManaged ( ) throws java.lang.Exception { android.telecom.PhoneAccountHandle phoneAccountHandle = mPhoneAccountSelfManaged.getAccountHandle ( ) ; startAndMakeActiveIncomingCall ( "650-555-1212" , phoneAccountHandle , mConnectionServiceFixtureA ) ; android.telecom.Connection connection = mConnectionServiceFixtureA.mLatestConnection ; connection.setAudioRoute ( CallAudioState.ROUTE_SPEAKER ) ; waitForHandlerAction ( new android.os.Handler ( android.os.Looper.getMainLooper ( ) ) , com.android.server.telecom.tests.TEST_TIMEOUT ) ; startAndMakeDialingEmergencyCall ( "650-555-1212" , mPhoneAccountE0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( CallAudioState.ROUTE_EARPIECE , mInCallServiceFixtureX.mCallAudioState.getRoute ( ) ) ; }

Target:
public void testDisconnectSelfManaged ( ) throws java.lang.Exception { android.telecom.PhoneAccountHandle phoneAccountHandle = mPhoneAccountSelfManaged.getAccountHandle ( ) ; startAndMakeActiveIncomingCall ( "650-555-1212" , phoneAccountHandle , mConnectionServiceFixtureA ) ; android.telecom.Connection connection = mConnectionServiceFixtureA.mLatestConnection ; connection.setAudioRoute ( CallAudioState.ROUTE_SPEAKER ) ; waitForHandlerAction ( new android.os.Handler ( android.os.Looper.getMainLooper ( ) ) , com.android.server.telecom.tests.TEST_TIMEOUT ) ; startAndMakeDialingEmergencyCall ( "650-555-1212" , mPhoneAccountE0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.junit.Assert.assertEquals ( CallAudioState.ROUTE_EARPIECE , mInCallServiceFixtureX.mCallAudioState.getRoute ( ) ) ; }
Source:
public boolean getRingBufferData ( java.lang.String ringName ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getRingBufferData ( ringName ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getRingBufferDataNative ( com.android.server.wifi.WifiNative.sWlan0Index , ringName ) ; } else { return false ; } } } }

Target:
public boolean getRingBufferData ( java.lang.String ringName ) { return mWifiVendorHal.getRingBufferData ( ringName ) ; }
Source:
protected void fillFiles ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVDir vDir , @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull java.util.List < com.android.sched.vfs.InputVFile > files ) { for ( com.android.sched.vfs.InputVElement subFile : vDir.list ( ) ) { if ( subFile.isVDir ( ) ) { fillFiles ( ( ( com.android.sched.vfs.InputVDir ) ( subFile ) ) , fileType , files ) ; } else { com.android.sched.vfs.InputVFile vFile = ( ( com.android.sched.vfs.InputVFile ) ( subFile ) ) ; if ( fileType.isOfType ( vFile ) ) { files.add ( vFile ) ; } } } }

Target:
protected void fillFiles ( @ javax.annotation.Nonnull com.android.sched.vfs.InputVDir vDir , @ javax.annotation.Nonnull java.util.List < com.android.sched.vfs.InputVFile > files ) { for ( com.android.sched.vfs.InputVElement subFile : vDir.list ( ) ) { if ( subFile.isVDir ( ) ) { fillFiles ( ( ( com.android.sched.vfs.InputVDir ) ( subFile ) ) , files ) ; } else { files.add ( ( ( com.android.sched.vfs.InputVFile ) ( subFile ) ) ) ; } } }
Source:
public boolean equals ( sun.security.x509.AlgorithmId other ) { boolean paramsEqual = ( ( params ) == null ) ? ( other.params ) == null : params.equals ( other.params ) ; return ( algid.equals ( other.algid ) ) && paramsEqual ; }

Target:
public boolean equals ( sun.security.x509.AlgorithmId other ) { boolean paramsEqual = ( ( params ) == null ) ? ( other.params ) == null : params.equals ( other.params ) ; return ( algid.equals ( ( ( java.lang.Object ) ( other.algid ) ) ) ) && paramsEqual ; }
Source:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByOid ( org.bouncycastle.asn1.ASN1ObjectIdentifier oid ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.crypto.ec.CustomNamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.x9.X962NamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByOID ( oid ) ; } if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByOID ( oid ) ; } if ( params == null ) { params = org.bouncycastle.asn1.teletrust.TeleTrusTNamedCurves.getByOID ( oid ) ; } } return params ; }

Target:
public static org.bouncycastle.asn1.x9.X9ECParameters getNamedCurveByOid ( org.bouncycastle.asn1.ASN1ObjectIdentifier oid ) { org.bouncycastle.asn1.x9.X9ECParameters params = org.bouncycastle.crypto.ec.CustomNamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.x9.X962NamedCurves.getByOID ( oid ) ; if ( params == null ) { params = org.bouncycastle.asn1.sec.SECNamedCurves.getByOID ( oid ) ; } if ( params == null ) { params = org.bouncycastle.asn1.nist.NISTNamedCurves.getByOID ( oid ) ; } } return params ; }
Source:
public void testConstructor_IllegalAliases_Middle ( ) { try { new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22##ab" } ) ; fail ( "Should throw IllegalCharsetNameException!" ) ; } catch ( java.nio.charset.IllegalCharsetNameException e ) { } try { new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22%%ab" } ) ; fail ( "Should throw IllegalCharsetNameException!" ) ; } catch ( java.nio.charset.IllegalCharsetNameException e ) { } }

Target:
public void testConstructor_IllegalAliases_Middle ( ) { try { new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22##ab" } ) ; fail ( ) ; } catch ( java.nio.charset.IllegalCharsetNameException expected ) { } try { new tests.api.java.nio.charset.CharsetTest.MockCharset ( "mockChar" , new java.lang.String [ ] { "mock" , "22%%ab" } ) ; fail ( ) ; } catch ( java.nio.charset.IllegalCharsetNameException expected ) { } }
Source:
private void reAddWindowToListInOrderLocked ( com.android.server.WindowManagerService.WindowState win ) { addWindowToListInOrderLocked ( win , false ) ; int wpos = mWindows.indexOf ( win ) ; if ( wpos >= 0 ) { if ( com.android.server.WindowManagerService.DEBUG_WINDOW_MOVEMENT ) android.util.Log.v ( com.android.server.WindowManagerService.TAG , ( ( ( "ReAdd removing from " + wpos ) + ": " ) + win ) ) ; mWindows.remove ( wpos ) ; reAddWindowLocked ( wpos , win ) ; } }

Target:
private void reAddWindowToListInOrderLocked ( com.android.server.WindowManagerService.WindowState win ) { addWindowToListInOrderLocked ( win , false ) ; int wpos = mWindows.indexOf ( win ) ; if ( wpos >= 0 ) { if ( com.android.server.WindowManagerService.DEBUG_WINDOW_MOVEMENT ) android.util.Slog.v ( com.android.server.WindowManagerService.TAG , ( ( ( "ReAdd removing from " + wpos ) + ": " ) + win ) ) ; mWindows.remove ( wpos ) ; reAddWindowLocked ( wpos , win ) ; } }
Source:
private void inflateTable ( int toSize ) { int capacity = java.util.HashMap.roundUpToPowerOf2 ( toSize ) ; float thresholdFloat = capacity * ( loadFactor ) ; if ( thresholdFloat > ( ( java.util.HashMap.MAXIMUM_CAPACITY ) + 1 ) ) { thresholdFloat = ( java.util.HashMap.MAXIMUM_CAPACITY ) + 1 ; } threshold = ( ( int ) ( thresholdFloat ) ) ; table = new java.util.HashMap.HashMapEntry [ capacity ] ; initHashSeedAsNeeded ( capacity ) ; }

Target:
private void inflateTable ( int toSize ) { int capacity = java.util.HashMap.roundUpToPowerOf2 ( toSize ) ; float thresholdFloat = capacity * ( loadFactor ) ; if ( thresholdFloat > ( ( java.util.HashMap.MAXIMUM_CAPACITY ) + 1 ) ) { thresholdFloat = ( java.util.HashMap.MAXIMUM_CAPACITY ) + 1 ; } threshold = ( ( int ) ( thresholdFloat ) ) ; table = new java.util.HashMap.HashMapEntry [ capacity ] ; }
Source:
public static void testSendMessage7bitMultipageGsm ( android.app.Activity activity , int serialNumber , int category ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION ) ; byte [ ] [ ] pdus = new byte [ 2 ] [ ] ; pdus [ 0 ] = com.android.cellbroadcastreceiver.tests.SendTestMessages.gsm7BitTestMultipage1 ; pdus [ 1 ] = com.android.cellbroadcastreceiver.tests.SendTestMessages.gsm7BitTestMultipage2 ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdus ( pdus , serialNumber , category ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_SMS , AppOpsManager.OP_RECEIVE_SMS , null , null , Activity.RESULT_OK , null , null ) ; }

Target:
public static void testSendMessage7bitMultipageGsm ( android.app.Activity activity , int serialNumber , int category ) { android.content.Intent intent = new android.content.Intent ( android.provider.Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION ) ; byte [ ] [ ] pdus = new byte [ 2 ] [ ] ; pdus [ 0 ] = com.android.cellbroadcastreceiver.tests.SendTestMessages.gsm7BitTestMultipage1 ; pdus [ 1 ] = com.android.cellbroadcastreceiver.tests.SendTestMessages.gsm7BitTestMultipage2 ; intent.putExtra ( "message" , com.android.cellbroadcastreceiver.tests.SendTestMessages.createFromPdus ( activity , pdus , serialNumber , category ) ) ; activity.sendOrderedBroadcastAsUser ( intent , UserHandle.ALL , Manifest.permission.RECEIVE_SMS , AppOpsManager.OP_RECEIVE_SMS , null , null , Activity.RESULT_OK , null , null ) ; }
Source:
public void end ( ) throws com.android.ide.common.res2.ConsumerException { try { postWriteAction ( ) ; getExecutor ( ) . waitForTasksWithQuickFail ( ) ; } catch ( java.lang.InterruptedException e ) { getExecutor ( ) . cancelAllTasks ( ) ; throw new com.android.ide.common.res2.ConsumerException ( e ) ; } catch ( java.util.concurrent.ExecutionException e ) { mExecutor.cancelAllTasks ( ) ; throw new com.android.ide.common.res2.ConsumerException ( e.getCause ( ) ) ; } }

Target:
public void end ( ) throws com.android.ide.common.res2.ConsumerException { try { postWriteAction ( ) ; getExecutor ( ) . waitForTasksWithQuickFail ( true ) ; } catch ( java.lang.Exception e ) { throw new com.android.ide.common.res2.ConsumerException ( e ) ; } }
Source:
static void setChar ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , char value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertActualAndExpectedMatch ( exceptionThrown , expectFailure ) ; }

Target:
static void setChar ( java.lang.invoke.MethodHandle m , Main.ValueHolder v , char value , boolean expectFailure ) throws java.lang.Throwable { boolean exceptionThrown = false ; try { if ( v == null ) { m.invokeExact ( value ) ; } else { m.invokeExact ( v , value ) ; } } catch ( java.lang.invoke.WrongMethodTypeException e ) { exceptionThrown = true ; } Main.Tester.assertEquals ( exceptionThrown , expectFailure ) ; }
Source:
private int pointToPosition ( int x , int y ) { x -= getCompoundPaddingLeft ( ) ; y -= getExtendedPaddingTop ( ) ; x += getScrollX ( ) ; y += getScrollY ( ) ; android.text.Layout layout = getLayout ( ) ; if ( layout == null ) { return - 1 ; } int line = layout.getLineForVertical ( y ) ; int off = layout.getOffsetForHorizontal ( line , x ) ; return off ; }

Target:
private int pointToPosition ( int x , int y ) { android.text.Layout layout = getLayout ( ) ; if ( layout == null ) { return - 1 ; } x -= getCompoundPaddingLeft ( ) ; y -= getExtendedPaddingTop ( ) ; x += getScrollX ( ) ; y += getScrollY ( ) ; int line = layout.getLineForVertical ( y ) ; int off = layout.getOffsetForHorizontal ( line , x ) ; return off ; }