auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void visitMethodInsn ( final int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc ) { if ( owner.equals ( "pkg/FrameTable" ) ) { super . visitMethodInsn ( opcode , "pkg/FrameMap" , name , desc ) ; } else { super . visitMethodInsn ( opcode , owner , name , desc ) ; } }

Target:
public void visitMethodInsn ( final int opcode , final java.lang.String owner , final java.lang.String name , final java.lang.String desc , final boolean itf ) { if ( owner.equals ( "pkg/FrameTable" ) ) { super . visitMethodInsn ( opcode , "pkg/FrameMap" , name , desc , itf ) ; } else { super . visitMethodInsn ( opcode , owner , name , desc , itf ) ; } }
Source:
public static < T > void runSizedTests ( java.util.Spliterator < T > spliterator , int expectedSize ) { junit.framework.Assert.assertTrue ( spliterator.hasCharacteristics ( java.util.Spliterator.SIZED ) ) ; junit.framework.Assert.assertEquals ( expectedSize , spliterator.estimateSize ( ) ) ; junit.framework.Assert.assertEquals ( expectedSize , spliterator.getExactSizeIfKnown ( ) ) ; }

Target:
public static < T > void runSizedTests ( java.util.Spliterator < T > spliterator , int expectedSize ) { libcore.java.util.SpliteratorTester.assertHasCharacteristics ( java.util.Spliterator.SIZED , spliterator ) ; junit.framework.Assert.assertEquals ( expectedSize , spliterator.estimateSize ( ) ) ; junit.framework.Assert.assertEquals ( expectedSize , spliterator.getExactSizeIfKnown ( ) ) ; }
Source:
public boolean reportError ( android.bluetooth.BluetoothDevice device , byte error ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( ( ( "reportError(): device=" + device ) + " error=" ) + error ) ) ; boolean result = false ; if ( ( mService ) != null ) { try { result = mService.reportError ( device , error ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }

Target:
public boolean disconnect ( android.bluetooth.BluetoothDevice device ) { android.util.Log.v ( android.bluetooth.BluetoothInputHost.TAG , ( "disconnect(): device=" + device ) ) ; boolean result = false ; final android.bluetooth.IBluetoothInputHost service = mService ; if ( service != null ) { try { result = service.disconnect ( device ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothInputHost.TAG , e.toString ( ) ) ; } } else { android.util.Log.w ( android.bluetooth.BluetoothInputHost.TAG , "Proxy not attached to service" ) ; } return result ; }
Source:
public int hashCode ( ) { return bits.hashCode ( ) ; }

Target:
public void writeTo ( java.io.OutputStream out ) throws java.io.IOException { java.io.DataOutputStream dout = new java.io.DataOutputStream ( out ) ; dout.writeByte ( com.google.common.primitives.SignedBytes.checkedCast ( strategy.ordinal ( ) ) ) ; dout.writeByte ( com.google.common.primitives.UnsignedBytes.checkedCast ( numHashFunctions ) ) ; dout.writeInt ( bits.data.length ) ; for ( long value : bits.data ) { dout.writeLong ( value ) ; } }
Source:
public java.util.Collection < java.lang.String > getItemsOfType ( @ com.android.annotations.NonNull com.android.resources.ResourceType type ) { synchronized ( mItems ) { com.google.common.collect.Multimap < java.lang.String , com.android.ide.common.res2.ResourceItem > map = mItems.get ( type ) ; if ( map == null ) { return java.util.Collections.emptyList ( ) ; } return java.util.Collections.unmodifiableCollection ( map.keySet ( ) ) ; } }

Target:
protected com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > getMap ( com.android.resources.ResourceType type , boolean create ) { com.google.common.collect.ListMultimap < java.lang.String , com.android.ide.common.res2.ResourceItem > multimap = mItems.get ( type ) ; if ( ( multimap == null ) && create ) { multimap = com.google.common.collect.ArrayListMultimap.create ( ) ; mItems.put ( type , multimap ) ; } return multimap ; }
Source:
public static void notifyMethodEntry ( java.lang.Object m ) { art.Test988.results.add ( new art.Test988.MethodEntry ( m , art.Test988.cnt ) ) ; ( art.Test988.cnt ) ++ ; }

Target:
public static void notifyMethodEntry ( java.lang.Object m ) { ( art.Test988.cnt ) ++ ; if ( ( ( ( art.Test988.cnt ) - 1 ) > ( art.Test988.METHOD_TRACING_IGNORE_DEPTH ) ) && ( art.Test988.sMethodTracingIgnore ) ) { return ; } art.Test988.results.add ( new art.Test988.MethodEntry ( m , ( ( art.Test988.cnt ) - 1 ) ) ) ; }
Source:
private void doAddConfig ( java.lang.String name , com.android.ide.eclipse.adt.internal.resources.configurations.FolderConfiguration config ) { for ( com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig c : mConfigs ) { if ( c.getName ( ) . equals ( name ) ) { mConfigs.remove ( c ) ; break ; } } mConfigs.add ( new com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig ( name , config ) ) ; }

Target:
private void doAddConfig ( java.lang.String name , com.android.ide.common.resources.configuration.FolderConfiguration config ) { for ( com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig c : mConfigs ) { if ( c.getName ( ) . equals ( name ) ) { mConfigs.remove ( c ) ; break ; } } mConfigs.add ( new com.android.ide.eclipse.adt.internal.sdk.LayoutDevice.DeviceConfig ( name , config ) ) ; }
Source:
private void sendAck ( ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_RESPONSE_ACKNOWLEDGEMENT , null , mRILDefaultWorkSource ) ; acquireWakeLock ( rr , com.android.internal.telephony.RIL.FOR_ACK_WAKELOCK ) ; android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( null ) ; if ( radioProxy != null ) { try { radioProxy.responseAcknowledgement ( ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { resetProxyAndRequestList ( ) ; riljLoge ( ( "sendAck: " + e ) ) ; } } else { android.telephony.Rlog.e ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , "Error trying to send ack, radioProxy = null" ) ; } rr.release ( ) ; }

Target:
private void sendAck ( ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_RESPONSE_ACKNOWLEDGEMENT , null , mRILDefaultWorkSource ) ; acquireWakeLock ( rr , com.android.internal.telephony.RIL.FOR_ACK_WAKELOCK ) ; android.hardware.radio.V1_0.IRadio radioProxy = getRadioProxy ( null ) ; if ( radioProxy != null ) { try { radioProxy.responseAcknowledgement ( ) ; } catch ( android.os.RemoteException | java.lang.RuntimeException e ) { handleRadioProxyExceptionForRR ( rr , "sendAck" , e ) ; riljLoge ( ( "sendAck: " + e ) ) ; } } else { android.telephony.Rlog.e ( com.android.internal.telephony.RIL.RILJ_LOG_TAG , "Error trying to send ack, radioProxy = null" ) ; } rr.release ( ) ; }
Source:
public org.eclipse.swt.graphics.Color getBackground ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) { if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) == ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.NEW_AVAILABLE ) ) { } else if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) == ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.UPDATE_AVAILABLE ) ) { return mColorUpdate ; } } return null ; }

