auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public boolean enterIfInterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard , long time , java.util.concurrent.TimeUnit unit ) throws java.lang.InterruptedException { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( lock.tryLock ( time , unit ) ) ) { return false ; } boolean satisfied = false ; try { satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } return satisfied ; }

Target:
public boolean enterIfInterruptibly ( com.google.common.util.concurrent.Monitor.Guard guard , long time , java.util.concurrent.TimeUnit unit ) throws java.lang.InterruptedException { if ( ( guard.monitor ) != ( this ) ) { throw new java.lang.IllegalMonitorStateException ( ) ; } final java.util.concurrent.locks.ReentrantLock lock = this . lock ; if ( ! ( lock.tryLock ( time , unit ) ) ) { return false ; } boolean satisfied = false ; try { return satisfied = guard.isSatisfied ( ) ; } finally { if ( ! satisfied ) { lock.unlock ( ) ; } } }
Source:
public synchronized boolean enable ( boolean quietMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; if ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_BLUETOOTH , UserHandle.SYSTEM ) ) { debugLog ( "enable() called when Bluetooth was disallowed" ) ; return false ; } debugLog ( ( "enable() - Enable called with quiet mode status = " + ( mQuietmode ) ) ) ; mQuietmode = quietMode ; android.os.Message m = mAdapterStateMachine.obtainMessage ( AdapterState.BLE_TURN_ON ) ; mAdapterStateMachine.sendMessage ( m ) ; mBluetoothStartTime = java.lang.System.currentTimeMillis ( ) ; return true ; }

Target:
public synchronized boolean enable ( boolean quietMode ) { enforceCallingOrSelfPermission ( com.android.bluetooth.btservice.AdapterService.BLUETOOTH_ADMIN_PERM , "Need BLUETOOTH ADMIN permission" ) ; if ( mUserManager.hasUserRestriction ( UserManager.DISALLOW_BLUETOOTH , UserHandle.SYSTEM ) ) { debugLog ( "enable() called when Bluetooth was disallowed" ) ; return false ; } debugLog ( ( "enable() - Enable called with quiet mode status = " + quietMode ) ) ; mQuietmode = quietMode ; android.os.Message m = mAdapterStateMachine.obtainMessage ( AdapterState.BLE_TURN_ON ) ; mAdapterStateMachine.sendMessage ( m ) ; mBluetoothStartTime = java.lang.System.currentTimeMillis ( ) ; return true ; }
Source:
public static void computeRadians ( android.renderscript.cts.TestRadians.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 3 , 3 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inValue ) ; android.renderscript.cts.Target.Floaty k = t.new32 ( ( ( float ) ( ( java.lang.Math.PI ) / 180.0 ) ) ) ; args.out = t.multiply ( in , k ) ; }

Target:
public static void computeRadians ( android.renderscript.cts.TestRadians.ArgumentsFloatFloat args , android.renderscript.cts.Target t ) { t.setPrecision ( 3 , 3 , false ) ; android.renderscript.cts.Target.Floaty in = t.new32 ( args.inV ) ; android.renderscript.cts.Target.Floaty k = t.new32 ( ( ( float ) ( ( java.lang.Math.PI ) / 180.0 ) ) ) ; args.out = t.multiply ( in , k ) ; }
Source:
public void populateModuleExtraModels ( @ org.jetbrains.annotations.NotNull org.gradle.tooling.model.idea.IdeaModule gradleModule , @ org.jetbrains.annotations.NotNull com.intellij.openapi.externalSystem.model.DataNode < com.intellij.openapi.externalSystem.model.project.ModuleData > ideModule ) { if ( ! ( org.jetbrains.plugins.gradle.integrations.scala.ScalaGradleProjectResolverExtension.scalaPluginPresent ) ) return ; org.jetbrains.plugins.gradle.model.ScalaModel scalaModel = resolverCtx.getExtraProject ( gradleModule , org.jetbrains.plugins.gradle.model.ScalaModel.class ) ; if ( scalaModel != null ) { org.jetbrains.plugins.gradle.model.data.ScalaModelData scalaModelData = org.jetbrains.plugins.gradle.integrations.scala.ScalaGradleProjectResolverExtension.create ( scalaModel ) ; ideModule.createChild ( ScalaModelData.KEY , scalaModelData ) ; } nextResolver.populateModuleExtraModels ( gradleModule , ideModule ) ; }

Target:
public void populateModuleExtraModels ( @ org.jetbrains.annotations.NotNull org.gradle.tooling.model.idea.IdeaModule gradleModule , @ org.jetbrains.annotations.NotNull com.intellij.openapi.externalSystem.model.DataNode < com.intellij.openapi.externalSystem.model.project.ModuleData > ideModule ) { org.jetbrains.plugins.gradle.model.ScalaModel scalaModel = resolverCtx.getExtraProject ( gradleModule , org.jetbrains.plugins.gradle.model.ScalaModel.class ) ; if ( scalaModel != null ) { org.jetbrains.plugins.gradle.model.data.ScalaModelData scalaModelData = org.jetbrains.plugins.gradle.integrations.scala.ScalaGradleProjectResolverExtension.create ( scalaModel ) ; ideModule.createChild ( ScalaModelData.KEY , scalaModelData ) ; } nextResolver.populateModuleExtraModels ( gradleModule , ideModule ) ; }
Source:
public void test_setTrafficClassI ( ) throws java.lang.Exception { int IPTOS_LOWCOST = 2 ; int IPTOS_THROUGHPUT = 8 ; java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( 0 ) ; try { theSocket.setTrafficClass ( 256 ) ; fail ( "No exception when traffic class set to 256" ) ; } catch ( java.lang.IllegalArgumentException e ) { } try { theSocket.setTrafficClass ( ( - 1 ) ) ; fail ( "No exception when traffic class set to -1" ) ; } catch ( java.lang.IllegalArgumentException e ) { } theSocket.setTrafficClass ( IPTOS_LOWCOST ) ; theSocket.setTrafficClass ( IPTOS_THROUGHPUT ) ; }

