auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public android.net.IpSecTransform.Builder setIpv4Encapsulation ( android.net.IpSecManager.UdpEncapsulationSocket localSocket , int remotePort ) { mConfig.setEncapType ( android.net.IpSecTransform.ENCAP_ESPINUDP ) ; if ( ( localSocket.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid UdpEncapsulationSocket" ) ; } mConfig.setEncapSocketResourceId ( localSocket.getResourceId ( ) ) ; mConfig.setEncapRemotePort ( remotePort ) ; return this ; }

Target:
public android.net.IpSecTransform.Builder setIpv4Encapsulation ( @ android.annotation.NonNull android.net.IpSecManager.UdpEncapsulationSocket localSocket , int remotePort ) { com.android.internal.util.Preconditions.checkNotNull ( localSocket ) ; mConfig.setEncapType ( android.net.IpSecTransform.ENCAP_ESPINUDP ) ; if ( ( localSocket.getResourceId ( ) ) == ( android.net.IpSecManager.INVALID_RESOURCE_ID ) ) { throw new java.lang.IllegalArgumentException ( "Invalid UdpEncapsulationSocket" ) ; } mConfig.setEncapSocketResourceId ( localSocket.getResourceId ( ) ) ; mConfig.setEncapRemotePort ( remotePort ) ; return this ; }
Source:
public void testJavaUdpSocketPairUnconnected ( ) throws java.lang.Exception { for ( java.lang.String addr : android.net.cts.IpSecBaseTest.LOOPBACK_ADDRS ) { java.net.InetAddress local = java.net.InetAddress.getByName ( addr ) ; try ( android.net.IpSecTransform transform = getTransform ( local ) ) { android.net.cts.IpSecBaseTest.SocketPair < android.net.cts.IpSecBaseTest.JavaUdpSocket > sockets = android.net.cts.IpSecBaseTest.getJavaUdpSocketPair ( local , mISM , transform , false ) ; checkUnconnectedUdpSocketPair ( sockets.mLeftSock , sockets.mRightSock , local ) ; } } }

Target:
public void testJavaUdpSocketPairUnconnected ( ) throws java.lang.Exception { for ( java.lang.String addr : android.net.cts.IpSecBaseTest.LOOPBACK_ADDRS ) { java.net.InetAddress local = java.net.InetAddress.getByName ( addr ) ; try ( android.net.IpSecTransform transform = buildDefaultTransform ( local ) ) { android.net.cts.IpSecBaseTest.SocketPair < android.net.cts.IpSecBaseTest.JavaUdpSocket > sockets = android.net.cts.IpSecBaseTest.getJavaUdpSocketPair ( local , mISM , transform , false ) ; checkUnconnectedUdpSocketPair ( sockets.mLeftSock , sockets.mRightSock , local ) ; } } }
Source:
void collapseViewHolder ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailViewHolder.collapseViewHolder" , "viewHolderId:%d is being collapsed, its MPViewUri:%s, its Uri is :%s" , viewHolderId , java.lang.String.valueOf ( mediaPlayerView.getVoicemailUri ( ) ) , java.lang.String.valueOf ( viewHolderVoicemailUri ) ) ; transcriptionTextView.setMaxLines ( 1 ) ; isViewHolderExpanded = false ; mediaPlayerView.setVisibility ( android.view.View.GONE ) ; }

Target:
void collapseViewHolder ( ) { com.android.dialer.common.LogUtil.i ( "NewVoicemailViewHolder.collapseViewHolder" , "viewHolderId:%d is being collapsed, its MPViewUri:%s, its Uri is :%s" , viewHolderId , java.lang.String.valueOf ( mediaPlayerView.getVoicemailUri ( ) ) , java.lang.String.valueOf ( viewHolderVoicemailUri ) ) ; transcriptionTextView.setMaxLines ( 1 ) ; isViewHolderExpanded = false ; mediaPlayerView.reset ( ) ; mediaPlayerView.setVisibility ( android.view.View.GONE ) ; }
Source:
public void bindResponse ( int ind_id , boolean ind_status ) { if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { mService.bindResponse ( ind_id , ind_status ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } }

Target:
public void bindResponse ( int indId , boolean indStatus ) { final android.bluetooth.IBluetoothHeadset service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { service.bindResponse ( indId , indStatus ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothHeadset.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothHeadset.TAG , "Proxy not attached to service" ) ; if ( android.bluetooth.BluetoothHeadset.DBG ) android.util.Log.d ( android.bluetooth.BluetoothHeadset.TAG , android.util.Log.getStackTraceString ( new java.lang.Throwable ( ) ) ) ; } }
Source:
public void connect ( java.net.SocketAddress peer ) throws java.net.SocketException { if ( isConnected ( ) ) { return ; } super . connect ( peer ) ; channelImpl.onBind ( false ) ; java.net.InetSocketAddress inetSocketAddress = ( ( java.net.InetSocketAddress ) ( peer ) ) ; channelImpl.onConnect ( inetSocketAddress.getAddress ( ) , inetSocketAddress.getPort ( ) , false ) ; }

Target:
public void connect ( java.net.SocketAddress peer ) throws java.net.SocketException { if ( isConnected ( ) ) { throw new java.lang.IllegalStateException ( "Socket is already connected." ) ; } super . connect ( peer ) ; channelImpl.onBind ( false ) ; java.net.InetSocketAddress inetSocketAddress = ( ( java.net.InetSocketAddress ) ( peer ) ) ; channelImpl.onConnect ( inetSocketAddress.getAddress ( ) , inetSocketAddress.getPort ( ) , false ) ; }
Source:
public void wifiNanDestroyAll ( ) { synchronized ( mLock ) { for ( int i = 0 ; i < ( mSessions.size ( ) ) ; ++ i ) { mSessions.valueAt ( i ) . destroy ( ) ; } mSessions.clear ( ) ; mDiscoverySessions.clear ( ) ; } }

Target:
public void wifiNanDestroyAll ( ) { synchronized ( mLock ) { for ( int i = 0 ; i < ( mSessions.size ( ) ) ; ++ i ) { mSessions.valueAt ( i ) . destroy ( ) ; } mSessions.clear ( ) ; mDiscoverySessions.clear ( ) ; mMessageStartTime.clear ( ) ; } }
Source:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { com.android.sched.vfs.WriteZipFS vfs = new com.android.sched.vfs.WriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change , com.android.sched.util.file.OutputZipFile.Compression.COMPRESSED ) ) ; return new com.android.sched.vfs.GenericOutputVFS ( vfs ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }

Target:
public com.android.sched.vfs.OutputVFS checkString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull final java.lang.String string ) throws com.android.sched.util.codec.ParsingException { com.android.sched.util.RunnableHooks hooks = context.getRunnableHooks ( ) ; try { com.android.sched.vfs.WriteZipFS vfs = new com.android.sched.vfs.WriteZipFS ( new com.android.sched.util.file.OutputZipFile ( context.getWorkingDirectory ( ) , string , hooks , existence , change , com.android.sched.util.file.OutputZipFile.Compression.COMPRESSED ) ) ; return new com.android.sched.vfs.GenericOutputVFS ( vfs ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NotFileException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotChangePermissionException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.FileAlreadyExistsException e ) { throw new com.android.sched.util.codec.ParsingException ( e.getMessage ( ) , e ) ; } }
Source:
public void testHashCode ( ) throws java.text.ParseException { { java.lang.String rule = "< a < b < c < d" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } { java.lang.String rule = "< a < b < c < d < e" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } }

Target:
public void testHashCode ( ) throws java.text.ParseException { { java.lang.String rule = "&9 < a < b < c < d" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } { java.lang.String rule = "&9 < a < b < c < d < e" ; java.text.RuleBasedCollator coll = new java.text.RuleBasedCollator ( rule ) ; assertEquals ( rule.hashCode ( ) , coll.hashCode ( ) ) ; } }
Source:
void implTestDecodeCharBufferByteBufferException ( java.nio.ByteBuffer in , boolean endOfInput ) throws java.io.UnsupportedEncodingException , java.nio.charset.CharacterCodingException { java.nio.CharBuffer out = java.nio.CharBuffer.allocate ( 50 ) ; tests.api.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; try { tests.api.java.nio.charset.CharsetDecoderTest.decoder.decode ( in , out , endOfInput ) ; fail ( "should throw runtime exception" ) ; } catch ( java.lang.RuntimeException e ) { } }

Target:
void implTestDecodeCharBufferByteBufferException ( java.nio.ByteBuffer in , boolean endOfInput ) throws java.io.UnsupportedEncodingException , java.nio.charset.CharacterCodingException { java.nio.CharBuffer out = java.nio.CharBuffer.allocate ( 50 ) ; org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.reset ( ) ; try { org.apache.harmony.tests.java.nio.charset.CharsetDecoderTest.decoder.decode ( in , out , endOfInput ) ; fail ( "should throw runtime exception" ) ; } catch ( java.lang.RuntimeException e ) { } }
Source:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { super . visit ( version , access , name , signature , superName , interfaces ) ; shouldCurrentClassBeIgnored = com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXT_CLASS_INTERNAL_NAMES.contains ( name ) ; }

Target:
public void visit ( int version , int access , java.lang.String name , java.lang.String signature , java.lang.String superName , java.lang.String [ ] interfaces ) { super . visit ( version , access , name , signature , superName , interfaces ) ; internalName = name ; shouldCurrentClassBeIgnored = com.google.devtools.build.android.desugar.TryWithResourcesRewriter.THROWABLE_EXT_CLASS_INTERNAL_NAMES.contains ( name ) ; }
Source:
public static com.android.dx.dex.file.ClassDefItem translate ( java.lang.String filePath , byte [ ] bytes , com.android.dx.dex.cf.CfOptions cfOptions , com.android.dx.dex.DexOptions dexOptions ) { try { return com.android.dx.dex.cf.CfTranslator.translate0 ( filePath , bytes , cfOptions , dexOptions ) ; } catch ( java.lang.RuntimeException ex ) { java.lang.String msg = "...while processing " + filePath ; throw com.android.dx.util.ExceptionWithContext.withContext ( ex , msg ) ; } }

Target:
public static com.android.dx.dex.file.ClassDefItem translate ( java.lang.String filePath , byte [ ] bytes , com.android.dx.dex.cf.CfOptions cfOptions , com.android.dx.dex.DexOptions dexOptions ) { try { return com.android.dx.dex.cf.CfTranslator.translate0 ( filePath , bytes , cfOptions , dexOptions ) ; } catch ( java.lang.RuntimeException ex ) { java.lang.String msg = "...while processing " + filePath ; throw com.android.dex.util.ExceptionWithContext.withContext ( ex , msg ) ; } }
Source:
public void testDeserializeRemovedValue ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200246a6176612e7574696c2e456e756d5365742453657269616c" + ( ( ( ( ( ( "697a6174696f6e50726f78790507d3db7654cad10200024c000b656c656d656e7" + "4547970657400114c6a6176612f6c616e672f436c6173733b5b0008656c656d65" ) + "6e74737400115b4c6a6176612f6c616e672f456e756d3b7870767200266c69626" ) + "36f72652e6a6176612e7574696c2e456e756d5365745465737424526f7368616d" ) + "626f00000000000000001200007872000e6a6176612e6c616e672e456e756d000" ) + "00000000000001200007870757200115b4c6a6176612e6c616e672e456e756d3b" ) + "a88dea2d33d22f980200007870000000017e71007e000474000553504f434b" ) ; try { libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidObjectException expected ) { } }

Target:
public void testDeserializeRemovedValue ( ) throws java.lang.Exception { java.lang.String s = "aced0005737200246a6176612e7574696c2e456e756d5365742453657269616c" + ( ( ( ( ( ( "697a6174696f6e50726f78790507d3db7654cad10200024c000b656c656d656e7" + "4547970657400114c6a6176612f6c616e672f436c6173733b5b0008656c656d65" ) + "6e74737400115b4c6a6176612f6c616e672f456e756d3b7870767200266c69626" ) + "36f72652e6a6176612e7574696c2e456e756d5365745465737424526f7368616d" ) + "626f00000000000000001200007872000e6a6176612e6c616e672e456e756d000" ) + "00000000000001200007870757200115b4c6a6176612e6c616e672e456e756d3b" ) + "a88dea2d33d22f980200007870000000017e71007e000474000553504f434b" ) ; try { libcore.libcore.util.SerializationTester.deserializeHex ( s ) ; fail ( ) ; } catch ( java.io.InvalidObjectException expected ) { } }
Source:
private static boolean useCdmaFormatForMoSms ( ) { if ( ! ( android.telephony.SmsManager.getDefault ( ) . isImsSmsSupported ( ) ) ) { return android.telephony.SmsMessage.isCdmaVoice ( ) ; } return SmsConstants.FORMAT_3GPP2.equals ( android.telephony.SmsManager.getDefault ( ) . getImsSmsFormat ( ) ) ; }

Target:
private static boolean useCdmaFormatForMoSms ( int subId ) { android.telephony.SmsManager smsManager = android.telephony.SmsManager.getSmsManagerForSubscriptionId ( subId ) ; if ( ! ( smsManager.isImsSmsSupported ( ) ) ) { return android.telephony.SmsMessage.isCdmaVoice ( subId ) ; } return SmsConstants.FORMAT_3GPP2.equals ( smsManager.getImsSmsFormat ( ) ) ; }
Source:
public final void setAddress ( java.lang.String connectionId , android.net.Uri address , int presentation ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.arg2 = address ; args.argi1 = presentation ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_SET_ADDRESS , args ) . sendToTarget ( ) ; }

Target:
public final void setAddress ( java.lang.String connectionId , android.net.Uri address , int presentation , android.telecom.Logging.Session.Info sessionInfo ) { com.android.internal.os.SomeArgs args = com.android.internal.os.SomeArgs.obtain ( ) ; args.arg1 = connectionId ; args.arg2 = address ; args.argi1 = presentation ; mHandler.obtainMessage ( android.telecom.ConnectionServiceAdapterServant.MSG_SET_ADDRESS , args ) . sendToTarget ( ) ; }
Source:
public final int getInt ( ) { int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } int result = this . block.peekInt ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }

Target:
public java.nio.ByteBuffer putInt ( int value ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } int newPosition = ( position ) + ( libcore.io.SizeOf.INT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferOverflowException ( ) ; } this . block.pokeInt ( ( ( offset ) + ( position ) ) , value , order ) ; position = newPosition ; return this ; }
Source:
public synchronized com.android.ide.common.rendering.LayoutLibrary getLayoutLibrary ( ) { if ( ( ( mLayoutBridgeInit ) == false ) && ( ( mLayoutLibrary.getStatus ( ) ) == ( com.android.ide.common.sdk.LoadStatus.LOADED ) ) ) { mLayoutLibrary.init ( new java.io.File ( mTarget.getPath ( IAndroidTarget.FONTS ) ) , getEnumValueMap ( ) ) ; mLayoutBridgeInit = true ; } return mLayoutLibrary ; }