Target:
public org.eclipse.swt.graphics.Font getFont ( java.lang.Object element , int columnIndex ) { if ( element instanceof com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) { if ( ( ( ( com.android.sdkuilib.internal.repository.PackagesPage.PkgItem ) ( element ) ) . getState ( ) ) == ( com.android.sdkuilib.internal.repository.PackagesPage.PkgState.NEW ) ) { return mTreeFontItalic ; } } else if ( element instanceof java.lang.Package ) { return mTreeFontItalic ; } return super . getFont ( element ) ; }
Source:
public static com.android.jack.dx.rop.code.Rop opMoveParam ( com.android.jack.dx.rop.type.TypeBearer type ) { switch ( type.getBasicFrameType ( ) ) { case com.android.jack.dx.rop.type.Type.BT_INT : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_INT ; case com.android.jack.dx.rop.type.Type.BT_LONG : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_LONG ; case com.android.jack.dx.rop.type.Type.BT_FLOAT : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_FLOAT ; case com.android.jack.dx.rop.type.Type.BT_DOUBLE : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_DOUBLE ; case com.android.jack.dx.rop.type.Type.BT_OBJECT : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_OBJECT ; } return com.android.jack.dx.rop.code.Rops.throwBadType ( type ) ; }

Target:
public static com.android.jack.dx.rop.code.Rop opMoveParam ( com.android.jack.dx.rop.type.TypeBearer type ) { switch ( type.getBasicFrameType ( ) ) { case com.android.jack.dx.rop.type.Type.BT_INT : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_INT ; case com.android.jack.dx.rop.type.Type.BT_LONG : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_LONG ; case com.android.jack.dx.rop.type.Type.BT_FLOAT : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_FLOAT ; case com.android.jack.dx.rop.type.Type.BT_DOUBLE : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_DOUBLE ; case com.android.jack.dx.rop.type.Type.BT_OBJECT : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_OBJECT ; case com.android.jack.dx.rop.type.Type.BT_CLOSURE : return com.android.jack.dx.rop.code.Rops.MOVE_PARAM_LONG ; } return com.android.jack.dx.rop.code.Rops.throwBadType ( type ) ; }
Source:
public void onGenerated ( android.support.v7.graphics.Palette palette ) { mMetaViewHolder.setBackgroundColor ( palette.getDarkVibrantColor ( getResources ( ) . getColor ( R.color.channel_card_meta_background , null ) ) ) ; }

Target:
protected void onPostExecute ( java.lang.CharSequence appLabel ) { mTvInputManagerHelper.setTvInputApplicationLabel ( mLoadTvInputId , appLabel ) ; if ( ( ( mLoadTvInputId ) != ( mChannel.getInputId ( ) ) ) || ( ! ( isAttachedToWindow ( ) ) ) ) { return ; } mAppInfoView.setText ( appLabel ) ; }
Source:
public void linkFile ( java.lang.String relativePath , java.lang.String fromBase , java.lang.String toBase ) throws com.android.internal.os.InstallerConnection.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.linkFile ( relativePath , fromBase , toBase ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void moveAb ( java.lang.String apkPath , java.lang.String instructionSet , java.lang.String outputPath ) throws com.android.server.pm.Installer.InstallerException { if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.moveAb ( apkPath , instructionSet , outputPath ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw com.android.server.pm.Installer.InstallerException.from ( e ) ; } }
Source:
public void stopRinging ( ) { if ( ( mRingingCall ) != null ) { android.telecom.Log.addEvent ( mRingingCall , LogUtils.Events.STOP_RINGER ) ; mRingingCall = null ; } mRingtonePlayer.stop ( ) ; if ( mIsVibrating ) { mVibrator.cancel ( ) ; mIsVibrating = false ; } }

Target:
public void stopRinging ( ) { if ( ( mRingingCall ) != null ) { android.telecom.Log.addEvent ( mRingingCall , LogUtils.Events.STOP_RINGER ) ; mRingingCall = null ; } mRingtonePlayer.stop ( ) ; if ( mIsVibrating ) { android.telecom.Log.addEvent ( mVibratingCall , LogUtils.Events.STOP_VIBRATOR ) ; mVibrator.cancel ( ) ; mIsVibrating = false ; mVibratingCall = null ; } }
Source:
private void assertArmCpuAbiConstants ( ) { boolean isArm7Compatible = isArm7Compatible ( ) ; if ( isArm7Compatible ) { java.lang.String message = java.lang.String.format ( ( "CPU is ARM v7 compatible, so Build.CPU_ABI must be %s" + " and Build.CPU_ABI2 must be %s." ) , android.os.cts.BuildTest.ARMEABI_V7 , android.os.cts.BuildTest.ARMEABI ) ; assertEquals ( message , android.os.cts.BuildTest.ARMEABI_V7 , Build.CPU_ABI ) ; assertEquals ( message , android.os.cts.BuildTest.ARMEABI , Build.CPU_ABI2 ) ; } else { java.lang.String message = java.lang.String.format ( ( "CPU is not ARM v7 compatible, so Build.CPU_ABI must " + "be %s and Build.CPU_ABI2 must be 'unknown'." ) , android.os.cts.BuildTest.ARMEABI ) ; assertEquals ( message , android.os.cts.BuildTest.ARMEABI , Build.CPU_ABI ) ; assertEquals ( message , "unknown" , Build.CPU_ABI2 ) ; } }

Target:
private void assertArmCpuAbiConstants ( ) { if ( android.os.cts.CpuFeatures.isArm7Compatible ( ) ) { java.lang.String message = java.lang.String.format ( ( "CPU is ARM v7 compatible, so Build.CPU_ABI must be %s" + " and Build.CPU_ABI2 must be %s." ) , CpuFeatures.ARMEABI_V7 , CpuFeatures.ARMEABI ) ; assertEquals ( message , CpuFeatures.ARMEABI_V7 , Build.CPU_ABI ) ; assertEquals ( message , CpuFeatures.ARMEABI , Build.CPU_ABI2 ) ; } else { java.lang.String message = java.lang.String.format ( ( "CPU is not ARM v7 compatible, so Build.CPU_ABI must " + "be %s and Build.CPU_ABI2 must be 'unknown'." ) , CpuFeatures.ARMEABI ) ; assertEquals ( message , CpuFeatures.ARMEABI , Build.CPU_ABI ) ; assertEquals ( message , "unknown" , Build.CPU_ABI2 ) ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { assert ( ( expr.getType ( ) ) instanceof com.android.jack.ir.ast.JPrimitiveType.JBooleanType ) || ( expr.getType ( ) . equals ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_BOOLEAN ) ) ) ; ( opAfterTransformation ) ++ ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { assert ( ( expr.getType ( ) ) instanceof com.android.jack.ir.ast.JPrimitiveType.JBooleanType ) || ( expr.getType ( ) . isSameType ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_BOOLEAN ) ) ) ; ( opAfterTransformation ) ++ ; return false ; }
Source:
public void test_d2i_SSL_SESSION ( ) throws java.lang.Exception { try { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( null ) ; fail ( ) ; } catch ( java.lang.NullPointerException expected ) { } try { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( new byte [ 0 ] ) ; fail ( "Should throw IOException with invalid SSL_SESSION data" ) ; } catch ( java.io.IOException expected ) { } try { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( new byte [ 1 ] ) ; fail ( "Should throw IOException with invalid SSL_SESSION data" ) ; } catch ( java.io.IOException expected ) { } }