Target:
public void test_setTrafficClassI ( ) throws java.lang.Exception { int IPTOS_LOWCOST = 2 ; int IPTOS_THROUGHPUT = 8 ; try ( java.net.DatagramSocket theSocket = new java.net.DatagramSocket ( 0 ) ) { try { theSocket.setTrafficClass ( 256 ) ; fail ( "No exception when traffic class set to 256" ) ; } catch ( java.lang.IllegalArgumentException e ) { } try { theSocket.setTrafficClass ( ( - 1 ) ) ; fail ( "No exception when traffic class set to -1" ) ; } catch ( java.lang.IllegalArgumentException e ) { } theSocket.setTrafficClass ( IPTOS_LOWCOST ) ; theSocket.setTrafficClass ( IPTOS_THROUGHPUT ) ; } }
Source:
public void copyFrom ( android.renderscript.Allocation a ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ! ( mType.equals ( a.getType ( ) ) ) ) { throw new android.renderscript.RSIllegalArgumentException ( "Types of allocations must match." ) ; } copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , a , 0 , 0 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( android.renderscript.Allocation a ) { try { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ! ( mType.equals ( a.getType ( ) ) ) ) { throw new android.renderscript.RSIllegalArgumentException ( "Types of allocations must match." ) ; } copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , a , 0 , 0 ) ; } finally { android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; } }
Source:
public final void activityResumed ( android.os.IBinder token ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; synchronized ( this ) { com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; if ( stack != null ) { com.android.server.am.ActivityRecord.activityResumedLocked ( token ) ; } } android.os.Binder.restoreCallingIdentity ( origId ) ; }

Target:
public final void activityResumed ( android.os.IBinder token ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; synchronized ( this ) { com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; if ( stack != null ) { stack.activityResumedLocked ( token ) ; } } android.os.Binder.restoreCallingIdentity ( origId ) ; }
Source:
private static javax.net.ssl.X509ExtendedTrustManager findFirstX509TrustManager ( javax.net.ssl.TrustManager [ ] tms ) { for ( javax.net.ssl.TrustManager tm : tms ) { if ( tm instanceof javax.net.ssl.X509ExtendedTrustManager ) { return ( ( javax.net.ssl.X509ExtendedTrustManager ) ( tm ) ) ; } if ( tm instanceof javax.net.ssl.X509TrustManager ) { return new org.conscrypt.X509ExtendedTrustManagerWrapper ( ( ( javax.net.ssl.X509TrustManager ) ( tm ) ) ) ; } } return null ; }

Target:
private static javax.net.ssl.X509TrustManager findFirstX509TrustManager ( javax.net.ssl.TrustManager [ ] tms ) { for ( javax.net.ssl.TrustManager tm : tms ) { if ( tm instanceof javax.net.ssl.X509TrustManager ) { return ( ( javax.net.ssl.X509TrustManager ) ( tm ) ) ; } } return null ; }
Source:
public java.nio.ByteBuffer putDouble ( double x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putDouble ( ix ( nextPutIndex ( SizeOf.DOUBLE ) ) , x ) ; return this ; }

Target:
public final java.nio.ByteBuffer putDouble ( double x ) { if ( isReadOnly ) { throw new java.nio.ReadOnlyBufferException ( ) ; } if ( ! ( memoryRef.isAccessible ) ) { throw new java.lang.IllegalStateException ( "buffer is inaccessible" ) ; } putDouble ( ix ( nextPutIndex ( SizeOf.DOUBLE ) ) , x ) ; return this ; }
Source:
public int hashCode ( ) { if ( ( myhash ) == ( - 1 ) ) { myhash = 37 + ( party.hashCode ( ) ) ; if ( ( assigner ) != null ) { myhash = ( 37 * ( myhash ) ) + ( assigner.hashCode ( ) ) ; } } return myhash ; }

Target:
public int hashCode ( ) { if ( ( myhash ) == ( - 1 ) ) { myhash = 37 + ( ( party ) == null ? 1 : party.hashCode ( ) ) ; if ( ( assigner ) != null ) { myhash = ( 37 * ( myhash ) ) + ( assigner.hashCode ( ) ) ; } } return myhash ; }
Source:
public void drawBitmap ( android.graphics.Bitmap bitmap , float left , float top , android.graphics.Paint paint ) { throwIfCannotDraw ( bitmap ) ; int modifiers = ( paint != null ) ? setupModifiers ( bitmap , paint ) : android.view.GLES20Canvas.MODIFIER_NONE ; try { final int nativePaint = ( paint == null ) ? 0 : paint.mNativePaint ; android.view.GLES20Canvas.nDrawBitmap ( mRenderer , bitmap.mNativeBitmap , bitmap.mBuffer , left , top , nativePaint ) ; } finally { if ( modifiers != ( android.view.GLES20Canvas.MODIFIER_NONE ) ) android.view.GLES20Canvas.nResetModifiers ( mRenderer , modifiers ) ; } }

