auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAddSuppressedWithSuppressionDisabled ( ) { java.lang.Throwable throwable = new libcore.java.lang.ThrowableTest.SuppressionsThrowable ( "foo" , null , false ) ; assertSuppressed ( throwable ) ; throwable.addSuppressed ( new java.lang.Throwable ( ) ) ; assertSuppressed ( throwable ) ; throwable.addSuppressed ( new java.lang.Throwable ( ) ) ; assertSuppressed ( throwable ) ; }

Target:
public void testAddSuppressedWithSuppressionDisabled ( ) { java.lang.Throwable throwable = new libcore.java.lang.ThrowableTest.SuppressionsThrowable ( "foo" , null , false , true ) ; assertSuppressed ( throwable ) ; throwable.addSuppressed ( new java.lang.Throwable ( ) ) ; assertSuppressed ( throwable ) ; throwable.addSuppressed ( new java.lang.Throwable ( ) ) ; assertSuppressed ( throwable ) ; }
Source:
public void accept ( int result ) { if ( result == ( android.app.Activity.RESULT_OK ) ) { logFail ( ) ; status = FAIL ; } else { if ( ( ( mNm.getEffectsSuppressor ( ) ) == null ) || ( ! ( mNm.getEffectsSuppressor ( ) . equals ( MockListener.COMPONENT_NAME ) ) ) ) { status = PASS ; } else { status = FAIL ; } } next ( ) ; }

Target:
void test ( ) { if ( ( ( mNm.getEffectsSuppressor ( ) ) == null ) || ( ! ( mNm.getEffectsSuppressor ( ) . equals ( MockListener.COMPONENT_NAME ) ) ) ) { status = PASS ; } else { status = FAIL ; } }
Source:
protected boolean cleanup ( ) { mHandler = null ; if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mHealthChannels ) != null ) { mHealthChannels.clear ( ) ; } if ( ( mHealthDevices ) != null ) { mHealthDevices.clear ( ) ; } if ( ( mApps ) != null ) { mApps.clear ( ) ; } return true ; }

Target:
protected void cleanup ( ) { mHandler = null ; if ( mNativeAvailable ) { cleanupNative ( ) ; mNativeAvailable = false ; } if ( ( mHealthChannels ) != null ) { mHealthChannels.clear ( ) ; } if ( ( mHealthDevices ) != null ) { mHealthDevices.clear ( ) ; } if ( ( mApps ) != null ) { mApps.clear ( ) ; } }
Source:
private void assertNetworkStats ( java.lang.String iface , com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats stats , android.net.NetworkStats.Entry entry ) { org.junit.Assert.assertEquals ( iface , entry.iface ) ; org.junit.Assert.assertEquals ( stats.rxBytes , entry.rxBytes ) ; org.junit.Assert.assertEquals ( stats.txBytes , entry.txBytes ) ; org.junit.Assert.assertEquals ( android.net.NetworkStats.SET_DEFAULT , entry.set ) ; org.junit.Assert.assertEquals ( android.net.NetworkStats.TAG_NONE , entry.tag ) ; org.junit.Assert.assertEquals ( android.net.TrafficStats.UID_TETHERING , entry.uid ) ; }

Target:
private void assertNetworkStats ( java.lang.String iface , com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats stats , android.net.NetworkStats.Entry entry ) { org.junit.Assert.assertEquals ( iface , entry.iface ) ; org.junit.Assert.assertEquals ( stats.rxBytes , entry.rxBytes ) ; org.junit.Assert.assertEquals ( stats.txBytes , entry.txBytes ) ; org.junit.Assert.assertEquals ( android.net.NetworkStats.SET_DEFAULT , entry.set ) ; org.junit.Assert.assertEquals ( android.net.NetworkStats.TAG_NONE , entry.tag ) ; }
Source:
public void onDestroy ( ) { com.android.dialer.common.LogUtil.enterBlock ( "DialerCall.onDestroy" ) ; if ( ( rttTranscript ) != null ) { com.android.dialer.rtt.RttTranscript rttTranscriptToSave = rttTranscript ; com.google.common.util.concurrent.ListenableFuture < java.lang.Void > future = com.android.dialer.common.concurrent.DialerExecutorComponent.get ( context ) . backgroundExecutor ( ) . submit ( ( ) -> { new com.android.dialer.rtt.RttTranscriptUtil ( context ) . saveRttTranscript ( rttTranscriptToSave ) ; return null ; } ) ; com.google.common.util.concurrent.Futures.addCallback ( future , new com.android.dialer.common.concurrent.DefaultFutureCallback ( ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; rttTranscript = null ; } }

Target:
public void onDestroy ( ) { com.android.dialer.common.LogUtil.enterBlock ( "DialerCall.onDestroy" ) ; if ( ( rttTranscript ) != null ) { com.google.common.util.concurrent.Futures.addCallback ( com.android.dialer.rtt.RttTranscriptUtil.saveRttTranscript ( context , rttTranscript ) , new com.android.dialer.common.concurrent.DefaultFutureCallback ( ) , com.google.common.util.concurrent.MoreExecutors.directExecutor ( ) ) ; rttTranscript = null ; } }
Source:
public void handleMessage ( android.os.Message msg ) { debugLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) , msg.arg1 ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_REGISTERED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_REGISTERED" ) ; registerProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_UNREGISTERED : debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_UNREGISTERED" ) ; unregisterProfileService ( ( ( com.android.bluetooth.btservice.ProfileService ) ( msg.obj ) ) ) ; break ; } }

Target:
public void handleMessage ( android.os.Message msg ) { debugLog ( ( "handleMessage() - Message: " + ( msg.what ) ) ) ; switch ( msg.what ) { case com.android.bluetooth.btservice.AdapterService.MESSAGE_PROFILE_SERVICE_STATE_CHANGED : { debugLog ( "handleMessage() - MESSAGE_PROFILE_SERVICE_STATE_CHANGED" ) ; processProfileServiceStateChanged ( ( ( java.lang.String ) ( msg.obj ) ) , msg.arg1 ) ; } break ; } }
Source:
public static void $noinline$stackOverflow ( Main m , boolean isSecondInvocation ) { if ( ! ( Main.isInInterpreter ( "$noinline$stackOverflow" ) ) ) { return ; } Main.ensureHasProfilingInfo ( ) ; if ( isSecondInvocation ) { while ( ! ( Main.isInOsrCode ( "$noinline$stackOverflow" ) ) ) { } } for ( int i = 0 ; i < ( isSecondInvocation ? 10000000 : 1 ) ; ++ i ) { m.otherInlineCache ( ) ; } }

