auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void startDtmf ( char c ) { if ( ! ( ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) || ( ( c >= 'A' ) && ( c <= 'D' ) ) ) ) { android.telephony.Rlog.e ( com.android.internal.telephony.imsphone.ImsPhone.LOG_TAG , ( ( "startDtmf called with invalid character '" + c ) + "'" ) ) ; } else { mCT.startDtmf ( c ) ; } }

Target:
public void startDtmf ( char c ) { if ( ! ( ( android.telephony.PhoneNumberUtils.is12Key ( c ) ) || ( ( c >= 'A' ) && ( c <= 'D' ) ) ) ) { loge ( ( ( "startDtmf called with invalid character '" + c ) + "'" ) ) ; } else { mCT.startDtmf ( c ) ; } }
Source:
private static int getAlignment ( java.util.List < ? extends com.android.jack.dx.dex.file.OffsettedItem > items ) { try { return java.lang.Math.max ( com.android.jack.dx.dex.file.UniformListItem.HEADER_SIZE , items.get ( 0 ) . getAlignment ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException ex ) { throw new java.lang.IllegalArgumentException ( "items.size() == 0" ) ; } catch ( java.lang.NullPointerException ex ) { throw new java.lang.NullPointerException ( "items == null" ) ; } }

Target:
private static int getAlignment ( java.util.List < ? extends com.android.jack.dx.dex.file.OffsettedItem > items ) { assert items != null ; try { return java.lang.Math.max ( com.android.jack.dx.dex.file.UniformListItem.HEADER_SIZE , items.get ( 0 ) . getAlignment ( ) ) ; } catch ( java.lang.IndexOutOfBoundsException ex ) { throw new java.lang.IllegalArgumentException ( "items.size() == 0" ) ; } }
Source:
public void testStageInstallWithErrorCode_missingIcuFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro.getBytes ( ) ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_missingIcuFile ( ) throws java.lang.Exception { com.android.timezone.distro.TimeZoneDistro stagedDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistro ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_SUCCESS , installer.stageInstallWithErrorCode ( stagedDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; com.android.timezone.distro.TimeZoneDistro incompleteDistro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createValidTimeZoneDistroBuilder ( libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEWER_RULES_VERSION , 1 ) . clearIcuDataForTests ( ) . buildUnvalidated ( ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( incompleteDistro ) ) ; assertInstallDistroStaged ( stagedDistro ) ; assertNoInstalledDistro ( ) ; }
Source:
private java.lang.String displayName ( java.lang.String id ) { if ( id.equals ( "GMT" ) ) { return "Greenwich Mean Time" ; } if ( id.equals ( "GMT0" ) ) { return "Greenwich Mean Time" ; } if ( id.equals ( "UTC" ) ) { return "Coordinated Universal Time" ; } return id ; }

Target:
private java.lang.String displayName ( java.lang.String id ) { return id ; }
Source:
protected void addSVUID ( long svuid ) { org.objectweb.asm.FieldVisitor fv = super . visitField ( ( ( org.objectweb.asm.Opcodes.ACC_FINAL ) + ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) , "serialVersionUID" , "J" , null , new java.lang.Long ( svuid ) ) ; if ( fv != null ) { fv.visitEnd ( ) ; } }

Target:
protected void addSVUID ( long svuid ) { org.objectweb.asm.FieldVisitor fv = super . visitField ( ( ( org.objectweb.asm.Opcodes.ACC_FINAL ) + ( org.objectweb.asm.Opcodes.ACC_STATIC ) ) , "serialVersionUID" , "J" , null , svuid ) ; if ( fv != null ) { fv.visitEnd ( ) ; } }
Source:
static void nativeDraw ( int canvas_instance , android.graphics.RectF loc , int bitmap_instance , int chunk , int paint_instance_or_null , int destDensity , int srcDensity ) { android.graphics.NinePatch_Delegate.draw ( canvas_instance , ( ( int ) ( loc.left ) ) , ( ( int ) ( loc.top ) ) , ( ( int ) ( loc.width ( ) ) ) , ( ( int ) ( loc.height ( ) ) ) , bitmap_instance , chunk , paint_instance_or_null , destDensity , srcDensity ) ; }

Target:
static void nativeDraw ( long canvas_instance , android.graphics.RectF loc , long bitmap_instance , long chunk , long paint_instance_or_null , int destDensity , int srcDensity ) { android.graphics.NinePatch_Delegate.draw ( canvas_instance , ( ( int ) ( loc.left ) ) , ( ( int ) ( loc.top ) ) , ( ( int ) ( loc.width ( ) ) ) , ( ( int ) ( loc.height ( ) ) ) , bitmap_instance , chunk , paint_instance_or_null , destDensity , srcDensity ) ; }
Source:
public java.lang.String getRemoteName ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getRemoteName() - Not allowed for non-active user" ) ; return null ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) return null ; return service.getRemoteName ( device ) ; }

Target:
public java.lang.String getRemoteName ( android.bluetooth.BluetoothDevice device ) { if ( ! ( com.android.bluetooth.Utils.checkCallerAllowManagedProfiles ( mService ) ) ) { android.util.Log.w ( com.android.bluetooth.btservice.AdapterService.TAG , "getRemoteName() - Not allowed for non-active user" ) ; return null ; } com.android.bluetooth.btservice.AdapterService service = getService ( ) ; if ( service == null ) { return null ; } return service.getRemoteName ( device ) ; }
Source:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_fp_mad s = new com.android.rs.test.ScriptC_fp_mad ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.invoke_fp_mad_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; pRS.destroy ( ) ; }

Target:
public void run ( ) { android.renderscript.RenderScript pRS = android.renderscript.RenderScript.create ( mCtx ) ; com.android.rs.test.ScriptC_fp_mad s = new com.android.rs.test.ScriptC_fp_mad ( pRS ) ; pRS.setMessageHandler ( mRsMessage ) ; s.invoke_fp_mad_test ( 0 , 0 ) ; pRS.finish ( ) ; waitForMessage ( ) ; s.destroy ( ) ; pRS.destroy ( ) ; }
Source:
public void ensureAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JParameter loaded ) { synchronized ( this ) { if ( isAnnotationsLoaded ) { return ; } com.android.jack.jayce.ParameterNode node ; try { node = getNNode ( ) ; node.loadAnnotations ( loaded ) ; } catch ( com.android.jack.LibraryException e ) { throw new com.android.jack.load.JackLoadingException ( getLocation ( loaded ) , e ) ; } isAnnotationsLoaded = true ; } loaded.removeLoader ( ) ; }

