auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static boolean isAttributeValueLink ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( attribute == null ) { return false ; } if ( ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isClassAttribute ( context ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isActivity ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isService ( context ) ) ) { return true ; } java.lang.String value = attribute.getValue ( ) ; if ( value.startsWith ( "@+" ) ) { return false ; } com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resource = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.parseResource ( value ) ; if ( resource != null ) { com.android.resources.ResourceType type = resource.getFirst ( ) ; if ( type != null ) { return true ; } } return false ; }

Target:
private static boolean isAttributeValueLink ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( attribute == null ) { return false ; } if ( ( ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isClassAttribute ( context ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isOnClickAttribute ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isActivity ( context ) ) ) || ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.isService ( context ) ) ) { return true ; } java.lang.String value = attribute.getValue ( ) ; if ( value.startsWith ( "@+" ) ) { return false ; } com.android.util.Pair < com.android.resources.ResourceType , java.lang.String > resource = com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.parseResource ( value ) ; if ( resource != null ) { com.android.resources.ResourceType type = resource.getFirst ( ) ; if ( type != null ) { return true ; } } return false ; }
Source:
public final org.jf.dexlib2.iface.reference.FieldReference enum_literal ( ) throws org.jf.smali.RecognitionException { org.jf.dexlib2.iface.reference.FieldReference value = null ; org.jf.dexlib2.immutable.reference.ImmutableFieldReference field_reference210 = null ; try { { match ( input , org.jf.smali.smaliTreeWalker.I_ENCODED_ENUM , org.jf.smali.smaliTreeWalker.FOLLOW_I_ENCODED_ENUM_in_enum_literal3617 ) ; match ( input , Token.DOWN , null ) ; pushFollow ( org.jf.smali.smaliTreeWalker.FOLLOW_field_reference_in_enum_literal3619 ) ; field_reference210 = field_reference ( ) ; ( state._fsp ) -- ; match ( input , Token.UP , null ) ; value = field_reference210 ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final boolean bool_literal ( ) throws org.jf.smali.RecognitionException { boolean value = false ; org.antlr.runtime.tree.CommonTree BOOL_LITERAL212 = null ; try { { BOOL_LITERAL212 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.BOOL_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_BOOL_LITERAL_in_bool_literal3562 ) ) ) ; value = java.lang.Boolean.parseBoolean ( ( BOOL_LITERAL212 != null ? BOOL_LITERAL212.getText ( ) : null ) ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public java.util.Collection < V > get ( java.lang.Object key ) { return containsKey ( key ) ? multimap ( ) . get ( ( ( K ) ( key ) ) ) : null ; }

Target:
public static < K , V > java.util.Map < K , java.util.List < V > > asMap ( com.google.common.collect.ListMultimap < K , V > multimap ) { return ( ( java.util.Map < K , java.util.List < V > > ) ( ( java.util.Map < K , ? > ) ( multimap.asMap ( ) ) ) ) ; }
Source:
public java.lang.String getModuleReference ( ) { return ':' + ( getModuleName ( ) ) ; }

Target:
public java.lang.String getModuleReference ( ) { java.lang.String moduleName = getModuleName ( ) ; java.io.File file = new java.io.File ( moduleName ) ; java.lang.StringBuilder builder = new java.lang.StringBuilder ( ( ( moduleName.length ( ) ) + 1 ) ) ; while ( file != null ) { builder.insert ( 0 , file.getName ( ) ) ; builder.insert ( 0 , ':' ) ; file = file.getParentFile ( ) ; } return builder.toString ( ) ; }
Source:
void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection ) { android.telecom.Log.v ( this , "addExistingConnection: %s" , callId ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.addExistingConnection ( callId , connection ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void addExistingConnection ( java.lang.String callId , android.telecom.ParcelableConnection connection ) { android.telecom.Log.v ( this , "addExistingConnection: %s" , callId ) ; for ( com.android.internal.telecom.IConnectionServiceAdapter adapter : mAdapters ) { try { adapter.addExistingConnection ( callId , connection , android.telecom.Log.getExternalSession ( ) ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public boolean handleMessage ( android.os.Message msg ) { if ( ( msg.what ) == ( com.android.nfc.beam.BeamManager.MSG_BEAM_COMPLETE ) ) { synchronized ( mLock ) { mBeamInProgress = false ; } return true ; } return false ; }

Target:
public boolean handleMessage ( android.os.Message msg ) { if ( ( msg.what ) == ( com.android.nfc.beam.BeamManager.MSG_BEAM_COMPLETE ) ) { synchronized ( mLock ) { mBeamInProgress = false ; } boolean success = ( msg.arg1 ) == 1 ; if ( success ) { mNfcService.playSound ( NfcService.SOUND_END ) ; } return true ; } return false ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.v ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "onReceive" ) ; java.lang.String action = intent.getAction ( ) ; if ( action.equals ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ) { android.bluetooth.BluetoothDevice device = intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ; disconnect ( device ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { android.util.Log.v ( com.android.bluetooth.pbapclient.PbapClientService.TAG , "onReceive" ) ; java.lang.String action = intent.getAction ( ) ; if ( action.equals ( BluetoothDevice.ACTION_ACL_DISCONNECTED ) ) { android.bluetooth.BluetoothDevice device = intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ; if ( ( getConnectionState ( device ) ) != ( android.bluetooth.BluetoothProfile.STATE_DISCONNECTED ) ) { disconnect ( device ) ; } } else if ( action.equals ( Intent.ACTION_USER_UNLOCKED ) ) { mPbapClientStateMachine.resumeDownload ( ) ; } }
Source:
private boolean addLocalService ( android.os.Messenger m , android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo ) { clearClientDeadChannels ( ) ; com.android.server.wifi.p2p.WifiP2pServiceImpl.ClientInfo clientInfo = getClientInfo ( m , true ) ; if ( clientInfo == null ) { return false ; } if ( ! ( clientInfo.mServList.add ( servInfo ) ) ) { return false ; } if ( ! ( mWifiNative.p2pServiceAdd ( servInfo ) ) ) { clientInfo.mServList.remove ( servInfo ) ; return false ; } return true ; }

Target:
private void clearLocalServices ( android.os.Messenger m ) { com.android.server.wifi.p2p.WifiP2pServiceImpl.ClientInfo clientInfo = getClientInfo ( m , false ) ; if ( clientInfo == null ) { return ; } for ( android.net.wifi.p2p.nsd.WifiP2pServiceInfo servInfo : clientInfo.mServList ) { mWifiNative.p2pServiceDel ( servInfo ) ; } clientInfo.mServList.clear ( ) ; if ( ( clientInfo.mReqList.size ( ) ) == 0 ) { if ( com.android.server.wifi.p2p.WifiP2pServiceImpl.DBG ) logd ( "remove client information from framework" ) ; mClientInfoList.remove ( clientInfo.mMessenger ) ; } }
Source:
private static android.net.wifi.hotspot2.pps.Credential createCredential ( ) { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.realm = "realm" ; cred.userCredential = null ; cred.certCredential = null ; cred.simCredential = new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ; cred.simCredential.imsi = "1234*" ; cred.simCredential.eapType = android.net.wifi.EAPConstants.EAP_SIM ; cred.caCertificate = null ; cred.clientCertificateChain = null ; cred.clientPrivateKey = null ; return cred ; }

Target:
private static android.net.wifi.hotspot2.pps.Credential createCredential ( ) { android.net.wifi.hotspot2.pps.Credential cred = new android.net.wifi.hotspot2.pps.Credential ( ) ; cred.setRealm ( "realm" ) ; cred.setUserCredential ( null ) ; cred.setCertCredential ( null ) ; cred.setSimCredential ( new android.net.wifi.hotspot2.pps.Credential.SimCredential ( ) ) ; cred.getSimCredential ( ) . setImsi ( "1234*" ) ; cred.getSimCredential ( ) . setEapType ( EAPConstants.EAP_SIM ) ; cred.setCaCertificate ( null ) ; cred.setClientCertificateChain ( null ) ; cred.setClientPrivateKey ( null ) ; return cred ; }
Source:
public final short getShort ( ) { checkNotFreed ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.SHORT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } short result = this . block.peekShort ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }

Target:
public final short getShort ( ) { checkIsAccessible ( ) ; int newPosition = ( position ) + ( libcore.io.SizeOf.SHORT ) ; if ( newPosition > ( limit ) ) { throw new java.nio.BufferUnderflowException ( ) ; } short result = this . block.peekShort ( ( ( offset ) + ( position ) ) , order ) ; position = newPosition ; return result ; }
Source:
private void checkAndUpdate ( com.android.ide.eclipse.adt.internal.resources.ResourceType type ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType [ ] folderTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedFolders ( type ) ; for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType folderType : folderTypes ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > folders = mFolderMap.get ( folderType ) ; if ( folders != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder folder : folders ) { if ( folder.isTouched ( ) ) { com.android.ide.eclipse.adt.internal.resources.ResourceType [ ] resTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedResourceTypes ( folderType ) ; for ( com.android.ide.eclipse.adt.internal.resources.ResourceType resType : resTypes ) { update ( resType ) ; } return ; } } } } }

Target:
private void checkAndUpdate ( com.android.resources.ResourceType type ) { com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType [ ] folderTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedFolders ( type ) ; for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolderType folderType : folderTypes ) { java.util.List < com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder > folders = mFolderMap.get ( folderType ) ; if ( folders != null ) { for ( com.android.ide.eclipse.adt.internal.resources.manager.ResourceFolder folder : folders ) { if ( folder.isTouched ( ) ) { com.android.resources.ResourceType [ ] resTypes = com.android.ide.eclipse.adt.internal.resources.manager.FolderTypeRelationship.getRelatedResourceTypes ( folderType ) ; for ( com.android.resources.ResourceType resType : resTypes ) { update ( resType ) ; } return ; } } } } }
Source:
public void getIMSIForApp ( java.lang.String aid , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GET_IMSI , result ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeString ( aid ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> getIMSI: " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " aid: " ) + aid ) ) ; send ( rr ) ; }

Target:
public void getIMSIForApp ( java.lang.String aid , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_GET_IMSI , result , mRILDefaultWorkSource ) ; rr.mParcel.writeInt ( 1 ) ; rr.mParcel.writeString ( aid ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( ( ( rr.serialString ( ) ) + "> getIMSI: " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) + " aid: " ) + aid ) ) ; send ( rr ) ; }
Source:
public void run ( ) { try { mContext.setWallpaper ( mBitmap ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.cooliris.media.Photographs.LOG_TAG , "Failed to set wallpaper." , e ) ; } finally { mHandler.sendEmptyMessage ( com.cooliris.media.Photographs.FINISH ) ; mFile.delete ( ) ; } }

Target:
public void run ( ) { try { android.app.WallpaperManager.getInstance ( mContext ) . setBitmap ( mBitmap ) ; } catch ( java.io.IOException e ) { android.util.Log.e ( com.cooliris.media.Photographs.LOG_TAG , "Failed to set wallpaper." , e ) ; } finally { mHandler.sendEmptyMessage ( com.cooliris.media.Photographs.FINISH ) ; mFile.delete ( ) ; } }
Source:
public int compare ( org.w3c.dom.Attr attr1 , org.w3c.dom.Attr attr2 ) { if ( com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor.XMLNS.equals ( attr1.getPrefix ( ) ) ) { if ( com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor.XMLNS.equals ( attr2.getPrefix ( ) ) ) { return 0 ; } return - 1 ; } else if ( com.android.ide.eclipse.adt.internal.editors.descriptors.XmlnsAttributeDescriptor.XMLNS.equals ( attr2.getPrefix ( ) ) ) { return 1 ; } return attr1.getName ( ) . compareTo ( attr2.getName ( ) ) ; }

Target:
public int compare ( org.w3c.dom.Attr attr1 , org.w3c.dom.Attr attr2 ) { if ( com.android.util.XmlUtils.XMLNS.equals ( attr1.getPrefix ( ) ) ) { if ( com.android.util.XmlUtils.XMLNS.equals ( attr2.getPrefix ( ) ) ) { return 0 ; } return - 1 ; } else if ( com.android.util.XmlUtils.XMLNS.equals ( attr2.getPrefix ( ) ) ) { return 1 ; } return attr1.getName ( ) . compareTo ( attr2.getName ( ) ) ; }
Source:
protected java.lang.Object make ( java.lang.Object o ) { if ( o instanceof com.google.doclava.MethodDoc ) { return com.google.doclava.Converter.obtainMethod ( ( ( com.google.doclava.MethodDoc ) ( o ) ) ) ; } else if ( o instanceof com.google.doclava.ConstructorDoc ) { return com.google.doclava.Converter.obtainMethod ( ( ( com.google.doclava.ConstructorDoc ) ( o ) ) ) ; } else if ( o instanceof com.google.doclava.FieldDoc ) { return com.google.doclava.Converter.obtainField ( ( ( com.google.doclava.FieldDoc ) ( o ) ) ) ; } else { return null ; } }

Target:
protected java.lang.Object make ( java.lang.Object o ) { if ( o instanceof com.sun.javadoc.MethodDoc ) { return com.google.doclava.Converter.obtainMethod ( ( ( com.sun.javadoc.MethodDoc ) ( o ) ) ) ; } else if ( o instanceof com.sun.javadoc.ConstructorDoc ) { return com.google.doclava.Converter.obtainMethod ( ( ( com.sun.javadoc.ConstructorDoc ) ( o ) ) ) ; } else if ( o instanceof com.sun.javadoc.FieldDoc ) { return com.google.doclava.Converter.obtainField ( ( ( com.sun.javadoc.FieldDoc ) ( o ) ) ) ; } else { return null ; } }
Source:
protected void setUp ( ) throws java.lang.Exception { spf = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; parser = spf.newSAXParser ( ) ; assertNotNull ( parser ) ; tests.api.javax.xml.parsers.SAXParserTest.ns = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; tests.api.javax.xml.parsers.SAXParserTest.attr = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; tests.api.javax.xml.parsers.SAXParserTest.el = new java.util.Vector < java.lang.String > ( ) ; initFiles ( ) ; }

Target:
protected void setUp ( ) throws java.lang.Exception { spf = javax.xml.parsers.SAXParserFactory.newInstance ( ) ; parser = spf.newSAXParser ( ) ; assertNotNull ( parser ) ; org.apache.harmony.tests.javax.xml.parsers.SAXParserTest.ns = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.apache.harmony.tests.javax.xml.parsers.SAXParserTest.attr = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.apache.harmony.tests.javax.xml.parsers.SAXParserTest.el = new java.util.Vector < java.lang.String > ( ) ; initFiles ( ) ; }
Source:
public boolean zoomIn ( ) { mFactory.startYourEngines ( true ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return zoomIn ( ) ; } } ) ; return ret ; } return mAwContents.zoomIn ( ) ; }

Target:
public boolean performAccessibilityAction ( final int action , final android.os.Bundle arguments ) { mFactory.startYourEngines ( false ) ; if ( checkNeedsPost ( ) ) { boolean ret = runOnUiThreadBlocking ( new java.util.concurrent.Callable < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean call ( ) { return performAccessibilityAction ( action , arguments ) ; } } ) ; return ret ; } if ( mAwContents.supportsAccessibilityAction ( action ) ) { return mAwContents.performAccessibilityAction ( action , arguments ) ; } return mWebViewPrivate.super_performAccessibilityAction ( action , arguments ) ; }
Source:
public void surfaceChanged ( android.view.SurfaceHolder holder , int format , int width , int height ) { android.util.Log.i ( android.hardware.camera2.cts.Camera2SurfaceViewCtsActivity.TAG , ( ( ( "Surface Changed to: " + width ) + "x" ) + height ) ) ; currentWidth = width ; currentHeight = height ; surfaceChangedDone.open ( ) ; }

Target:
public void surfaceChanged ( android.view.SurfaceHolder holder , int format , int width , int height ) { android.util.Log.i ( android.hardware.camera2.cts.Camera2SurfaceViewCtsActivity.TAG , ( ( ( "Surface Changed to: " + width ) + "x" ) + height ) ) ; synchronized ( sizeLock ) { currentWidth = width ; currentHeight = height ; } surfaceChangedDone.open ( ) ; }
Source:
public void putAll ( java.util.Map < ? extends K , ? extends V > m ) { for ( java.util.Map.Entry < ? extends K , ? extends V > e : m.entrySet ( ) ) put ( e.getKey ( ) , e.getValue ( ) ) ; }

Target:
public void putAll ( java.util.Map < ? extends K , ? extends V > m ) { tryPresize ( m.size ( ) ) ; for ( java.util.Map.Entry < ? extends K , ? extends V > e : m.entrySet ( ) ) putVal ( e.getKey ( ) , e.getValue ( ) , false ) ; }
Source:
protected boolean isMultipart ( ) { java.util.HashMap < java.lang.String , java.lang.Object > map = mData ; return map.containsKey ( "parts" ) ; }

Target:
void writeSentMessage ( android.content.Context context ) { java.lang.String text = ( ( java.lang.String ) ( mData.get ( "text" ) ) ) ; if ( text != null ) { boolean deliveryReport = ( mDeliveryIntent ) != null ; mMessageUri = android.provider.Telephony.Sms.addMessageToUri ( context.getContentResolver ( ) , Telephony.Sms.Sent.CONTENT_URI , mDestAddress , text , null , mTimestamp , true , deliveryReport , 0 ) ; } }
Source:
public int dexopt ( java.lang.String apkPath , int uid , boolean isPublic , java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , boolean vmSafeMode , boolean debuggable , @ android.annotation.Nullable java.lang.String outputPath ) { return dexopt ( apkPath , uid , isPublic , pkgName , instructionSet , dexoptNeeded , vmSafeMode , debuggable , outputPath , true ) ; }

Target:
public int dexopt ( java.lang.String apkPath , int uid , java.lang.String pkgName , java.lang.String instructionSet , int dexoptNeeded , @ android.annotation.Nullable java.lang.String outputPath , int dexFlags ) { if ( ! ( com.android.server.pm.Installer.isValidInstructionSet ( instructionSet ) ) ) { android.util.Slog.e ( com.android.server.pm.Installer.TAG , ( "Invalid instruction set: " + instructionSet ) ) ; return - 1 ; } return mInstaller.dexopt ( apkPath , uid , pkgName , instructionSet , dexoptNeeded , outputPath , dexFlags ) ; }
Source:
private boolean addOrReplaceBlockNoDelete ( com.android.dx.cf.code.BasicBlock block , com.android.dx.util.IntList subroutines ) { if ( block == null ) { throw new java.lang.NullPointerException ( "block == null" ) ; } int idx = labelToResultIndex ( block.getLabel ( ) ) ; boolean ret ; if ( idx < 0 ) { ret = false ; } else { result.remove ( idx ) ; resultSubroutines.remove ( idx ) ; ret = true ; } result.add ( block ) ; subroutines.throwIfMutable ( ) ; resultSubroutines.add ( subroutines ) ; return ret ; }

Target:
private boolean addOrReplaceBlockNoDelete ( com.android.dx.rop.code.BasicBlock block , com.android.dx.util.IntList subroutines ) { if ( block == null ) { throw new java.lang.NullPointerException ( "block == null" ) ; } int idx = labelToResultIndex ( block.getLabel ( ) ) ; boolean ret ; if ( idx < 0 ) { ret = false ; } else { result.remove ( idx ) ; resultSubroutines.remove ( idx ) ; ret = true ; } result.add ( block ) ; subroutines.throwIfMutable ( ) ; resultSubroutines.add ( subroutines ) ; return ret ; }
Source:
public com.android.newbubble.NewBubble startBubble ( ) { if ( ! ( com.android.newbubble.NewBubble.canShowBubbles ( context ) ) ) { com.android.dialer.common.LogUtil.i ( "ReturnToCallController.startNewBubble" , "can't show bubble, no permission" ) ; return null ; } com.android.newbubble.NewBubble returnToCallBubble = com.android.newbubble.NewBubble.createBubble ( context , generateBubbleInfo ( ) ) ; returnToCallBubble.show ( ) ; return returnToCallBubble ; }

Target:
public com.android.newbubble.NewBubble startBubble ( ) { if ( ! ( com.android.incallui.NewReturnToCallController.canShowBubbles ( context ) ) ) { com.android.dialer.common.LogUtil.i ( "ReturnToCallController.startNewBubble" , "can't show bubble, no permission" ) ; return null ; } com.android.newbubble.NewBubble returnToCallBubble = com.android.newbubble.NewBubbleComponent.get ( context ) . getNewBubble ( ) ; returnToCallBubble.setBubbleInfo ( generateBubbleInfo ( ) ) ; returnToCallBubble.show ( ) ; return returnToCallBubble ; }
Source:
public void getRulesAuthTable ( android.telephony.euicc.EuiccCardManager.ResultCallback < android.telephony.euicc.EuiccRulesAuthTable > callback ) { try { getIEuiccCardController ( ) . getRulesAuthTable ( mContext.getOpPackageName ( ) , new com.android.internal.telephony.euicc.IGetRulesAuthTableCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , android.telephony.euicc.EuiccRulesAuthTable rat ) { callback.onComplete ( resultCode , rat ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getRulesAuthTable" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }

Target:
public void getRulesAuthTable ( java.lang.String cardId , android.telephony.euicc.EuiccCardManager.ResultCallback < android.telephony.euicc.EuiccRulesAuthTable > callback ) { try { getIEuiccCardController ( ) . getRulesAuthTable ( mContext.getOpPackageName ( ) , cardId , new com.android.internal.telephony.euicc.IGetRulesAuthTableCallback.Stub ( ) { @ java.lang.Override public void onComplete ( int resultCode , android.telephony.euicc.EuiccRulesAuthTable rat ) { callback.onComplete ( resultCode , rat ) ; } } ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.telephony.euicc.EuiccCardManager.TAG , "Error calling getRulesAuthTable" , e ) ; throw e.rethrowFromSystemServer ( ) ; } }
Source:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , int [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData3D ( int id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID ) ; }
Source:
private static void verfyBatteryLevelChangedIntent ( android.bluetooth.BluetoothDevice device , int batteryLevel , org.mockito.ArgumentCaptor < android.content.Intent > intentArgument ) { org.junit.Assert.assertEquals ( BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED , intentArgument.getValue ( ) . getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intentArgument.getValue ( ) . getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( batteryLevel , intentArgument.getValue ( ) . getIntExtra ( BluetoothDevice.EXTRA_BATTERY_LEVEL , ( - 15 ) ) ) ; org.junit.Assert.assertEquals ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT , intentArgument.getValue ( ) . getFlags ( ) ) ; }

Target:
private static void verifyBatteryLevelChangedIntent ( android.bluetooth.BluetoothDevice device , int batteryLevel , android.content.Intent intent ) { org.junit.Assert.assertEquals ( BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED , intent.getAction ( ) ) ; org.junit.Assert.assertEquals ( device , intent.getParcelableExtra ( BluetoothDevice.EXTRA_DEVICE ) ) ; org.junit.Assert.assertEquals ( batteryLevel , intent.getIntExtra ( BluetoothDevice.EXTRA_BATTERY_LEVEL , ( - 15 ) ) ) ; org.junit.Assert.assertEquals ( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT , intent.getFlags ( ) ) ; }
Source:
public boolean containsAll ( java.util.Collection < ? > c ) { java.lang.Object [ ] elements = getArray ( ) ; int len = elements.length ; for ( java.lang.Object e : c ) { if ( ( java.util.concurrent.CopyOnWriteArrayList.indexOf ( e , elements , 0 , len ) ) < 0 ) return false ; } return true ; }

Target:
public synchronized boolean remove ( java.lang.Object o ) { int index = indexOf ( o ) ; if ( index == ( - 1 ) ) { return false ; } remove ( index ) ; return true ; }
Source:
public boolean createBondOutOfBand ( android.bluetooth.BluetoothDevice device , int transport , android.bluetooth.OobData oobData ) { if ( ! ( com.android.bluetooth.Utils.checkCaller ( ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "createBondOutOfBand() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.createBond ( device , transport , oobData ) ; }

Target:
public boolean createBondOutOfBand ( android.bluetooth.BluetoothDevice device , int transport , android.bluetooth.OobData oobData ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "createBondOutOfBand() - Not allowed for non-active user" ) ; return false ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return false ; return service.createBond ( device , transport , oobData ) ; }
Source:
android.telecom.cts.MockConnection verifyConnectionForOutgoingCall ( int connectionIndex ) { try { if ( ! ( connectionService.lock.tryAcquire ( TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ) { fail ( "No outgoing call connection requested by Telecom" ) ; } } catch ( java.lang.InterruptedException e ) { android.util.Log.i ( android.telecom.cts.TAG , "Test interrupted!" ) ; } org.junit.Assert.assertThat ( "Telecom should create outgoing connection for outgoing call" , connectionService.outgoingConnections.size ( ) , org.hamcrest.CoreMatchers.not ( org.hamcrest.CoreMatchers.equalTo ( 0 ) ) ) ; android.telecom.cts.MockConnection connection = connectionService.outgoingConnections.get ( connectionIndex ) ; return connection ; }

Target:
android.telecom.cts.MockConnection verifyConnectionForIncomingCall ( int connectionIndex ) { try { if ( ! ( connectionService.lock.tryAcquire ( TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS , java.util.concurrent.TimeUnit.MILLISECONDS ) ) ) { fail ( "No outgoing call connection requested by Telecom" ) ; } } catch ( java.lang.InterruptedException e ) { android.util.Log.i ( android.telecom.cts.TestUtils.TAG , "Test interrupted!" ) ; } org.junit.Assert.assertThat ( "Telecom should create incoming connections for incoming calls" , connectionService.incomingConnections.size ( ) , org.hamcrest.CoreMatchers.not ( org.hamcrest.CoreMatchers.equalTo ( 0 ) ) ) ; android.telecom.cts.MockConnection connection = connectionService.incomingConnections.get ( connectionIndex ) ; setAndVerifyConnectionForIncomingCall ( connection ) ; return connection ; }
Source:
protected boolean cleanup ( ) { if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , "cleanup()" ) ; cleanupNative ( ) ; if ( ( mAdvertiseManager ) != null ) mAdvertiseManager.cleanup ( ) ; if ( ( mScanManager ) != null ) mScanManager.cleanup ( ) ; return true ; }

Target:
protected boolean cleanup ( ) { if ( com.android.bluetooth.gatt.GattService.DBG ) android.util.Log.d ( com.android.bluetooth.gatt.GattService.TAG , "cleanup()" ) ; cleanupNative ( ) ; if ( ( mAdvertiseManager ) != null ) mAdvertiseManager.cleanup ( ) ; if ( ( mScanManager ) != null ) mScanManager.cleanup ( ) ; if ( ( mPeriodicScanManager ) != null ) mPeriodicScanManager.cleanup ( ) ; return true ; }
Source:
public void setComment ( java.lang.String comment ) { if ( comment == null ) { this . comment = null ; return ; } byte [ ] commentBytes = comment.getBytes ( Charsets.UTF_8 ) ; if ( ( commentBytes.length ) > 65535 ) { throw new java.lang.IllegalArgumentException ( ( "Comment too long: " + ( commentBytes.length ) ) ) ; } this . comment = comment ; }

Target:
public void setComment ( java.lang.String comment ) { if ( comment == null ) { this . comment = null ; return ; } byte [ ] commentBytes = comment.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; if ( ( commentBytes.length ) > 65535 ) { throw new java.lang.IllegalArgumentException ( ( "Comment too long: " + ( commentBytes.length ) ) ) ; } this . comment = comment ; }
Source:
public void setDeviceTimeZone ( java.lang.String zoneId ) { android.app.AlarmManager alarm = ( ( android.app.AlarmManager ) ( mContext.getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarm.setTimeZone ( zoneId ) ; android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_NETWORK_SET_TIMEZONE ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time-zone" , zoneId ) ; mContext.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }

Target:
static void setDeviceTimeZoneStatic ( android.content.Context context , java.lang.String zoneId ) { android.app.AlarmManager alarmManager = ( ( android.app.AlarmManager ) ( context.getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarmManager.setTimeZone ( zoneId ) ; android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_NETWORK_SET_TIMEZONE ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time-zone" , zoneId ) ; context.sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; }
Source:
private static void renumProviders ( ) { java.security.Provider [ ] p = org.apache.harmony.security.fortress.Services.getProviders ( ) ; for ( int i = 0 ; i < ( p.length ) ; i ++ ) { p [ i ] . setProviderNumber ( ( i + 1 ) ) ; } }

Target:
private static void renumProviders ( ) { java.util.ArrayList < java.security.Provider > providers = org.apache.harmony.security.fortress.Services.getProviders ( ) ; for ( int i = 0 ; i < ( providers.size ( ) ) ; i ++ ) { providers.get ( i ) . setProviderNumber ( ( i + 1 ) ) ; } }
Source:
public static boolean isValidTransport ( int transportType ) { return ( ( android.net.NetworkCapabilities.MIN_TRANSPORT ) <= transportType ) && ( transportType <= ( android.net.NetworkCapabilities.MAX_TRANSPORT ) ) ; }

Target:
public android.net.NetworkCapabilities addTransportType ( int transportType ) { if ( ( transportType < ( android.net.NetworkCapabilities.MIN_TRANSPORT ) ) || ( transportType > ( android.net.NetworkCapabilities.MAX_TRANSPORT ) ) ) { throw new java.lang.IllegalArgumentException ( "TransportType out of range" ) ; } mTransportTypes |= 1 << transportType ; setNetworkSpecifier ( mNetworkSpecifier ) ; return this ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; final com.android.internal.app.AlertController.AlertParams p = mAlertParams ; p.mIconId = android.R.drawable.ic_dialog_alert ; p.mTitle = getString ( R.string.bt_enable_title ) ; p.mView = createView ( ) ; p.mPositiveButtonText = getString ( R.string.bt_enable_ok ) ; p.mPositiveButtonListener = this ; p.mNegativeButtonText = getString ( R.string.bt_enable_cancel ) ; p.mNegativeButtonListener = this ; setupAlert ( ) ; }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; final com.android.internal.app.AlertController.AlertParams p = mAlertParams ; p.mIconAttrId = android.R.attr.alertDialogIcon ; p.mTitle = getString ( R.string.bt_enable_title ) ; p.mView = createView ( ) ; p.mPositiveButtonText = getString ( R.string.bt_enable_ok ) ; p.mPositiveButtonListener = this ; p.mNegativeButtonText = getString ( R.string.bt_enable_cancel ) ; p.mNegativeButtonListener = this ; setupAlert ( ) ; }
Source:
public java.util.Set < java.io.File > getCompileClasspath ( ) { java.util.Set < java.io.File > classpath = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.android.builder.dependency.LibraryDependency lib : mFlatLibraries ) { classpath.add ( lib.getJarFile ( ) ) ; for ( com.android.builder.dependency.JarDependency jarDependency : lib.getLocalDependencies ( ) ) { classpath.add ( jarDependency.getJarFile ( ) ) ; } } for ( com.android.builder.dependency.JarDependency jar : mJars ) { if ( jar.isCompiled ( ) ) { classpath.add ( jar.getJarFile ( ) ) ; } } return classpath ; }

Target:
public java.util.Set < java.io.File > getCompileClasspath ( ) { java.util.Set < java.io.File > classpath = com.google.common.collect.Sets.newHashSet ( ) ; for ( com.android.builder.dependency.LibraryDependency lib : mFlatLibraries ) { classpath.add ( lib.getJarFile ( ) ) ; for ( java.io.File jarFile : lib.getLocalJars ( ) ) { classpath.add ( jarFile ) ; } } for ( com.android.builder.dependency.JarDependency jar : mJars ) { if ( jar.isCompiled ( ) ) { classpath.add ( jar.getJarFile ( ) ) ; } } return classpath ; }
Source:
public final void init ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { initialized = false ; javax.crypto.Cipher.checkOpmode ( opmode ) ; if ( ( spi ) != null ) { checkCryptoPerm ( spi , key , params ) ; spi.engineInit ( opmode , key , params , random ) ; } else { chooseProvider ( javax.crypto.Cipher.I_PARAMSPEC , opmode , key , params , null , random ) ; } initialized = true ; this . opmode = opmode ; }

Target:
public final void init ( int opmode , java.security.Key key , java.security.spec.AlgorithmParameterSpec params , java.security.SecureRandom random ) throws java.security.InvalidAlgorithmParameterException , java.security.InvalidKeyException { initialized = false ; javax.crypto.Cipher.checkOpmode ( opmode ) ; if ( ( spi ) != null ) { spi.engineInit ( opmode , key , params , random ) ; } else { chooseProvider ( javax.crypto.Cipher.InitType.ALGORITHM_PARAM_SPEC , opmode , key , params , null , random ) ; } initialized = true ; this . opmode = opmode ; }
Source:
public java.lang.Object getService ( android.app.ContextImpl ctx ) { android.view.Display display = ctx.mDisplay ; if ( display == null ) { android.hardware.display.DisplayManager dm = ( ( android.hardware.display.DisplayManager ) ( ctx.getOuterContext ( ) . getSystemService ( Context.DISPLAY_SERVICE ) ) ) ; display = dm.getDisplay ( Display.DEFAULT_DISPLAY ) ; } return new android.view.WindowManagerImpl ( display ) ; }

Target:
public java.lang.Object getService ( android.app.ContextImpl ctx ) { android.view.Display display = ctx.mDisplay ; if ( display == null ) { if ( ( mDefaultDisplay ) == null ) { android.hardware.display.DisplayManager dm = ( ( android.hardware.display.DisplayManager ) ( ctx.getOuterContext ( ) . getSystemService ( Context.DISPLAY_SERVICE ) ) ) ; mDefaultDisplay = dm.getDisplay ( Display.DEFAULT_DISPLAY ) ; } display = mDefaultDisplay ; } return new android.view.WindowManagerImpl ( display ) ; }
Source:
public void testAesCbcHmacSha1Tcp4UdpEncap ( ) 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_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesCbcHmacSha512Udp4 ( ) 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_SHA512 , android.net.cts.IpSecManagerTest.getKey ( 512 ) , 256 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
private com.android.jack.ir.ast.JDefinedClass initializeSyntheticClass ( @ javax.annotation.Nonnull java.lang.String syntheticClassFullName ) { com.android.jack.ir.ast.JDefinedClass syntheticSwitchmapClass = createSyntheticClass ( syntheticClassFullName ) ; syntheticSwitchmapClass.setSuperClass ( supportUtil.getObjectType ( ) ) ; syntheticSwitchmapClass.setExternal ( false ) ; com.android.jack.Jack.getSession ( ) . addTypeToEmit ( syntheticSwitchmapClass ) ; if ( ( supportUtil.getLookup ( ) . getClass ( syntheticClassFullName ) ) != syntheticSwitchmapClass ) { throw new java.lang.AssertionError ( ( "Existed synthetic switch map class doesn't match with: " + syntheticSwitchmapClass ) ) ; } return syntheticSwitchmapClass ; }

Target:
private com.android.jack.ir.ast.JDefinedClass initializeSyntheticClass ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JPackage enclosingPackage , @ javax.annotation.Nonnull java.lang.String syntheticClassShortName ) { com.android.jack.ir.ast.JDefinedClass syntheticSwitchmapClass = new com.android.jack.ir.ast.JDefinedClass ( com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN , syntheticClassShortName , ( ( ( com.android.jack.ir.ast.JModifier.PUBLIC ) | ( com.android.jack.ir.ast.JModifier.FINAL ) ) | ( com.android.jack.ir.ast.JModifier.SYNTHETIC ) ) , enclosingPackage , com.android.jack.load.NopClassOrInterfaceLoader.INSTANCE ) ; syntheticSwitchmapClass.setSuperClass ( supportUtil.getObjectType ( ) ) ; syntheticSwitchmapClass.setExternal ( false ) ; session.addTypeToEmit ( syntheticSwitchmapClass ) ; return syntheticSwitchmapClass ; }
Source:
private void addClassLink ( org.eclipse.swt.custom.StyledText styledText , java.lang.String link ) { java.lang.String s = styledText.getText ( ) ; int start = ( s == null ) ? 0 : s.length ( ) ; styledText.append ( link ) ; org.eclipse.swt.custom.StyleRange sr = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.ClassLinkStyleRange ( ) ; sr.start = start ; sr.length = link.length ( ) ; sr.fontStyle = org.eclipse.swt.SWT.NORMAL ; sr.underlineStyle = org.eclipse.swt.SWT.UNDERLINE_LINK ; sr.underline = true ; styledText.setStyleRange ( sr ) ; }

Target:
private void addActionLink ( org.eclipse.swt.custom.StyledText styledText , java.lang.String fqcn , int action , java.lang.String label ) { java.lang.String s = styledText.getText ( ) ; int start = ( s == null ) ? 0 : s.length ( ) ; styledText.append ( label ) ; org.eclipse.swt.custom.StyleRange sr = new com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.ActionLinkStyleRange ( action , fqcn ) ; sr.start = start ; sr.length = label.length ( ) ; sr.fontStyle = org.eclipse.swt.SWT.NORMAL ; sr.underlineStyle = org.eclipse.swt.SWT.UNDERLINE_LINK ; sr.underline = true ; styledText.setStyleRange ( sr ) ; }
Source:
public void configureWifiChange ( int rssiSampleSize , int lostApSampleSize , int unchangedSampleSize , int minApsBreachingThreshold , int periodInMs , android.net.wifi.WifiScanner.BssidInfo [ ] bssidInfos ) { validateChannel ( ) ; android.net.wifi.WifiScanner.WifiChangeSettings settings = new android.net.wifi.WifiScanner.WifiChangeSettings ( ) ; settings.rssiSampleSize = rssiSampleSize ; settings.lostApSampleSize = lostApSampleSize ; settings.unchangedSampleSize = unchangedSampleSize ; settings.minApsBreachingThreshold = minApsBreachingThreshold ; settings.periodInMs = periodInMs ; settings.bssidInfos = bssidInfos ; configureWifiChange ( settings ) ; }

Target:
public void configureWifiChange ( int rssiSampleSize , int lostApSampleSize , int unchangedSampleSize , int minApsBreachingThreshold , int periodInMs , android.net.wifi.WifiScanner.BssidInfo [ ] bssidInfos ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
private com.android.internal.telephony.gsm.stk.Item getSelectedItem ( int position ) { com.android.internal.telephony.gsm.stk.Item item = null ; if ( ( mStkMenu ) != null ) { try { item = mStkMenu.items.get ( position ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { if ( StkApp.DBG ) { com.android.internal.telephony.gsm.stk.StkLog.d ( this , "Invalid menu" ) ; } } catch ( java.lang.NullPointerException e ) { if ( StkApp.DBG ) { com.android.internal.telephony.gsm.stk.StkLog.d ( this , "Invalid menu" ) ; } } } return item ; }

Target:
private com.android.internal.telephony.cat.Item getSelectedItem ( int position ) { com.android.internal.telephony.cat.Item item = null ; if ( ( mStkMenu ) != null ) { try { item = mStkMenu.items.get ( position ) ; } catch ( java.lang.IndexOutOfBoundsException e ) { if ( StkApp.DBG ) { com.android.internal.telephony.cat.CatLog.d ( this , "Invalid menu" ) ; } } catch ( java.lang.NullPointerException e ) { if ( StkApp.DBG ) { com.android.internal.telephony.cat.CatLog.d ( this , "Invalid menu" ) ; } } } return item ; }
Source:
public void testStageInstallWithErrorCode_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { libcore.tzdata.shared2.TimeZoneDistro distro1 = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( distro1.getBytes ( ) ) ) ; assertInstallDistroStaged ( distro1 ) ; libcore.tzdata.shared2.TimeZoneDistro distro2 = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.stageInstallWithErrorCode ( distro2.getBytes ( ) ) ) ; assertInstallDistroStaged ( distro1 ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_unsuccessfulFollowOnUpdate_olderVersion ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro distro1 = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 2 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( distro1.getBytes ( ) ) ) ; assertInstallDistroStaged ( distro1 ) ; com.android.timezone.distro.TimeZoneDistro distro2 = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.OLDER_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_RULES_TOO_OLD , installer.stageInstallWithErrorCode ( distro2.getBytes ( ) ) ) ; assertInstallDistroStaged ( distro1 ) ; assertNoInstalledDistro ( ) ; }
Source:
public java.lang.String getHttpMethod ( com.google.gct.idea.appengine.validation.PsiMethod psiMethod ) { com.google.gct.idea.appengine.validation.PsiModifierList modifierList = psiMethod.getModifierList ( ) ; java.lang.String httpMethod = null ; for ( com.google.gct.idea.appengine.validation.PsiAnnotation annotation : modifierList.getAnnotations ( ) ) { try { httpMethod = getAttributeFromAnnotation ( annotation , GctConstants.APP_ENGINE_ANNOTATION_API_METHOD , "httpMethod" ) ; } catch ( com.google.gct.idea.appengine.validation.InvalidAnnotationException e ) { } catch ( com.google.gct.idea.appengine.validation.MissingAttributeException e ) { break ; } if ( httpMethod != null ) { if ( ! ( httpMethod.isEmpty ( ) ) ) { return httpMethod ; } } } return getDefaultHttpMethod ( psiMethod ) ; }

Target:
public java.lang.String getHttpMethod ( com.google.gct.idea.appengine.validation.PsiMethod psiMethod ) { com.google.gct.idea.appengine.validation.PsiModifierList modifierList = psiMethod.getModifierList ( ) ; java.lang.String httpMethod = null ; for ( com.google.gct.idea.appengine.validation.PsiAnnotation annotation : modifierList.getAnnotations ( ) ) { try { httpMethod = getAttributeFromAnnotation ( annotation , GctConstants.APP_ENGINE_ANNOTATION_API_METHOD , "httpMethod" ) ; } catch ( com.google.gct.idea.appengine.validation.InvalidAnnotationException e ) { } catch ( com.google.gct.idea.appengine.validation.MissingAttributeException e ) { break ; } if ( httpMethod != null ) { if ( ! ( httpMethod.isEmpty ( ) ) ) { return httpMethod ; } } } return getDefaultRestMethod ( psiMethod ) . getHttpMethod ( ) ; }
Source:
private int getMaxLabel ( com.android.jack.cfg.ControlFlowGraph cfg ) { int maxLabel = - 1 ; for ( com.android.jack.cfg.BasicBlock bb : cfg.getNodes ( ) ) { int bbId = bb.getId ( ) ; if ( bbId > maxLabel ) { maxLabel = bbId ; } } maxLabel ++ ; return maxLabel ; }

Target:
private int getBlockId ( @ javax.annotation.Nonnull com.android.jack.ir.ast.cfg.JBasicBlock block ) { if ( block == entryBasicBlock ) { return 0 ; } if ( block == exitBasicBlock ) { return java.lang.Integer.MAX_VALUE ; } return basicBlocks.get ( block ) . intValue ( ) ; }
Source:
boolean acceptIncomingConnect ( android.bluetooth.BluetoothDevice device ) { return false ; }

Target:
boolean stopVoiceRecognition ( android.bluetooth.BluetoothDevice device ) { enforceCallingOrSelfPermission ( com.android.bluetooth.hfp.BLUETOOTH_PERM , "Need BLUETOOTH permission" ) ; synchronized ( mStateMachines ) { final com.android.bluetooth.hfp.HeadsetStateMachine stateMachine = mStateMachines.get ( device ) ; if ( stateMachine == null ) { return false ; } int connectionState = stateMachine.getConnectionState ( ) ; if ( ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTED ) ) && ( connectionState != ( android.bluetooth.BluetoothProfile.STATE_CONNECTING ) ) ) { return false ; } mVoiceRecognitionStarted = false ; stateMachine.sendMessage ( HeadsetStateMachine.VOICE_RECOGNITION_STOP , device ) ; } return true ; }