Target:
public void d2i_SSL_SESSION_EmptyArgument ( ) throws java.lang.Exception { org.conscrypt.NativeCrypto.d2i_SSL_SESSION ( new byte [ 0 ] ) ; }
Source:
private java.lang.String getFullSessionId ( ) { android.telecom.Logging.Session parentSession = mParentSession ; if ( parentSession == null ) { return mSessionId ; } else { return ( ( parentSession.getFullSessionId ( ) ) + "_" ) + ( mSessionId ) ; } }

Target:
private java.lang.String getFullSessionId ( ) { android.telecom.Logging.Session parentSession = mParentSession ; if ( parentSession == null ) { return mSessionId ; } else { if ( android.telecom.Log.VERBOSE ) { return ( ( parentSession.getFullSessionId ( ) ) + ( android.telecom.Logging.Session.SESSION_SEPARATION_CHAR_CHILD ) ) + ( mSessionId ) ; } else { return parentSession.getFullSessionId ( ) ; } } }
Source:
public void testUpdateBatteryLevel_errorNegativeValue ( ) { com.android.bluetooth.btservice.RemoteDevices remoteDevices = new com.android.bluetooth.btservice.RemoteDevices ( mAdapterService ) ; int batteryLevel = - 1 ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; remoteDevices.updateBatteryLevel ( mDevice1 , batteryLevel ) ; org.mockito.Mockito.verify ( mAdapterService , org.mockito.Mockito.never ( ) ) . sendBroadcast ( org.mockito.Mockito.any ( ) , org.mockito.Mockito.anyString ( ) ) ; org.junit.Assert.assertNull ( remoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }

Target:
public void testResetBatteryLevel_testResetBeforeUpdate ( ) { org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; mRemoteDevices.resetBatteryLevel ( mDevice1 ) ; org.junit.Assert.assertNull ( mRemoteDevices.getDeviceProperties ( mDevice1 ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( mAdapterService ) ; }
Source:
public void sendDtmf ( char c , android.os.Message result ) { logi ( ( "sendDtmf :: code=" + c ) ) ; synchronized ( mLockObj ) { if ( ( mSession ) != null ) { mSession.sendDtmf ( c , result ) ; } } }

Target:
public void inviteParticipants ( java.lang.String [ ] participants ) throws com.android.ims.ImsException { logi ( "inviteParticipants ::" ) ; synchronized ( mLockObj ) { if ( ( mSession ) == null ) { loge ( "inviteParticipants :: " ) ; throw new com.android.ims.ImsException ( "No call session" , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_CALL_TERMINATED ) ; } mSession.inviteParticipants ( participants ) ; } }
Source:
private void readObject ( java.io.ObjectInputStream s ) throws java.io.IOException , java.lang.ClassNotFoundException { s.defaultReadObject ( ) ; resetLock ( ) ; int len = s.readInt ( ) ; java.lang.Object [ ] elements = new java.lang.Object [ len ] ; for ( int i = 0 ; i < len ; i ++ ) elements [ i ] = s.readObject ( ) ; setArray ( elements ) ; }

Target:
public synchronized E remove ( int index ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) E removed = ( ( E ) ( elements [ index ] ) ) ; removeRange ( index , ( index + 1 ) ) ; return removed ; }
Source:
private void createContents ( ) { org.eclipse.swt.widgets.TabFolder tabFolder = new org.eclipse.swt.widgets.TabFolder ( mShell , org.eclipse.swt.SWT.NONE ) ; com.android.sdkuilib.ui.GridDataBuilder.create ( tabFolder ) . fill ( ) . grab ( ) . hSpan ( 2 ) ; org.eclipse.swt.widgets.TabItem avdTabItem = new org.eclipse.swt.widgets.TabItem ( tabFolder , org.eclipse.swt.SWT.NONE ) ; avdTabItem.setText ( "Android Virtual Devices" ) ; createAvdTab ( tabFolder , avdTabItem ) ; org.eclipse.swt.widgets.TabItem devTabItem = new org.eclipse.swt.widgets.TabItem ( tabFolder , org.eclipse.swt.SWT.NONE ) ; devTabItem.setText ( "Device Definitions" ) ; createDeviceTab ( tabFolder , devTabItem ) ; }

Target:
private void createContents ( ) { mTabFolder = new org.eclipse.swt.widgets.TabFolder ( mShell , org.eclipse.swt.SWT.NONE ) ; com.android.sdkuilib.ui.GridDataBuilder.create ( mTabFolder ) . fill ( ) . grab ( ) . hSpan ( 2 ) ; org.eclipse.swt.widgets.TabItem avdTabItem = new org.eclipse.swt.widgets.TabItem ( mTabFolder , org.eclipse.swt.SWT.NONE ) ; avdTabItem.setText ( "Android Virtual Devices" ) ; createAvdTab ( mTabFolder , avdTabItem ) ; org.eclipse.swt.widgets.TabItem devTabItem = new org.eclipse.swt.widgets.TabItem ( mTabFolder , org.eclipse.swt.SWT.NONE ) ; devTabItem.setText ( "Device Definitions" ) ; createDeviceTab ( mTabFolder , devTabItem ) ; }
Source:
private void onLockedAllRecordsLoaded ( ) { setSimLanguageFromEF ( ) ; mLockedRecordsLoadedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , null , null ) ) ; }