Target:
public void ensureAnnotations ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JParameter loaded ) { synchronized ( this ) { if ( isAnnotationsLoaded ) { return ; } com.android.jack.jayce.ParameterNode node ; try { node = getNNode ( ) ; node.loadAnnotations ( loaded , this ) ; } catch ( com.android.jack.LibraryException e ) { throw new com.android.jack.load.JackLoadingException ( getLocation ( loaded ) , e ) ; } isAnnotationsLoaded = true ; } loaded.removeLoader ( ) ; }
Source:
public void testRendering800x480Remotely ( ) throws java.lang.Throwable { android.util.Log.i ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , "testRendering800x480Remotely" ) ; android.util.Pair < java.lang.Integer , java.lang.Integer > maxRes = checkMaxConcurrentEncodingDecodingResolution ( ) ; if ( ( ( maxRes.first ) >= 800 ) && ( ( maxRes.second ) >= 480 ) ) { runTestRenderingInSeparateThread ( 800 , 480 , true , false ) ; } else { android.util.Log.w ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , "This H/W does not support 800x480" ) ; } }

Target:
public void testRendering800x480Remotely ( ) throws java.lang.Throwable { android.util.Log.i ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , "testRendering800x480Remotely" ) ; android.util.Pair < java.lang.Integer , java.lang.Integer > maxRes = checkMaxConcurrentEncodingDecodingResolution ( ) ; if ( maxRes == null ) return ; if ( ( ( maxRes.first ) >= 800 ) && ( ( maxRes.second ) >= 480 ) ) { runTestRenderingInSeparateThread ( 800 , 480 , true , false ) ; } else { android.util.Log.w ( android.media.cts.EncodeVirtualDisplayWithCompositionTest.TAG , "This H/W does not support 800x480" ) ; } }
Source:
private boolean overridesIsValidFragment ( com.android.tools.lint.client.api.JavaParser.ResolvedClass resolvedClass ) { java.lang.Iterable < com.android.tools.lint.client.api.JavaParser.ResolvedMethod > resolvedMethods = resolvedClass.getMethods ( com.android.tools.lint.checks.PreferenceActivityDetector.IS_VALID_FRAGMENT , false ) ; for ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod resolvedMethod : resolvedMethods ) { if ( ( ( resolvedMethod.getArgumentCount ( ) ) == 1 ) && ( resolvedMethod.getArgumentType ( 0 ) . getName ( ) . equals ( com.android.tools.lint.client.api.JavaParser.TYPE_STRING ) ) ) { return true ; } } return false ; }

Target:
private static boolean overridesIsValidFragment ( com.android.tools.lint.client.api.JavaParser.ResolvedClass resolvedClass ) { java.lang.Iterable < com.android.tools.lint.client.api.JavaParser.ResolvedMethod > resolvedMethods = resolvedClass.getMethods ( com.android.tools.lint.checks.PreferenceActivityDetector.IS_VALID_FRAGMENT , false ) ; for ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod resolvedMethod : resolvedMethods ) { if ( ( ( resolvedMethod.getArgumentCount ( ) ) == 1 ) && ( resolvedMethod.getArgumentType ( 0 ) . getName ( ) . equals ( com.android.tools.lint.client.api.JavaParser.TYPE_STRING ) ) ) { return true ; } } return false ; }
Source:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( ( method.getEnclosingType ( ) . isExternal ( ) ) || ( method.isNative ( ) ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( com.android.jack.transformations.cast.UselessCastRemover.class , method ) ) ) ) { return ; } com.android.jack.transformations.request.TransformationRequest request = new com.android.jack.transformations.request.TransformationRequest ( method ) ; com.android.jack.transformations.cast.UselessCastRemover.Visitor visitor = new com.android.jack.transformations.cast.UselessCastRemover.Visitor ( request ) ; visitor.accept ( method ) ; request.commit ( ) ; }