Target:
public void error ( java.lang.String tag , java.lang.String message ) { com.android.ide.eclipse.adt.AdtPlugin.log ( IStatus.ERROR , message ) ; }
Source:
public void testListenerCompatLayer ( ) throws java.lang.Exception { android.telephony.ims.ImsCallSessionListener listener = org.mockito.Mockito.mock ( android.telephony.ims.ImsCallSessionListener.class ) ; android.telephony.ims.ImsReasonInfo info = org.mockito.Mockito.mock ( android.telephony.ims.ImsReasonInfo.class ) ; mCompatCallSession.setListener ( listener ) ; mCompatCallSession.mListener.callSessionTerminated ( null , info ) ; org.mockito.Mockito.verify ( listener ) . callSessionTerminated ( org.mockito.ArgumentMatchers.eq ( info ) ) ; }

Target:
public void testListenerCompatLayer ( ) throws java.lang.Exception { android.telephony.ims.aidl.IImsCallSessionListener listener = org.mockito.Mockito.mock ( android.telephony.ims.aidl.IImsCallSessionListener.class ) ; android.telephony.ims.ImsReasonInfo info = new android.telephony.ims.ImsReasonInfo ( ) ; mCompatCallSession.setListener ( listener ) ; mCompatCallSession.mListener.callSessionTerminated ( null , info ) ; org.mockito.Mockito.verify ( listener ) . callSessionTerminated ( org.mockito.ArgumentMatchers.eq ( info ) ) ; }
Source:
private boolean isInstallRequestFromUnknownSource ( android.content.Intent intent ) { java.lang.String callerPackage = getCallingPackage ( ) ; if ( ( callerPackage != null ) && ( intent.getBooleanExtra ( Intent.EXTRA_NOT_UNKNOWN_SOURCE , false ) ) ) { try { mSourceInfo = mPm.getApplicationInfo ( callerPackage , 0 ) ; if ( ( mSourceInfo ) != null ) { if ( ( ( mSourceInfo.flags ) & ( android.content.pm.ApplicationInfo.FLAG_PRIVILEGED ) ) != 0 ) { return false ; } } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { } } return true ; }

Target:
private boolean isInstallRequestFromUnknownSource ( android.content.Intent intent ) { java.lang.String callerPackage = getCallingPackage ( ) ; if ( ( callerPackage != null ) && ( intent.getBooleanExtra ( Intent.EXTRA_NOT_UNKNOWN_SOURCE , false ) ) ) { try { mSourceInfo = mPm.getApplicationInfo ( callerPackage , 0 ) ; if ( ( mSourceInfo ) != null ) { if ( ( ( mSourceInfo.privateFlags ) & ( android.content.pm.ApplicationInfo.PRIVATE_FLAG_PRIVILEGED ) ) != 0 ) { return false ; } } } catch ( android.content.pm.PackageManager.NameNotFoundException e ) { } } return true ; }
Source:
public void run ( @ javax.annotation.Nonnull final com.android.jack.ir.ast.cfg.JControlFlowGraph cfg ) { new com.android.jack.ir.ast.cfg.BasicBlockLiveProcessor ( cfg , false ) { @ java.lang.Override public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JSimpleBasicBlock block ) { if ( ( ( block.getElementCount ( ) ) == 1 ) && ( ( block.getLastElement ( ) . getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) ) { block.delete ( ) ; } return false ; } } . process ( ) ; }

Target:
public void run ( @ javax.annotation.Nonnull final com.android.jack.ir.ast.JMethodBodyCfg body ) { new com.android.jack.ir.ast.cfg.BasicBlockLiveProcessor ( body.getCfg ( ) , false ) { @ java.lang.Override public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JSimpleBasicBlock block ) { if ( ( ( block.getElementCount ( ) ) == 1 ) && ( ( block.getLastElement ( ) . getSourceInfo ( ) ) == ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ) ) ) { block.delete ( ) ; } return false ; } } . process ( ) ; }
Source:
public android.drm.DrmInfo acquireDrmInfo ( android.drm.DrmInfoRequest drmInfoRequest ) { if ( ( null == drmInfoRequest ) || ( ! ( drmInfoRequest.isValid ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Given drmInfoRequest is invalid/null" ) ; } else if ( ( getState ( ) ) == ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _acquireDrmInfo ( mUniqueId , drmInfoRequest ) ; }

Target:
public int getDrmObjectType ( java.lang.String path , java.lang.String mimeType ) { if ( ( ( null == path ) || ( path.equals ( "" ) ) ) && ( ( null == mimeType ) || ( mimeType.equals ( "" ) ) ) ) { throw new java.lang.IllegalArgumentException ( "Path or the mimetype should be non null" ) ; } else if ( ( android.drm.DrmManagerClient.STATE_UNINITIALIZED ) == ( getState ( ) ) ) { throw new java.lang.IllegalStateException ( "Not Initialized yet" ) ; } return _getDrmObjectType ( mUniqueId , path , mimeType ) ; }
Source:
public void TestSerbianLongNegative ( ) { if ( logKnownIssue ( "12181" , "No support for negative numbers in CDF" ) ) { return ; } checkLocale ( android.icu.util.ULocale.forLanguageTag ( "sr" ) , CompactStyle.LONG , SerbianTestDataLongNegative ) ; }

Target:
public void TestBig ( ) { android.icu.text.CompactDecimalFormat cdf = android.icu.text.CompactDecimalFormat.getInstance ( ULocale.ENGLISH , CompactStyle.LONG ) ; java.math.BigInteger source_int = new java.math.BigInteger ( "31415926535897932384626433" ) ; assertEquals ( "BigInteger format wrong: " , "31,000,000,000,000 trillion" , cdf.format ( source_int ) ) ; java.math.BigDecimal source_dec = new java.math.BigDecimal ( source_int ) ; assertEquals ( "BigDecimal format wrong: " , "31,000,000,000,000 trillion" , cdf.format ( source_dec ) ) ; }
Source:
public void setPictureListener ( final android.webkit.WebView.PictureListener listener ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setPictureListener ( listener ) ; } } ) ; return ; } mContentsClientAdapter.setPictureListener ( listener ) ; mAwContents.enableOnNewPicture ( ( listener != null ) , ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.JELLY_BEAN_MR2 ) ) ) ; }

