auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.util.Iterator < ? > getFilesByNameEntryFilter ( java.lang.String folder , java.lang.String filter ) { org.apache.tools.ant.Project taskProject = getProject ( ) ; org.apache.tools.ant.types.FileSet fs = new org.apache.tools.ant.types.FileSet ( ) ; fs.setProject ( taskProject ) ; fs.setDir ( new java.io.File ( folder ) ) ; org.apache.tools.ant.types.PatternSet.NameEntry include = fs.createInclude ( ) ; include.setName ( filter ) ; return fs.iterator ( ) ; }

Target:
private java.util.Iterator < ? > getFilesByNameEntryFilter ( java.lang.String folder , java.lang.String ... filters ) { org.apache.tools.ant.Project taskProject = getProject ( ) ; org.apache.tools.ant.types.FileSet fs = new org.apache.tools.ant.types.FileSet ( ) ; fs.setProject ( taskProject ) ; fs.setDir ( new java.io.File ( folder ) ) ; for ( java.lang.String filter : filters ) { org.apache.tools.ant.types.PatternSet.NameEntry include = fs.createInclude ( ) ; include.setName ( filter ) ; } return fs.iterator ( ) ; }
Source:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , short [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 2 ) ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
void copy2DRangeFromUnchecked ( int xoff , int yoff , int w , int h , short [ ] data ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy2DRangeFromUnchecked" ) ; mRS.validate ( ) ; validate2DRange ( xoff , yoff , w , h ) ; mRS.nAllocationData2D ( getIDSafe ( ) , xoff , yoff , mSelectedLOD , mSelectedFace.mID , w , h , data , ( ( data.length ) * 2 ) , Element.DataType.SIGNED_16 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public static void sendBroadcast ( android.content.Context context , java.lang.String updaterAppPackageName , byte [ ] checkTokenBytes ) { android.content.Intent intent = android.app.timezone.RulesUpdaterContract.createUpdaterIntent ( updaterAppPackageName ) ; intent.putExtra ( android.app.timezone.RulesUpdaterContract.EXTRA_CHECK_TOKEN , checkTokenBytes ) ; context.sendBroadcastAsUser ( intent , android.os.UserHandle.of ( android.os.UserHandle.myUserId ( ) ) , android.app.timezone.RulesUpdaterContract.UPDATE_TIME_ZONE_RULES_PERMISSION ) ; }

Target:
public static void sendBroadcast ( android.content.Context context , java.lang.String updaterAppPackageName , byte [ ] checkTokenBytes ) { android.content.Intent intent = android.app.timezone.RulesUpdaterContract.createUpdaterIntent ( updaterAppPackageName ) ; intent.putExtra ( android.app.timezone.RulesUpdaterContract.EXTRA_CHECK_TOKEN , checkTokenBytes ) ; context.sendBroadcastAsUser ( intent , UserHandle.SYSTEM , android.app.timezone.RulesUpdaterContract.UPDATE_TIME_ZONE_RULES_PERMISSION ) ; }
Source:
public static void computeFract ( android.renderscript.cts.TestFract.ArgumentsFloatFloatFloat args ) { args.ulf = 4 ; args.ulfRelaxed = 12 ; args.outFloor = ( ( float ) ( java.lang.StrictMath.floor ( args.inV ) ) ) ; args.out = ( ( float ) ( java.lang.StrictMath.min ( ( ( args.inV ) - ( args.outFloor ) ) , 0.99999994F ) ) ) ; }

Target:
public static void computeAsinpi ( android.renderscript.cts.TestAsinpi.ArgumentsFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( ( ( android.renderscript.cts.CoreMathVerifier.asin ( args.inV ) ) / ( ( float ) ( java.lang.Math.PI ) ) ) , 5 , 128 ) ; }
Source:
public void setNetworkInterface ( java.net.NetworkInterface netInterface ) throws java.net.SocketException { if ( netInterface == null ) { throw new java.lang.NullPointerException ( "netInterface == null" ) ; } try { Libcore.os.setsockoptIfreq ( impl.fd , java.net.SOL_SOCKET , java.net.SO_BINDTODEVICE , netInterface.getName ( ) ) ; } catch ( libcore.io.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }

Target:
public void setNetworkInterface ( java.net.NetworkInterface netInterface ) throws java.net.SocketException { if ( netInterface == null ) { throw new java.lang.NullPointerException ( "netInterface == null" ) ; } try { Libcore.os.setsockoptIfreq ( impl.fd , java.net.SOL_SOCKET , java.net.SO_BINDTODEVICE , netInterface.getName ( ) ) ; } catch ( android.system.ErrnoException errnoException ) { throw errnoException.rethrowAsSocketException ( ) ; } }
Source:
public int prepareAddWindowLw ( android.view.WindowManagerPolicy.WindowState win , android.view.WindowManager.LayoutParams attrs ) { switch ( attrs.type ) { case android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR : if ( ( mStatusBar ) != null ) { return android.view.WindowManagerImpl.ADD_MULTIPLE_SINGLETON ; } mStatusBar = win ; break ; case android.view.WindowManager.LayoutParams.TYPE_KEYGUARD : if ( ( mKeyguard ) != null ) { return android.view.WindowManagerImpl.ADD_MULTIPLE_SINGLETON ; } mKeyguard = win ; break ; } return android.view.WindowManagerImpl.ADD_OKAY ; }

Target:
public int prepareAddWindowLw ( com.android.internal.policy.impl.WindowState win , android.view.WindowManager.LayoutParams attrs ) { switch ( attrs.type ) { case android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR : if ( ( mStatusBar ) != null ) { return android.view.WindowManagerImpl.ADD_MULTIPLE_SINGLETON ; } mStatusBar = win ; break ; case android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL : mStatusBarPanels.add ( win ) ; break ; case android.view.WindowManager.LayoutParams.TYPE_KEYGUARD : if ( ( mKeyguard ) != null ) { return android.view.WindowManagerImpl.ADD_MULTIPLE_SINGLETON ; } mKeyguard = win ; break ; } return android.view.WindowManagerImpl.ADD_OKAY ; }
Source:
public boolean verify ( java.lang.String key , byte [ ] data , byte [ ] signature ) { return verify ( android.security.KeyStore.getKeyBytes ( key ) , data , signature ) ; }

Target:
public boolean ungrant ( java.lang.String key , int uid ) { try { return ( mBinder.ungrant ( key , uid ) ) == ( android.security.KeyStore.NO_ERROR ) ; } catch ( android.os.RemoteException e ) { android.util.Log.w ( android.security.KeyStore.TAG , "Cannot connect to keystore" , e ) ; return false ; } }
Source:
native void rsnAllocationData1D ( long con , long id , int off , int mip , int count , int [ ] d , int sizeBytes ) ;

Target:
synchronized void nAllocationData3D ( long id , int xoff , int yoff , int zoff , int mip , int w , int h , int depth , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt , int mSize , boolean usePadding ) { validate ( ) ; rsnAllocationData3D ( mContext , id , xoff , yoff , zoff , mip , w , h , depth , d , sizeBytes , dt.mID , mSize , usePadding ) ; }
Source:
public void testSslCertificateWithEmptyIssuer ( ) throws java.lang.Exception { java.security.cert.CertificateFactory certificateFactory = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; java.security.cert.X509Certificate x509Certificate = ( ( java.security.cert.X509Certificate ) ( certificateFactory.generateCertificate ( new java.io.ByteArrayInputStream ( android.net.http.SslCertificateTest.Issue1597Certificate.getBytes ( ) ) ) ) ) ; assertEquals ( x509Certificate.getIssuerDN ( ) . getName ( ) , "" ) ; android.net.http.SslCertificate sslCertificate = new android.net.http.SslCertificate ( x509Certificate ) ; assertEquals ( sslCertificate.getIssuedBy ( ) . getDName ( ) , "" ) ; }

Target:
private static java.security.cert.X509Certificate generateCertificate ( java.lang.String pem ) throws java.lang.Exception { java.security.cert.CertificateFactory cf = java.security.cert.CertificateFactory.getInstance ( "X.509" ) ; return ( ( java.security.cert.X509Certificate ) ( cf.generateCertificate ( new java.io.ByteArrayInputStream ( pem.getBytes ( ) ) ) ) ) ; }
Source:
public int getLensFacingChecked ( ) { android.hardware.camera2.CameraCharacteristics.Key < java.lang.Integer > key = android.hardware.camera2.CameraCharacteristics.LENS_FACING ; java.lang.Integer facing = getValueFromKeyNonNull ( key ) ; if ( facing == null ) { return android.hardware.camera2.CameraCharacteristics.LENS_FACING_BACK ; } checkTrueForKey ( key , " value is out of range " , ( ( facing >= ( android.hardware.camera2.CameraCharacteristics.LENS_FACING_FRONT ) ) && ( facing <= ( android.hardware.camera2.CameraCharacteristics.LENS_FACING_BACK ) ) ) ) ; return facing ; }

Target:
public int getLensFacingChecked ( ) { android.hardware.camera2.CameraCharacteristics.Key < java.lang.Integer > key = android.hardware.camera2.CameraCharacteristics.LENS_FACING ; java.lang.Integer facing = getValueFromKeyNonNull ( key ) ; if ( facing == null ) { return android.hardware.camera2.CameraCharacteristics.LENS_FACING_BACK ; } checkTrueForKey ( key , " value is out of range " , ( ( facing >= ( android.hardware.camera2.CameraCharacteristics.LENS_FACING_FRONT ) ) && ( facing <= ( android.hardware.camera2.CameraCharacteristics.LENS_FACING_EXTERNAL ) ) ) ) ; return facing ; }
Source:
static java.math.BigInteger calculateResidue ( java.math.BigInteger p ) { int bitLength = p.bitLength ( ) ; if ( bitLength > 128 ) { java.math.BigInteger firstWord = p.shiftRight ( ( bitLength - 64 ) ) ; if ( ( firstWord.longValue ( ) ) == ( - 1L ) ) { return org.bouncycastle.math.ec.ONE.shiftLeft ( bitLength ) . subtract ( p ) ; } } return null ; }

Target:
static java.math.BigInteger calculateResidue ( java.math.BigInteger p ) { int bitLength = p.bitLength ( ) ; if ( bitLength >= 96 ) { java.math.BigInteger firstWord = p.shiftRight ( ( bitLength - 64 ) ) ; if ( ( firstWord.longValue ( ) ) == ( - 1L ) ) { return org.bouncycastle.math.ec.ONE.shiftLeft ( bitLength ) . subtract ( p ) ; } } return null ; }
Source:
private static java.lang.String encodeClassLoaderChain ( java.lang.String cl1 , java.lang.String cl2 ) { if ( cl1.isEmpty ( ) ) return cl2 ; if ( cl2.isEmpty ( ) ) return cl1 ; return ( cl1 + ";" ) + cl2 ; }

Target:
static java.lang.String encodeClassLoaderChain ( java.lang.String cl1 , java.lang.String cl2 ) { if ( ( cl1.equals ( PackageDexOptimizer.SKIP_SHARED_LIBRARY_CHECK ) ) || ( cl2.equals ( PackageDexOptimizer.SKIP_SHARED_LIBRARY_CHECK ) ) ) { return com.android.server.pm.PackageDexOptimizer.SKIP_SHARED_LIBRARY_CHECK ; } if ( cl1.isEmpty ( ) ) return cl2 ; if ( cl2.isEmpty ( ) ) return cl1 ; return ( cl1 + ";" ) + cl2 ; }
Source:
public void callSessionInviteParticipantsRequestFailed ( com.android.ims.internal.ImsCallSession session , com.android.ims.ImsReasonInfo reasonInfo ) { loge ( ( "callSessionInviteParticipantsRequestFailed :: reasonInfo=" + reasonInfo ) ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( ( "callSessionInviteParticipantsRequestFailed :: not supported for " + "conference session=" ) + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; } if ( listener != null ) { try { listener.onCallInviteParticipantsRequestFailed ( this , reasonInfo ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionInviteParticipantsRequestFailed :: " , t ) ; } } }

Target:
public void callSessionInviteParticipantsRequestDelivered ( android.telephony.ims.ImsCallSession session ) { logi ( "callSessionInviteParticipantsRequestDelivered ::" ) ; if ( isTransientConferenceSession ( session ) ) { logi ( ( ( "callSessionInviteParticipantsRequestDelivered :: not supported for " + "conference session=" ) + session ) ) ; return ; } com.android.ims.ImsCall.Listener listener ; synchronized ( this ) { listener = mListener ; } if ( listener != null ) { try { listener.onCallInviteParticipantsRequestDelivered ( this ) ; } catch ( java.lang.Throwable t ) { loge ( "callSessionInviteParticipantsRequestDelivered :: " , t ) ; } } }
Source:
void foo3 ( int [ ] array , int end ) { for ( int i = 3 ; i <= end ; i ++ ) { array [ i ] = 1 ; sum += array [ i ] ; } }

Target:
void foo3 ( int [ ] array , int end , boolean expectInterpreter ) { for ( int i = 3 ; i <= end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }
Source:
private static java.lang.String rsnCipherToString ( int cipher ) { switch ( cipher ) { case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_NONE : return "NONE" ; case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_TKIP : return "TKIP" ; case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_CCMP : return "CCMP" ; case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_NO_GROUP_ADDRESSED : return "GTK_NOT_USED" ; default : return "?" ; } }

Target:
private static int parseRsnCipher ( int cipher ) { switch ( cipher ) { case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_NONE : return android.net.wifi.ScanResult.CIPHER_NONE ; case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_TKIP : return android.net.wifi.ScanResult.CIPHER_TKIP ; case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_CCMP : return android.net.wifi.ScanResult.CIPHER_CCMP ; case com.android.server.wifi.util.InformationElementUtil.Capabilities.RSN_CIPHER_NO_GROUP_ADDRESSED : return android.net.wifi.ScanResult.CIPHER_NO_GROUP_ADDRESSED ; default : android.util.Log.w ( "IE_Capabilities" , ( "Unknown RSN cipher suite: " + ( java.lang.Integer.toHexString ( cipher ) ) ) ) ; return android.net.wifi.ScanResult.CIPHER_NONE ; } }
Source:
private void registerAllAppEvents ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) com.android.internal.telephony.uicc.UiccProfile.log ( "registerUiccCardEvents: registering for EVENT_APP_READY" ) ; app.registerForReady ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_APP_READY , null ) ; com.android.internal.telephony.uicc.IccRecords ir = app.getIccRecords ( ) ; if ( ir != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) com.android.internal.telephony.uicc.UiccProfile.log ( "registerUiccCardEvents: registering for EVENT_RECORDS_LOADED" ) ; ir.registerForRecordsLoaded ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_RECORDS_LOADED , null ) ; ir.registerForRecordsEvents ( this , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_RECORD_EVENTS , null ) ; } } } }

Target:
private void registerAllAppEvents ( ) { for ( com.android.internal.telephony.uicc.UiccCardApplication app : mUiccApplications ) { if ( app != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) com.android.internal.telephony.uicc.UiccProfile.log ( "registerUiccCardEvents: registering for EVENT_APP_READY" ) ; app.registerForReady ( mHandler , com.android.internal.telephony.uicc.UiccProfile.EVENT_APP_READY , null ) ; com.android.internal.telephony.uicc.IccRecords ir = app.getIccRecords ( ) ; if ( ir != null ) { if ( com.android.internal.telephony.uicc.UiccProfile.VDBG ) com.android.internal.telephony.uicc.UiccProfile.log ( "registerUiccCardEvents: registering for EVENT_RECORDS_LOADED" ) ; ir.registerForRecordsLoaded ( mHandler , com.android.internal.telephony.uicc.UiccProfile.EVENT_RECORDS_LOADED , null ) ; ir.registerForRecordsEvents ( mHandler , com.android.internal.telephony.uicc.UiccProfile.EVENT_ICC_RECORD_EVENTS , null ) ; } } } }
Source:
public java.lang.Void call ( ) throws java.lang.Exception { try { server.startHandshake ( ) ; fail ( "Should receive SSLHandshakeException as server" ) ; } catch ( javax.net.ssl.SSLHandshakeException expected ) { } return null ; }