Target:
private void onLockedAllRecordsLoaded ( ) { setSimLanguageFromEF ( ) ; if ( ( mLockedRecordsReqReason ) == ( LOCKED_RECORDS_REQ_REASON_LOCKED ) ) { mLockedRecordsLoadedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , null , null ) ) ; } else if ( ( mLockedRecordsReqReason ) == ( LOCKED_RECORDS_REQ_REASON_NETWORK_LOCKED ) ) { mNetworkLockedRecordsLoadedRegistrants.notifyRegistrants ( new android.os.AsyncResult ( null , null , null ) ) ; } else { loge ( ( "onLockedAllRecordsLoaded: unexpected mLockedRecordsReqReason " + ( mLockedRecordsReqReason ) ) ) ; } }
Source:
public void setMsisdnNumber ( java.lang.String alphaTag , java.lang.String number , android.os.Message onComplete ) { mMsisdn = number ; mMsisdnTag = alphaTag ; if ( com.android.internal.telephony.uicc.IccRecords.DBG ) log ( ( ( ( "Set MSISDN: " + ( mMsisdnTag ) ) + " " ) + ( mMsisdn ) ) ) ; com.android.internal.telephony.uicc.AdnRecord adn = new com.android.internal.telephony.uicc.AdnRecord ( mMsisdnTag , mMsisdn ) ; new com.android.internal.telephony.uicc.AdnRecordLoader ( mFh ) . updateEF ( adn , com.android.internal.telephony.uicc.EF_MSISDN , com.android.internal.telephony.uicc.EF_EXT1 , 1 , null , obtainMessage ( com.android.internal.telephony.uicc.IccRecords.EVENT_SET_MSISDN_DONE , onComplete ) ) ; }

Target:
public void setMsisdnNumber ( java.lang.String alphaTag , java.lang.String number , android.os.Message onComplete ) { loge ( "setMsisdn() should not be invoked on base IccRecords" ) ; android.os.AsyncResult.forMessage ( onComplete ) . exception = new com.android.internal.telephony.uicc.IccIoResult ( 106 , 130 , ( ( byte [ ] ) ( null ) ) ) . getException ( ) ; onComplete.sendToTarget ( ) ; }
Source:
private void addDockModeToBundles ( java.util.List < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > addConfig ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > list = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle bundle : addConfig ) { int index = 0 ; for ( com.android.resources.DockMode mode : com.android.resources.DockMode.values ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle b = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle ( bundle ) ; b.config.setDockModeQualifier ( new com.android.ide.eclipse.adt.internal.resources.configurations.DockModeQualifier ( mode ) ) ; b.dockModeIndex = index ++ ; list.add ( b ) ; } } addConfig.clear ( ) ; addConfig.addAll ( list ) ; }

Target:
private void addDockModeToBundles ( java.util.List < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > addConfig ) { java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > list = new java.util.ArrayList < com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle > ( ) ; for ( com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle bundle : addConfig ) { int index = 0 ; for ( com.android.resources.DockMode mode : com.android.resources.DockMode.values ( ) ) { com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle b = new com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.ConfigBundle ( bundle ) ; b.config.setDockModeQualifier ( new com.android.ide.common.resources.configuration.DockModeQualifier ( mode ) ) ; b.dockModeIndex = index ++ ; list.add ( b ) ; } } addConfig.clear ( ) ; addConfig.addAll ( list ) ; }
Source:
public final int update ( java.nio.ByteBuffer input , java.nio.ByteBuffer output ) throws javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == output ) { throw new java.lang.IllegalArgumentException ( "input == output" ) ; } return spiImpl.engineUpdate ( input , output ) ; }

Target:
public final int doFinal ( java.nio.ByteBuffer input , java.nio.ByteBuffer output ) throws javax.crypto.BadPaddingException , javax.crypto.IllegalBlockSizeException , javax.crypto.ShortBufferException { if ( ( ( mode ) != ( javax.crypto.Cipher.ENCRYPT_MODE ) ) && ( ( mode ) != ( javax.crypto.Cipher.DECRYPT_MODE ) ) ) { throw new java.lang.IllegalStateException ( ) ; } if ( input == output ) { throw new java.lang.IllegalArgumentException ( "input == output" ) ; } return getSpi ( ) . engineDoFinal ( input , output ) ; }
Source:
static com.android.ide.common.res2.ResourceItem getResource ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.Nullable java.io.File from ) { com.android.resources.ResourceType type = com.android.ide.common.res2.ValueResourceParser2.getType ( node , from ) ; java.lang.String name = com.android.ide.common.res2.ValueResourceParser2.getName ( node ) ; if ( name != null ) { if ( type != null ) { return new com.android.ide.common.res2.ResourceItem ( name , type , node ) ; } } return null ; }