Target:
public void drawBitmap ( android.graphics.Bitmap bitmap , float left , float top , android.graphics.Paint paint ) { throwIfCannotDraw ( bitmap ) ; int modifiers = ( paint != null ) ? setupModifiers ( bitmap , paint ) : android.view.GLES20Canvas.MODIFIER_NONE ; try { final long nativePaint = ( paint == null ) ? 0 : paint.mNativePaint ; android.view.GLES20Canvas.nDrawBitmap ( mRenderer , bitmap.mNativeBitmap , bitmap.mBuffer , left , top , nativePaint ) ; } finally { if ( modifiers != ( android.view.GLES20Canvas.MODIFIER_NONE ) ) android.view.GLES20Canvas.nResetModifiers ( mRenderer , modifiers ) ; } }
Source:
private void responseSignalStrength ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.SignalStrength sigStrength ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { android.telephony.SignalStrength ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalSignalStrength ( sigStrength ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseSignalStrength ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , com.android.internal.telephony.V1_0.SignalStrength sigStrength ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { android.telephony.SignalStrength ret = com.android.internal.telephony.RIL.convertHalSignalStrength ( sigStrength ) ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
private boolean initPacketSocket ( ) { try { mPacketSock = android.system.Os.socket ( android.net.dhcp.AF_PACKET , android.net.dhcp.SOCK_RAW , android.net.dhcp.ETH_P_IP ) ; android.system.PacketSocketAddress addr = new android.system.PacketSocketAddress ( ( ( short ) ( ETH_P_IP ) ) , mIface.getIndex ( ) ) ; android.system.Os.bind ( mPacketSock , addr ) ; android.net.NetworkUtils.attachDhcpFilter ( mPacketSock ) ; } catch ( java.net.SocketException | android.system.ErrnoException e ) { android.util.Log.e ( android.net.dhcp.DhcpClient.TAG , "Error creating packet socket" , e ) ; return false ; } return true ; }

Target:
private boolean initPacketSocket ( ) { try { mPacketSock = android.system.Os.socket ( android.net.dhcp.AF_PACKET , android.net.dhcp.SOCK_RAW , android.net.dhcp.ETH_P_IP ) ; android.system.PacketSocketAddress addr = new android.system.PacketSocketAddress ( ( ( short ) ( ETH_P_IP ) ) , mIface.index ) ; android.system.Os.bind ( mPacketSock , addr ) ; android.net.NetworkUtils.attachDhcpFilter ( mPacketSock ) ; } catch ( java.net.SocketException | android.system.ErrnoException e ) { android.util.Log.e ( android.net.dhcp.DhcpClient.TAG , "Error creating packet socket" , e ) ; return false ; } return true ; }
Source:
public static android.renderscript.Type createX ( android.renderscript.RenderScript rs , android.renderscript.Element e , int dimX ) { if ( dimX < 1 ) { throw new android.renderscript.RSInvalidStateException ( "Dimension must be >= 1." ) ; } int id = rs.nTypeCreate ( e.getID ( rs ) , dimX , 0 , 0 , false , false , 0 ) ; android.renderscript.Type t = new android.renderscript.Type ( id , rs ) ; t.mElement = e ; t.mDimX = dimX ; t.calcElementCount ( ) ; return t ; }

Target:
public static android.renderscript.Type createX ( android.renderscript.RenderScript rs , android.renderscript.Element e , int dimX ) { if ( dimX < 1 ) { throw new android.renderscript.RSInvalidStateException ( "Dimension must be >= 1." ) ; } long id = rs.nTypeCreate ( e.getID ( rs ) , dimX , 0 , 0 , false , false , 0 ) ; android.renderscript.Type t = new android.renderscript.Type ( id , rs ) ; t.mElement = e ; t.mDimX = dimX ; t.calcElementCount ( ) ; return t ; }
Source:
public void test_cs_CZ ( ) throws java.lang.Exception { libcore.icu.LocaleData l = libcore.icu.LocaleData.get ( new java.util.Locale ( "cs" , "CZ" ) ) ; assertEquals ( "ledna" , l.longMonthNames [ 0 ] ) ; assertEquals ( "led" , l.shortMonthNames [ 0 ] ) ; assertEquals ( "1" , l.tinyMonthNames [ 0 ] ) ; assertEquals ( "leden" , l.longStandAloneMonthNames [ 0 ] ) ; assertEquals ( "led" , l.shortStandAloneMonthNames [ 0 ] ) ; assertEquals ( "l" , l.tinyStandAloneMonthNames [ 0 ] ) ; }

Target:
public void test_cs_CZ ( ) throws java.lang.Exception { libcore.icu.LocaleData l = libcore.icu.LocaleData.get ( new java.util.Locale ( "cs" , "CZ" ) ) ; assertEquals ( "ledna" , l.longMonthNames [ 0 ] ) ; assertEquals ( "led" , l.shortMonthNames [ 0 ] ) ; assertEquals ( "1" , l.tinyMonthNames [ 0 ] ) ; assertEquals ( "leden" , l.longStandAloneMonthNames [ 0 ] ) ; assertEquals ( "led" , l.shortStandAloneMonthNames [ 0 ] ) ; assertEquals ( "1" , l.tinyStandAloneMonthNames [ 0 ] ) ; }
Source:
protected void replaceImpl ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode newNode ) throws java.lang.UnsupportedOperationException { assert newNode != null ; if ( ( block ) == existingNode ) { block = ( ( com.android.jack.ir.ast.JBlock ) ( newNode ) ) ; } else { super . replaceImpl ( existingNode , newNode ) ; } }

Target:
protected void replaceImpl ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode existingNode , @ javax.annotation.Nonnull com.android.jack.ir.ast.JNode newNode ) throws java.lang.UnsupportedOperationException { if ( ( block ) == existingNode ) { block = ( ( com.android.jack.ir.ast.JBlock ) ( newNode ) ) ; } else { super . replaceImpl ( existingNode , newNode ) ; } }
Source:
public void rilConnected ( int indicationType ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLog ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RIL_CONNECTED ) ; mRil.setRadioPower ( false , null ) ; mRil.setCdmaSubscriptionSource ( mRil.mCdmaSubscription , null ) ; mRil.setCellInfoListRate ( ) ; mRil.notifyRegistrantsRilConnectionChanged ( 15 ) ; mRil.updateScreenState ( true ) ; }

Target:
public void rilConnected ( int indicationType ) { mRil.processIndication ( indicationType ) ; if ( RIL.RILJ_LOGD ) mRil.unsljLog ( com.android.internal.telephony.RILConstants.RIL_UNSOL_RIL_CONNECTED ) ; mRil.setRadioPower ( false , null ) ; mRil.setCdmaSubscriptionSource ( mRil.mCdmaSubscription , null ) ; mRil.setCellInfoListRate ( ) ; mRil.notifyRegistrantsRilConnectionChanged ( 15 ) ; }
Source:
public boolean equals ( java.lang.Object thatObject ) { if ( ( this ) == thatObject ) { return true ; } else if ( ( thatObject == null ) || ( ( getClass ( ) ) != ( thatObject.getClass ( ) ) ) ) { return false ; } com.android.server.wifi.hotspot2.anqp.eap.EAPMethod that = ( ( com.android.server.wifi.hotspot2.anqp.eap.EAPMethod ) ( thatObject ) ) ; return ( ( mEAPMethodID ) == ( that.mEAPMethodID ) ) && ( mAuthParams.equals ( that.mAuthParams ) ) ; }