Target:
public void addJavascriptInterface ( final java.lang.Object obj , final java.lang.String interfaceName ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { addJavascriptInterface ( obj , interfaceName ) ; } } ) ; return ; } java.lang.Class < ? extends java.lang.annotation.Annotation > requiredAnnotation = null ; if ( ( mAppTargetSdkVersion ) >= ( Build.VERSION_CODES.JELLY_BEAN_MR1 ) ) { requiredAnnotation = android.webkit.JavascriptInterface.class ; } mAwContents.addPossiblyUnsafeJavascriptInterface ( obj , interfaceName , requiredAnnotation ) ; }
Source:
public void testIpSecServiceReserveSpi ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockNetd.ipSecAllocateSpi ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.eq ( IpSecTransform.DIRECTION_OUT ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.eq ( mRemoteAddr ) , org.mockito.Matchers.eq ( com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT ) ) ) . thenReturn ( com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT ) ; android.net.IpSecSpiResponse spiResp = mIpSecService.reserveSecurityParameterIndex ( IpSecTransform.DIRECTION_OUT , mRemoteAddr , com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT , new android.os.Binder ( ) ) ; org.junit.Assert.assertEquals ( IpSecManager.Status.OK , spiResp.status ) ; org.junit.Assert.assertEquals ( com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT , spiResp.spi ) ; }