Target:
static com.android.ide.common.res2.ResourceItem getResource ( @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.Nullable java.io.File from ) throws com.android.ide.common.res2.MergingException { com.android.resources.ResourceType type = com.android.ide.common.res2.ValueResourceParser2.getType ( node , from ) ; java.lang.String name = com.android.ide.common.res2.ValueResourceParser2.getName ( node ) ; if ( name != null ) { if ( type != null ) { return new com.android.ide.common.res2.ResourceItem ( name , type , node ) ; } } else if ( type == ( com.android.resources.ResourceType.PUBLIC ) ) { return new com.android.ide.common.res2.ResourceItem ( "" , type , node ) ; } return null ; }
Source:
private void assertIsNotSameAddressAs ( android.net.LinkAddress l1 , android.net.LinkAddress l2 ) { assertFalse ( ( ( l1 + " unexpectedly has same address as " ) + l2 ) , l1.isSameAddressAs ( l2 ) ) ; assertFalse ( ( ( l2 + " unexpectedly has same address as " ) + l1 ) , l1.isSameAddressAs ( l2 ) ) ; }

Target:
private void assertIsNotSameAddressAs ( android.net.LinkAddress l1 , android.net.LinkAddress l2 ) { org.junit.Assert.assertFalse ( ( ( l1 + " unexpectedly has same address as " ) + l2 ) , l1.isSameAddressAs ( l2 ) ) ; org.junit.Assert.assertFalse ( ( ( l2 + " unexpectedly has same address as " ) + l1 ) , l1.isSameAddressAs ( l2 ) ) ; }
Source:
public void registerExtraPage ( java.lang.String title , java.lang.Class < ? extends org.eclipse.swt.widgets.Composite > pageClass ) { if ( ( mExtraPages ) == null ) { mExtraPages = new java.util.ArrayList < java.lang.Object [ ] > ( ) ; } mExtraPages.add ( new java.lang.Object [ ] { title , pageClass } ) ; }

Target:
public void registerPage ( java.lang.String title , java.lang.Class < ? extends org.eclipse.swt.widgets.Composite > pageClass ) { if ( ( mExtraPages ) == null ) { mExtraPages = new java.util.ArrayList < java.lang.Object [ ] > ( ) ; } mExtraPages.add ( new java.lang.Object [ ] { title , pageClass } ) ; }
Source:
public boolean accept ( org.eclipse.core.resources.IProject project ) { com.android.ide.eclipse.adt.internal.project.ProjectState state = com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState ( project ) ; if ( state != null ) { if ( ( ( state.isLibrary ( ) ) == false ) || ( project == ( mState.getProject ( ) ) ) ) { return false ; } for ( com.android.ide.eclipse.adt.internal.properties.LibraryProperties.ItemData data : mItemDataList ) { if ( ( data.project ) == project ) { return false ; } } return true ; } return false ; }

Target:
public boolean accept ( org.eclipse.core.resources.IProject project ) { com.android.ide.eclipse.adt.internal.sdk.ProjectState state = com.android.ide.eclipse.adt.internal.sdk.Sdk.getProjectState ( project ) ; if ( state != null ) { if ( ( ( state.isLibrary ( ) ) == false ) || ( project == ( mState.getProject ( ) ) ) ) { return false ; } for ( com.android.ide.eclipse.adt.internal.properties.LibraryProperties.ItemData data : mItemDataList ) { if ( ( data.project ) == project ) { return false ; } } return true ; } return false ; }
Source:
public java.lang.String getContentType ( ) { try { if ( ! ( connected ) ) { connect ( ) ; } } catch ( java.io.IOException e ) { return "content/unknown" ; } if ( isDir ) { return "text/plain" ; } java.lang.String result = java.net.URLConnection.guessContentTypeFromName ( url.getFile ( ) ) ; if ( result != null ) { return result ; } try { result = java.net.URLConnection.guessContentTypeFromStream ( is ) ; } catch ( java.io.IOException e ) { } if ( result != null ) { return result ; } return "content/unknown" ; }

Target:
public java.lang.String getHeaderField ( java.lang.String key ) { if ( ! ( connected ) ) { try { connect ( ) ; } catch ( java.io.IOException ioe ) { return null ; } } for ( int i = 0 ; i < ( headerKeysAndValues.length ) ; i += 2 ) { if ( headerKeysAndValues [ i ] . equalsIgnoreCase ( key ) ) { return headerKeysAndValues [ ( i + 1 ) ] ; } } return null ; }
Source:
private void read ( java.io.InputStream patchIn ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataInputStream in = new java.io.DataInputStream ( patchIn ) ; myOldBuild = in.readUTF ( ) ; myNewBuild = in.readUTF ( ) ; myIsBinary = in.readBoolean ( ) ; myIsStrict = in.readBoolean ( ) ; myIsNormalized = in.readBoolean ( ) ; myWarnings = com.intellij.updater.Patch.readMap ( in ) ; myActions = readActions ( in ) ; }

Target:
private void read ( java.io.InputStream patchIn ) throws java.io.IOException { @ java.lang.SuppressWarnings ( value = "IOResourceOpenedButNotSafelyClosed" ) java.io.DataInputStream in = new java.io.DataInputStream ( patchIn ) ; myOldBuild = in.readUTF ( ) ; myNewBuild = in.readUTF ( ) ; myIsBinary = in.readBoolean ( ) ; myIsStrict = in.readBoolean ( ) ; myIsNormalized = in.readBoolean ( ) ; myWarnings = com.intellij.updater.Patch.readMap ( in ) ; myDeleteFiles = com.intellij.updater.Patch.readList ( in ) ; myActions = readActions ( in ) ; }
Source:
public void assertReadAccessAllowed ( ) { if ( ! ( isReadAccessAllowed ( ) ) ) { com.intellij.openapi.application.impl.ApplicationImpl.LOG.error ( ( "Read access is allowed from event dispatch thread or inside read-action only" + " (see com.intellij.openapi.application.Application.runReadAction())" ) , ( "Current thread: " + ( com.intellij.openapi.application.impl.ApplicationImpl.describe ( java.lang.Thread.currentThread ( ) ) ) ) , ( ( ( "; dispatch thread: " + ( java.awt.EventQueue.isDispatchThread ( ) ) ) + "; isDispatchThread(): " ) + ( isDispatchThread ( ) ) ) , ( "SystemEventQueueThread: " + ( com.intellij.openapi.application.impl.ApplicationImpl.describe ( com.intellij.openapi.application.impl.ApplicationImpl.getEventQueueThread ( ) ) ) ) ) ; } }