Target:
public static void $noinline$stackOverflow ( Main m , boolean isSecondInvocation ) { if ( ! ( Main.isInInterpreter ( "$noinline$stackOverflow" ) ) ) { return ; } Main.ensureHasProfilingInfo ( "$noinline$stackOverflow" ) ; if ( isSecondInvocation ) { while ( ! ( Main.isInOsrCode ( "$noinline$stackOverflow" ) ) ) { } } for ( int i = 0 ; i < ( isSecondInvocation ? 10000000 : 1 ) ; ++ i ) { m.otherInlineCache ( ) ; } }
Source:
private void loadFromWpaSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { if ( ! ( mWifiNative.migrateNetworksFromSupplicant ( configurationMap , networkExtras ) ) ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "Failed to load wifi configurations from wpa_supplicant" ) ; return ; } if ( configurationMap.isEmpty ( ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "No wifi configurations found in wpa_supplicant" ) ; return ; } if ( ! ( WifiNative.HIDL_SUP_ENABLE ) ) { populateMaskedFieldsFromWpaSupplicantFile ( configurationMap ) ; } }

Target:
private void loadFromWpaSupplicant ( java.util.Map < java.lang.String , android.net.wifi.WifiConfiguration > configurationMap , android.util.SparseArray < java.util.Map < java.lang.String , java.lang.String > > networkExtras ) { if ( ! ( mWifiNative.migrateNetworksFromSupplicant ( configurationMap , networkExtras ) ) ) { android.util.Log.wtf ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "Failed to load wifi configurations from wpa_supplicant" ) ; return ; } if ( configurationMap.isEmpty ( ) ) { android.util.Log.w ( com.android.server.wifi.WifiConfigStoreLegacy.TAG , "No wifi configurations found in wpa_supplicant" ) ; return ; } }
Source:
private static com.google.common.collect.ImmutableList < com.google.devtools.build.android.desugar.InputFileProvider > toRegisteredInputFileProvider ( com.google.common.io.Closer closer , java.util.List < java.nio.file.Path > paths ) throws java.io.IOException { com.google.common.collect.ImmutableList.Builder < com.google.devtools.build.android.desugar.InputFileProvider > builder = new com.google.common.collect.ImmutableList.Builder < > ( ) ; for ( java.nio.file.Path path : paths ) { builder.add ( closer.register ( com.google.devtools.build.android.desugar.Desugar.toInputFileProvider ( path ) ) ) ; } return builder.build ( ) ; }

Target:
static com.google.common.collect.ImmutableList < com.google.devtools.build.android.desugar.InputFileProvider > toRegisteredInputFileProvider ( com.google.common.io.Closer closer , java.util.List < java.nio.file.Path > paths ) throws java.io.IOException { com.google.common.collect.ImmutableList.Builder < com.google.devtools.build.android.desugar.InputFileProvider > builder = new com.google.common.collect.ImmutableList.Builder < > ( ) ; for ( java.nio.file.Path path : paths ) { builder.add ( closer.register ( com.google.devtools.build.android.desugar.Desugar.toInputFileProvider ( path ) ) ) ; } return builder.build ( ) ; }
Source:
public void initialize ( int strength , java.security.SecureRandom random ) { this . strength = strength ; this . random = random ; java.security.spec.ECGenParameterSpec ecParams = ( ( java.security.spec.ECGenParameterSpec ) ( org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi.EC.ecParameters.get ( org.bouncycastle.util.Integers.valueOf ( strength ) ) ) ) ; if ( ecParams != null ) { try { initialize ( ecParams , random ) ; } catch ( java.security.InvalidAlgorithmParameterException e ) { throw new java.security.InvalidParameterException ( "key size not configurable." ) ; } } else { throw new java.security.InvalidParameterException ( "unknown key size." ) ; } }

Target:
public void initialize ( int strength , java.security.SecureRandom random ) { this . strength = strength ; this . random = random ; java.security.spec.ECGenParameterSpec ecParams = ( ( java.security.spec.ECGenParameterSpec ) ( org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi.EC.ecParameters.get ( org.bouncycastle.util.Integers.valueOf ( strength ) ) ) ) ; if ( ecParams == null ) { throw new java.security.InvalidParameterException ( "unknown key size." ) ; } try { initialize ( ecParams , random ) ; } catch ( java.security.InvalidAlgorithmParameterException e ) { throw new java.security.InvalidParameterException ( "key size not configurable." ) ; } }
Source:
public boolean satisfiedByUids ( android.net.NetworkCapabilities nc ) { if ( null == ( nc.mUids ) ) return true ; if ( null == ( mUids ) ) return false ; for ( android.net.UidRange requiredRange : mUids ) { if ( requiredRange.contains ( nc.mEstablishingVpnAppUid ) ) return true ; if ( ! ( nc.appliesToUidRange ( requiredRange ) ) ) { return false ; } } return true ; }

Target:
public boolean satisfiedByUids ( android.net.NetworkCapabilities nc ) { if ( ( null == ( nc.mUids ) ) || ( null == ( mUids ) ) ) return true ; for ( android.net.UidRange requiredRange : mUids ) { if ( requiredRange.contains ( nc.mEstablishingVpnAppUid ) ) return true ; if ( ! ( nc.appliesToUidRange ( requiredRange ) ) ) { return false ; } } return true ; }
Source:
private void placeWindowBefore ( java.lang.Object pos , com.android.server.WindowManagerService.WindowState window ) { final int i = mWindows.indexOf ( pos ) ; if ( ( com.android.server.WindowManagerService.DEBUG_FOCUS ) || ( com.android.server.WindowManagerService.DEBUG_WINDOW_MOVEMENT ) ) android.util.Log.v ( com.android.server.WindowManagerService.TAG , ( ( ( ( ( ( ( ( "Adding window " + window ) + " at " ) + i ) + " of " ) + ( mWindows.size ( ) ) ) + " (before " ) + pos ) + ")" ) ) ; mWindows.add ( i , window ) ; }