Target:
public void run ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) throws java.lang.Exception { if ( ( ( method.isNative ( ) ) || ( method.isAbstract ( ) ) ) || ( ! ( filter.accept ( com.android.jack.transformations.cast.UselessCastRemover.class , method ) ) ) ) { return ; } com.android.jack.transformations.request.TransformationRequest request = new com.android.jack.transformations.request.TransformationRequest ( method ) ; com.android.jack.transformations.cast.UselessCastRemover.Visitor visitor = new com.android.jack.transformations.cast.UselessCastRemover.Visitor ( request ) ; visitor.accept ( method ) ; request.commit ( ) ; }
Source:
public void testReceiveSessionModifyRequest ( ) throws java.lang.Exception { org.mockito.Mockito.doAnswer ( mVerification ) . when ( mVideoCallCallback ) . onSessionModifyRequestReceived ( org.mockito.Matchers.any ( android.telecom.VideoProfile.class ) ) ; mConnectionInfo.mockVideoProvider.sendMockSessionModifyRequest ( ) ; mVerificationLock.await ( com.android.server.telecom.tests.TEST_TIMEOUT , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.mockito.ArgumentCaptor < android.telecom.VideoProfile > requestProfileCaptor = org.mockito.ArgumentCaptor.forClass ( android.telecom.VideoProfile.class ) ; org.mockito.Mockito.verify ( mVideoCallCallback , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . onSessionModifyRequestReceived ( requestProfileCaptor.capture ( ) ) ; android.test.MoreAsserts.assertEquals ( VideoProfile.STATE_BIDIRECTIONAL , requestProfileCaptor.getValue ( ) . getVideoState ( ) ) ; }

Target:
public void testReceiveSessionModifyRequest ( ) throws java.lang.Exception { org.mockito.Mockito.doAnswer ( mVerification ) . when ( mVideoCallCallback ) . onSessionModifyRequestReceived ( org.mockito.Matchers.any ( android.telecom.VideoProfile.class ) ) ; mConnectionInfo.mockVideoProvider.sendMockSessionModifyRequest ( ) ; mVerificationLock.await ( com.android.server.telecom.tests.TEST_TIMEOUT , java.util.concurrent.TimeUnit.MILLISECONDS ) ; org.mockito.ArgumentCaptor < android.telecom.VideoProfile > requestProfileCaptor = org.mockito.ArgumentCaptor.forClass ( android.telecom.VideoProfile.class ) ; org.mockito.Mockito.verify ( mVideoCallCallback , org.mockito.Mockito.timeout ( com.android.server.telecom.tests.TEST_TIMEOUT ) ) . onSessionModifyRequestReceived ( requestProfileCaptor.capture ( ) ) ; org.junit.Assert.assertEquals ( VideoProfile.STATE_BIDIRECTIONAL , requestProfileCaptor.getValue ( ) . getVideoState ( ) ) ; }
Source:
public void testAbiOnlyWithUniversalMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( match , result ) ; }

Target:
public void testAbiOnlyWithUniversalMatch ( ) { com.android.build.SplitOutput match ; java.util.List < com.android.build.SplitOutput > list = com.google.common.collect.Lists.newArrayList ( ) ; list.add ( ( match = com.android.ide.common.build.SplitOutputMatcherTest.getUniversalOutput ( 1 ) ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "foo" , 2 ) ) ; list.add ( com.android.ide.common.build.SplitOutputMatcherTest.getAbiOutput ( "bar" , 3 ) ) ; com.android.build.SplitOutput result = com.android.ide.common.build.SplitOutputMatcherTest.computeBestOutput ( list , 160 , "zzz" ) ; assertEquals ( match , result ) ; }
Source:
private void addAttributeDeclaration ( org.eclipse.text.edits.MultiTextEdit rootEdit , int offset , java.lang.String attributePrefix , java.lang.String attributeName , java.lang.String attributeValue ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( ' ' ) . append ( attributePrefix ) . append ( ':' ) ; sb.append ( attributeName ) . append ( '=' ) . append ( '"' ) ; sb.append ( attributeValue ) . append ( '"' ) ; org.eclipse.text.edits.InsertEdit setAttribute = new org.eclipse.text.edits.InsertEdit ( offset , sb.toString ( ) ) ; rootEdit.addChild ( setAttribute ) ; }

Target:
private void addAttributeDeclaration ( org.eclipse.text.edits.MultiTextEdit rootEdit , int offset , java.lang.String attributePrefix , java.lang.String attributeName , java.lang.String attributeValue ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( ' ' ) ; if ( attributePrefix != null ) { sb.append ( attributePrefix ) . append ( ':' ) ; } sb.append ( attributeName ) . append ( '=' ) . append ( '"' ) ; sb.append ( attributeValue ) . append ( '"' ) ; org.eclipse.text.edits.InsertEdit setAttribute = new org.eclipse.text.edits.InsertEdit ( offset , sb.toString ( ) ) ; rootEdit.addChild ( setAttribute ) ; }
Source:
protected void handleUpdateState ( com.android.systemui.plugins.qs.QSTile.BooleanState state , java.lang.Object arg ) { final android.graphics.drawable.Drawable mEnable = mContext.getDrawable ( R.drawable.ic_qs_nfc_enabled ) ; final android.graphics.drawable.Drawable mDisable = mContext.getDrawable ( R.drawable.ic_qs_nfc_disabled ) ; state.value = getAdapter ( ) . isEnabled ( ) ; state.label = mContext.getString ( R.string.quick_settings_nfc_label ) ; state.icon = new com.android.systemui.qs.tiles.DrawableIcon ( ( state.value ? mEnable : mDisable ) ) ; state.expandedAccessibilityClassName = android.widget.Switch.class . getName ( ) ; state.contentDescription = state.label ; }

Target:
protected void handleUpdateState ( com.android.systemui.plugins.qs.QSTile.BooleanState state , java.lang.Object arg ) { final android.graphics.drawable.Drawable mEnable = mContext.getDrawable ( R.drawable.ic_qs_nfc_enabled ) ; final android.graphics.drawable.Drawable mDisable = mContext.getDrawable ( R.drawable.ic_qs_nfc_disabled ) ; if ( ( getAdapter ( ) ) == null ) return ; state.value = getAdapter ( ) . isEnabled ( ) ; state.label = mContext.getString ( R.string.quick_settings_nfc_label ) ; state.icon = new com.android.systemui.qs.tiles.DrawableIcon ( ( state.value ? mEnable : mDisable ) ) ; state.expandedAccessibilityClassName = android.widget.Switch.class . getName ( ) ; state.contentDescription = state.label ; }
Source:
public void handleMessage ( android.os.Message msg ) { riljLog ( ( ( ( ( ( "handleMessage: msg.what = " + ( msg.what ) ) + " cookie = " ) + ( msg.obj ) ) + " mRadioProxyCookie = " ) + ( mRadioProxyCookie.get ( ) ) ) ) ; if ( ( ( msg.what ) == ( com.android.internal.telephony.RIL.EVENT_RADIO_PROXY_DEAD ) ) && ( ( ( long ) ( msg.obj ) ) == ( mRadioProxyCookie.get ( ) ) ) ) { resetProxyAndRequestList ( ) ; getRadioProxy ( ) ; } }

Target:
public void handleMessage ( android.os.Message msg ) { riljLog ( ( ( ( ( ( "handleMessage: msg.what = " + ( msg.what ) ) + " cookie = " ) + ( msg.obj ) ) + " mRadioProxyCookie = " ) + ( mRadioProxyCookie.get ( ) ) ) ) ; if ( ( ( msg.what ) == ( com.android.internal.telephony.RIL.EVENT_RADIO_PROXY_DEAD ) ) && ( ( ( long ) ( msg.obj ) ) == ( mRadioProxyCookie.get ( ) ) ) ) { resetProxyAndRequestList ( ) ; getRadioProxy ( null ) ; } }
Source:
public boolean supports64Bits ( ) { java.lang.String targetString = getCompileSdkVersion ( ) . replace ( "android-" , "" ) ; try { return ( java.lang.Integer.parseInt ( targetString ) ) >= 20 ; } catch ( java.lang.NumberFormatException ignored ) { return true ; } }

Target:
public boolean supports64Bits ( ) { if ( ( getCompileSdkVersion ( ) ) == null ) { return false ; } java.lang.String targetString = getCompileSdkVersion ( ) . replace ( "android-" , "" ) ; try { return ( java.lang.Integer.parseInt ( targetString ) ) >= 20 ; } catch ( java.lang.NumberFormatException ignored ) { return true ; } }
Source:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject ) throws com.android.ide.eclipse.adt.internal.build.builders.AbortBuildException { super . abortOnBadSetup ( javaProject ) ; org.eclipse.core.resources.IProject iProject = getProject ( ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AAPT_COMPILE , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AIDL , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_RENDERSCRIPT , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_ANDROID , IResource.DEPTH_ZERO ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER , IResource.DEPTH_INFINITE ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.BUILDPATH_PROBLEM_MARKER , IResource.DEPTH_INFINITE ) ; }