Target:
public void assertReadAccessAllowed ( ) { if ( ! ( isReadAccessAllowed ( ) ) ) { com.intellij.openapi.application.impl.ApplicationImpl.LOG.error ( ( "Read access is allowed from event dispatch thread or inside read-action only" + " (see com.intellij.openapi.application.Application.runReadAction())" ) , new com.intellij.openapi.application.impl.ApplicationImpl.NoReadAccessException ( ) , ( "Current thread: " + ( com.intellij.openapi.application.impl.ApplicationImpl.describe ( java.lang.Thread.currentThread ( ) ) ) ) , ( ( ( "; dispatch thread: " + ( java.awt.EventQueue.isDispatchThread ( ) ) ) + "; isDispatchThread(): " ) + ( isDispatchThread ( ) ) ) , ( "SystemEventQueueThread: " + ( com.intellij.openapi.application.impl.ApplicationImpl.describe ( com.intellij.openapi.application.impl.ApplicationImpl.getEventQueueThread ( ) ) ) ) ) ; } }
Source:
public void run ( final com.android.cts.TestDevice device ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException { mTestStop = false ; java.util.Iterator < com.android.cts.Test > tests = getTests ( ) . iterator ( ) ; while ( ( tests.hasNext ( ) ) && ( ! ( mTestStop ) ) ) { mCurrentTest = tests.next ( ) ; if ( mCurrentTest.getResult ( ) . isNotExecuted ( ) ) { mCurrentTest.run ( device ) ; } } }

Target:
public void run ( final com.android.cts.TestDevice device , android.annotation.cts.Profile profile ) throws com.android.cts.ADBServerNeedRestartException , com.android.cts.DeviceDisconnectedException { mTestStop = false ; java.util.Iterator < com.android.cts.Test > tests = getTests ( ) . iterator ( ) ; while ( ( tests.hasNext ( ) ) && ( ! ( mTestStop ) ) ) { mCurrentTest = tests.next ( ) ; if ( mCurrentTest.getResult ( ) . isNotExecuted ( ) ) { mCurrentTest.run ( device , profile ) ; } } }
Source:
static java.lang.String printXmlString ( @ com.android.annotations.NonNull org.w3c.dom.Document doc , @ com.android.annotations.NonNull com.android.sdklib.ISdkLog log ) { try { javax.xml.transform.Transformer tf = javax.xml.transform.TransformerFactory.newInstance ( ) . newTransformer ( ) ; tf.setOutputProperty ( javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION , "yes" ) ; tf.setOutputProperty ( javax.xml.transform.OutputKeys.ENCODING , "UTF-8" ) ; tf.setOutputProperty ( javax.xml.transform.OutputKeys.INDENT , "yes" ) ; tf.setOutputProperty ( "{http://xml.apache.org/xslt}indent-amount" , "4" ) ; java.io.StringWriter sw = new java.io.StringWriter ( ) ; tf.transform ( new javax.xml.transform.dom.DOMSource ( doc ) , new javax.xml.transform.stream.StreamResult ( sw ) ) ; return sw.toString ( ) ; } catch ( javax.xml.transform.TransformerException e ) { log.error ( e , "Failed to write XML file" ) ; return null ; } }

Target:
static java.lang.String printXmlString ( @ com.android.annotations.NonNull org.w3c.dom.Document doc , @ com.android.annotations.NonNull com.android.manifmerger.IMergerLog log ) { try { javax.xml.transform.Transformer tf = javax.xml.transform.TransformerFactory.newInstance ( ) . newTransformer ( ) ; tf.setOutputProperty ( javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION , "yes" ) ; tf.setOutputProperty ( javax.xml.transform.OutputKeys.ENCODING , "UTF-8" ) ; tf.setOutputProperty ( javax.xml.transform.OutputKeys.INDENT , "yes" ) ; tf.setOutputProperty ( "{http://xml.apache.org/xslt}indent-amount" , "4" ) ; java.io.StringWriter sw = new java.io.StringWriter ( ) ; tf.transform ( new javax.xml.transform.dom.DOMSource ( doc ) , new javax.xml.transform.stream.StreamResult ( sw ) ) ; return sw.toString ( ) ; } catch ( javax.xml.transform.TransformerException e ) { log.error ( Severity.ERROR , new com.android.manifmerger.IMergerLog.FileAndLine ( com.android.manifmerger.XmlUtils.extractXmlFilename ( doc ) , 0 ) , "Failed to write XML file: %1$s" , e.toString ( ) ) ; return null ; } }
Source:
public void setTarget ( @ com.android.annotations.NonNull java.lang.String target ) { if ( target == null ) { throw new java.lang.RuntimeException ( "Compilation target not set!" ) ; } mTarget = mSdkParser.resolveTarget ( target , mLogger ) ; if ( ( mTarget ) == null ) { throw new java.lang.RuntimeException ( ( "Unknown target: " + target ) ) ; } }

Target:
public void setTarget ( @ com.android.annotations.NonNull java.lang.String target ) { com.google.common.base.Preconditions.checkNotNull ( target , "target cannot be null." ) ; mTarget = mSdkParser.resolveTarget ( target , mLogger ) ; if ( ( mTarget ) == null ) { throw new java.lang.RuntimeException ( ( "Unknown target: " + target ) ) ; } }
Source:
public static java.nio.LongBuffer wrap ( long [ ] array , int start , int longCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , longCount ) ; java.nio.LongBuffer buf = new java.nio.ReadWriteLongArrayBuffer ( array ) ; buf.position = start ; buf.limit = start + longCount ; return buf ; }