Target:
public void testIpSecServiceReserveSpi ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mMockNetd.ipSecAllocateSpi ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.eq ( IpSecTransform.DIRECTION_OUT ) , org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.eq ( mRemoteAddr ) , org.mockito.Matchers.eq ( com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT ) ) ) . thenReturn ( com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT ) ; android.net.IpSecSpiResponse spiResp = mIpSecService.allocateSecurityParameterIndex ( IpSecTransform.DIRECTION_OUT , mRemoteAddr , com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT , new android.os.Binder ( ) ) ; org.junit.Assert.assertEquals ( IpSecManager.Status.OK , spiResp.status ) ; org.junit.Assert.assertEquals ( com.android.server.IpSecServiceParameterizedTest.TEST_SPI_OUT , spiResp.spi ) ; }
Source:
void copyFrom ( com.android.tv.data.Channel other ) { if ( ( this ) == other ) { return ; } mId = other.mId ; mPackageName = other.mPackageName ; mInputId = other.mInputId ; mType = other.mType ; mDisplayNumber = other.mDisplayNumber ; mDisplayName = other.mDisplayName ; mDescription = other.mDescription ; mVideoFormat = other.mVideoFormat ; mIsPassthrough = other.mIsPassthrough ; mBrowsable = other.mBrowsable ; mLocked = other.mLocked ; mAppLinkText = other.mAppLinkText ; mAppLinkColor = other.mAppLinkColor ; mAppLinkIconUri = other.mAppLinkIconUri ; mAppLinkPosterArtUri = other.mAppLinkPosterArtUri ; mAppLinkIntentUri = other.mAppLinkIntentUri ; mAppLinkIntent = other.mAppLinkIntent ; mAppLinkType = other.mAppLinkType ; }