Target:
public boolean equals ( java.lang.Object thatObject ) { if ( thatObject == ( this ) ) { return true ; } if ( ! ( thatObject instanceof com.android.server.wifi.hotspot2.anqp.eap.EAPMethod ) ) { return false ; } com.android.server.wifi.hotspot2.anqp.eap.EAPMethod that = ( ( com.android.server.wifi.hotspot2.anqp.eap.EAPMethod ) ( thatObject ) ) ; return ( ( mEAPMethodID ) == ( that.mEAPMethodID ) ) && ( mAuthParams.equals ( that.mAuthParams ) ) ; }
Source:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final java.lang.String action = intent.getAction ( ) ; if ( Intent.ACTION_BOOT_COMPLETED.equals ( action ) ) { android.mtp.MtpServer.configure ( false ) ; final android.content.Intent usbState = context.registerReceiver ( null , new android.content.IntentFilter ( android.hardware.usb.UsbManager.ACTION_USB_STATE ) ) ; if ( usbState != null ) { handleUsbState ( context , usbState ) ; } } else if ( UsbManager.ACTION_USB_STATE.equals ( action ) ) { handleUsbState ( context , intent ) ; } }

Target:
public void onReceive ( android.content.Context context , android.content.Intent intent ) { final java.lang.String action = intent.getAction ( ) ; if ( Intent.ACTION_BOOT_COMPLETED.equals ( action ) ) { final android.content.Intent usbState = context.registerReceiver ( null , new android.content.IntentFilter ( android.hardware.usb.UsbManager.ACTION_USB_STATE ) ) ; if ( usbState != null ) { handleUsbState ( context , usbState ) ; } } else if ( UsbManager.ACTION_USB_STATE.equals ( action ) ) { handleUsbState ( context , intent ) ; } }
Source:
public void pulse ( int color , int onMS ) { synchronized ( this ) { if ( ( ( mColor ) == 0 ) && ( ! ( mFlashing ) ) ) { setLightLocked ( color , com.android.server.LightsService.LIGHT_FLASH_HARDWARE , onMS , 1000 , com.android.server.LightsService.BRIGHTNESS_MODE_USER ) ; mH.sendMessageDelayed ( android.os.Message.obtain ( mH , 1 , this ) , onMS ) ; } } }

Target:
public void pulse ( int color , int onMS ) { synchronized ( this ) { if ( ( ( mColor ) == 0 ) && ( ! ( mFlashing ) ) ) { setLightLocked ( color , com.android.server.LightsService.LIGHT_FLASH_HARDWARE , onMS , 1000 , com.android.server.LightsService.BRIGHTNESS_MODE_USER ) ; mColor = 0 ; mH.sendMessageDelayed ( android.os.Message.obtain ( mH , 1 , this ) , onMS ) ; } } }
Source:
protected void onPrintJobQueued ( android.printservice.PrintJob printJob ) { if ( com.android.bips.BuiltInPrintService.DEBUG ) android.util.Log.d ( com.android.bips.BuiltInPrintService.TAG , "onPrintJobQueued" ) ; if ( com.android.bips.util.WifiMonitor.isConnected ( this ) ) { mJobQueue.print ( new com.android.bips.LocalPrintJob ( this , mBackend , printJob ) ) ; } else { printJob.fail ( getString ( R.string.wifi_not_connected ) ) ; } }

Target:
protected void onPrintJobQueued ( android.printservice.PrintJob printJob ) { if ( com.android.bips.BuiltInPrintService.DEBUG ) android.util.Log.d ( com.android.bips.BuiltInPrintService.TAG , "onPrintJobQueued" ) ; mJobQueue.print ( new com.android.bips.LocalPrintJob ( this , mBackend , printJob ) ) ; }
Source:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( com.android.tools.perflib.heap.Heap mHeap : mHeaps ) { com.android.tools.perflib.heap.ClassObj theClass = mHeap.getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }

Target:
public final com.android.tools.perflib.heap.ClassObj findClass ( long id ) { for ( int i = 0 ; i < ( mHeaps.size ( ) ) ; i ++ ) { com.android.tools.perflib.heap.ClassObj theClass = mHeaps.get ( i ) . getClass ( id ) ; if ( theClass != null ) { return theClass ; } } return null ; }
Source:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; java.lang.String correct = ( java.lang.Character.toLowerCase ( tag.charAt ( 0 ) ) ) + ( tag.substring ( 1 ) ) ; context.report ( com.android.tools.lint.checks.WrongCaseDetector.WRONG_CASE , element , context.getLocation ( element ) , java.lang.String.format ( "Invalid tag `<%1$s>`; should be `<%2$s>`" , tag , correct ) , null ) ; }

Target:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { java.lang.String tag = element.getTagName ( ) ; java.lang.String correct = ( java.lang.Character.toLowerCase ( tag.charAt ( 0 ) ) ) + ( tag.substring ( 1 ) ) ; context.report ( com.android.tools.lint.checks.WrongCaseDetector.WRONG_CASE , element , context.getLocation ( element ) , java.lang.String.format ( "Invalid tag `<%1$s>`; should be `<%2$s>`" , tag , correct ) ) ; }
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 ; 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 ) ; }

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 ; } return com.android.jack.dx.rop.code.Rops.throwBadType ( type ) ; }
Source:
public void testGetSimCountryIso ( ) { android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; java.lang.String countryCode = mTelephonyManager.getSimCountryIso ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { assertTrue ( ( ( ( "Country code '" + countryCode ) + "' did not match " ) + ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN ) ) , java.util.regex.Pattern.matches ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN , countryCode ) ) ; } else { assertEquals ( "" , countryCode ) ; } }