Target:
public static java.nio.LongBuffer wrap ( long [ ] array , int start , int longCount ) { java.util.Arrays.checkOffsetAndCount ( array.length , start , longCount ) ; java.nio.LongBuffer buf = new java.nio.LongArrayBuffer ( array ) ; buf.position = start ; buf.limit = start + longCount ; return buf ; }
Source:
public com.android.ims.ImsUtInterface getSupplementaryServiceConfiguration ( ) throws com.android.ims.ImsException { if ( ( ( mUt ) != null ) && ( mUt.isBinderAlive ( ) ) ) { return mUt ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsUt iUt = mMmTelFeatureConnection.getUtInterface ( ) ; if ( iUt == null ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , ImsReasonInfo.CODE_UT_NOT_SUPPORTED ) ; } mUt = new com.android.ims.ImsUt ( iUt ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , e , ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } return mUt ; }

Target:
public com.android.ims.ImsUtInterface getSupplementaryServiceConfiguration ( ) throws com.android.ims.ImsException { if ( ( ( mUt ) != null ) && ( mUt.isBinderAlive ( ) ) ) { return mUt ; } checkAndThrowExceptionIfServiceUnavailable ( ) ; try { com.android.ims.internal.IImsUt iUt = mMmTelFeatureConnection.getUtInterface ( ) ; if ( iUt == null ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , android.telephony.ims.ImsReasonInfo.CODE_UT_NOT_SUPPORTED ) ; } mUt = new com.android.ims.ImsUt ( iUt ) ; } catch ( android.os.RemoteException e ) { throw new com.android.ims.ImsException ( "getSupplementaryServiceConfiguration()" , e , android.telephony.ims.ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN ) ; } return mUt ; }
Source:
public void clearAppProfiles ( java.lang.String packageName ) throws com.android.internal.os.InstallerConnection.InstallerException { checkLock ( ) ; try { mInstalld.clearAppProfiles ( packageName ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }

Target:
public void rmdex ( java.lang.String codePath , java.lang.String instructionSet ) throws com.android.internal.os.InstallerConnection.InstallerException { com.android.server.pm.Installer.assertValidInstructionSet ( instructionSet ) ; if ( ! ( checkBeforeRemote ( ) ) ) return ; try { mInstalld.rmdex ( codePath , instructionSet ) ; } catch ( android.os.RemoteException | android.os.ServiceSpecificException e ) { throw new com.android.internal.os.InstallerConnection.InstallerException ( e.getMessage ( ) ) ; } }
Source:
public void registerFinalizer ( @ javax.annotation.Nonnull final java.lang.Runnable finalizer , @ javax.annotation.Nonnull java.lang.Object watched ) { assert ( thread ) != null ; synchronized ( referenceList ) { com.android.sched.util.FinalizerRunner.FinalizerReference reference = new com.android.sched.util.FinalizerRunner.FinalizerReference ( watched , queue , finalizer ) ; referenceList.add ( reference ) ; } }

Target:
public void registerFinalizer ( @ javax.annotation.Nonnull final java.lang.Runnable finalizer , @ javax.annotation.Nonnull java.lang.Object watched ) { synchronized ( referenceList ) { assert ! ( shutDown ) ; if ( ( thread ) == null ) { java.lang.Thread finalizerThread = new com.android.sched.util.FinalizerRunner.FinalizerThread ( name ) ; finalizerThread.setDaemon ( true ) ; thread = finalizerThread ; finalizerThread.start ( ) ; } com.android.sched.util.FinalizerRunner.FinalizerReference reference = new com.android.sched.util.FinalizerRunner.FinalizerReference ( watched , queue , finalizer ) ; referenceList.add ( reference ) ; } }
Source:
public void test_close ( ) throws java.io.IOException { f = new java.io.File ( java.lang.System.getProperty ( "user.home" ) , "output.tst" ) ; fos = new java.io.FileOutputStream ( f.getPath ( ) ) ; fos.close ( ) ; try { fos.write ( fileString.getBytes ( ) ) ; fail ( "Close test failed - wrote to closed stream" ) ; } catch ( java.io.IOException e ) { } }

Target:
public void test_close ( ) throws java.io.IOException { f = java.io.File.createTempFile ( "FileOutputStreamTest" , "tst" ) ; fos = new java.io.FileOutputStream ( f.getPath ( ) ) ; fos.close ( ) ; try { fos.write ( fileString.getBytes ( ) ) ; fail ( "Close test failed - wrote to closed stream" ) ; } catch ( java.io.IOException e ) { } }
Source:
private boolean releaseWakeLock ( java.lang.String lockName ) { synchronized ( this ) { if ( ( mWakeLock ) == null ) { errorLog ( ( "Repeated wake lock release; aborting release: " + lockName ) ) ; return false ; } mWakeLock.release ( ) ; mWakeLock = null ; mWakeLockName = null ; } return true ; }

Target:
private boolean acquireWakeLock ( java.lang.String lockName ) { synchronized ( this ) { if ( ( mWakeLock ) == null ) { mWakeLockName = lockName ; mWakeLock = mPowerManager.newWakeLock ( PowerManager.PARTIAL_WAKE_LOCK , lockName ) ; } if ( ! ( mWakeLock.isHeld ( ) ) ) mWakeLock.acquire ( ) ; } return true ; }
Source:
public static void write ( java.lang.CharSequence from , java.io.File to , java.nio.charset.Charset charset ) throws java.io.IOException { com.google.common.io.Files.write ( from , to , charset , false ) ; }

Target:
public static java.lang.String getNameWithoutExtension ( java.lang.String file ) { com.google.common.base.Preconditions.checkNotNull ( file ) ; java.lang.String fileName = new java.io.File ( file ) . getName ( ) ; int dotIndex = fileName.lastIndexOf ( '.' ) ; return dotIndex == ( - 1 ) ? fileName : fileName.substring ( 0 , dotIndex ) ; }
Source:
private void getIccCardStatusDone ( android.os.AsyncResult ar ) { if ( ( ar.exception ) != null ) { android.util.Log.e ( mLogTag , ( "Error getting ICC status. " + ( "RIL_REQUEST_GET_ICC_STATUS should " + "never return an error" ) ) , ar.exception ) ; return ; } handleIccCardStatus ( ( ( com.android.internal.telephony.IccCardStatus ) ( ar.result ) ) ) ; }

Target:
private void loge ( java.lang.String msg ) { android.util.Log.e ( mLogTag , ( "[IccCard] " + msg ) ) ; }
Source:
public void testWriteAndReadBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , null ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; }

Target:
public void testWriteAndReadBlob ( ) throws java.lang.Exception { com.android.ide.common.res2.ResourceMerger merger = com.android.ide.common.res2.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.google.common.io.Files.createTempDir ( ) ; merger.writeBlobTo ( folder , new com.android.ide.common.res2.MergedResourceWriter ( com.google.common.io.Files.createTempDir ( ) , mPngCruncher , false , false ) ) ; com.android.ide.common.res2.ResourceMerger loadedMerger = new com.android.ide.common.res2.ResourceMerger ( ) ; assertTrue ( loadedMerger.loadFromBlob ( folder , true ) ) ; }
Source:
public com.android.sched.vfs.InputOutputVFile getFile ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException { try { return getSectionVFS ( fileType ) . getRootInputOutputVDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) ; } catch ( com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.NoSuchFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } catch ( com.android.sched.util.file.CannotCreateFileException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }

Target:
public void delete ( @ javax.annotation.Nonnull com.android.jack.library.FileType fileType , @ javax.annotation.Nonnull com.android.sched.vfs.VPath typePath ) throws com.android.jack.library.FileTypeDoesNotExistException , com.android.sched.util.file.CannotDeleteFileException { assert ! ( isClosed ( ) ) ; try { getSectionVFS ( fileType ) . getRootInputOutputVDir ( ) . getInputVFile ( buildFileVPath ( fileType , typePath ) ) . delete ( ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.NoSuchFileException | com.android.sched.util.file.NotFileOrDirectoryException e ) { throw new com.android.jack.library.FileTypeDoesNotExistException ( getLocation ( ) , typePath , fileType ) ; } }
Source:
public boolean p2pServiceAdd ( android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo ) { if ( ( com.android.server.wifi.WifiNative.HIDL_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.serviceAdd ( servInfo ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { for ( java.lang.String s : servInfo.getSupplicantQueryList ( ) ) { java.lang.String command = "P2P_SERVICE_ADD" ; command += " " + s ; if ( ! ( doBooleanCommand ( command ) ) ) { return false ; } } } return true ; } }

Target:
public boolean p2pServiceAdd ( android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo ) { if ( ( com.android.server.wifi.WifiNative.HIDL_P2P_ENABLE ) && ( ( mSupplicantP2pIfaceHal ) != null ) ) { return mSupplicantP2pIfaceHal.serviceAdd ( servInfo ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { for ( java.lang.String s : servInfo.getSupplicantQueryList ( ) ) { java.lang.String command = "P2P_SERVICE_ADD" ; command += " " + s ; if ( ! ( doBooleanCommand ( command ) ) ) { return false ; } } } return true ; } }
Source:
private static double getDoubleAttribute ( @ com.android.annotations.NonNull com.android.tools.lint.client.api.JavaParser.ResolvedAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name , double defaultValue ) { java.lang.Object value = annotation.getValue ( name ) ; if ( value instanceof java.lang.Number ) { return ( ( java.lang.Number ) ( value ) ) . doubleValue ( ) ; } return defaultValue ; }

Target:
static double getDoubleAttribute ( @ com.android.annotations.NonNull com.intellij.psi.PsiAnnotation annotation , @ com.android.annotations.NonNull java.lang.String name , double defaultValue ) { java.lang.Double value = com.android.tools.lint.checks.PermissionRequirement.getAnnotationDoubleValue ( annotation , name ) ; if ( value != null ) { return value ; } return defaultValue ; }
Source:
public void testCallPhoneNumber ( ) { android.net.Uri uri = android.net.Uri.parse ( "tel:2125551212" ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_CALL , uri ) ; assertCanBeHandled ( intent ) ; }

Target:
public void testCallPhoneNumber ( ) { android.content.pm.PackageManager packageManager = mContext.getPackageManager ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { android.net.Uri uri = android.net.Uri.parse ( "tel:2125551212" ) ; android.content.Intent intent = new android.content.Intent ( android.content.Intent.ACTION_CALL , uri ) ; assertCanBeHandled ( intent ) ; } }
Source:
public static void checkWfcWifiOnlyModeBeforeDial ( com.android.internal.telephony.Phone imsPhone , android.content.Context context ) throws com.android.internal.telephony.CallStateException { if ( ( imsPhone == null ) || ( ! ( imsPhone.isWifiCallingEnabled ( ) ) ) ) { boolean wfcWiFiOnly = ( ( com.android.ims.ImsManager.isWfcEnabledByPlatform ( context ) ) && ( com.android.ims.ImsManager.isWfcEnabledByUser ( context ) ) ) && ( ( com.android.ims.ImsManager.getWfcMode ( context ) ) == ( ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY ) ) ; if ( wfcWiFiOnly ) { throw new com.android.internal.telephony.CallStateException ( CallStateException.ERROR_DISCONNECTED , "WFC Wi-Fi Only Mode: IMS not registered" ) ; } } }

Target:
public static void checkWfcWifiOnlyModeBeforeDial ( com.android.internal.telephony.Phone imsPhone , android.content.Context context ) throws com.android.internal.telephony.CallStateException { if ( ( imsPhone == null ) || ( ! ( imsPhone.isWifiCallingEnabled ( ) ) ) ) { boolean wfcWiFiOnly = ( ( com.android.ims.ImsManager.isWfcEnabledByPlatform ( context ) ) && ( com.android.ims.ImsManager.isWfcEnabledByUser ( context ) ) ) && ( ( com.android.ims.ImsManager.getWfcMode ( context ) ) == ( ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY ) ) ; if ( wfcWiFiOnly ) { throw new com.android.internal.telephony.CallStateException ( CallStateException.ERROR_OUT_OF_SERVICE , "WFC Wi-Fi Only Mode: IMS not registered" ) ; } } }