Target:
protected void abortOnBadSetup ( org.eclipse.jdt.core.IJavaProject javaProject ) throws com.android.ide.eclipse.adt.internal.build.builders.AbortBuildException { super . abortOnBadSetup ( javaProject ) ; org.eclipse.core.resources.IProject iProject = getProject ( ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AAPT_COMPILE , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_AIDL , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_RENDERSCRIPT , IResource.DEPTH_INFINITE , false ) ; stopOnMarker ( iProject , AndroidConstants.MARKER_ANDROID , IResource.DEPTH_ZERO , false ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER , IResource.DEPTH_INFINITE , true ) ; stopOnMarker ( iProject , org.eclipse.jdt.core.IJavaModelMarker.BUILDPATH_PROBLEM_MARKER , IResource.DEPTH_INFINITE , true ) ; }
Source:
public void run ( ) { ( mTestIndex ) ++ ; if ( ( mTestIndex ) < ( mTests.length ) ) { mTests [ mTestIndex ] . run ( ) ; } else { mNextButton.setVisibility ( View.GONE ) ; findViewById ( R.id.pass_button ) . setVisibility ( View.VISIBLE ) ; } }

Target:
protected void run ( ) { super . run ( ) ; mNextButton.setVisibility ( View.GONE ) ; findViewById ( R.id.pass_button ) . setVisibility ( View.VISIBLE ) ; }
Source:
private void onGetImageSuccess ( java.lang.String cacheKey , android.graphics.Bitmap response ) { mCache.putBitmap ( cacheKey , response ) ; com.android.volley.toolbox.ImageLoader.BatchedImageRequest request = mInFlightRequests.remove ( cacheKey ) ; if ( request != null ) { request.mResponseBitmap = response ; batchResponse ( cacheKey , request , null ) ; } }

Target:
private void onGetImageSuccess ( java.lang.String cacheKey , android.graphics.Bitmap response ) { mCache.putBitmap ( cacheKey , response ) ; com.android.volley.toolbox.ImageLoader.BatchedImageRequest request = mInFlightRequests.remove ( cacheKey ) ; if ( request != null ) { request.mResponseBitmap = response ; batchResponse ( cacheKey , request ) ; } }
Source:
private boolean denyIfQueueLimitReached ( com.android.internal.telephony.SMSDispatcher.SmsTracker tracker ) { if ( ( mPendingTrackerCount ) >= ( com.android.internal.telephony.SMSDispatcher.MO_MSG_QUEUE_LIMIT ) ) { try { tracker.mSentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_LIMIT_EXCEEDED ) ; } catch ( android.app.PendingIntent.CanceledException ex ) { android.util.Log.e ( com.android.internal.telephony.SMSDispatcher.TAG , "failed to send back RESULT_ERROR_LIMIT_EXCEEDED" ) ; } return true ; } ( mPendingTrackerCount ) ++ ; return false ; }

Target:
private boolean denyIfQueueLimitReached ( com.android.internal.telephony.SMSDispatcher.SmsTracker tracker ) { if ( ( mPendingTrackerCount ) >= ( com.android.internal.telephony.SMSDispatcher.MO_MSG_QUEUE_LIMIT ) ) { try { if ( ( tracker.mSentIntent ) != null ) { tracker.mSentIntent.send ( android.telephony.SmsManager.RESULT_ERROR_LIMIT_EXCEEDED ) ; } } catch ( android.app.PendingIntent.CanceledException ex ) { android.util.Log.e ( com.android.internal.telephony.SMSDispatcher.TAG , "failed to send back RESULT_ERROR_LIMIT_EXCEEDED" ) ; } return true ; } ( mPendingTrackerCount ) ++ ; return false ; }
Source:
private static java.io.Serializable getObject ( junit.framework.TestCase test , java.lang.String toAppend ) throws java.lang.Exception { java.lang.StringBuilder path = new java.lang.StringBuilder ( "/serialization" ) ; path.append ( java.io.File.separatorChar ) ; path.append ( test.getClass ( ) . getName ( ) . replace ( '.' , java.io.File.separatorChar ) ) ; path.append ( toAppend ) ; java.lang.String pathString = path.toString ( ) ; java.io.InputStream in = org.apache.harmony.testframework.serialization.SerializationTest.class . getResourceAsStream ( pathString ) ; assertNotNull ( ( "Failed to load serialization resource file: " + path ) , in ) ; return org.apache.harmony.testframework.serialization.SerializationTest.getObjectFromStream ( in ) ; }