Target:
public java.lang.Void call ( ) throws java.lang.Exception { server.startHandshake ( ) ; assertNotNull ( server.getSession ( ) ) ; try { server.getSession ( ) . getPeerCertificates ( ) ; fail ( ) ; } catch ( javax.net.ssl.SSLPeerUnverifiedException expected ) { } java.security.cert.Certificate [ ] localCertificates = server.getSession ( ) . getLocalCertificates ( ) ; assertNotNull ( localCertificates ) ; libcore.java.security.TestKeyStore.assertChainLength ( localCertificates ) ; assertNotNull ( localCertificates [ 0 ] ) ; libcore.javax.net.ssl.TestSSLContext.assertCertificateInKeyStore ( localCertificates [ 0 ] , c.serverKeyStore ) ; return null ; }
Source:
static void sendBufferNotification ( int id ) { synchronized ( android.renderscript.Allocation.mAllocationMap ) { android.renderscript.Allocation a = android.renderscript.Allocation.mAllocationMap.get ( new java.lang.Integer ( id ) ) ; if ( ( a != null ) && ( ( a.mBufferNotifier ) != null ) ) { a.mBufferNotifier.onBufferAvailable ( a ) ; } } }

Target:
static void sendBufferNotification ( int id ) { synchronized ( android.renderscript.Allocation.mAllocationMap ) { android.renderscript.Allocation a = android.renderscript.Allocation.mAllocationMap.get ( new java.lang.Long ( id ) ) ; if ( ( a != null ) && ( ( a.mBufferNotifier ) != null ) ) { a.mBufferNotifier.onBufferAvailable ( a ) ; } } }
Source:
public void test3 ( ) { com.android.utils.HtmlBuilder builder1 = new com.android.utils.HtmlBuilder ( ) ; builder1.addBold ( "This is bold" ) ; assertEquals ( "<B>This is bold</B>" , builder1.getHtml ( ) ) ; com.android.utils.HtmlBuilder builder2 = new com.android.utils.HtmlBuilder ( ) ; builder2.add ( "Plain. " ) ; builder2.beginBold ( ) ; builder2.add ( "Bold. " ) ; builder2.addLink ( "mylink" , "runnable:0" ) ; builder2.endBold ( ) ; assertEquals ( "Plain. <B>Bold. <A HREF=\"runnable:0\">mylink</A></B>" , builder2.getHtml ( ) ) ; }