Target:
private void placeWindowBefore ( java.lang.Object pos , com.android.server.WindowManagerService.WindowState window ) { final int i = mWindows.indexOf ( pos ) ; if ( ( com.android.server.WindowManagerService.DEBUG_FOCUS ) || ( com.android.server.WindowManagerService.DEBUG_WINDOW_MOVEMENT ) ) android.util.Slog.v ( com.android.server.WindowManagerService.TAG , ( ( ( ( ( ( ( ( "Adding window " + window ) + " at " ) + i ) + " of " ) + ( mWindows.size ( ) ) ) + " (before " ) + pos ) + ")" ) ) ; mWindows.add ( i , window ) ; }
Source:
public void testAll ( ) throws java.lang.Exception { for ( java.util.Locale l : java.util.Locale.getAvailableLocales ( ) ) { libcore.icu.LocaleData d = libcore.icu.LocaleData.get ( l ) ; java.lang.System.err.println ( ( ( ( ( ( ( l + " : " ) + ( d.yesterday ) ) + " " ) + ( d.today ) ) + " " ) + ( d.tomorrow ) ) ) ; } }

Target:
public void testAll ( ) throws java.lang.Exception { for ( java.util.Locale l : java.util.Locale.getAvailableLocales ( ) ) { libcore.icu.LocaleData d = libcore.icu.LocaleData.get ( l ) ; } }
Source:
private java.lang.Class < ? > loadClassFromJar ( java.lang.String name ) throws java.lang.ClassNotFoundException { if ( ( mJarClassLoader ) == null ) { java.net.URL [ ] jars = getExternalJars ( ) ; mJarClassLoader = new java.net.URLClassLoader ( jars , this ) ; } try { mInsideJarClassLoader = true ; return mJarClassLoader.loadClass ( name ) ; } finally { mInsideJarClassLoader = false ; } }

Target:
private java.lang.Class < ? > loadClassFromJar ( java.lang.String name ) { if ( ( mJarClassLoader ) == null ) { java.net.URL [ ] jars = getExternalJars ( ) ; mJarClassLoader = new java.net.URLClassLoader ( jars , this ) ; } try { mInsideJarClassLoader = true ; return mJarClassLoader.loadClass ( name ) ; } catch ( java.lang.ClassNotFoundException e ) { return null ; } finally { mInsideJarClassLoader = false ; } }
Source:
void finishInstrumentationLocked ( com.android.server.am.ProcessRecord app , int resultCode , android.os.Bundle results ) { if ( ( app.instrumentationWatcher ) != null ) { try { app.instrumentationWatcher.instrumentationFinished ( app.instrumentationClass , resultCode , results ) ; } catch ( android.os.RemoteException e ) { } } app.instrumentationWatcher = null ; app.instrumentationClass = null ; app.instrumentationInfo = null ; app.instrumentationProfileFile = null ; app.instrumentationArguments = null ; forceStopPackageLocked ( app.processName , ( - 1 ) , false , false , true ) ; }

Target:
void finishInstrumentationLocked ( com.android.server.am.ProcessRecord app , int resultCode , android.os.Bundle results ) { if ( ( app.instrumentationWatcher ) != null ) { try { app.instrumentationWatcher.instrumentationFinished ( app.instrumentationClass , resultCode , results ) ; } catch ( android.os.RemoteException e ) { } } app.instrumentationWatcher = null ; app.instrumentationClass = null ; app.instrumentationInfo = null ; app.instrumentationProfileFile = null ; app.instrumentationArguments = null ; forceStopPackageLocked ( app.processName , ( - 1 ) , false , false , true , true ) ; }
Source:
private com.android.jill.frontend.java.Variable getTempVarFromTopOfStackMinus1 ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame ) { com.android.jill.frontend.java.Variable topOfStackBeforeInst = getStackVariable ( frame , ( ( com.android.jill.frontend.java.MethodBodyWriter.TOP_OF_STACK ) - 1 ) ) ; java.lang.String tmpVarId = "-swap_tmp_" + ( typeToUntypedDesc ( topOfStackBeforeInst.getType ( ) ) ) ; com.android.jill.frontend.java.Variable tmpVariable = getVariable ( tmpVarId , tmpVarId , topOfStackBeforeInst.getType ( ) , null ) ; tmpVariable.setSynthetic ( ) ; return tmpVariable ; }

Target:
private com.android.jill.frontend.java.Variable getTempVarFromTopOfStackMinus1 ( @ javax.annotation.Nonnull org.objectweb.asm.tree.analysis.Frame < org.objectweb.asm.tree.analysis.BasicValue > frame ) { com.android.jill.frontend.java.Variable topOfStackBeforeInst = getStackVariable ( frame , ( ( com.android.jill.frontend.java.MethodBodyWriter.TOP_OF_STACK ) - 1 ) ) ; java.lang.String tmpVarId = "-swap_tmp_" + ( typeToUntypedDesc ( topOfStackBeforeInst.getType ( ) ) ) ; com.android.jill.frontend.java.Variable tmpVariable = getVariable ( tmpVarId , tmpVarId , topOfStackBeforeInst.getType ( ) , null ) ; return tmpVariable ; }
Source:
public java.lang.String substring ( int beginIndex , int endIndex ) { if ( beginIndex < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( this , beginIndex ) ; } if ( endIndex > ( count ) ) { throw new java.lang.StringIndexOutOfBoundsException ( this , endIndex ) ; } int subLen = endIndex - beginIndex ; if ( subLen < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( subLen ) ; } return ( beginIndex == 0 ) && ( endIndex == ( count ) ) ? this : fastSubstring ( beginIndex , subLen ) ; }

Target:
public java.lang.String substring ( int beginIndex , int endIndex ) { if ( beginIndex < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( this , beginIndex ) ; } if ( endIndex > ( length ( ) ) ) { throw new java.lang.StringIndexOutOfBoundsException ( this , endIndex ) ; } int subLen = endIndex - beginIndex ; if ( subLen < 0 ) { throw new java.lang.StringIndexOutOfBoundsException ( subLen ) ; } return ( beginIndex == 0 ) && ( endIndex == ( length ( ) ) ) ? this : fastSubstring ( beginIndex , subLen ) ; }
Source:
public java.lang.String getStringAttr ( java.lang.String attrName ) { com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode uiNode = mNode ; if ( ( uiNode.getXmlNode ( ) ) != null ) { org.w3c.dom.Node xmlNode = uiNode.getXmlNode ( ) ; if ( xmlNode != null ) { org.w3c.dom.NamedNodeMap nodeAttributes = xmlNode.getAttributes ( ) ; if ( nodeAttributes != null ) { org.w3c.dom.Node attr = nodeAttributes.getNamedItemNS ( SdkConstants.NS_RESOURCES , attrName ) ; if ( attr != null ) { return attr.getNodeValue ( ) ; } } } } return null ; }