Target:
private static java.io.Serializable getObject ( java.lang.Object test , java.lang.String toAppend ) throws java.lang.Exception { java.lang.StringBuilder path = new java.lang.StringBuilder ( "/serialization" ) ; path.append ( java.io.File.separatorChar ) ; path.append ( test.getClass ( ) . getName ( ) . replace ( '.' , java.io.File.separatorChar ) ) ; path.append ( toAppend ) ; java.lang.String pathString = path.toString ( ) ; java.io.InputStream in = org.apache.harmony.testframework.serialization.SerializationTest.class . getResourceAsStream ( pathString ) ; assertNotNull ( ( "Failed to load serialization resource file: " + path ) , in ) ; return org.apache.harmony.testframework.serialization.SerializationTest.getObjectFromStream ( in ) ; }
Source:
public boolean isVoicemailTranscriptionAvailable ( android.content.Context context ) { if ( ! ( android.support.v4.os.BuildCompat.isAtLeastO ( ) ) ) { com.android.dialer.common.LogUtil.i ( "VoicemailClientImpl.isVoicemailTranscriptionAvailable" , "not running on O or later" ) ; return false ; } com.android.voicemail.impl.transcribe.TranscriptionConfigProvider provider = new com.android.voicemail.impl.transcribe.TranscriptionConfigProvider ( context ) ; if ( ! ( provider.isVoicemailTranscriptionEnabled ( ) ) ) { com.android.dialer.common.LogUtil.i ( "VoicemailClientImpl.isVoicemailTranscriptionAvailable" , "feature disabled by config" ) ; return false ; } return true ; }

Target:
public boolean isVoicemailTranscriptionAvailable ( android.content.Context context ) { if ( ! ( android.support.v4.os.BuildCompat.isAtLeastO ( ) ) ) { com.android.dialer.common.LogUtil.i ( "VoicemailClientImpl.isVoicemailTranscriptionAvailable" , "not running on O or later" ) ; return false ; } com.android.voicemail.impl.transcribe.TranscriptionConfigProvider provider = new com.android.voicemail.impl.transcribe.TranscriptionConfigProvider ( context ) ; if ( ! ( provider.isVoicemailTranscriptionAvailable ( ) ) ) { com.android.dialer.common.LogUtil.i ( "VoicemailClientImpl.isVoicemailTranscriptionAvailable" , "feature disabled by config" ) ; return false ; } return true ; }
Source:
public java.lang.String getDriverVersion ( ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getDriverVersion ( ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getDriverVersionNative ( com.android.server.wifi.WifiNative.sWlan0Index ) ; } else { return "" ; } } } }

Target:
public java.lang.String getDriverVersion ( ) { return mWifiVendorHal.getDriverVersion ( ) ; }
Source:
public java.text.AttributedCharacterIterator formatToCharacterIterator ( java.lang.Object object ) { if ( object == null ) { throw new java.lang.NullPointerException ( "object == null" ) ; } if ( ( ( roundingMode ) == ( java.math.RoundingMode.UNNECESSARY ) ) && ( ( object instanceof java.lang.Float ) || ( object instanceof java.lang.Double ) ) ) { checkRoundingUnnecessary ( ( ( java.lang.Number ) ( object ) ) . doubleValue ( ) ) ; } return ndf.formatToCharacterIterator ( object ) ; }

Target:
public java.text.AttributedCharacterIterator formatToCharacterIterator ( java.lang.Object object ) { if ( object == null ) { throw new java.lang.NullPointerException ( "object == null" ) ; } return ndf.formatToCharacterIterator ( object ) ; }
Source:
protected java.net.URLConnection openConnection ( @ javax.annotation.Nonnull java.net.URL u ) throws java.io.IOException { java.util.zip.ZipEntry entry = zip.getEntry ( com.android.jack.launcher.ZipLoader.getZipEntry ( u ) ) ; if ( entry == null ) { throw new java.io.FileNotFoundException ( u.toString ( ) ) ; } return new com.android.jack.launcher.ZipLoader.ZipURLConnection ( u , zip , entry ) ; }

Target:
protected java.net.URLConnection openConnection ( @ javax.annotation.Nonnull java.net.URL url ) throws java.io.IOException { java.util.zip.ZipEntry entry = zip.getEntry ( com.android.jack.launcher.ZipLoader.getZipEntry ( url ) ) ; if ( entry == null ) { throw new java.io.FileNotFoundException ( url.toString ( ) ) ; } return new com.android.jack.launcher.ZipLoader.ZipURLConnection ( url , zip , entry ) ; }
Source:
private void editMmsMessageItem ( com.android.mms.ui.MessageItem msgItem ) { com.android.mms.data.WorkingMessage newWorkingMessage = com.android.mms.data.WorkingMessage.load ( this , msgItem.mMessageUri ) ; if ( newWorkingMessage == null ) { return ; } mWorkingMessage.discard ( ) ; mWorkingMessage = newWorkingMessage ; mWorkingMessage.setConversation ( mConversation ) ; invalidateOptionsMenu ( ) ; drawTopPanel ( false ) ; mWorkingMessage.setSubject ( msgItem.mSubject , false ) ; if ( mWorkingMessage.hasSubject ( ) ) { showSubjectEditor ( true ) ; } }

Target:
private void editMmsMessageItem ( com.android.mms.ui.MessageItem msgItem ) { com.android.mms.data.WorkingMessage newWorkingMessage = com.android.mms.data.WorkingMessage.load ( this , msgItem.mMessageUri ) ; if ( newWorkingMessage == null ) { return ; } mWorkingMessage.discard ( ) ; mWorkingMessage = newWorkingMessage ; mWorkingMessage.setConversation ( mConversation ) ; drawTopPanel ( false ) ; mWorkingMessage.setSubject ( msgItem.mSubject , false ) ; if ( mWorkingMessage.hasSubject ( ) ) { showSubjectEditor ( true ) ; } }
Source:
private int parseIdFromInsertedUri ( android.net.Uri uri ) { int id = 0 ; if ( uri != null ) { try { id = java.lang.Integer.parseInt ( uri.getLastPathSegment ( ) ) ; } catch ( java.lang.NumberFormatException e ) { } } assertTrue ( "Can't parse ID for inserted APN" , ( id != 0 ) ) ; return id ; }