Target:
public void testGetSimCountryIso ( ) { android.content.pm.PackageManager packageManager = getContext ( ) . getPackageManager ( ) ; java.lang.String countryCode = mTelephonyManager.getSimCountryIso ( ) ; if ( packageManager.hasSystemFeature ( PackageManager.FEATURE_TELEPHONY ) ) { assertTrue ( ( ( ( "Country code '" + countryCode ) + "' did not match " ) + ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN ) ) , java.util.regex.Pattern.matches ( android.telephony.cts.TelephonyManagerTest.ISO_COUNTRY_CODE_PATTERN , countryCode ) ) ; } else { } }
Source:
private void assertContentsMatches ( java.io.InputStream expected , java.io.File actual ) throws java.lang.Exception { byte [ ] actualBytes = libcore.io.IoUtils.readFileAsByteArray ( actual.getPath ( ) ) ; byte [ ] expectedBytes = libcore.io.Streams.readFullyNoClose ( expected ) ; org.junit.Assert.assertArrayEquals ( expectedBytes , actualBytes ) ; }

Target:
private void assertContentsMatches ( java.io.File expected , java.io.File actual ) throws java.io.IOException { byte [ ] actualBytes = libcore.io.IoUtils.readFileAsByteArray ( actual.getPath ( ) ) ; byte [ ] expectedBytes = libcore.io.IoUtils.readFileAsByteArray ( expected.getPath ( ) ) ; org.junit.Assert.assertArrayEquals ( expectedBytes , actualBytes ) ; }
Source:
public void recommendation_noScans_noCurrentConfig_returnsEmpty ( ) throws java.lang.Exception { android.net.wifi.ScanResult [ ] scanResults = new android.net.wifi.ScanResult [ 0 ] ; android.net.RecommendationRequest request = new android.net.RecommendationRequest.Builder ( ) . setScanResults ( scanResults ) . setNetworkCapabilities ( new android.net.NetworkCapabilities ( ) . removeCapability ( NetworkCapabilities.NET_CAPABILITY_TRUSTED ) ) . build ( ) ; android.net.RecommendationResult result = verifyAndCaptureResult ( request ) ; org.junit.Assert.assertNull ( result.getWifiConfiguration ( ) ) ; }

Target:
public void recommendation_noScans_noCurrentConfig_returnsEmpty ( ) throws java.lang.Exception { android.net.wifi.ScanResult [ ] scanResults = new android.net.wifi.ScanResult [ 0 ] ; android.net.RecommendationRequest request = new android.net.RecommendationRequest.Builder ( ) . setScanResults ( scanResults ) . build ( ) ; android.net.RecommendationResult result = verifyAndCaptureResult ( request ) ; org.junit.Assert.assertNull ( result.getWifiConfiguration ( ) ) ; }
Source:
static void writeClassFile ( java.io.PrintStream stream , java.util.HashSet < com.google.doclava.ClassInfo > notStrippable , com.google.doclava.ClassInfo cl ) { com.google.doclava.PackageInfo pkg = cl.containingPackage ( ) ; if ( ( cl.containingClass ( ) ) == null ) { stream.print ( com.google.doclava.Stubs.parseLicenseHeader ( cl.position ( ) ) ) ; } if ( pkg != null ) { stream.println ( ( ( "package " + ( pkg.name ( ) ) ) + ";" ) ) ; } com.google.doclava.Stubs.writeClass ( stream , notStrippable , cl ) ; }