Target:
void copyFrom ( com.android.tv.data.Channel other ) { if ( ( this ) == other ) { return ; } mId = other.mId ; mPackageName = other.mPackageName ; mInputId = other.mInputId ; mType = other.mType ; mDisplayNumber = other.mDisplayNumber ; mDisplayName = other.mDisplayName ; mDescription = other.mDescription ; mVideoFormat = other.mVideoFormat ; mIsPassthrough = other.mIsPassthrough ; mBrowsable = other.mBrowsable ; mLocked = other.mLocked ; mAppLinkText = other.mAppLinkText ; mAppLinkColor = other.mAppLinkColor ; mAppLinkIconUri = other.mAppLinkIconUri ; mAppLinkPosterArtUri = other.mAppLinkPosterArtUri ; mAppLinkIntentUri = other.mAppLinkIntentUri ; mAppLinkIntent = other.mAppLinkIntent ; mAppLinkType = other.mAppLinkType ; mRecordingProhibited = other.mRecordingProhibited ; mChannelLogoExist = other.mChannelLogoExist ; }
Source:
public static void checkGlError ( java.lang.String glOperation ) { int error ; while ( ( error = android.opengl.GLES20.glGetError ( ) ) != ( android.opengl.GLES20.GL_NO_ERROR ) ) { android.util.Log.e ( com.android.graphics.benchmark.example.MyGLRenderer.TAG , ( ( glOperation + ": glError " ) + error ) ) ; throw new java.lang.RuntimeException ( ( ( glOperation + ": glError " ) + error ) ) ; } }

Target:
public static void checkGlError ( java.lang.String glOperation ) { int error ; while ( ( error = android.opengl.GLES20.glGetError ( ) ) != ( android.opengl.GLES20.GL_NO_ERROR ) ) { android.util.Log.e ( com.android.game.qualification.example.MyGLRenderer.TAG , ( ( glOperation + ": glError " ) + error ) ) ; throw new java.lang.RuntimeException ( ( ( glOperation + ": glError " ) + error ) ) ; } }
Source:
public static < E > com.google.common.collect.ImmutableList < E > copyOf ( java.util.Collection < ? extends E > elements ) { if ( elements instanceof com.google.common.collect.ImmutableCollection ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) com.google.common.collect.ImmutableList < E > list = ( ( com.google.common.collect.ImmutableCollection < E > ) ( elements ) ) . asList ( ) ; return list.isPartialView ( ) ? com.google.common.collect.ImmutableList.copyFromCollection ( list ) : list ; } return com.google.common.collect.ImmutableList.copyFromCollection ( elements ) ; }

Target:
public static < E > com.google.common.collect.ImmutableList < E > copyOf ( java.util.Collection < ? extends E > elements ) { if ( elements instanceof com.google.common.collect.ImmutableCollection ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) com.google.common.collect.ImmutableList < E > list = ( ( com.google.common.collect.ImmutableCollection < E > ) ( elements ) ) . asList ( ) ; return list.isPartialView ( ) ? com.google.common.collect.ImmutableList.< E > asImmutableList ( list.toArray ( ) ) : list ; } return com.google.common.collect.ImmutableList.construct ( elements.toArray ( ) ) ; }
Source:
synchronized void addClient ( com.android.ddmlib.Client client ) { if ( ( com.android.ddmlib.MonitorThread.mInstance ) == null ) { return ; } com.android.ddmlib.Log.d ( "ddms" , ( "Adding new client " + client ) ) ; synchronized ( mClientList ) { mClientList.add ( client ) ; try { wakeup ( ) ; client.register ( mSelector ) ; com.android.ddmlib.Debugger dbg = client.getDebugger ( ) ; if ( dbg != null ) { dbg.registerListener ( mSelector ) ; } } catch ( java.io.IOException ioe ) { ioe.printStackTrace ( ) ; } } }

Target:
synchronized void addClient ( com.android.ddmlib.Client client ) { if ( ( com.android.ddmlib.MonitorThread.sInstance ) == null ) { return ; } com.android.ddmlib.Log.d ( "ddms" , ( "Adding new client " + client ) ) ; synchronized ( mClientList ) { mClientList.add ( client ) ; try { wakeup ( ) ; client.register ( mSelector ) ; com.android.ddmlib.Debugger dbg = client.getDebugger ( ) ; if ( dbg != null ) { dbg.registerListener ( mSelector ) ; } } catch ( java.io.IOException ioe ) { ioe.printStackTrace ( ) ; } } }
Source:
public void testBind_Null ( ) throws java.lang.Exception { assertNull ( channel1.getLocalAddress ( ) ) ; channel1.bind ( null ) ; java.net.InetSocketAddress localAddress = ( ( java.net.InetSocketAddress ) ( channel1.getLocalAddress ( ) ) ) ; assertTrue ( localAddress.getAddress ( ) . isAnyLocalAddress ( ) ) ; assertTrue ( ( ( localAddress.getPort ( ) ) > 0 ) ) ; }

Target:
public void testBind_Null ( ) throws java.lang.Exception { assertNull ( channel1.socket ( ) . getLocalSocketAddress ( ) ) ; channel1.socket ( ) . bind ( null ) ; java.net.InetSocketAddress localAddress = ( ( java.net.InetSocketAddress ) ( channel1.socket ( ) . getLocalSocketAddress ( ) ) ) ; assertTrue ( localAddress.getAddress ( ) . isAnyLocalAddress ( ) ) ; assertTrue ( ( ( localAddress.getPort ( ) ) > 0 ) ) ; }
Source:
public void testIsOutgoingCallPermittedOngoing ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; assertFalse ( mTelecomSystem.getTelecomServiceImpl ( ) . getBinder ( ) . isOutgoingCallPermitted ( mPhoneAccountSelfManaged.getAccountHandle ( ) ) ) ; }