Target:
public void testAddItalic ( ) { com.android.utils.HtmlBuilder builder = new com.android.utils.HtmlBuilder ( ) ; builder.addItalic ( "This is italic" ) ; assertEquals ( "<I>This is italic</I>" , builder.getHtml ( ) ) ; }
Source:
static void getUsage ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass , java.lang.StringBuilder usage ) { java.util.List < java.lang.reflect.Field > optionFields = com.google.common.collect.Lists.newArrayList ( com.google.devtools.common.options.OptionsParser.getAllAnnotatedFields ( optionsClass ) ) ; java.util.Collections.sort ( optionFields , com.google.devtools.common.options.OptionsUsage.BY_NAME ) ; for ( java.lang.reflect.Field optionField : optionFields ) { com.google.devtools.common.options.OptionsUsage.getUsage ( optionField , usage , OptionsParser.HelpVerbosity.LONG , null ) ; } }

Target:
static void getUsage ( java.lang.Class < ? extends com.google.devtools.common.options.OptionsBase > optionsClass , java.lang.StringBuilder usage ) { com.google.devtools.common.options.OptionsData data = com.google.devtools.common.options.OptionsParser.getOptionsDataInternal ( optionsClass ) ; java.util.List < java.lang.reflect.Field > optionFields = new java.util.ArrayList ( data.getFieldsForClass ( optionsClass ) ) ; java.util.Collections.sort ( optionFields , com.google.devtools.common.options.OptionsUsage.BY_NAME ) ; for ( java.lang.reflect.Field optionField : optionFields ) { com.google.devtools.common.options.OptionsUsage.getUsage ( optionField , usage , OptionsParser.HelpVerbosity.LONG , null ) ; } }
Source:
public static float nextUp ( float f ) { return sun.misc.FpUtils.nextUp ( f ) ; }