Target:
static void writeClassFile ( java.io.PrintStream stream , java.util.HashSet < com.google.doclava.ClassInfo > notStrippable , com.google.doclava.ClassInfo cl ) { com.google.doclava.PackageInfo pkg = cl.containingPackage ( ) ; if ( pkg != null ) { stream.println ( ( ( "package " + ( pkg.name ( ) ) ) + ";" ) ) ; } com.google.doclava.Stubs.writeClass ( stream , notStrippable , cl ) ; }
Source:
public boolean fetchUuidsWithSdp ( ) { android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ( isBluetoothEnabled ( ) ) == false ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot fetchUuidsWithSdp" ) ; return false ; } try { return service.fetchRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }

Target:
public boolean fetchUuidsWithSdp ( ) { android.bluetooth.IBluetooth service = android.bluetooth.BluetoothDevice.sService ; if ( ( service == null ) || ( ! ( isBluetoothEnabled ( ) ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "BT not enabled. Cannot fetchUuidsWithSdp" ) ; return false ; } try { return service.fetchRemoteUuids ( this ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "" , e ) ; } return false ; }
Source:
public static final int getHeaderSize ( @ javax.annotation.Nonnegative int apiLevel ) { int headerSize = ( ( ( 8 * ( com.android.jack.dx.dex.SizeOf.UBYTE ) ) + ( com.android.jack.dx.dex.SizeOf.UINT ) ) + ( com.android.jack.dx.dex.SizeOf.SIGNATURE ) ) + ( 20 * ( com.android.jack.dx.dex.SizeOf.UINT ) ) ; if ( apiLevel >= ( DexFormat.API_ANDROID_O ) ) { headerSize += 2 * ( com.android.jack.dx.dex.SizeOf.UINT ) ; } return headerSize ; }

Target:
public static final int getHeaderSize ( @ javax.annotation.Nonnegative int apiLevel ) { int headerSize = ( ( ( 8 * ( com.android.jack.dx.dex.SizeOf.UBYTE ) ) + ( com.android.jack.dx.dex.SizeOf.UINT ) ) + ( com.android.jack.dx.dex.SizeOf.SIGNATURE ) ) + ( 20 * ( com.android.jack.dx.dex.SizeOf.UINT ) ) ; if ( apiLevel >= ( DexFormat.API_ANDROID_O ) ) { headerSize += 4 * ( com.android.jack.dx.dex.SizeOf.UINT ) ; } return headerSize ; }
Source:
public static boolean isKeyAlgorithmSupported ( java.lang.String algorithm ) { final java.lang.String algUpper = algorithm.toUpperCase ( java.util.Locale.US ) ; return ( ( "DSA" . equals ( algUpper ) ) || ( "EC" . equals ( algUpper ) ) ) || ( "RSA" . equals ( algUpper ) ) ; }

Target:
public static boolean isKeyAlgorithmSupported ( java.lang.String algorithm ) { final java.lang.String algUpper = algorithm.toUpperCase ( java.util.Locale.US ) ; return ( "EC" . equals ( algUpper ) ) || ( "RSA" . equals ( algUpper ) ) ; }
Source:
public void registerListener ( android.hardware.cts.helpers.TestSensorEventListener listener ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } mTestSensorEventListener = ( listener != null ) ? listener : new android.hardware.cts.helpers.TestSensorEventListener ( ) ; mTestSensorEventListener.setSensorInfo ( mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; java.lang.String message = android.hardware.cts.helpers.SensorCtsHelper.formatAssertionMessage ( mSensor , "registerListener" ) ; boolean result = mSensorManager.registerListener ( mTestSensorEventListener , mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; junit.framework.Assert.assertTrue ( message , result ) ; }

Target:
public void registerListener ( android.hardware.cts.helpers.TestSensorEventListener listener ) { if ( ( mTestSensorEventListener ) != null ) { android.util.Log.w ( android.hardware.cts.helpers.TestSensorManager.LOG_TAG , "Listener already registered, returning." ) ; return ; } mTestSensorEventListener = ( listener != null ) ? listener : new android.hardware.cts.helpers.TestSensorEventListener ( ) ; mTestSensorEventListener.setSensorInfo ( mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; java.lang.String message = android.hardware.cts.helpers.SensorCtsHelper.formatAssertionMessage ( mSensor , "registerListener" , mRateUs , mMaxBatchReportLatencyUs ) ; boolean result = mSensorManager.registerListener ( mTestSensorEventListener , mSensor , mRateUs , mMaxBatchReportLatencyUs ) ; junit.framework.Assert.assertTrue ( message , result ) ; }
Source:
public void setSimPowerStateForSlot ( int slotIndex , boolean powerUp ) { enforceModifyPermission ( ) ; int [ ] subId = mSubscriptionController.getSubIdUsingSlotIndex ( slotIndex ) ; if ( ( subId == null ) || ( ( subId.length ) == 0 ) ) { return ; } final com.android.internal.telephony.Phone phone = getPhone ( subId [ 0 ] ) ; if ( phone != null ) { phone.setSimPowerState ( powerUp ) ; } }

Target:
public void setSimPowerStateForSlot ( int slotIndex , int state ) { enforceModifyPermission ( ) ; int [ ] subId = mSubscriptionController.getSubIdUsingSlotIndex ( slotIndex ) ; if ( ( subId == null ) || ( ( subId.length ) == 0 ) ) { return ; } final com.android.internal.telephony.Phone phone = getPhone ( subId [ 0 ] ) ; if ( phone != null ) { phone.setSimPowerState ( state ) ; } }
Source:
public void notifyStartSubscribeResponse ( short id , android.hardware.wifi.V1_0.WifiNanStatus status , short subscribeId ) { if ( com.android.server.wifi.aware.WifiAwareNativeCallback.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNativeCallback.TAG , ( ( ( ( ( "notifyStartSubscribeResponse: id=" + id ) + ", status=" ) + ( com.android.server.wifi.aware.WifiAwareNativeCallback.statusString ( status ) ) ) + ", subscribeId=" ) + subscribeId ) ) ; } if ( ( status.status ) == ( android.hardware.wifi.V1_0.NanStatusType.SUCCESS ) ) { mWifiAwareStateManager.onSessionConfigSuccessResponse ( id , false , subscribeId ) ; } else { mWifiAwareStateManager.onSessionConfigFailResponse ( id , false , status.status ) ; } }

Target:
public void notifyStartSubscribeResponse ( short id , android.hardware.wifi.V1_0.WifiNanStatus status , byte subscribeId ) { if ( com.android.server.wifi.aware.WifiAwareNativeCallback.VDBG ) { android.util.Log.v ( com.android.server.wifi.aware.WifiAwareNativeCallback.TAG , ( ( ( ( ( "notifyStartSubscribeResponse: id=" + id ) + ", status=" ) + ( com.android.server.wifi.aware.WifiAwareNativeCallback.statusString ( status ) ) ) + ", subscribeId=" ) + subscribeId ) ) ; } if ( ( status.status ) == ( android.hardware.wifi.V1_0.NanStatusType.SUCCESS ) ) { mWifiAwareStateManager.onSessionConfigSuccessResponse ( id , false , subscribeId ) ; } else { mWifiAwareStateManager.onSessionConfigFailResponse ( id , false , status.status ) ; } }
Source:
public java.lang.String getMessage ( ) { if ( ( location ) != null ) { return createMessage ( location.getDescription ( ) ) ; } if ( ( locationProvider ) != null ) { return createMessage ( locationProvider.getLocation ( ) . getDescription ( ) ) ; } throw new java.lang.AssertionError ( ) ; }

Target:
public java.lang.String getMessage ( ) { return createMessage ( getLocation ( ) . getDescription ( ) ) ; }
Source:
public android.bluetooth.BluetoothSocket createInsecureRfcommSocket ( int port ) throws java.io.IOException { if ( ( isBluetoothEnabled ( ) ) == false ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_RFCOMM , ( - 1 ) , false , false , this , port , null ) ; }

Target:
public android.bluetooth.BluetoothSocket createInsecureRfcommSocket ( int port ) throws java.io.IOException { if ( ! ( isBluetoothEnabled ( ) ) ) { android.util.Log.e ( android.bluetooth.BluetoothDevice.TAG , "Bluetooth is not enabled" ) ; throw new java.io.IOException ( ) ; } return new android.bluetooth.BluetoothSocket ( BluetoothSocket.TYPE_RFCOMM , ( - 1 ) , false , false , this , port , null ) ; }
Source:
public java.lang.String getTree ( com.android.sdkuilib.internal.repository.core.PackagesDiffLogic l , boolean displaySortByApi ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : m.getCategories ( displaySortByApi ) ) { sb.append ( cat.toString ( ) ) . append ( '\n' ) ; for ( com.android.sdklib.internal.repository.updater.PkgItem item : cat.getItems ( ) ) { sb.append ( "-- " ) . append ( item.toString ( ) ) . append ( '\n' ) ; } } return sb.toString ( ) ; }

Target:
public java.lang.String getTree ( com.android.sdkuilib.internal.repository.core.PackagesDiffLogic l ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( com.android.sdkuilib.internal.repository.core.PkgCategory cat : m.getCategories ( ) ) { sb.append ( cat.toString ( ) ) . append ( '\n' ) ; for ( com.android.sdklib.internal.repository.updater.PkgItem item : cat.getItems ( ) ) { sb.append ( "-- " ) . append ( item.toString ( ) ) . append ( '\n' ) ; } } return sb.toString ( ) ; }
Source:
public void testAllFilesInSysAreNotWritable ( ) throws java.lang.Exception { java.util.Set < java.io.File > writable = android.permission.cts.FileSystemPermissionTest.getAllWritableFilesInDirAndSubDir ( new java.io.File ( "/sys" ) ) ; java.util.Set < java.io.File > ignorables = android.permission.cts.FileSystemPermissionTest.getIgnorablesFromPaths ( android.permission.cts.FileSystemPermissionTest.SYS_EXCEPTIONS ) ; writable.removeAll ( ignorables ) ; assertTrue ( ( "Found writable: " + ( writable.toString ( ) ) ) , writable.isEmpty ( ) ) ; }

Target:
public void testAllFilesInSysAreNotWritable ( ) throws java.lang.Exception { java.util.Set < java.io.File > writable = android.permission.cts.FileSystemPermissionTest.getAllWritableFilesInDirAndSubDir ( new java.io.File ( "/sys" ) ) ; writable.removeAll ( android.permission.cts.FileSystemPermissionTest.SYS_EXCEPTIONS ) ; assertTrue ( ( "Found writable: " + ( writable.toString ( ) ) ) , writable.isEmpty ( ) ) ; }
Source:
private static boolean isManifestName ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( ( com.android.sdklib.xml.AndroidManifest.ATTRIBUTE_NAME.equals ( attribute.getLocalName ( ) ) ) && ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { if ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getEditor ( ) ) instanceof com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor ) { return true ; } } return false ; }