Target:
public java.lang.String getStringAttr ( java.lang.String uri , java.lang.String attrName ) { com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode uiNode = mNode ; if ( ( uiNode.getXmlNode ( ) ) != null ) { org.w3c.dom.Node xmlNode = uiNode.getXmlNode ( ) ; if ( xmlNode != null ) { org.w3c.dom.NamedNodeMap nodeAttributes = xmlNode.getAttributes ( ) ; if ( nodeAttributes != null ) { org.w3c.dom.Node attr = nodeAttributes.getNamedItemNS ( uri , attrName ) ; if ( attr != null ) { return attr.getNodeValue ( ) ; } } } } return null ; }
Source:
public java.util.ArrayList < android.content.SyncStorageEngine.AuthorityInfo > getAuthorities ( ) { synchronized ( mAuthorities ) { final int N = mAuthorities.size ( ) ; java.util.ArrayList < android.content.SyncStorageEngine.AuthorityInfo > infos = new java.util.ArrayList < android.content.SyncStorageEngine.AuthorityInfo > ( N ) ; for ( int i = 0 ; i < N ; i ++ ) { infos.add ( mAuthorities.valueAt ( i ) ) ; } return infos ; } }

Target:
public java.util.ArrayList < android.content.SyncStorageEngine.AuthorityInfo > getAuthorities ( ) { synchronized ( mAuthorities ) { final int N = mAuthorities.size ( ) ; java.util.ArrayList < android.content.SyncStorageEngine.AuthorityInfo > infos = new java.util.ArrayList < android.content.SyncStorageEngine.AuthorityInfo > ( N ) ; for ( int i = 0 ; i < N ; i ++ ) { infos.add ( new android.content.SyncStorageEngine.AuthorityInfo ( mAuthorities.valueAt ( i ) ) ) ; } return infos ; } }
Source:
public java.lang.String getVoiceMailNumberForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , callingPackage , "getVoiceMailNumber" ) ) ) { return null ; } java.lang.String number = android.telephony.PhoneNumberUtils.extractNetworkPortion ( phone.getVoiceMailNumber ( ) ) ; if ( com.android.internal.telephony.PhoneSubInfoController.VDBG ) log ( ( "VM: getVoiceMailNUmber: " + number ) ) ; return number ; } else { loge ( ( "getVoiceMailNumber phone is null for Subscription:" + subId ) ) ; return null ; } }

Target:
public java.lang.String getVoiceMailNumberForSubscriber ( int subId , java.lang.String callingPackage ) { com.android.internal.telephony.Phone phone = getPhone ( subId ) ; if ( phone != null ) { if ( ! ( com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState ( mContext , subId , callingPackage , "getVoiceMailNumber" ) ) ) { return null ; } java.lang.String number = android.telephony.PhoneNumberUtils.extractNetworkPortion ( phone.getVoiceMailNumber ( ) ) ; if ( com.android.internal.telephony.PhoneSubInfoController.VDBG ) log ( ( "VM: getVoiceMailNUmber: " + number ) ) ; return number ; } else { loge ( ( "getVoiceMailNumber phone is null for Subscription:" + subId ) ) ; return null ; } }
Source:
public android.hardware.cts.helpers.TestSensorEvent [ ] getEvents ( long duration , java.util.concurrent.TimeUnit timeUnit ) { if ( ( mTestSensorEventListener ) == null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "No listener registered, returning." ) ; return null ; } mTestSensorEventListener.waitForEvents ( duration , timeUnit ) ; android.hardware.cts.helpers.TestSensorEvent [ ] events = mTestSensorEventListener.getEvents ( ) ; mTestSensorEventListener.clearEvents ( ) ; return events ; }

Target:
public void waitForEvents ( long duration , java.util.concurrent.TimeUnit timeUnit ) { if ( ( mTestSensorEventListener ) == null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "No listener registered, returning." ) ; return ; } mTestSensorEventListener.waitForEvents ( duration , timeUnit ) ; }
Source:
static void decode ( byte [ ] input , char [ ] expectedOutput ) throws java.nio.charset.CharacterCodingException { java.nio.ByteBuffer inputBB = java.nio.ByteBuffer.wrap ( input ) ; java.nio.CharBuffer outputCB ; libcore.java.nio.charset.OldCharset_AbstractTest.decoder.onMalformedInput ( java.nio.charset.CodingErrorAction.REPORT ) ; outputCB = libcore.java.nio.charset.OldCharset_AbstractTest.decoder.decode ( inputBB ) ; outputCB.rewind ( ) ; libcore.java.nio.charset.OldCharset_AbstractTest.assertEqualChars ( "Decoded charactes must match!" , expectedOutput , outputCB ) ; }

Target:
static void decode ( byte [ ] input , char [ ] expectedOutput ) throws java.nio.charset.CharacterCodingException { java.nio.ByteBuffer inputBB = java.nio.ByteBuffer.wrap ( input ) ; libcore.java.nio.charset.OldCharset_AbstractTest.decoder.onMalformedInput ( java.nio.charset.CodingErrorAction.REPORT ) ; java.nio.CharBuffer outputCB = libcore.java.nio.charset.OldCharset_AbstractTest.decoder.decode ( inputBB ) ; outputCB.rewind ( ) ; libcore.java.nio.charset.OldCharset_AbstractTest.assertEqualChars ( expectedOutput , outputCB ) ; }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , float [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }
Source:
private static java.lang.String quoteSsid ( android.net.wifi.ScanResult scanResult ) { if ( ( scanResult.wifiSsid ) != null ) { return ( "\"" + ( scanResult.wifiSsid.toString ( ) ) ) + "\"" ; } else if ( ( scanResult.SSID ) != null ) { return ( "\"" + ( scanResult.SSID ) ) + "\"" ; } else { throw new java.lang.IllegalArgumentException ( "ScanResult is missing an SSID." ) ; } }