Target:
public static float nextUp ( float f ) { if ( ( java.lang.Float.isNaN ( f ) ) || ( f == ( sun.misc.FloatConsts.POSITIVE_INFINITY ) ) ) return f ; else { f += 0.0F ; return java.lang.Float.intBitsToFloat ( ( ( java.lang.Float.floatToRawIntBits ( f ) ) + ( f >= 0.0F ? + 1 : - 1 ) ) ) ; } }
Source:
public void setRetainedSize ( com.android.tools.perflib.heap.Heap heap , long size ) { mRetainedSizes.put ( heap , size ) ; }

Target:
public void resetRetainedSize ( ) { java.util.List < com.android.tools.perflib.heap.Heap > allHeaps = mHeap.mSnapshot.mHeaps ; if ( ( mRetainedSizes ) == null ) { mRetainedSizes = new long [ allHeaps.size ( ) ] ; } else { java.util.Arrays.fill ( mRetainedSizes , 0 ) ; } mRetainedSizes [ allHeaps.indexOf ( mHeap ) ] = getSize ( ) ; }
Source:
public boolean showSoftInput ( android.view.View view , int flags , android.os.ResultReceiver resultReceiver ) { checkFocus ( ) ; synchronized ( mH ) { if ( ( ( mServedView ) != view ) && ( ( ( mServedView ) == null ) || ( ! ( mServedView.checkInputConnectionProxy ( view ) ) ) ) ) { return false ; } try { return mService.showSoftInput ( mClient , flags , resultReceiver ) ; } catch ( android.os.RemoteException e ) { } return false ; } }