Target:
private static boolean isManifestName ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; if ( ( ( attribute != null ) && ( com.android.sdklib.xml.AndroidManifest.ATTRIBUTE_NAME.equals ( attribute.getLocalName ( ) ) ) ) && ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { if ( ( com.android.ide.eclipse.adt.internal.editors.xml.Hyperlinks.getEditor ( ) ) instanceof com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor ) { return true ; } } return false ; }
Source:
public void testMaxLengthName ( ) throws java.lang.Exception { java.lang.String maxLengthName = libcore.java.util.zip.ZipEntryTest.makeString ( 65535 , "z" ) ; java.io.File f = libcore.java.util.zip.ZipEntryTest.createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = libcore.java.util.zip.ZipEntryTest.createZipOutputStream ( f ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( maxLengthName ) ) ; out.closeEntry ( ) ; out.close ( ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; assertNotNull ( zipFile.getEntry ( maxLengthName ) ) ; zipFile.close ( ) ; }

Target:
public void testMaxLengthName ( ) throws java.lang.Exception { java.lang.String maxLengthName = libcore.java.util.zip.ZipEntryTest.makeString ( 65535 , "z" ) ; java.io.File f = createTemporaryZipFile ( ) ; java.util.zip.ZipOutputStream out = libcore.java.util.zip.ZipEntryTest.createZipOutputStream ( f ) ; out.putNextEntry ( new java.util.zip.ZipEntry ( maxLengthName ) ) ; out.closeEntry ( ) ; out.close ( ) ; java.util.zip.ZipFile zipFile = new java.util.zip.ZipFile ( f ) ; assertNotNull ( zipFile.getEntry ( maxLengthName ) ) ; zipFile.close ( ) ; }
Source:
public void listen ( android.telephony.PhoneStateListener listener , int events ) { if ( ( mContext ) == null ) return ; try { java.lang.Boolean notifyNow = ( getITelephony ( ) ) != null ; if ( ( listener.mSubId ) == null ) { listener.mSubId = mSubId ; } android.telephony.TelephonyManager.sRegistry.listenForSubscriber ( listener.mSubId , getOpPackageName ( ) , listener.callback , events , notifyNow ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }

Target:
public void listen ( android.telephony.PhoneStateListener listener , int events ) { if ( ( mContext ) == null ) return ; try { boolean notifyNow = ( getITelephony ( ) ) != null ; if ( ( listener.mSubId ) == null ) { listener.mSubId = mSubId ; } android.telephony.TelephonyManager.sRegistry.listenForSubscriber ( listener.mSubId , getOpPackageName ( ) , listener.callback , events , notifyNow ) ; } catch ( android.os.RemoteException ex ) { } catch ( java.lang.NullPointerException ex ) { } }
Source:
private static boolean needsNewSuccessor ( com.android.jack.dx.ssa.SsaBasicBlock block , com.android.jack.dx.ssa.SsaBasicBlock succ ) { java.util.ArrayList < com.android.jack.dx.ssa.SsaInsn > insns = block.getInsns ( ) ; com.android.jack.dx.ssa.SsaInsn lastInsn = insns.get ( ( ( insns.size ( ) ) - 1 ) ) ; return ( ( ( lastInsn.getResult ( ) ) != null ) || ( ( lastInsn.getSources ( ) . size ( ) ) > 0 ) ) && ( ( succ.getPredecessors ( ) . cardinality ( ) ) > 1 ) ; }

Target:
private static boolean needsNewSuccessor ( com.android.jack.dx.ssa.SsaBasicBlock block , com.android.jack.dx.ssa.SsaBasicBlock succ ) { java.util.List < com.android.jack.dx.ssa.SsaInsn > insns = block.getInsns ( ) ; com.android.jack.dx.ssa.SsaInsn lastInsn = insns.get ( ( ( insns.size ( ) ) - 1 ) ) ; return ( ( ( lastInsn.getResult ( ) ) != null ) || ( ( lastInsn.getSources ( ) . size ( ) ) > 0 ) ) && ( ( succ.getPredecessors ( ) . cardinality ( ) ) > 1 ) ; }
Source:
private boolean enforceChecksumValidity ( ) { byte [ ] storedDigest = new byte [ com.android.server.PersistentDataBlockService.DIGEST_SIZE_BYTES ] ; synchronized ( mLock ) { byte [ ] digest = computeDigestLocked ( storedDigest ) ; if ( ( digest == null ) || ( ! ( java.util.Arrays.equals ( storedDigest , digest ) ) ) ) { android.util.Slog.i ( com.android.server.PersistentDataBlockService.TAG , "Formatting FRP partition..." ) ; formatPartitionLocked ( ) ; return false ; } } return true ; }

Target:
private boolean enforceChecksumValidity ( ) { byte [ ] storedDigest = new byte [ com.android.server.PersistentDataBlockService.DIGEST_SIZE_BYTES ] ; synchronized ( mLock ) { byte [ ] digest = computeDigestLocked ( storedDigest ) ; if ( ( digest == null ) || ( ! ( java.util.Arrays.equals ( storedDigest , digest ) ) ) ) { android.util.Slog.i ( com.android.server.PersistentDataBlockService.TAG , "Formatting FRP partition..." ) ; formatPartitionLocked ( false ) ; return false ; } } return true ; }
Source:
public boolean disconnectMap ( android.bluetooth.BluetoothDevice device ) { boolean result = false ; if ( com.android.bluetooth.map.BluetoothMapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.map.BluetoothMapService.TAG , "disconnectMap" ) ; } if ( ( ( com.android.bluetooth.map.BluetoothMapService.getRemoteDevice ( ) ) != null ) && ( com.android.bluetooth.map.BluetoothMapService.getRemoteDevice ( ) . equals ( device ) ) ) { switch ( mState ) { case android.bluetooth.BluetoothMap.STATE_CONNECTED : stopObexServerSessions ( ( - 1 ) ) ; result = true ; break ; default : break ; } } return result ; }

Target:
void disconnectMap ( android.bluetooth.BluetoothDevice device ) { if ( com.android.bluetooth.map.BluetoothMapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.map.BluetoothMapService.TAG , "disconnectMap" ) ; } if ( ( ( com.android.bluetooth.map.BluetoothMapService.getRemoteDevice ( ) ) != null ) && ( com.android.bluetooth.map.BluetoothMapService.getRemoteDevice ( ) . equals ( device ) ) ) { switch ( mState ) { case android.bluetooth.BluetoothMap.STATE_CONNECTED : stopObexServerSessions ( ( - 1 ) ) ; break ; default : break ; } } }
Source:
public void testPullNonExternalCall ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; java.lang.Thread.sleep ( com.android.server.telecom.tests.TEST_TIMEOUT ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.never ( ) ) . pullExternalCall ( org.mockito.Matchers.eq ( ids.mCallId ) , org.mockito.Matchers.any ( ) ) ; }