Target:
public void testIsOutgoingCallPermittedOngoing ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.junit.Assert.assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; org.junit.Assert.assertFalse ( mTelecomSystem.getTelecomServiceImpl ( ) . getBinder ( ) . isOutgoingCallPermitted ( mPhoneAccountSelfManaged.getAccountHandle ( ) ) ) ; }
Source:
public static void checkAndRun ( @ javax.annotation.Nonnull com.android.jack.Options options ) throws com.android.jack.IllegalOptionsException , com.android.jack.JackUserException , com.android.sched.scheduler.ProcessException , com.android.sched.util.config.ConfigurationException { com.android.sched.util.RunnableHooks hooks = new com.android.sched.util.RunnableHooks ( ) ; try { com.android.jack.Jack.check ( options , hooks ) ; com.android.jack.Jack.run ( options , hooks ) ; } finally { hooks.runHooks ( ) ; } }

Target:
public static void checkAndRun ( @ javax.annotation.Nonnull java.lang.Class < ? extends com.android.jack.api.impl.ApiFeature > api , @ javax.annotation.Nonnull com.android.jack.Options options ) throws com.android.jack.IllegalOptionsException , com.android.jack.JackUserException , com.android.sched.scheduler.ProcessException , com.android.sched.util.config.ConfigurationException { com.android.sched.util.RunnableHooks hooks = new com.android.sched.util.RunnableHooks ( ) ; try { com.android.jack.Jack.check ( api , options , hooks ) ; com.android.jack.Jack.run ( api , options , hooks ) ; } finally { hooks.runHooks ( ) ; } }
Source:
private static void indent ( java.lang.StringBuilder sb , int indent ) { for ( int i = 0 ; i < indent ; i ++ ) { sb.append ( " " ) ; } }

Target:
public static org.w3c.dom.Document parseDocumentSilently ( @ com.android.annotations.NonNull java.lang.String xml , boolean namespaceAware ) { javax.xml.parsers.DocumentBuilderFactory factory = javax.xml.parsers.DocumentBuilderFactory.newInstance ( ) ; org.xml.sax.InputSource is = new org.xml.sax.InputSource ( new java.io.StringReader ( xml ) ) ; factory.setNamespaceAware ( namespaceAware ) ; factory.setValidating ( false ) ; try { javax.xml.parsers.DocumentBuilder builder = factory.newDocumentBuilder ( ) ; return builder.parse ( is ) ; } catch ( java.lang.Exception e ) { } return null ; }
Source:
private void assertParentPathToGc ( int node , int ... parents ) { for ( int parent : parents ) { com.android.tools.perflib.heap.analysis.Instance parentInstance = mSnapshot.findReference ( node ) . getNextInstanceToGcRoot ( ) ; if ( ( parentInstance != null ) && ( ( parentInstance.getId ( ) ) == parent ) ) { return ; } } fail ( ) ; }

Target:
private void assertParentPathToGc ( int node , int ... parents ) { for ( int parent : parents ) { com.android.tools.perflib.heap.analysis.Instance parentInstance = mSnapshot.findInstance ( node ) . getNextInstanceToGcRoot ( ) ; if ( ( parentInstance != null ) && ( ( parentInstance.getId ( ) ) == parent ) ) { return ; } } fail ( ) ; }
Source:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.main ) ; com.android.tests.basicjar.Foo foo = new com.android.tests.basicjar.Foo ( ) ; int a = foo.getRandomFoo ( ) ; android.widget.TextView tv = ( ( android.widget.TextView ) ( findViewById ( R.id.text ) ) ) ; tv.setText ( ( "Random number from Jar: " + a ) ) ; }

Target:
public void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( R.layout.basiclibwithjar_main ) ; com.android.tests.basicjar.Foo foo = new com.android.tests.basicjar.Foo ( ) ; int a = foo.getRandomFoo ( ) ; android.widget.TextView tv = ( ( android.widget.TextView ) ( findViewById ( R.id.text ) ) ) ; tv.setText ( ( "BasicLibWithJar: Value from Jar: " + a ) ) ; }
Source:
public void testInterfaceCountersUdp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , getAuthKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1000 , false ) ; }