Target:
private static java.lang.String quoteSsid ( android.net.wifi.ScanResult scanResult ) { if ( ( scanResult.wifiSsid ) != null ) { return ( "\"" + ( scanResult.wifiSsid ) ) + "\"" ; } else if ( ( scanResult.SSID ) != null ) { return ( "\"" + ( scanResult.SSID ) ) + "\"" ; } else { throw new java.lang.IllegalArgumentException ( "ScanResult is missing an SSID." ) ; } }
Source:
public void handleWriteSpeedSlow ( ) throws java.io.IOException { if ( ( mBufferReason ) == ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.BUFFER_REASON_RECORDING ) ) { android.util.Log.w ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.TAG , ( ( "Disk I/O speed is slow for recording temporarily: " + ( mBufferManager.getWriteBandwidth ( ) ) ) + "MBps" ) ) ; return ; } android.util.Log.w ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.TAG , "Disk is too slow for trickplay" ) ; mBufferManager.disable ( ) ; mBufferListener.onDiskTooSlow ( ) ; }

Target:
public void handleWriteSpeedSlow ( ) throws java.io.IOException { if ( ( mBufferReason ) == ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.BUFFER_REASON_RECORDING ) ) { android.util.Log.w ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.TAG , ( ( "Disk I/O speed is slow for recording temporarily: " + ( mBufferManager.getWriteBandwidth ( ) ) ) + "MBps" ) ) ; return ; } android.util.Log.w ( com.android.tv.tuner.exoplayer.buffer.RecordingSampleBuffer.TAG , "Disk is too slow for trickplay" ) ; mBufferListener.onDiskTooSlow ( ) ; }
Source:
public void setError ( java.lang.CharSequence error ) { if ( error == null ) { setError ( null , null ) ; } else { android.graphics.drawable.Drawable dr = getContext ( ) . getResources ( ) . getDrawable ( com.android.internal.R.drawable.indicator_input_error ) ; dr.setBounds ( 0 , 0 , dr.getIntrinsicWidth ( ) , dr.getIntrinsicHeight ( ) ) ; setError ( error , dr ) ; } }

Target:
public void setError ( java.lang.CharSequence error ) { if ( error == null ) { setError ( null , null ) ; } else { android.graphics.drawable.Drawable dr = getContext ( ) . getDrawable ( com.android.internal.R.drawable.indicator_input_error ) ; dr.setBounds ( 0 , 0 , dr.getIntrinsicWidth ( ) , dr.getIntrinsicHeight ( ) ) ; setError ( error , dr ) ; } }
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 { org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.assertEqualSessions ( serverSession [ 0 ] , session ) ; super . afterHandshake ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , s , org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , sock , fd , callback ) ; }

Target:
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 { super . afterHandshake ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , s , org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL , sock , fd , callback ) ; serverSession [ 0 ] = session ; }
Source:
public void testGetErrorStreamOnUnsuccessfulRequest ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setResponseCode ( 404 ) . setBody ( "A" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; assertEquals ( "A" , readAscii ( connection.getErrorStream ( ) , java.lang.Integer.MAX_VALUE ) ) ; }

Target:
public void testGetErrorStreamOnUnsuccessfulRequest ( ) throws java.lang.Exception { server.enqueue ( new com.google.mockwebserver.MockResponse ( ) . setResponseCode ( 404 ) . setBody ( "A" ) ) ; server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; org.junit.Assert.assertEquals ( "A" , readAscii ( connection.getErrorStream ( ) , java.lang.Integer.MAX_VALUE ) ) ; }
Source:
public void test_SSL_CTX_new ( ) throws java.lang.Exception { int c = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; assertTrue ( ( c != ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ) ) ; int c2 = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; assertTrue ( ( c != c2 ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c2 ) ; }

Target:
public void test_SSL_CTX_new ( ) throws java.lang.Exception { long c = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; assertTrue ( ( c != ( org.apache.harmony.xnet.provider.jsse.NativeCryptoTest.NULL ) ) ) ; long c2 = org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_new ( ) ; assertTrue ( ( c != c2 ) ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c ) ; org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_CTX_free ( c2 ) ; }
Source:
public void visitMethod ( @ 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.MethodInvocation node ) { lombok.ast.StrictListAccessor < lombok.ast.Expression , lombok.ast.MethodInvocation > args = node.astArguments ( ) ; java.util.Iterator < lombok.ast.Expression > iterator = args.iterator ( ) ; while ( iterator.hasNext ( ) ) { iterator.next ( ) . accept ( visitor ) ; } }

Target:
public void visitMethod ( @ 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.MethodInvocation node ) { lombok.ast.StrictListAccessor < lombok.ast.Expression , lombok.ast.MethodInvocation > args = node.astArguments ( ) ; for ( lombok.ast.Expression arg : args ) { arg.accept ( visitor ) ; } }
Source:
public void run ( ) { android.os.PowerManager pm = ( ( android.os.PowerManager ) ( this . getSystemService ( Context.POWER_SERVICE ) ) ) ; android.os.PowerManager.WakeLock wl = pm.newWakeLock ( PowerManager.PARTIAL_WAKE_LOCK , "sound" ) ; wl.acquire ( ) ; pm.goToSleep ( android.os.SystemClock.uptimeMillis ( ) ) ; android.app.Notification n = new android.app.Notification ( ) ; n.sound = android.net.Uri.parse ( "file:///sdcard/virtual-void.mp3" ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , ( "n.sound=" + ( n.sound ) ) ) ; mNM.notify ( 1 , n ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "releasing wake lock" ) ; wl.release ( ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "released wake lock" ) ; }

Target:
public void run ( ) { android.os.PowerManager pm = ( ( android.os.PowerManager ) ( this . getSystemService ( Context.POWER_SERVICE ) ) ) ; android.os.PowerManager.WakeLock wl = pm.newWakeLock ( PowerManager.PARTIAL_WAKE_LOCK , "sound" ) ; wl.acquire ( ) ; pm.goToSleep ( android.os.SystemClock.uptimeMillis ( ) ) ; android.app.Notification n = new android.app.Notification ( ) ; n.sound = android.net.Uri.parse ( ( ( "file://" + ( android.os.Environment.getExternalStorageDirectory ( ) ) ) + "/virtual-void.mp3" ) ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , ( "n.sound=" + ( n.sound ) ) ) ; mNM.notify ( 1 , n ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "releasing wake lock" ) ; wl.release ( ) ; android.util.Log.d ( com.android.statusbartest.NotificationTestList.TAG , "released wake lock" ) ; }
Source:
public void testStartLocalOnlyHotspotSuccess ( ) { if ( ! ( android.net.wifi.cts.WifiFeature.isWifiSupported ( getContext ( ) ) ) ) { return ; } if ( ! ( mWifiManager.isPortableHotspotSupported ( ) ) ) { return ; } boolean wifiEnabled = mWifiManager.isWifiEnabled ( ) ; android.net.wifi.cts.WifiManagerTest.TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot ( ) ; assertFalse ( mWifiManager.isWifiEnabled ( ) ) ; stopLocalOnlyHotspot ( callback , wifiEnabled ) ; assertEquals ( wifiEnabled , mWifiManager.isWifiEnabled ( ) ) ; }

Target:
public void testStartLocalOnlyHotspotSuccess ( ) { if ( ! ( mWifiManager.isPortableHotspotSupported ( ) ) ) { return ; } boolean wifiEnabled = mWifiManager.isWifiEnabled ( ) ; android.net.wifi.cts.WifiManagerTest.TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot ( ) ; assertFalse ( mWifiManager.isWifiEnabled ( ) ) ; stopLocalOnlyHotspot ( callback , wifiEnabled ) ; assertEquals ( wifiEnabled , mWifiManager.isWifiEnabled ( ) ) ; }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JIfStatement ifStmt ) { com.android.jack.ir.ast.JStatement thenStmt = ifStmt.getThenStmt ( ) ; com.android.jack.ir.ast.JStatement elseStmt = ifStmt.getElseStmt ( ) ; if ( ( ( thenStmt != null ) && ( ! ( thenStmt instanceof com.android.jack.ir.ast.JBlock ) ) ) || ( ( elseStmt != null ) && ( ! ( elseStmt instanceof com.android.jack.ir.ast.JBlock ) ) ) ) { throw new java.lang.AssertionError ( "If statement with stand-alone statement." ) ; } return super . visit ( ifStmt ) ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JIfStatement ifStmt ) { com.android.jack.ir.ast.JStatement thenStmt = ifStmt.getThenStmt ( ) ; com.android.jack.ir.ast.JStatement elseStmt = ifStmt.getElseStmt ( ) ; if ( ( ! ( thenStmt instanceof com.android.jack.ir.ast.JBlock ) ) || ( ( elseStmt != null ) && ( ! ( elseStmt instanceof com.android.jack.ir.ast.JBlock ) ) ) ) { throw new java.lang.AssertionError ( "If statement with stand-alone statement." ) ; } return super . visit ( ifStmt ) ; }
Source:
public android.os.ParcelUuid [ ] getUuids ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getUuids() - Not allowed for non-active user" ) ; return new android.os.ParcelUuid [ 0 ] ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return new android.os.ParcelUuid [ 0 ] ; return service.getUuids ( ) ; }