Target:
private int parseIdFromInsertedUri ( android.net.Uri uri ) throws java.lang.NumberFormatException { return uri != null ? java.lang.Integer.parseInt ( uri.getLastPathSegment ( ) ) : - 1 ; }
Source:
synchronized void nAllocationData2D ( int id , int xoff , int yoff , int mip , int face , int w , int h , short [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes ) ; }
Source:
private void verifyRaEvent ( android.net.metrics.RaEvent expected ) { org.mockito.ArgumentCaptor < android.os.Parcelable > captor = org.mockito.ArgumentCaptor.forClass ( android.os.Parcelable.class ) ; org.mockito.Mockito.verify ( mLog , org.mockito.Mockito.atLeastOnce ( ) ) . log ( captor.capture ( ) ) ; android.net.metrics.RaEvent got = lastRaEvent ( captor.getAllValues ( ) ) ; if ( ! ( raEventEquals ( expected , got ) ) ) { assertEquals ( expected , got ) ; } }

Target:
private void verifyRaEvent ( android.net.metrics.RaEvent expected ) { org.mockito.ArgumentCaptor < android.os.Parcelable > captor = org.mockito.ArgumentCaptor.forClass ( android.os.Parcelable.class ) ; org.mockito.Mockito.verify ( mLog , org.mockito.Mockito.atLeastOnce ( ) ) . log ( captor.capture ( ) ) ; android.net.metrics.RaEvent got = lastRaEvent ( captor.getAllValues ( ) ) ; if ( ! ( raEventEquals ( expected , got ) ) ) { org.junit.Assert.assertEquals ( expected , got ) ; } }
Source:
public void watchdogBitePnoGoodIncrementsMetrics ( ) { when ( mWifiNS.selectNetwork ( anyObject ( ) , anyObject ( ) , anyBoolean ( ) , anyBoolean ( ) , anyBoolean ( ) ) ) . thenReturn ( null ) ; mWifiConnectivityManager.handleScreenStateChanged ( false ) ; mWifiConnectivityManager.handleConnectionStateChanged ( WifiConnectivityManager.WIFI_STATE_DISCONNECTED ) ; mAlarmManager.dispatch ( WifiConnectivityManager.WATCHDOG_TIMER_TAG ) ; mLooper.dispatchAll ( ) ; verify ( mWifiMetrics ) . incrementNumConnectivityWatchdogPnoGood ( ) ; verify ( mWifiMetrics , never ( ) ) . incrementNumConnectivityWatchdogPnoBad ( ) ; }

Target:
public void watchdogBitePnoGoodIncrementsMetrics ( ) { when ( mWifiNS.selectNetwork ( anyObject ( ) , anyObject ( ) , anyObject ( ) , anyBoolean ( ) , anyBoolean ( ) , anyBoolean ( ) ) ) . thenReturn ( null ) ; mWifiConnectivityManager.handleScreenStateChanged ( false ) ; mWifiConnectivityManager.handleConnectionStateChanged ( WifiConnectivityManager.WIFI_STATE_DISCONNECTED ) ; mAlarmManager.dispatch ( WifiConnectivityManager.WATCHDOG_TIMER_TAG ) ; mLooper.dispatchAll ( ) ; verify ( mWifiMetrics ) . incrementNumConnectivityWatchdogPnoGood ( ) ; verify ( mWifiMetrics , never ( ) ) . incrementNumConnectivityWatchdogPnoBad ( ) ; }
Source:
private void responseCellInfoList ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.util.ArrayList < com.android.internal.telephony.V1_0.CellInfo > cellInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < android.telephony.CellInfo > ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalCellInfoList ( cellInfo ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseCellInfoList ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , java.util.ArrayList < com.android.internal.telephony.V1_0.CellInfo > cellInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < android.telephony.CellInfo > ret = com.android.internal.telephony.RIL.convertHalCellInfoList ( cellInfo ) ; 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:
public boolean hasChanged ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.sdklib.repository.descriptors.PkgType > filters ) { for ( com.android.sdklib.repository.descriptors.PkgType filter : filters ) { java.util.Collection < com.android.sdklib.repository.local.LocalDirInfo > dirInfos ; synchronized ( mLocalPackages ) { dirInfos = mVisitedDirs.get ( filter ) ; } for ( com.android.sdklib.repository.local.LocalDirInfo dirInfo : dirInfos ) { if ( dirInfo.hasChanged ( ) ) { return true ; } } } return false ; }

Target:
public boolean hasChanged ( @ com.android.annotations.NonNull java.util.EnumSet < com.android.sdklib.repository.descriptors.PkgType > filters ) { for ( com.android.sdklib.repository.descriptors.PkgType filter : filters ) { java.util.Collection < com.android.sdklib.repository.local.LocalDirInfo > dirInfos ; synchronized ( mLocalPackages ) { dirInfos = mVisitedDirs.get ( filter ) ; for ( com.android.sdklib.repository.local.LocalDirInfo dirInfo : dirInfos ) { if ( dirInfo.hasChanged ( ) ) { return true ; } } } } return false ; }
Source:
private void addDexFolder ( @ com.android.annotations.NonNull java.io.File dexFolder ) throws com.android.builder.packaging.DuplicateFileException , com.android.builder.packaging.PackagerException , com.android.builder.packaging.SealedPackageException { java.io.File [ ] files = dexFolder.listFiles ( new java.io.FilenameFilter ( ) { @ java.lang.Override public boolean accept ( java.io.File file , java.lang.String name ) { return name.endsWith ( SdkConstants.DOT_DEX ) ; } } ) ; if ( ( files != null ) && ( ( files.length ) > 0 ) ) { for ( java.io.File file : files ) { addDexFile ( file ) ; } } }