Target:
public void testAesCbcHmacMd5Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_MD5 , android.net.cts.IpSecManagerTest.getKey ( 128 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
private static com.android.dialer.historyitemactions.HistoryItemActionModule createModuleForAccessingCallDetails ( android.content.Context context , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = row.getNumberAttributes ( ) . getCanReportAsInvalidNumber ( ) ; return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.getCoalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createCallDetailsHeaderInfoFromRow ( context , row ) , canReportAsInvalidNumber , com.android.dialer.calllog.ui.menu.Modules.canSupportAssistedDialing ( row ) ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ; }

Target:
private static com.android.dialer.historyitemactions.HistoryItemActionModule createModuleForAccessingCallDetails ( android.content.Context context , com.android.dialer.calllog.model.CoalescedRow row ) { boolean canReportAsInvalidNumber = ( ! ( row.getIsVoicemailCall ( ) ) ) && ( row.getNumberAttributes ( ) . getCanReportAsInvalidNumber ( ) ) ; return new com.android.dialer.historyitemactions.IntentModule ( context , com.android.dialer.calldetails.CallDetailsActivity.newInstance ( context , row.getCoalescedIds ( ) , com.android.dialer.calllog.ui.menu.Modules.createCallDetailsHeaderInfoFromRow ( context , row ) , canReportAsInvalidNumber , com.android.dialer.calllog.ui.menu.Modules.canSupportAssistedDialing ( row ) ) , R.string.call_details_menu_label , R.drawable.quantum_ic_info_outline_vd_theme_24 ) ; }
Source:
public void test_with_adjustment_LocalTime ( ) { java.time.OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with ( java.time.LocalTime.of ( 19 , 15 ) ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2008 , 6 , 30 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }

Target:
public void test_with_adjustment_LocalTime ( ) { java.time.OffsetDateTime test = tck.java.time.TCKOffsetDateTime.TEST_2008_6_30_11_30_59_000000500.with ( java.time.LocalTime.of ( 19 , 15 ) ) ; org.testng.Assert.assertEquals ( test , java.time.OffsetDateTime.of ( java.time.LocalDate.of ( 2008 , 6 , 30 ) , java.time.LocalTime.of ( 19 , 15 ) , tck.java.time.TCKOffsetDateTime.OFFSET_PONE ) ) ; }
Source:
private boolean isApiVisible ( org.eclipse.jdt.core.dom.BodyDeclaration bodyDeclaration ) { return ( ( bodyDeclaration.getModifiers ( ) ) & ( ( java.lang.reflect.Modifier.PROTECTED ) | ( java.lang.reflect.Modifier.PUBLIC ) ) ) > 0 ; }

Target:
private boolean isApiVisible ( org.eclipse.jdt.core.dom.AbstractTypeDeclaration matchedType , org.eclipse.jdt.core.dom.BodyDeclaration bodyDeclaration ) { if ( matchedType instanceof org.eclipse.jdt.core.dom.TypeDeclaration ) { org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration = ( ( org.eclipse.jdt.core.dom.TypeDeclaration ) ( matchedType ) ) ; if ( typeDeclaration.isInterface ( ) ) { return true ; } } if ( bodyDeclaration instanceof org.eclipse.jdt.core.dom.EnumConstantDeclaration ) { return true ; } return ( ( bodyDeclaration.getModifiers ( ) ) & ( ( java.lang.reflect.Modifier.PROTECTED ) | ( java.lang.reflect.Modifier.PUBLIC ) ) ) > 0 ; }
Source:
public static void computeMix ( android.renderscript.cts.TestMix.ArgumentsFloatFloatFloatFloat args ) { args.ulf = 0 ; args.ulfRelaxed = 4 ; args.out = ( ( float ) ( ( args.inStart ) + ( ( ( args.inStop ) - ( args.inStart ) ) * ( args.inAmount ) ) ) ) ; }

Target:
public static void computeMix ( android.renderscript.cts.TestMix.ArgumentsFloatFloatFloatFloat args ) { android.renderscript.cts.Floaty start = new android.renderscript.cts.Floaty ( args.inStart ) ; android.renderscript.cts.Floaty stop = new android.renderscript.cts.Floaty ( args.inStop ) ; android.renderscript.cts.Floaty diff = android.renderscript.cts.Floaty.subtract ( stop , start ) ; args.out = android.renderscript.cts.Floaty.add ( start , android.renderscript.cts.Floaty.multiply ( diff , new android.renderscript.cts.Floaty ( args.inAmount ) ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { org.mockito.MockitoAnnotations.initMocks ( this ) ; mPreparer.setCmdUtil ( mCmdUtil ) ; com.android.tradefed.config.OptionSetter setter = new com.android.tradefed.config.OptionSetter ( mPreparer ) ; setter.setOptionValue ( "adapter-binary-name" , TEST_HAL_ADAPTER_BINARY ) ; setter.setOptionValue ( "hal-package-name" , TEST_HAL_PACKAGE ) ; doReturn ( true ) . when ( mDevice ) . waitForBootComplete ( FRAMEWORK_START_TIMEOUT ) ; doReturn ( "64" ) . when ( mAbi ) . getBitness ( ) ; }

Target:
public void testOnSetUpAdapterFailed ( ) throws java.lang.Exception { java.io.File testAdapter = new java.io.File ( mTestDir , ( ( VTS_NATIVE_TEST_DIR ) + ( TEST_HAL_ADAPTER_BINARY ) ) ) ; testAdapter.createNewFile ( ) ; java.lang.String output = "android.hardware.foo@1.1::IFoo/default" ; doReturn ( output ) . when ( mDevice ) . executeShellCommand ( java.lang.String.format ( LIST_HAL_CMD , TEST_HAL_PACKAGE ) ) ; mCmdUtil.mCmdSuccess = false ; try { mPreparer.setUp ( mDevice , mBuildInfo ) ; } catch ( com.android.tradefed.targetprep.TargetSetupError e ) { org.junit.Assert.assertEquals ( "HAL adapter failed." , e.getMessage ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }
Source:
public void setSystemProperty ( java.lang.String property , java.lang.String value ) { if ( getUnitTestMode ( ) ) { return ; } if ( ( isPhoneTypeGsm ( ) ) || ( isPhoneTypeCdmaLte ( ) ) ) { android.telephony.TelephonyManager.setTelephonyProperty ( mPhoneId , property , value ) ; } else { super . setSystemProperty ( property , value ) ; } }

Target:
protected com.android.internal.telephony.Connection dialInternal ( java.lang.String dialString , com.android.internal.telephony.DialArgs dialArgs ) throws com.android.internal.telephony.CallStateException { return dialInternal ( dialString , dialArgs , null ) ; }
Source:
protected T computeNext ( ) { if ( queue.isEmpty ( ) ) { return endOfData ( ) ; } com.google.common.collect.PeekingIterator < T > nextIter = queue.poll ( ) ; T next = nextIter.next ( ) ; if ( nextIter.hasNext ( ) ) { queue.add ( nextIter ) ; } return next ; }

Target:
public T next ( ) { com.google.common.collect.PeekingIterator < T > nextIter = queue.remove ( ) ; T next = nextIter.next ( ) ; if ( nextIter.hasNext ( ) ) { queue.add ( nextIter ) ; } return next ; }
Source:
public void onMultipartyStateChanged ( com.android.ims.ImsCall imsCall , boolean isMultiParty ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "onMultipartyStateChanged to " + ( isMultiParty ? "Y" : "N" ) ) ) ; com.android.internal.telephony.imsphone.ImsPhoneConnection conn = findConnection ( imsCall ) ; if ( conn != null ) { conn.updateMultipartyState ( isMultiParty ) ; } }

Target:
public void onCallTerminated ( com.android.ims.ImsCall imsCall , android.telephony.ims.ImsReasonInfo reasonInfo ) { if ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.DBG ) log ( ( "mImsUssdListener onCallTerminated reasonCode=" + ( reasonInfo.getCode ( ) ) ) ) ; removeMessages ( com.android.internal.telephony.imsphone.ImsPhoneCallTracker.EVENT_CHECK_FOR_WIFI_HANDOVER ) ; if ( imsCall == ( mUssdSession ) ) { mUssdSession = null ; if ( ( mPendingUssd ) != null ) { com.android.internal.telephony.CommandException ex = new com.android.internal.telephony.CommandException ( CommandException.Error.GENERIC_FAILURE ) ; android.os.AsyncResult.forMessage ( mPendingUssd , null , ex ) ; mPendingUssd.sendToTarget ( ) ; mPendingUssd = null ; } } imsCall.close ( ) ; }
Source:
public void setVerticalScrollbarOverlay ( final boolean overlay ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setVerticalScrollbarOverlay ( overlay ) ; } } ) ; return ; } mAwContents.setVerticalScrollbarOverlay ( overlay ) ; }