Target:
public android.os.ParcelUuid [ ] getUuids ( ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getUuids() - Not allowed for non-active user" ) ; return new android.os.ParcelUuid [ 0 ] ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return new android.os.ParcelUuid [ 0 ] ; } return service.getUuids ( ) ; }
Source:
public static java.lang.String show ( java.util.Collection c ) { java.lang.StringBuffer buffer = new java.lang.StringBuffer ( ) ; for ( java.util.Iterator it = c.iterator ( ) ; it.hasNext ( ) ; ) { buffer.append ( ( ( it.next ( ) ) + "\r\n" ) ) ; } return buffer.toString ( ) ; }

Target:
public static java.lang.String show ( java.util.Collection c ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; for ( java.util.Iterator it = c.iterator ( ) ; it.hasNext ( ) ; ) { buffer.append ( ( ( it.next ( ) ) + "\r\n" ) ) ; } return buffer.toString ( ) ; }
Source:
public boolean buildForLaunch ( org.eclipse.debug.core.ILaunchConfiguration configuration , java.lang.String mode , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { org.eclipse.core.resources.IProject project = getProject ( configuration ) ; if ( project != null ) { return true ; } throw new org.eclipse.core.runtime.CoreException ( new org.eclipse.core.runtime.Status ( org.eclipse.core.runtime.IStatus.ERROR , com.android.ide.eclipse.adt.AdtPlugin.PLUGIN_ID , 1 , "Can't find the project!" , null ) ) ; }

Target:
public boolean buildForLaunch ( org.eclipse.debug.core.ILaunchConfiguration configuration , java.lang.String mode , org.eclipse.core.runtime.IProgressMonitor monitor ) throws org.eclipse.core.runtime.CoreException { return false ; }
Source:
public int getVersionCode ( ) { int versionCode = ( ( mMergedFlavor.getVersionCode ( ) ) != null ) ? mMergedFlavor.getVersionCode ( ) : 1 ; if ( ( versionCode == ( - 1 ) ) && ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) ) { versionCode = getVersionCodeFromManifest ( ) ; } return versionCode ; }

Target:
public int getVersionCode ( ) { int versionCode = ( ( mMergedFlavor.getVersionCode ( ) ) != null ) ? mMergedFlavor.getVersionCode ( ) : - 1 ; if ( ( versionCode == ( - 1 ) ) && ( ( mType ) != ( com.android.builder.core.VariantConfiguration.Type.TEST ) ) ) { versionCode = getVersionCodeFromManifest ( ) ; } return versionCode ; }
Source:
public void testVarargsCustomClass ( junitparams.internal.TestMethodTest.Pair ... pairs ) { assertEquals ( pairs [ 0 ] . x , pairs [ 0 ] . y ) ; assertEquals ( pairs [ 1 ] . x , pairs [ 1 ] . y ) ; assertNotEquals ( pairs [ 2 ] . x , pairs [ 2 ] . y ) ; }

Target:
public void testVarargsCustomClass ( junitparams.internal.TestMethodTest.Pair ... pairs ) { assertEquals ( pairs [ 0 ] . x , pairs [ 0 ] . y ) ; assertEquals ( pairs [ 1 ] . x , pairs [ 1 ] . y ) ; assertTrue ( ( ( pairs [ 2 ] . x ) != ( pairs [ 2 ] . y ) ) ) ; }
Source:
static boolean native_preConcat ( int native_object , int other_matrix ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } android.graphics.Matrix_Delegate other = android.graphics.Matrix_Delegate.sManager.getDelegate ( other_matrix ) ; if ( other == null ) { return false ; } d.preTransform ( other.mValues ) ; return true ; }