Target:
public boolean showSoftInput ( android.view.View view , int flags , android.os.ResultReceiver resultReceiver ) { checkFocus ( ) ; synchronized ( mH ) { if ( ( ( mServedView ) != view ) && ( ( ( mServedView ) == null ) || ( ! ( mServedView.checkInputConnectionProxy ( view ) ) ) ) ) { return false ; } try { return mService.showSoftInput ( mClient , flags , resultReceiver ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } } }
Source:
public void run ( ) { com.android.rs.test.RenderScript pRS = com.android.rs.test.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_array_init s = new com.android.rs.test.ScriptC_array_init ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; checkInit ( s ) ; s.invoke_array_init_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; passTest ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_array_init s = new com.android.rs.test.ScriptC_array_init ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; checkInit ( s ) ; s.invoke_array_init_test ( ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; passTest ( ) ; }
Source:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copy1DRangeFromUnchecked ( int off , int count , int [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( ( d.length ) * 4 ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , d , dataSize , Element.DataType.SIGNED_32 ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
public com.android.server.wifi.SoftApManager answer ( org.mockito.invocation.InvocationOnMock invocation ) { mSoftApListener = ( ( com.android.server.wifi.SoftApManager.Listener ) ( invocation.getArguments ( ) [ 0 ] ) ) ; return mSoftApManager ; }

Target:
public com.android.server.wifi.SoftApManager answer ( org.mockito.invocation.InvocationOnMock invocation ) { java.lang.Object [ ] args = invocation.getArguments ( ) ; org.junit.Assert.assertEquals ( mNMService , ( ( android.os.INetworkManagementService ) ( args [ 0 ] ) ) ) ; mSoftApListener = ( ( com.android.server.wifi.SoftApManager.Listener ) ( args [ 1 ] ) ) ; org.junit.Assert.assertEquals ( mApInterface , ( ( android.net.wifi.IApInterface ) ( args [ 2 ] ) ) ) ; org.junit.Assert.assertEquals ( wifiConfig , ( ( android.net.wifi.WifiConfiguration ) ( args [ 3 ] ) ) ) ; return mSoftApManager ; }
Source:
public void refreshRecommendationRequestTimeoutMs ( ) { final android.content.ContentResolver cr = mContext.getContentResolver ( ) ; long timeoutMs = Settings.Global.getLong ( cr , Global.NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS , ( - 1L ) ) ; if ( timeoutMs < 0 ) { timeoutMs = android.util.TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS ; } if ( com.android.server.NetworkScoreService.DBG ) android.util.Log.d ( com.android.server.NetworkScoreService.TAG , ( ( "Updating the recommendation request timeout to " + timeoutMs ) + " ms" ) ) ; mRecommendationRequestTimeoutMs = timeoutMs ; }

Target:
public void refreshRecommendationRequestTimeoutMs ( ) { final android.content.ContentResolver cr = mContext.getContentResolver ( ) ; long timeoutMs = Settings.Global.getLong ( cr , Global.NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS , ( - 1L ) ) ; if ( timeoutMs < 0 ) { timeoutMs = android.util.TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS ; } if ( com.android.server.NetworkScoreService.DBG ) android.util.Log.d ( com.android.server.NetworkScoreService.TAG , ( ( "Updating the recommendation request timeout to " + timeoutMs ) + " ms" ) ) ; mRecommendationRequestTimeoutMs = timeoutMs ; mReqRecommendationCallerRef.set ( new com.android.server.NetworkScoreService.RequestRecommendationCaller ( timeoutMs ) ) ; }
Source:
private void addActiveLog ( java.lang.String packageName , boolean enable ) { synchronized ( mActiveLogs ) { if ( ( mActiveLogs.size ( ) ) > ( com.android.server.BluetoothManagerService.ACTIVE_LOG_MAX_SIZE ) ) { mActiveLogs.remove ( ) ; } mActiveLogs.add ( new com.android.server.BluetoothManagerService.ActiveLog ( packageName , enable , java.lang.System.currentTimeMillis ( ) ) ) ; } }

Target:
private void addActiveLog ( int reason , java.lang.String packageName , boolean enable ) { synchronized ( mActiveLogs ) { if ( ( mActiveLogs.size ( ) ) > ( com.android.server.BluetoothManagerService.ACTIVE_LOG_MAX_SIZE ) ) { mActiveLogs.remove ( ) ; } mActiveLogs.add ( new com.android.server.BluetoothManagerService.ActiveLog ( reason , packageName , enable , java.lang.System.currentTimeMillis ( ) ) ) ; } }
Source:
public void testTimeout ( ) throws java.io.IOException { mProcess = new com.android.tradefed.util.ProcessHelper ( new java.lang.ProcessBuilder ( "cat" ) . start ( ) ) ; com.android.tradefed.util.CommandStatus status = mProcess.waitForProcess ( 30 ) ; assertEquals ( CommandStatus.TIMED_OUT , status ) ; assertTrue ( mProcess.isRunning ( ) ) ; }

Target:
public void testTimeout ( ) throws java.io.IOException { mProcess = new com.android.tradefed.util.ProcessHelper ( new java.lang.ProcessBuilder ( "cat" ) . start ( ) ) ; com.android.tradefed.util.CommandStatus status = mProcess.waitForProcess ( 30 ) ; org.junit.Assert.assertEquals ( CommandStatus.TIMED_OUT , status ) ; org.junit.Assert.assertTrue ( mProcess.isRunning ( ) ) ; }
Source:
public void testNoLauncherCallbackPackageAddedSecondaryUser ( ) throws java.lang.Exception { if ( ! ( mMultiUserSupported ) ) { return ; } startCallbackService ( ) ; installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testNoCallbackForUser" , 0 , ( "-e testUser " + ( mSecondaryUserSerialNumber ) ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }

Target:
public void testNoLauncherCallbackPackageAddedSecondaryUser ( ) throws java.lang.Exception { if ( ! ( mMultiUserSupported ) ) { return ; } startCallbackService ( ) ; installApp ( com.android.cts.devicepolicy.SIMPLE_APP_APK ) ; try { assertTrue ( runDeviceTests ( com.android.cts.devicepolicy.LAUNCHER_TESTS_PKG , com.android.cts.devicepolicy.LAUNCHER_TESTS_CLASS , "testNoPackageAddedCallbackForUser" , 0 , ( "-e testUser " + ( mSecondaryUserSerialNumber ) ) ) ) ; } finally { getDevice ( ) . uninstallPackage ( com.android.cts.devicepolicy.SIMPLE_APP_PKG ) ; } }
Source:
public void onCreate ( android.os.Bundle bundle ) { super . onCreate ( bundle ) ; getWindow ( ) . getDecorView ( ) . setSystemUiVisibility ( ( ( android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION ) | ( android.view.View.SYSTEM_UI_FLAG_FULLSCREEN ) ) ) ; mHandler = new android.uirendering.cts.testinfrastructure.DrawActivity.RenderSpecHandler ( ) ; }

Target:
public void onCreate ( android.os.Bundle bundle ) { super . onCreate ( bundle ) ; getWindow ( ) . getDecorView ( ) . setSystemUiVisibility ( ( ( android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION ) | ( android.view.View.SYSTEM_UI_FLAG_FULLSCREEN ) ) ) ; mHandler = new android.uirendering.cts.testinfrastructure.DrawActivity.RenderSpecHandler ( ) ; int uiMode = getResources ( ) . getConfiguration ( ) . uiMode ; mOnTv = ( uiMode & ( android.content.res.Configuration.UI_MODE_TYPE_TELEVISION ) ) == ( android.content.res.Configuration.UI_MODE_TYPE_TELEVISION ) ; }
Source:
public void nulledDeletedDiffedFieldValues ( ) { com.android.ahat.heapdump.FieldValue nulled = new com.android.ahat.heapdump.FieldValue ( "name" , "type" , null ) ; com.android.ahat.heapdump.DiffedFieldValue x = com.android.ahat.heapdump.DiffedFieldValue.deleted ( nulled ) ; org.junit.Assert.assertEquals ( "name" , x.name ) ; org.junit.Assert.assertEquals ( "type" , x.type ) ; org.junit.Assert.assertNull ( x.baseline ) ; org.junit.Assert.assertEquals ( DiffedFieldValue.Status.DELETED , x.status ) ; }

Target:
public void nulledAddedDiffedFieldValues ( ) { com.android.ahat.heapdump.FieldValue nulled = new com.android.ahat.heapdump.FieldValue ( "name" , com.android.ahat.DiffFieldsTest.t0 , null ) ; com.android.ahat.heapdump.DiffedFieldValue x = com.android.ahat.heapdump.DiffedFieldValue.added ( nulled ) ; org.junit.Assert.assertEquals ( "name" , x.name ) ; org.junit.Assert.assertEquals ( com.android.ahat.DiffFieldsTest.t0 , x.type ) ; org.junit.Assert.assertNull ( x.current ) ; org.junit.Assert.assertEquals ( DiffedFieldValue.Status.ADDED , x.status ) ; }
Source:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsUcharUcharUcharUchar args ) { args.ulf = 0 ; args.ulfRelaxed = 0 ; args.out = ( ( byte ) ( java.lang.StrictMath.min ( ( ( args.inMaxValue ) & 255 ) , java.lang.StrictMath.max ( ( ( args.inValue ) & 255 ) , ( ( args.inMinValue ) & 255 ) ) ) ) ) ; }

Target:
public static void computeClamp ( android.renderscript.cts.TestClamp.ArgumentsFloatFloatFloatFloat args ) { args.out = new android.renderscript.cts.Floaty ( java.lang.Math.min ( args.inMaxValue , java.lang.Math.max ( args.inValue , args.inMinValue ) ) , 0 , 0 ) ; }
Source:
private void updateLocalMediaPath ( java.io.File mediaFolder ) throws com.android.tradefed.targetprep.TargetSetupError { java.lang.String [ ] subDirs = mediaFolder.list ( ) ; if ( ( subDirs.length ) != 1 ) { throw new com.android.tradefed.targetprep.TargetSetupError ( java.lang.String.format ( "Unexpected contents in directory %s" , mediaFolder.getAbsolutePath ( ) ) ) ; } mLocalMediaPath = new java.io.File ( mediaFolder , subDirs [ 0 ] ) . getAbsolutePath ( ) ; }

Target:
private void updateLocalMediaPath ( com.android.tradefed.device.ITestDevice device , java.io.File mediaFolder ) throws com.android.tradefed.targetprep.TargetSetupError { java.lang.String [ ] subDirs = mediaFolder.list ( ) ; if ( ( subDirs.length ) != 1 ) { throw new com.android.tradefed.targetprep.TargetSetupError ( java.lang.String.format ( "Unexpected contents in directory %s" , mediaFolder.getAbsolutePath ( ) ) ) ; } mLocalMediaPath = new java.io.File ( mediaFolder , subDirs [ 0 ] ) . getAbsolutePath ( ) ; }
Source:
public boolean setPlayerApplicationSetting ( android.bluetooth.BluetoothAvrcpPlayerSettings plAppSetting ) { if ( android.bluetooth.BluetoothAvrcpController.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAvrcpController.TAG , "setPlayerApplicationSetting" ) ; if ( ( ( mService ) != null ) && ( isEnabled ( ) ) ) { try { return mService.setPlayerApplicationSetting ( plAppSetting ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAvrcpController.TAG , ( "Error talking to BT service in setPlayerApplicationSetting() " + e ) ) ; return false ; } } if ( ( mService ) == null ) android.util.Log.w ( android.bluetooth.BluetoothAvrcpController.TAG , "Proxy not attached to service" ) ; return false ; }

Target:
public boolean setPlayerApplicationSetting ( android.bluetooth.BluetoothAvrcpPlayerSettings plAppSetting ) { if ( android.bluetooth.BluetoothAvrcpController.DBG ) android.util.Log.d ( android.bluetooth.BluetoothAvrcpController.TAG , "setPlayerApplicationSetting" ) ; final android.bluetooth.IBluetoothAvrcpController service = mService ; if ( ( service != null ) && ( isEnabled ( ) ) ) { try { return service.setPlayerApplicationSetting ( plAppSetting ) ; } catch ( android.os.RemoteException e ) { android.util.Log.e ( android.bluetooth.BluetoothAvrcpController.TAG , ( "Error talking to BT service in setPlayerApplicationSetting() " + e ) ) ; return false ; } } if ( service == null ) android.util.Log.w ( android.bluetooth.BluetoothAvrcpController.TAG , "Proxy not attached to service" ) ; return false ; }
Source:
public static com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode getMode ( boolean value ) { for ( com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode mode : com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode.values ( ) ) { if ( ( mode.mValue ) == value ) { return mode ; } } return null ; }

Target:
public static com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode getMode ( java.lang.String s ) { for ( com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode m : com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode.values ( ) ) { if ( m.toString ( ) . equals ( s ) ) { return m ; } } throw new java.lang.IllegalArgumentException ( java.lang.String.format ( "Invalid representation (%s) for TargetMode" , s ) ) ; }
Source:
private static void changeJavaAndAndroidLocale ( java.util.Locale locale ) { java.util.Locale.setDefault ( locale ) ; android.content.res.Configuration configuration = android.content.res.Resources.getSystem ( ) . getConfiguration ( ) ; configuration.locale = locale ; android.content.res.Resources.getSystem ( ) . updateConfiguration ( configuration , null ) ; }

Target:
private static boolean changeJavaAndAndroidLocale ( java.util.Locale locale , boolean force ) { if ( ( ! force ) && ( ! ( android.text.format.cts.TimeTest.sSystemLocales.contains ( locale ) ) ) ) { return false ; } java.util.Locale.setDefault ( locale ) ; android.content.res.Configuration configuration = android.content.res.Resources.getSystem ( ) . getConfiguration ( ) ; configuration.locale = locale ; android.content.res.Resources.getSystem ( ) . updateConfiguration ( configuration , null ) ; return true ; }
Source:
public void testPownF32_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandomInts ( 305419896 , 32 , ( - 16 ) , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n1 ( nAlloc ) ; doF32_relaxed ( 7432909 , 128 ) ; }

Target:
public void testPownF32_relaxed ( ) { android.renderscript.Allocation nAlloc = android.renderscript.Allocation.createSized ( mRS , android.renderscript.Element.I32 ( mRS ) , android.renderscript.cts.INPUTSIZE ) ; n = new int [ INPUTSIZE ] ; android.renderscript.cts.RSUtils.genRandomInts ( 305419896 , ( - 16 ) , 15 , n ) ; nAlloc.copyFrom ( n ) ; script_f32_relaxed.set_n1 ( nAlloc ) ; doF32_relaxed ( 7432909 , 128 ) ; }
Source:
private boolean allowMute ( com.android.internal.telephony.Phone phone ) { if ( ( phone.getPhoneType ( ) ) == ( android.telephony.TelephonyManager.PHONE_TYPE_CDMA ) ) { com.android.internal.telephony.PhoneProxy phoneProxy = ( ( com.android.internal.telephony.PhoneProxy ) ( phone ) ) ; com.android.internal.telephony.cdma.CDMAPhone cdmaPhone = ( ( com.android.internal.telephony.cdma.CDMAPhone ) ( phoneProxy.getActivePhone ( ) ) ) ; if ( cdmaPhone != null ) { if ( cdmaPhone.isInEcm ( ) ) { return false ; } } } return true ; }

Target:
private boolean allowsMute ( com.android.internal.telephony.Phone phone ) { if ( ( phone.getPhoneType ( ) ) == ( android.telephony.TelephonyManager.PHONE_TYPE_CDMA ) ) { if ( phone.isInEcm ( ) ) { return false ; } } return true ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { if ( ( args.length ) != 4 ) { java.lang.System.err.println ( "usage: java ZoneCompactor <setup file> <data directory> <output directory> <tzdata version>" ) ; java.lang.System.exit ( 0 ) ; } new ZoneCompactor ( args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { if ( ( args.length ) != 5 ) { java.lang.System.err.println ( "usage: java ZoneCompactor <setup file> <data directory> <zone.tab file> <output directory> <tzdata version>" ) ; java.lang.System.exit ( 0 ) ; } new ZoneCompactor ( args [ 0 ] , args [ 1 ] , args [ 2 ] , args [ 3 ] , args [ 4 ] ) ; }
Source:
public org.eclipse.swt.graphics.Image setImage ( java.awt.image.BufferedImage awtImage ) { if ( ( mImage ) != null ) { mImage.dispose ( ) ; } if ( awtImage == null ) { mImage = null ; } else { mImage = com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.convertImage ( mCanvas.getDisplay ( ) , awtImage , false , ( - 1 ) ) ; } return mImage ; }

Target:
public org.eclipse.swt.graphics.Image setImage ( java.awt.image.BufferedImage awtImage ) { if ( ( mImage ) != null ) { mImage.dispose ( ) ; } if ( awtImage == null ) { mImage = null ; } else { mImage = com.android.ide.eclipse.adt.internal.editors.layout.gle2.SwtUtils.convertToSwt ( mCanvas.getDisplay ( ) , awtImage , false , ( - 1 ) ) ; } return mImage ; }
Source:
public int getOffset ( long when ) { long unix = when / 1000 ; int transition = java.util.Arrays.binarySearch ( mTransitions , unix ) ; if ( transition < 0 ) { transition = ( ~ transition ) - 1 ; if ( transition < 0 ) { return mEarliestRawOffset ; } } return ( mRawOffset ) + ( ( mOffsets [ ( ( mTypes [ transition ] ) & 255 ) ] ) * 1000 ) ; }

Target:
static long roundDownMillisToSeconds ( long millis ) { if ( millis < 0 ) { return ( millis - 999 ) / 1000 ; } else { return millis / 1000 ; } }
Source:
public boolean offer ( E e , long timeout , java.util.concurrent.TimeUnit unit ) throws java.lang.InterruptedException { java.util.concurrent.ArrayBlockingQueue.checkNotNull ( e ) ; long nanos = unit.toNanos ( timeout ) ; final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == ( items.length ) ) { if ( nanos <= 0 ) return false ; nanos = notFull.awaitNanos ( nanos ) ; } insert ( e ) ; return true ; } finally { lock.unlock ( ) ; } }

Target:
public void put ( E e ) throws java.lang.InterruptedException { java.util.concurrent.ArrayBlockingQueue.checkNotNull ( e ) ; final java.util.concurrent.locks.ReentrantLock lock = this . lock ; lock.lockInterruptibly ( ) ; try { while ( ( count ) == ( items.length ) ) notFull.await ( ) ; enqueue ( e ) ; } finally { lock.unlock ( ) ; } }
Source:
public boolean decodeExtensionMedia ( int startIndex ) { int index = startIndex ; while ( ( wspData [ index ] ) != 0 ) { index ++ ; } dataLength = ( index - startIndex ) + 1 ; stringValue = new java.lang.String ( wspData , startIndex , ( ( dataLength ) - 1 ) ) ; return true ; }

Target:
public boolean decodeTokenText ( int startIndex ) { int index = startIndex ; while ( ( wspData [ index ] ) != 0 ) { index ++ ; } dataLength = ( index - startIndex ) + 1 ; stringValue = new java.lang.String ( wspData , startIndex , ( ( dataLength ) - 1 ) ) ; return true ; }
Source:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.util.Log.i ( android.aidl.tests.TestServiceClient.TAG , "Starting!" ) ; try { init ( ) ; android.aidl.tests.ITestService service = getService ( ) ; checkPrimitiveRepeat ( service ) ; mLog.log ( mSuccessSentinel ) ; } catch ( android.aidl.tests.TestServiceClient.TestFailException e ) { mLog.close ( ) ; throw new java.lang.RuntimeException ( e ) ; } finally { if ( ( mLog ) != null ) { mLog.close ( ) ; } } }

Target:
protected void onCreate ( android.os.Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; android.util.Log.i ( android.aidl.tests.TestServiceClient.TAG , "Starting!" ) ; try { init ( ) ; android.aidl.tests.ITestService service = getService ( ) ; checkPrimitiveRepeat ( service ) ; checkArrayReversal ( service ) ; mLog.log ( mSuccessSentinel ) ; } catch ( android.aidl.tests.TestServiceClient.TestFailException e ) { mLog.close ( ) ; throw new java.lang.RuntimeException ( e ) ; } finally { if ( ( mLog ) != null ) { mLog.close ( ) ; } } }
Source:
public void registerContentObservers ( android.content.Context appContext ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFramework.registerContentObservers" ) ; if ( ( ( com.android.dialer.buildtype.BuildType.get ( ) ) == ( com.android.dialer.buildtype.BuildType.BUGFOOD ) ) || ( com.android.dialer.common.LogUtil.isDebugEnabled ( ) ) ) { for ( com.android.dialer.calllog.datasources.CallLogDataSource dataSource : dataSources.getDataSourcesIncludingSystemCallLog ( ) ) { dataSource.registerContentObservers ( appContext , this ) ; } } else { com.android.dialer.common.LogUtil.i ( "CallLogFramework.registerContentObservers" , "not registering content observers" ) ; } }

Target:
public void registerContentObservers ( android.content.Context appContext ) { com.android.dialer.common.LogUtil.enterBlock ( "CallLogFramework.registerContentObservers" ) ; if ( com.android.dialer.configprovider.ConfigProviderBindings.get ( appContext ) . getBoolean ( "is_nui_shortcut_enabled" , false ) ) { for ( com.android.dialer.calllog.datasources.CallLogDataSource dataSource : dataSources.getDataSourcesIncludingSystemCallLog ( ) ) { dataSource.registerContentObservers ( appContext , this ) ; } } else { com.android.dialer.common.LogUtil.i ( "CallLogFramework.registerContentObservers" , "not registering content observers" ) ; } }
Source:
public int getState ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , ( "getState = " + ( mService.getState ( ) ) ) ) ; com.android.bluetooth.pbap.BluetoothPbapService service = getService ( com.android.bluetooth.pbap.BluetoothPbapService.BLUETOOTH_PERM ) ; if ( service == null ) return android.bluetooth.BluetoothPbap.STATE_DISCONNECTED ; return service.getState ( ) ; }

Target:
public java.util.List < android.bluetooth.BluetoothDevice > getConnectedDevices ( ) { if ( com.android.bluetooth.pbap.BluetoothPbapService.DEBUG ) { android.util.Log.d ( com.android.bluetooth.pbap.BluetoothPbapService.TAG , "getConnectedDevices" ) ; } com.android.bluetooth.pbap.BluetoothPbapService service = getService ( ) ; if ( service == null ) { return new java.util.ArrayList < > ( 0 ) ; } return service.getConnectedDevices ( ) ; }
Source:
public static float max ( float a , float b ) { if ( a != a ) return a ; if ( ( ( a == 0.0F ) && ( b == 0.0F ) ) && ( ( java.lang.Float.floatToRawIntBits ( a ) ) == ( java.lang.StrictMath.negativeZeroFloatBits ) ) ) { return b ; } return a >= b ? a : b ; }

Target:
public static float min ( float a , float b ) { return java.lang.Math.min ( a , b ) ; }
Source:
public void loggerFetchesRxFatesEvenIfFetchingTxFatesFails ( ) { final boolean verbosityToggle = true ; org.mockito.Mockito.when ( mWifiNative.getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ) . thenReturn ( false ) ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionFailure ( ) ; org.mockito.Mockito.verify ( mWifiNative ) . getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; }

Target:
public void loggerFetchesRxFatesEvenIfFetchingTxFatesFails ( ) { final boolean verbosityToggle = true ; org.mockito.Mockito.when ( mWifiNative.getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ) . thenReturn ( false ) ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.mockito.Mockito.verify ( mWifiNative ) . getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; }
Source:
public com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config getDevConfig ( ) { return new com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config ( getSecureLong ( android.provider.Settings.Secure.NETSTATS_DEV_BUCKET_DURATION , android.text.format.DateUtils.HOUR_IN_MILLIS ) , getSecureLong ( android.provider.Settings.Secure.NETSTATS_DEV_ROTATE_AGE , ( 15 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) , getSecureLong ( android.provider.Settings.Secure.NETSTATS_DEV_DELETE_AGE , ( 90 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) ) ; }

Target:
public com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config getUidConfig ( ) { return new com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config ( getGlobalLong ( android.provider.Settings.Global.NETSTATS_UID_BUCKET_DURATION , ( 2 * ( android.text.format.DateUtils.HOUR_IN_MILLIS ) ) ) , getGlobalLong ( android.provider.Settings.Global.NETSTATS_UID_ROTATE_AGE , ( 15 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) , getGlobalLong ( android.provider.Settings.Global.NETSTATS_UID_DELETE_AGE , ( 90 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) ) ; }
Source:
private static com.android.jack.dx.rop.code.RopMethod optimizeMinimizeRegisters ( com.android.jack.dx.rop.code.RopMethod rmeth , int paramWidth , boolean isStatic , java.util.EnumSet < com.android.jack.dx.ssa.Optimizer.OptionalStep > steps ) { com.android.jack.dx.ssa.SsaMethod ssaMeth ; com.android.jack.dx.rop.code.RopMethod resultMeth ; ssaMeth = com.android.jack.dx.ssa.SsaConverter.convertToSsaMethod ( rmeth , paramWidth , isStatic ) ; java.util.EnumSet < com.android.jack.dx.ssa.Optimizer.OptionalStep > newSteps = steps.clone ( ) ; newSteps.remove ( com.android.jack.dx.ssa.Optimizer.OptionalStep.CONST_COLLECTOR ) ; com.android.jack.dx.ssa.Optimizer.runSsaFormSteps ( ssaMeth , newSteps ) ; resultMeth = com.android.jack.dx.ssa.back.SsaToRop.convertToRopMethod ( ssaMeth ) ; return resultMeth ; }

Target:
private static com.android.jack.dx.rop.code.RopMethod optimizeMinimizeRegisters ( com.android.jack.dx.rop.code.RopMethod rmeth , int paramWidth , boolean isStatic , boolean removeRedundantConditionalBranch , java.util.EnumSet < com.android.jack.dx.ssa.Optimizer.OptionalStep > steps ) { com.android.jack.dx.ssa.SsaMethod ssaMeth ; com.android.jack.dx.rop.code.RopMethod resultMeth ; ssaMeth = com.android.jack.dx.ssa.SsaConverter.convertToSsaMethod ( rmeth , paramWidth , isStatic ) ; java.util.EnumSet < com.android.jack.dx.ssa.Optimizer.OptionalStep > newSteps = steps.clone ( ) ; newSteps.remove ( com.android.jack.dx.ssa.Optimizer.OptionalStep.CONST_COLLECTOR ) ; com.android.jack.dx.ssa.Optimizer.runSsaFormSteps ( ssaMeth , newSteps ) ; resultMeth = com.android.jack.dx.ssa.back.SsaToRop.convertToRopMethod ( ssaMeth , removeRedundantConditionalBranch ) ; return resultMeth ; }
Source:
protected void loadOutputAndDependencies ( ) { java.util.Collection < com.android.ide.eclipse.adt.internal.build.NonJavaFileBundle > bundles = getBundles ( ) ; for ( com.android.ide.eclipse.adt.internal.build.NonJavaFileBundle bundle : bundles ) { parseDependencyFileFor ( bundle.getSourceFile ( ) ) ; } }

Target:
protected void loadOutputAndDependencies ( ) { java.util.Collection < com.android.ide.eclipse.adt.internal.build.NonJavaFileBundle > bundles = getBundles ( ) ; for ( com.android.ide.eclipse.adt.internal.build.NonJavaFileBundle bundle : bundles ) { if ( ( parseDependencyFileFor ( bundle.getSourceFile ( ) ) ) == false ) { addFileToCompile ( bundle.getSourceFile ( ) ) ; } } }
Source:
public void onStaDeauthorized ( byte [ ] srcAddress , byte [ ] p2pDeviceAddress ) { com.android.server.wifi.p2p.SupplicantP2pIfaceCallback.logd ( ( "STA deauthorized on " + ( mInterface ) ) ) ; }

Target:
public void onStaDeauthorized ( byte [ ] srcAddress , byte [ ] p2pDeviceAddress ) { com.android.server.wifi.p2p.SupplicantP2pIfaceCallback.logd ( ( "STA deauthorized on " + ( mInterface ) ) ) ; android.net.wifi.p2p.WifiP2pDevice device = new android.net.wifi.p2p.WifiP2pDevice ( ) ; try { device.deviceAddress = com.android.server.wifi.util.NativeUtil.macAddressFromByteArray ( p2pDeviceAddress ) ; } catch ( java.lang.Exception e ) { android.util.Log.e ( com.android.server.wifi.p2p.SupplicantP2pIfaceCallback.TAG , "Could not decode MAC address." , e ) ; return ; } mMonitor.broadcastP2pApStaDisconnected ( mInterface , device ) ; }