Target:
public void addDexFolder ( @ com.android.annotations.NonNull java.io.File dexFolder ) throws com.android.builder.packaging.DuplicateFileException , com.android.builder.packaging.PackagerException , com.android.builder.packaging.SealedPackageException { java.io.File [ ] files = dexFolder.listFiles ( new java.io.FilenameFilter ( ) { @ java.lang.Override public boolean accept ( java.io.File file , java.lang.String name ) { return name.endsWith ( SdkConstants.DOT_DEX ) ; } } ) ; if ( ( files != null ) && ( ( files.length ) > 0 ) ) { for ( java.io.File file : files ) { addDexFile ( file ) ; } } }
Source:
public void testSaveProperties ( ) { java.util.Properties expected = createExpectedProps ( ) ; com.android.sdklib.internal.repository.packages.MinToolsPackageTest.MockMinToolsPackage p = new com.android.sdklib.internal.repository.packages.MinToolsPackageTest.MockMinToolsPackage ( null , expected , ( - 1 ) , null , null , null , com.android.sdklib.internal.repository.archives.Archive.Os.ANY , com.android.sdklib.internal.repository.archives.Archive.Arch.ANY , LOCAL_ARCHIVE_PATH ) ; java.util.Properties actual = new java.util.Properties ( ) ; p.saveProperties ( actual ) ; assertEquals ( expected , actual ) ; }

Target:
public void testSaveProperties ( ) { java.util.Properties expected = createExpectedProps ( ) ; com.android.sdklib.internal.repository.packages.MinToolsPackageTest.MockMinToolsPackage p = new com.android.sdklib.internal.repository.packages.MinToolsPackageTest.MockMinToolsPackage ( null , expected , ( - 1 ) , null , null , null , LOCAL_ARCHIVE_PATH ) ; java.util.Properties actual = new java.util.Properties ( ) ; p.saveProperties ( actual ) ; assertEquals ( expected , actual ) ; }
Source:
public void test_checkServerTrusted_03 ( ) { org.apache.harmony.xnet.tests.support.X509TrustManagerImpl xtm = new org.apache.harmony.xnet.tests.support.X509TrustManagerImpl ( ) ; java.security.cert.X509Certificate [ ] xcert = setX509Certificate ( ) ; try { xtm.checkServerTrusted ( xcert , "SSL" ) ; } catch ( java.lang.Exception ex ) { fail ( ( "Unexpected exception " + ex ) ) ; } }

Target:
public void test_checkServerTrusted_03 ( ) throws java.lang.Exception { org.apache.harmony.xnet.tests.support.X509TrustManagerImpl xtm = new org.apache.harmony.xnet.tests.support.X509TrustManagerImpl ( ) ; java.security.cert.X509Certificate [ ] xcert = setX509Certificate ( ) ; xtm.checkServerTrusted ( xcert , "SSL" ) ; }
Source:
public java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > getConfiguredResources ( @ com.android.annotations.NonNull com.android.ide.common.resources.configuration.FolderConfiguration referenceConfig ) { java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > map = com.google.common.collect.Maps.newEnumMap ( com.android.resources.ResourceType.class ) ; synchronized ( mItems ) { for ( com.android.resources.ResourceType key : com.android.resources.ResourceType.values ( ) ) { map.put ( key , getConfiguredResource ( key , referenceConfig ) ) ; } } return map ; }

Target:
public java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > getConfiguredResources ( @ com.android.annotations.NonNull com.android.ide.common.resources.configuration.FolderConfiguration referenceConfig ) { java.util.Map < com.android.resources.ResourceType , java.util.Map < java.lang.String , com.android.ide.common.rendering.api.ResourceValue > > map = com.google.common.collect.Maps.newEnumMap ( com.android.resources.ResourceType.class ) ; synchronized ( mItems ) { for ( com.android.resources.ResourceType key : com.android.resources.ResourceType.values ( ) ) { map.put ( key , getConfiguredResources ( key , referenceConfig ) ) ; } } return map ; }
Source:
private void checkSubroutine ( int offset ) { if ( ( subroutineStarts [ offset ] ) != ( proguard.optimize.peephole.BranchTargetFinder.UNKNOWN ) ) { currentSubroutineStart = subroutineStarts [ offset ] ; } else if ( ( currentSubroutineStart ) != ( proguard.optimize.peephole.BranchTargetFinder.UNKNOWN ) ) { subroutineStarts [ offset ] = currentSubroutineStart ; if ( ( currentSubroutineStart ) >= 0 ) { subroutineEnds [ currentSubroutineStart ] = offset ; } } }

Target:
private void checkSubroutine ( int offset ) { if ( ( subroutineStarts [ offset ] ) != ( proguard.optimize.peephole.BranchTargetFinder.UNKNOWN ) ) { currentSubroutineStart = subroutineStarts [ offset ] ; } else if ( ( currentSubroutineStart ) != ( proguard.optimize.peephole.BranchTargetFinder.UNKNOWN ) ) { subroutineStarts [ offset ] = currentSubroutineStart ; } }
Source:
public void testProcessChldAddHeldToConf ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; removeCallCapability ( activeCall , Connection.CAPABILITY_MERGE_CONFERENCE ) ; com.android.server.telecom.Call conferenceableCall = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; java.util.ArrayList < com.android.server.telecom.Call > conferenceableCalls = new java.util.ArrayList < > ( ) ; conferenceableCalls.add ( conferenceableCall ) ; org.mockito.Mockito.when ( activeCall.getConferenceableCalls ( ) ) . thenReturn ( conferenceableCalls ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_ADDHELDTOCONF ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . conference ( activeCall , conferenceableCall ) ; assertEquals ( didProcess , true ) ; }

Target:
public void testProcessChldAddHeldToConf ( ) throws java.lang.Exception { com.android.server.telecom.Call activeCall = createActiveCall ( ) ; removeCallCapability ( activeCall , Connection.CAPABILITY_MERGE_CONFERENCE ) ; com.android.server.telecom.Call conferenceableCall = org.mockito.Mockito.mock ( com.android.server.telecom.Call.class ) ; java.util.ArrayList < com.android.server.telecom.Call > conferenceableCalls = new java.util.ArrayList < > ( ) ; conferenceableCalls.add ( conferenceableCall ) ; org.mockito.Mockito.when ( activeCall.getConferenceableCalls ( ) ) . thenReturn ( conferenceableCalls ) ; boolean didProcess = mBluetoothPhoneService.mBinder.processChld ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CHLD_TYPE_ADDHELDTOCONF ) ; org.mockito.Mockito.verify ( mMockCallsManager ) . conference ( activeCall , conferenceableCall ) ; org.junit.Assert.assertEquals ( didProcess , true ) ; }
Source:
public static byte [ ] byteAddrFromLongAddr ( long addr ) { byte [ ] bytes = new byte [ android.net.MacAddress.ETHER_ADDR_LEN ] ; int index = android.net.MacAddress.ETHER_ADDR_LEN ; while ( ( index -- ) > 0 ) { bytes [ index ] = ( ( byte ) ( addr ) ) ; addr = addr > > 8 ; } return bytes ; }