Target:
static boolean native_preConcat ( long native_object , long other_matrix ) { android.graphics.Matrix_Delegate d = android.graphics.Matrix_Delegate.sManager.getDelegate ( native_object ) ; if ( d == null ) { return false ; } android.graphics.Matrix_Delegate other = android.graphics.Matrix_Delegate.sManager.getDelegate ( other_matrix ) ; if ( other == null ) { return false ; } d.preTransform ( other.mValues ) ; return true ; }
Source:
private static int reductionIntToLoop ( int [ ] x ) { int r = 0 ; for ( int i = 0 ; i < 4 ; i ++ ) { r += x [ i ] ; } for ( int i = r ; i < 16 ; i ++ ) { r += i ; } return r ; }

Target:
private static int reductionIntToLoop ( int [ ] x ) { int r = 0 ; for ( int i = 0 ; i < 8 ; i ++ ) { r += x [ i ] ; } for ( int i = r ; i < 16 ; i ++ ) { r += i ; } return r ; }
Source:
private synchronized com.android.bluetooth.avrcp.MediaPlayerInfo removeMediaPlayerInfo ( java.lang.String packageName ) { int removeKey = - 1 ; for ( java.util.Map.Entry < java.lang.Integer , com.android.bluetooth.avrcp.MediaPlayerInfo > entry : mMediaPlayerInfoList.entrySet ( ) ) { if ( entry.getValue ( ) . getPackageName ( ) . equals ( packageName ) ) { removeKey = entry.getKey ( ) ; break ; } } if ( removeKey != ( - 1 ) ) { return mMediaPlayerInfoList.remove ( removeKey ) ; } return null ; }

Target:
private com.android.bluetooth.avrcp.MediaPlayerInfo removeMediaPlayerInfo ( java.lang.String packageName ) { synchronized ( mMediaPlayerInfoList ) { int removeKey = - 1 ; for ( java.util.Map.Entry < java.lang.Integer , com.android.bluetooth.avrcp.MediaPlayerInfo > entry : mMediaPlayerInfoList.entrySet ( ) ) { if ( entry.getValue ( ) . getPackageName ( ) . equals ( packageName ) ) { removeKey = entry.getKey ( ) ; break ; } } if ( removeKey != ( - 1 ) ) { return mMediaPlayerInfoList.remove ( removeKey ) ; } return null ; } }
Source:
public void testLogPhoneAccountId ( ) { org.mockito.Mockito.when ( mMockPhoneAccountRegistrar.getPhoneAccountUnchecked ( org.mockito.Matchers.any ( android.telecom.PhoneAccountHandle.class ) ) ) . thenReturn ( makeFakePhoneAccount ( mDefaultAccountHandle , com.android.server.telecom.tests.CallLogManagerTest.CURRENT_USER_ID ) ) ; com.android.server.telecom.Call fakeCall = makeFakeCall ( DisconnectCause.OTHER , false , true , 1L , 1000L , com.android.server.telecom.tests.CallLogManagerTest.TEL_PHONEHANDLE , mDefaultAccountHandle , com.android.server.telecom.tests.CallLogManagerTest.NO_VIDEO_STATE , com.android.server.telecom.tests.CallLogManagerTest.POST_DIAL_STRING , com.android.server.telecom.tests.CallLogManagerTest.VIA_NUMBER_STRING , android.os.UserHandle.of ( com.android.server.telecom.tests.CallLogManagerTest.CURRENT_USER_ID ) ) ; mCallLogManager.onCallStateChanged ( fakeCall , CallState.ACTIVE , CallState.DISCONNECTED ) ; android.content.ContentValues insertedValues = verifyInsertionWithCapture ( com.android.server.telecom.tests.CallLogManagerTest.CURRENT_USER_ID ) ; assertEquals ( insertedValues.getAsString ( CallLog.Calls.PHONE_ACCOUNT_ID ) , com.android.server.telecom.tests.CallLogManagerTest.TEST_PHONE_ACCOUNT_ID ) ; }

Target:
public void testLogPhoneAccountId ( ) { org.mockito.Mockito.when ( mMockPhoneAccountRegistrar.getPhoneAccountUnchecked ( org.mockito.Matchers.any ( android.telecom.PhoneAccountHandle.class ) ) ) . thenReturn ( makeFakePhoneAccount ( mDefaultAccountHandle , com.android.server.telecom.tests.CallLogManagerTest.CURRENT_USER_ID ) ) ; com.android.server.telecom.Call fakeCall = makeFakeCall ( DisconnectCause.OTHER , false , true , 1L , 1000L , com.android.server.telecom.tests.CallLogManagerTest.TEL_PHONEHANDLE , mDefaultAccountHandle , com.android.server.telecom.tests.CallLogManagerTest.NO_VIDEO_STATE , com.android.server.telecom.tests.CallLogManagerTest.POST_DIAL_STRING , com.android.server.telecom.tests.CallLogManagerTest.VIA_NUMBER_STRING , android.os.UserHandle.of ( com.android.server.telecom.tests.CallLogManagerTest.CURRENT_USER_ID ) ) ; mCallLogManager.onCallStateChanged ( fakeCall , CallState.ACTIVE , CallState.DISCONNECTED ) ; android.content.ContentValues insertedValues = verifyInsertionWithCapture ( com.android.server.telecom.tests.CallLogManagerTest.CURRENT_USER_ID ) ; org.junit.Assert.assertEquals ( insertedValues.getAsString ( CallLog.Calls.PHONE_ACCOUNT_ID ) , com.android.server.telecom.tests.CallLogManagerTest.TEST_PHONE_ACCOUNT_ID ) ; }
Source:
public void testPut ( ) { java.util.concurrent.PriorityBlockingQueue q = new java.util.concurrent.PriorityBlockingQueue ( SIZE ) ; for ( int i = 0 ; i < ( SIZE ) ; ++ i ) { java.lang.Integer I = new java.lang.Integer ( i ) ; q.put ( I ) ; assertTrue ( q.contains ( I ) ) ; } assertEquals ( jsr166.SIZE , q.size ( ) ) ; }