Target:
public void setHttpAuthUsernamePassword ( final java.lang.String host , final java.lang.String realm , final java.lang.String username , final java.lang.String password ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { setHttpAuthUsernamePassword ( host , realm , username , password ) ; } } ) ; return ; } mAwContents.setHttpAuthUsernamePassword ( host , realm , username , password ) ; }
Source:
public void testDragInVerticalTop ( ) { dragInto ( true , new com.android.ide.common.api.Rect ( 0 , 0 , 105 , 80 ) , new com.android.ide.common.api.Point ( 30 , ( - 10 ) ) , 0 , ( - 1 ) , "useStyle(DROP_RECIPIENT), drawRect(Rect[0,0,240,480])" , ( "useStyle(DROP_ZONE), drawLine(0,0,240,0), drawLine(0,90,240,90), " + "drawLine(0,190,240,190), drawLine(0,290,240,290)" ) , "useStyle(DROP_ZONE_ACTIVE), useStyle(DROP_PREVIEW), drawLine(0,0,240,0)" , "useStyle(DROP_PREVIEW), drawRect(Rect[0,-40,105,80])" ) ; dragInto ( true , new com.android.ide.common.api.Rect ( 0 , 0 , 0 , 0 ) , new com.android.ide.common.api.Point ( 30 , ( - 10 ) ) , 0 , ( - 1 ) , "useStyle(DROP_ZONE_ACTIVE), useStyle(DROP_PREVIEW), drawLine(0,0,240,0)" ) ; }

Target:
public void testDragInVerticalTop ( ) { dragInto ( true , new com.android.ide.common.api.Rect ( 0 , 0 , 105 , 80 ) , new com.android.ide.common.api.Point ( 30 , ( - 10 ) ) , 0 , ( - 1 ) , "useStyle(DROP_RECIPIENT), drawRect(Rect[0,0,240,480])" , ( "useStyle(DROP_ZONE), drawLine(0,0,240,0), drawLine(0,90,240,90), " + ( "drawLine(0,190,240,190), drawLine(0,290,240,290), " + "drawLine(0,381,240,381)" ) ) , "useStyle(DROP_ZONE_ACTIVE), useStyle(DROP_PREVIEW), drawLine(0,0,240,0)" , "useStyle(DROP_PREVIEW), drawRect(Rect[0,-40,105,80])" ) ; dragInto ( true , new com.android.ide.common.api.Rect ( 0 , 0 , 0 , 0 ) , new com.android.ide.common.api.Point ( 30 , ( - 10 ) ) , 0 , ( - 1 ) , "useStyle(DROP_ZONE_ACTIVE), useStyle(DROP_PREVIEW), drawLine(0,0,240,0)" ) ; }
Source:
public boolean inDaylightTime ( java.util.Date time ) { long when = time.getTime ( ) ; long unix = when / 1000 ; int transition = java.util.Arrays.binarySearch ( mTransitions , unix ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return false ; } } return ( mIsDsts [ ( ( mTypes [ transition ] ) & 255 ) ] ) == 1 ; }

Target:
int findOffsetIndexForTimeInSeconds ( long seconds ) { int transition = java.util.Arrays.binarySearch ( mTransitions , seconds ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return - 1 ; } } return ( mTypes [ transition ] ) & 255 ; }
Source:
public java.util.Collection < java.lang.Class < ? extends com.android.jack.api.JackConfig > > getSupportedConfigs ( ) { java.util.List < java.lang.Class < ? extends com.android.jack.api.JackConfig > > result = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.api.JackConfig > > ( 1 ) ; result.add ( com.android.jack.api.v01.Api01Config.class ) ; return result ; }

Target:
public java.util.Collection < java.lang.Class < ? extends com.android.jack.api.JackConfig > > getSupportedConfigs ( ) { java.util.List < java.lang.Class < ? extends com.android.jack.api.JackConfig > > result = new java.util.ArrayList < java.lang.Class < ? extends com.android.jack.api.JackConfig > > ( 1 ) ; result.add ( com.android.jack.api.v01.Api01Config.class ) ; result.add ( com.android.jack.api.v01.Cli01Config.class ) ; return result ; }
Source:
private com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker getOrCreateRFICMarker ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface accessorClass ) { com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker marker = accessorClass.getMarker ( com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker.class ) ; if ( marker == null ) { marker = new com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker ( ) ; accessorClass.addMarker ( marker ) ; } return marker ; }

Target:
private com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker getOrCreateRFICMarker ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JDefinedClassOrInterface accessorClass ) { com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker marker = accessorClass.getMarker ( com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker.class ) ; if ( marker == null ) { com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker newMarker = new com.android.jack.transformations.ast.inner.ReferencedFromInnerClassMarker ( ) ; marker = accessorClass.addMarkerIfAbsent ( newMarker ) ; if ( marker == null ) { marker = newMarker ; } } return marker ; }
Source:
public android.webkit.WebBackForwardList copyBackForwardList ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { android.webkit.WebBackForwardList ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < android.webkit.WebBackForwardList > ( ) { @ java.lang.Override public android.webkit.WebBackForwardList call ( ) { return copyBackForwardList ( ) ; } } ) ; return ret ; } return new com.android.webview.chromium.WebBackForwardListChromium ( mAwContents.getNavigationHistory ( ) ) ; }

Target:
public void clearSslPreferences ( ) { if ( checkNeedsPost ( ) ) { mRunQueue.addTask ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { clearSslPreferences ( ) ; } } ) ; return ; } mAwContents.clearSslPreferences ( ) ; }