Target:
public void testPullNonExternalCall ( ) throws java.lang.Exception { com.android.server.telecom.tests.IdPair ids = startAndMakeActiveIncomingCall ( "650-555-1212" , mPhoneAccountA0.getAccountHandle ( ) , mConnectionServiceFixtureA ) ; org.junit.Assert.assertEquals ( Call.STATE_ACTIVE , mInCallServiceFixtureX.getCall ( ids.mCallId ) . getState ( ) ) ; mInCallServiceFixtureX.mInCallAdapter.pullExternalCall ( ids.mCallId ) ; java.lang.Thread.sleep ( com.android.server.telecom.tests.TEST_TIMEOUT ) ; org.mockito.Mockito.verify ( mConnectionServiceFixtureA.getTestDouble ( ) , org.mockito.Mockito.never ( ) ) . pullExternalCall ( org.mockito.Matchers.eq ( ids.mCallId ) , org.mockito.Matchers.any ( ) ) ; }
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 ) { 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 ; }

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 ) ; chooseProvider ( javax.crypto.Cipher.InitType.ALGORITHM_PARAM_SPEC , opmode , key , params , null , random ) ; initialized = true ; this . opmode = opmode ; }
Source:
private static void markAsDeleted ( final int id ) { try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.markDirty ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.addToFreeRecordsList ( id ) ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }

Target:
private static void markAsDeleted ( final int id ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.markDirty ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.addToFreeRecordsList ( id ) ; } catch ( java.lang.Throwable e ) { throw com.intellij.openapi.vfs.newvfs.persistent.FSRecords.DbConnection.handleError ( e ) ; } finally { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.unlock ( ) ; } }
Source:
public java.lang.String toString ( ) { return ( ( ( "a sequential task running " + ( com.android.sched.item.Items.getName ( instances.steps [ ( ( next ) - 1 ) ] . getInstance ( ) . getClass ( ) ) ) ) + " on '" ) + ( data ) ) + "'" ; }

Target:
public java.lang.String toString ( ) { return ( ( ( "a sequential task running " + ( com.android.sched.item.Items.getName ( instances.steps [ ( ( next ) - 1 ) ] . getInstance ( ) . getClass ( ) ) ) ) + " on '" ) + ( data.toString ( ) ) ) + "'" ; }