Target:
private static byte [ ] byteAddrFromLongAddr ( long addr ) { byte [ ] bytes = new byte [ android.net.MacAddress.ETHER_ADDR_LEN ] ; int index = android.net.MacAddress.ETHER_ADDR_LEN ; while ( ( index -- ) > 0 ) { bytes [ index ] = ( ( byte ) ( addr ) ) ; addr = addr > > 8 ; } return bytes ; }
Source:
public void checkValidity ( ) { super . checkValidity ( ) ; if ( ( getElementCount ( ) ) != 1 ) { throw new com.android.jack.ir.JNodeInternalError ( this , "Block must always have one single element" ) ; } if ( ( ! ( ( getLastElement ( ) ) instanceof com.android.jack.ir.ast.cfg.JVariableAsgBlockElement ) ) || ( ! ( ( ( com.android.jack.ir.ast.cfg.JVariableAsgBlockElement ) ( getLastElement ( ) ) ) . isCatchVariableAssignment ( ) ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "The only element of the block must be catch variable assignment element" ) ; } }

Target:
public void checkValidity ( ) { super . checkValidity ( ) ; if ( ( ! ( ( getLastElement ( ) ) instanceof com.android.jack.ir.ast.cfg.JVariableAsgBlockElement ) ) || ( ! ( ( ( com.android.jack.ir.ast.cfg.JVariableAsgBlockElement ) ( getLastElement ( ) ) ) . isCatchVariableAssignment ( ) ) ) ) { throw new com.android.jack.ir.JNodeInternalError ( this , "The only element of the block must be catch variable assignment element" ) ; } }
Source:
private void expandNode ( com.android.traceview.MethodData md ) { com.android.traceview.ProfileNode [ ] nodes = md.getProfileNodes ( ) ; mTreeViewer.setExpandedState ( md , true ) ; for ( com.android.traceview.ProfileNode node : nodes ) { if ( ( node.isRecursive ( ) ) == false ) mTreeViewer.setExpandedState ( node , true ) ; } }

Target:
private void expandNode ( com.android.traceview.MethodData md ) { com.android.traceview.ProfileNode [ ] nodes = md.getProfileNodes ( ) ; mTreeViewer.setExpandedState ( md , true ) ; if ( nodes != null ) { for ( com.android.traceview.ProfileNode node : nodes ) { if ( ( node.isRecursive ( ) ) == false ) mTreeViewer.setExpandedState ( node , true ) ; } } }
Source:
public void testRoamFailureDueToBssidSet ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; int connectedNetworkId = 5 ; executeAndValidateConnectSequence ( connectedNetworkId , false , false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( false ) ; android.net.wifi.WifiConfiguration roamingConfig = new android.net.wifi.WifiConfiguration ( ) ; roamingConfig.networkId = connectedNetworkId ; roamingConfig.getNetworkSelectionStatus ( ) . setNetworkSelectionBSSID ( "45:34:23:23:ab:ed" ) ; assertFalse ( mDut.roamToNetwork ( roamingConfig ) ) ; }

Target:
public void testRoamFailureDueToBssidSet ( ) throws java.lang.Exception { executeAndValidateInitializationSequence ( ) ; int connectedNetworkId = 5 ; executeAndValidateConnectSequence ( connectedNetworkId , false ) ; org.mockito.Mockito.when ( mSupplicantStaNetworkMock.setBssid ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( false ) ; android.net.wifi.WifiConfiguration roamingConfig = new android.net.wifi.WifiConfiguration ( ) ; roamingConfig.networkId = connectedNetworkId ; roamingConfig.getNetworkSelectionStatus ( ) . setNetworkSelectionBSSID ( "45:34:23:23:ab:ed" ) ; assertFalse ( mDut.roamToNetwork ( roamingConfig ) ) ; }
Source:
private android.app.PendingIntent createCallLogPendingIntent ( @ android.support.annotation.Nullable android.net.Uri callUri ) { android.content.Intent contentIntent ; if ( com.android.dialer.app.MainComponent.isNuiComponentEnabled ( context ) ) { contentIntent = com.android.dialer.app.MainComponent.getShowCallLogIntent ( context ) ; } else { contentIntent = com.android.dialer.app.DialtactsActivity.getShowTabIntent ( context , DialtactsPagerAdapter.TAB_INDEX_HISTORY ) ; } contentIntent.setData ( callUri ) ; return android.app.PendingIntent.getActivity ( context , 0 , contentIntent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }

Target:
private android.app.PendingIntent createCallLogPendingIntent ( @ android.support.annotation.Nullable android.net.Uri callUri ) { android.content.Intent contentIntent = com.android.dialer.app.MainComponent.getShowCallLogIntent ( context ) ; contentIntent.setData ( callUri ) ; return android.app.PendingIntent.getActivity ( context , 0 , contentIntent , PendingIntent.FLAG_UPDATE_CURRENT ) ; }
Source:
static void deleteRecordRecursively ( int id ) { try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; com.intellij.openapi.vfs.newvfs.persistent.FSRecords.incModCount ( id ) ; if ( com.intellij.openapi.vfs.newvfs.persistent.FSRecords.lazyVfsDataCleaning ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.markAsDeletedRecursively ( id ) ; } else { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.doDeleteRecursively ( 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:
static void deleteRecordRecursively ( int id ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.w.lock ( ) ; try { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.incModCount ( id ) ; if ( com.intellij.openapi.vfs.newvfs.persistent.FSRecords.lazyVfsDataCleaning ) { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.markAsDeletedRecursively ( id ) ; } else { com.intellij.openapi.vfs.newvfs.persistent.FSRecords.doDeleteRecursively ( 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 ( ) ; } }