Target:
public void testPut ( ) { java.util.concurrent.PriorityBlockingQueue q = new java.util.concurrent.PriorityBlockingQueue ( SIZE ) ; for ( int i = 0 ; i < ( SIZE ) ; ++ i ) { java.lang.Integer x = new java.lang.Integer ( i ) ; q.put ( x ) ; assertTrue ( q.contains ( x ) ) ; } assertEquals ( jsr166.SIZE , q.size ( ) ) ; }
Source:
public void testSrcStop ( ) { streamHandler.handleMessage ( streamHandler.obtainMessage ( A2dpSinkStreamHandler.SRC_STR_STOP ) ) ; org.mockito.Mockito.verify ( mockAudioManager , org.mockito.Mockito.times ( 0 ) ) . requestAudioFocus ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyInt ( ) , org.mockito.Mockito.anyInt ( ) ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 0 ) ) . informAudioFocusStateNative ( 1 ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 0 ) ) . informAudioTrackGainNative ( 1.0F ) ; }

Target:
public void testSrcStop ( ) { streamHandler.handleMessage ( streamHandler.obtainMessage ( A2dpSinkStreamHandler.SRC_STR_STOP ) ) ; org.mockito.Mockito.verify ( mockAudioManager , org.mockito.Mockito.times ( 0 ) ) . requestAudioFocus ( org.mockito.Mockito.any ( ) ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 0 ) ) . informAudioFocusStateNative ( 1 ) ; org.mockito.Mockito.verify ( mockA2dpSink , org.mockito.Mockito.times ( 0 ) ) . informAudioTrackGainNative ( 1.0F ) ; }
Source:
static int native_saveLayerAlpha ( int nativeCanvas , float l , float t , float r , float b , int alpha , int layerFlags ) { android.graphics.Canvas_Delegate canvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( nativeCanvas ) ; if ( canvasDelegate == null ) { return 0 ; } return canvasDelegate.saveLayerAlpha ( new android.graphics.RectF ( l , t , r , b ) , alpha , layerFlags ) ; }

Target:
static long native_saveLayerAlpha ( long nativeCanvas , float l , float t , float r , float b , int alpha , int layerFlags ) { android.graphics.Canvas_Delegate canvasDelegate = android.graphics.Canvas_Delegate.sManager.getDelegate ( nativeCanvas ) ; if ( canvasDelegate == null ) { return 0 ; } return canvasDelegate.saveLayerAlpha ( new android.graphics.RectF ( l , t , r , b ) , alpha , layerFlags ) ; }
Source:
public boolean removeAll ( java.util.Collection < ? > c ) { boolean modified = false ; for ( java.util.Iterator < ? > i = c.iterator ( ) ; i.hasNext ( ) ; ) if ( remove ( i.next ( ) ) ) modified = true ; return modified ; }

Target:
public boolean removeAll ( java.util.Collection < ? > c ) { boolean modified = false ; for ( java.lang.Object e : c ) if ( remove ( e ) ) modified = true ; return modified ; }
Source:
public boolean setPnoList ( com.android.server.wifi.WifiNative.PnoSettings settings , com.android.server.wifi.WifiNative.PnoEventHandler eventHandler ) { legacyHalWarning ( ) ; android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "setPnoList cmd " + ( com.android.server.wifi.WifiNative.sPnoCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.sPnoCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; com.android.server.wifi.WifiNative.sPnoEventHandler = eventHandler ; if ( com.android.server.wifi.WifiNative.setPnoListNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sPnoCmdId , settings ) ) { return true ; } } com.android.server.wifi.WifiNative.sPnoEventHandler = null ; return false ; } }

Target:
public boolean setPnoList ( com.android.server.wifi.WifiNative.PnoSettings settings , com.android.server.wifi.WifiNative.PnoEventHandler eventHandler ) { android.util.Log.e ( com.android.server.wifi.WifiNative.TAG , ( "setPnoList cmd " + ( com.android.server.wifi.WifiNative.sPnoCmdId ) ) ) ; synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { com.android.server.wifi.WifiNative.sPnoCmdId = com.android.server.wifi.WifiNative.getNewCmdIdLocked ( ) ; com.android.server.wifi.WifiNative.sPnoEventHandler = eventHandler ; if ( com.android.server.wifi.WifiNative.setPnoListNative ( com.android.server.wifi.WifiNative.sWlan0Index , com.android.server.wifi.WifiNative.sPnoCmdId , settings ) ) { return true ; } } com.android.server.wifi.WifiNative.sPnoEventHandler = null ; return false ; } }
Source:
private synchronized void onSetReport ( byte reportType , byte reportId , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) android.util.Log.v ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( "onSetReport(): reportType=" + reportType ) + " reportId=" ) + reportId ) ) ; java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( data ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDevService.MESSAGE_SET_REPORT ) ; msg.arg1 = reportType ; msg.arg2 = reportId ; msg.obj = bb ; mHandler.sendMessage ( msg ) ; }

Target:
private synchronized void onSetReport ( byte reportType , byte reportId , byte [ ] data ) { if ( com.android.bluetooth.hid.HidDevService.DBG ) { android.util.Log.d ( com.android.bluetooth.hid.HidDevService.TAG , ( ( ( "onSetReport(): reportType=" + reportType ) + " reportId=" ) + reportId ) ) ; } java.nio.ByteBuffer bb = java.nio.ByteBuffer.wrap ( data ) ; android.os.Message msg = mHandler.obtainMessage ( com.android.bluetooth.hid.HidDevService.MESSAGE_SET_REPORT ) ; msg.arg1 = reportType ; msg.arg2 = reportId ; msg.obj = bb ; mHandler.sendMessage ( msg ) ; }
Source:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_DELETE_ALL : confirmDeleteThread ( ( - 1 ) ) ; break ; case com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_PREFERENCES : android.content.Intent intent = new android.content.Intent ( getActivity ( ) , com.android.cellbroadcastreceiver.CellBroadcastSettings.class ) ; startActivity ( intent ) ; break ; default : return true ; } return false ; }

Target:
public boolean onOptionsItemSelected ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case com.android.cellbroadcastreceiver.CellBroadcastListActivity.CursorLoaderListFragment.MENU_DELETE_ALL : confirmDeleteThread ( ( - 1 ) ) ; break ; default : return true ; } return false ; }