auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testCheckAccessLevel_hasAppOpsBitDefault_grantedPermission ( ) throws java.lang.Exception { setHasCarrierPrivileges ( false ) ; setIsDeviceOwner ( false ) ; setIsProfileOwner ( true ) ; setHasAppOpsPermission ( AppOpsManager.MODE_DEFAULT , true ) ; setHasReadHistoryPermission ( false ) ; assertEquals ( NetworkStatsAccess.Level.USER , com.android.server.net.NetworkStatsAccess.checkAccessLevel ( mContext , com.android.server.net.NetworkStatsAccessTest.TEST_UID , com.android.server.net.NetworkStatsAccessTest.TEST_PKG ) ) ; }

Target:
public void testCheckAccessLevel_hasAppOpsBitDefault_grantedPermission ( ) throws java.lang.Exception { setHasCarrierPrivileges ( false ) ; setIsDeviceOwner ( false ) ; setIsProfileOwner ( true ) ; setHasAppOpsPermission ( AppOpsManager.MODE_DEFAULT , true ) ; setHasReadHistoryPermission ( false ) ; org.junit.Assert.assertEquals ( NetworkStatsAccess.Level.DEVICESUMMARY , com.android.server.net.NetworkStatsAccess.checkAccessLevel ( mContext , com.android.server.net.NetworkStatsAccessTest.TEST_UID , com.android.server.net.NetworkStatsAccessTest.TEST_PKG ) ) ; }
Source:
public void insert ( com.google.common.collect.ImmutableList < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { if ( entries.isEmpty ( ) ) { return ; } android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; db.beginTransaction ( ) ; try { insert ( db , entries ) ; db.setTransactionSuccessful ( ) ; } finally { db.endTransaction ( ) ; db.close ( ) ; } }

Target:
public com.google.common.collect.ImmutableMap < com.android.dialer.speeddial.database.SpeedDialEntry , java.lang.Long > insert ( com.google.common.collect.ImmutableList < com.android.dialer.speeddial.database.SpeedDialEntry > entries ) { if ( entries.isEmpty ( ) ) { return com.google.common.collect.ImmutableMap.of ( ) ; } android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; db.beginTransaction ( ) ; try { com.google.common.collect.ImmutableMap < com.android.dialer.speeddial.database.SpeedDialEntry , java.lang.Long > insertedEntriesToIdsMap = insert ( db , entries ) ; db.setTransactionSuccessful ( ) ; return insertedEntriesToIdsMap ; } finally { db.endTransaction ( ) ; db.close ( ) ; } }
Source:
public static void assertEqualCertificateChains ( byte [ ] [ ] expected , byte [ ] [ ] actual ) { org.conscrypt.NativeCryptoTest.assertEqualByteArrays ( expected , actual ) ; }

Target:
public static void assertEqualCertificateChains ( long [ ] expected , long [ ] actual ) { assertEquals ( expected.length , actual.length ) ; for ( int i = 0 ; i < ( expected.length ) ; i ++ ) { org.conscrypt.NativeCrypto.X509_cmp ( expected [ i ] , actual [ i ] ) ; } }
Source:
private void setupFunctioningHardwareInterface ( ) { org.mockito.Mockito.when ( mHardware.initOffloadConfig ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mHardware.initOffloadControl ( org.mockito.Matchers.any ( OffloadHardwareInterface.ControlCallback.class ) ) ) . thenReturn ( true ) ; }

Target:
private void setupFunctioningHardwareInterface ( ) { org.mockito.Mockito.when ( mHardware.initOffloadConfig ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mHardware.initOffloadControl ( org.mockito.Matchers.any ( OffloadHardwareInterface.ControlCallback.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( mHardware.getForwardedStats ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( new com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats ( ) ) ; }
Source:
public void changeBarringPassword ( java.lang.String facility , java.lang.String oldPwd , java.lang.String newPwd , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CHANGE_BARRING_PASSWORD , result ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeInt ( 3 ) ; rr.mParcel.writeString ( facility ) ; rr.mParcel.writeString ( oldPwd ) ; rr.mParcel.writeString ( newPwd ) ; send ( rr ) ; }

Target:
public void changeBarringPassword ( java.lang.String facility , java.lang.String oldPwd , java.lang.String newPwd , android.os.Message result ) { com.android.internal.telephony.RILRequest rr = com.android.internal.telephony.RILRequest.obtain ( com.android.internal.telephony.RIL_REQUEST_CHANGE_BARRING_PASSWORD , result , mRILDefaultWorkSource ) ; if ( com.android.internal.telephony.RIL.RILJ_LOGD ) riljLog ( ( ( ( rr.serialString ( ) ) + "> " ) + ( com.android.internal.telephony.RIL.requestToString ( rr.mRequest ) ) ) ) ; rr.mParcel.writeInt ( 3 ) ; rr.mParcel.writeString ( facility ) ; rr.mParcel.writeString ( oldPwd ) ; rr.mParcel.writeString ( newPwd ) ; send ( rr ) ; }
Source:
public void copyFrom ( float [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFrom" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFrom ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFrom ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFrom ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( short [ ] d ) { validateIsInt16 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_16 , d.length ) ; }
Source:
private void setCalcTypeForLocale ( com.ibm.icu.util.ULocale locale ) { java.lang.String localeCalType = com.ibm.icu.impl.CalendarUtil.getCalendarType ( locale ) ; if ( "islamic-civil" . equals ( localeCalType ) ) setType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_CIVIL ) ; else if ( "islamic-umalqura" . equals ( localeCalType ) ) setType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_UMALQURA ) ; else if ( "islamic-tbla" . equals ( localeCalType ) ) setType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_TBLA ) ; else if ( localeCalType.startsWith ( "islamic" ) ) setType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC ) ; else setType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_CIVIL ) ; }

Target:
private void setCalcTypeForLocale ( com.ibm.icu.util.ULocale locale ) { java.lang.String localeCalType = com.ibm.icu.impl.CalendarUtil.getCalendarType ( locale ) ; if ( "islamic-civil" . equals ( localeCalType ) ) setCalculationType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_CIVIL ) ; else if ( "islamic-umalqura" . equals ( localeCalType ) ) setCalculationType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_UMALQURA ) ; else if ( "islamic-tbla" . equals ( localeCalType ) ) setCalculationType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_TBLA ) ; else if ( localeCalType.startsWith ( "islamic" ) ) setCalculationType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC ) ; else setCalculationType ( com.ibm.icu.util.IslamicCalendar.CalculationType.ISLAMIC_CIVIL ) ; }
Source:
public void visitResourceReference ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable lombok.ast.AstVisitor visitor , @ com.android.annotations.NonNull org.w3c.dom.Node node , @ com.android.annotations.NonNull java.lang.String type , @ com.android.annotations.NonNull java.lang.String name , boolean isFramework ) { if ( ! isFramework ) { com.android.resources.ResourceType t = com.android.resources.ResourceType.getEnum ( type ) ; assert t != null : type ; com.android.tools.lint.checks.ResourceUsageModel.markReachable ( mModel.addResource ( t , name , null ) ) ; } }

Target:
public void visitReferenceExpression ( com.intellij.psi.PsiReferenceExpression expression ) { com.intellij.psi.PsiElement resolved = expression.resolve ( ) ; if ( resolved instanceof com.intellij.psi.PsiField ) { com.android.ide.common.resources.ResourceUrl url = com.android.tools.lint.detector.api.ResourceEvaluator.getResourceConstant ( resolved ) ; if ( ( url != null ) && ( ! ( url.framework ) ) ) { com.android.tools.lint.checks.ResourceUsageModel.Resource resource = mModel.addResource ( url.type , url.name , null ) ; com.android.tools.lint.checks.ResourceUsageModel.markReachable ( resource ) ; } } super . visitReferenceExpression ( expression ) ; }
Source:
public synchronized void close ( ) throws java.io.IOException { if ( ! ( closed ) ) { if ( ( zipFile.getStatus ( ) ) == ( com.android.sched.util.file.StreamFileStatus.OPEN ) ) { zipFile.getOutputStream ( ) . close ( ) ; } closed = true ; } }

Target:
public synchronized void close ( ) throws com.android.sched.util.file.CannotCloseOutputException { if ( ! ( closed ) ) { if ( ( zipFile.getStatus ( ) ) == ( com.android.sched.util.file.StreamFileStatus.OPEN ) ) { try { zipFile.getOutputStream ( ) . close ( ) ; } catch ( java.io.IOException e ) { throw new com.android.sched.util.file.CannotCloseOutputException ( this , e ) ; } } closed = true ; } }
Source:
public static void register ( java.util.Map taglets ) { com.ibm.icu.dev.tool.docs.ICUTaglet.ICUInternalTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUDraftTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUStableTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUProvisionalTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUObsoleteTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUIgnoreTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUNewTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUNoteTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUEnhancedTaglet.register ( taglets ) ; }

Target:
public static void register ( java.util.Map taglets ) { com.ibm.icu.dev.tool.docs.ICUTaglet.ICUInternalTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUDraftTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUStableTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUProvisionalTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUObsoleteTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUIgnoreTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUNewTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUNoteTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUEnhancedTaglet.register ( taglets ) ; com.ibm.icu.dev.tool.docs.ICUTaglet.ICUDiscouragedTaglet.register ( taglets ) ; }
Source:
public void onExternalCallChanged ( com.android.server.telecom.Call call , boolean isExternalCall ) { if ( isExternalCall ) { mEventHandler.obtainMessage ( com.android.server.telecom.ConnectionServiceFocusManager.MSG_REMOVE_CALL , call ) . sendToTarget ( ) ; } else { mEventHandler.obtainMessage ( com.android.server.telecom.ConnectionServiceFocusManager.MSG_ADD_CALL , call ) . sendToTarget ( ) ; } }

Target:
public void onExternalCallChanged ( com.android.server.telecom.Call call , boolean isExternalCall ) { if ( isExternalCall ) { mEventHandler.obtainMessage ( com.android.server.telecom.ConnectionServiceFocusManager.MSG_REMOVE_CALL , new com.android.server.telecom.ConnectionServiceFocusManager.MessageArgs ( android.telecom.Log.createSubsession ( ) , "CSFM.oECC" , call ) ) . sendToTarget ( ) ; } else { mEventHandler.obtainMessage ( com.android.server.telecom.ConnectionServiceFocusManager.MSG_ADD_CALL , new com.android.server.telecom.ConnectionServiceFocusManager.MessageArgs ( android.telecom.Log.createSubsession ( ) , "CSFM.oECC" , call ) ) . sendToTarget ( ) ; } }
Source:
void dispatchAborted ( ) { if ( ( ( mDialogInfo ) != null ) && ( ( mDialogInfo.callback ) != null ) ) { final android.content.pm.IPackageDeleteObserver2 observer = IPackageDeleteObserver2.Stub.asInterface ( mDialogInfo.callback ) ; try { observer.onPackageDeleted ( mDialogInfo.appInfo.packageName , PackageManager.DELETE_FAILED_ABORTED , "Cancelled by user" ) ; } catch ( android.os.RemoteException ignored ) { } } }

Target:
void dispatchAborted ( ) { if ( ( ( mDialogInfo ) != null ) && ( ( mDialogInfo.callback ) != null ) ) { final android.content.pm.IPackageDeleteObserver2 observer = IPackageDeleteObserver2.Stub.asInterface ( mDialogInfo.callback ) ; try { observer.onPackageDeleted ( mPackageName , PackageManager.DELETE_FAILED_ABORTED , "Cancelled by user" ) ; } catch ( android.os.RemoteException ignored ) { } } }
Source:
public com.android.build.gradle.internal.dsl.Map < java.lang.String , java.lang.Integer > getSeverityOverrides ( ) { if ( ( ( severities ) == null ) || ( severities.isEmpty ( ) ) ) { return null ; } com.android.build.gradle.internal.dsl.Map < java.lang.String , java.lang.Integer > map = com.google.common.collect.Maps.newHashMapWithExpectedSize ( severities.size ( ) ) ; for ( com.android.build.gradle.internal.dsl.Map.Entry < java.lang.String , com.android.tools.lint.detector.api.Severity > entry : severities.entrySet ( ) ) { map.put ( entry.key , com.android.build.gradle.internal.dsl.LintOptions.convert ( entry.value ) ) ; } return map ; }

Target:
public java.util.Map < java.lang.String , java.lang.Integer > getSeverityOverrides ( ) { if ( ( ( severities ) == null ) || ( severities.isEmpty ( ) ) ) { return null ; } java.util.Map < java.lang.String , java.lang.Integer > map = com.google.common.collect.Maps.newHashMapWithExpectedSize ( severities.size ( ) ) ; for ( java.util.Map.Entry < java.lang.String , com.android.tools.lint.detector.api.Severity > entry : severities.entrySet ( ) ) { map.put ( entry.getKey ( ) , com.android.build.gradle.internal.dsl.LintOptions.convert ( entry.getValue ( ) ) ) ; } return map ; }
Source:
public void testIncludeAllPackagesUnderHere ( ) throws java.lang.Exception { junit.framework.TestSuite testSuite = new android.test.suitebuilder.examples.OuterTest ( ) . buildTestsUnderHereRecursively ( ) ; assertContentsInOrder ( android.test.suitebuilder.ListTestCaseNames.getTestCaseNames ( testSuite ) , "testOuter" , "testErrorOne" , "testErrorTwo" , "testFailOne" , "testFailTwo" , "testInstrumentation" , "testLevel1" , "testLevel2" , "testAnotherOne" , "testSimpleOne" , "testSimpleTwo" , "testNonSmoke" , "testSmoke" , "testSubclass" , "testSuperclass" , "testUnSuppressedMethod" ) ; }

Target:
public void testIncludeAllPackagesUnderHere ( ) throws java.lang.Exception { junit.framework.TestSuite testSuite = new android.test.suitebuilder.examples.OuterTest ( ) . buildTestsUnderHereRecursively ( ) ; assertContentsInOrder ( android.test.suitebuilder.ListTestCaseNames.getTestCaseNames ( testSuite ) , "testOuter" , "testPublicConstructor" , "testErrorOne" , "testErrorTwo" , "testFailOne" , "testFailTwo" , "testInstrumentation" , "testLevel1" , "testLevel2" , "testAnotherOne" , "testSimpleOne" , "testSimpleTwo" , "testNonSmoke" , "testSmoke" , "testSubclass" , "testSuperclass" , "testUnSuppressedMethod" ) ; }
Source:
public void testLaunchToSide ( ) throws java.lang.Exception { if ( ( ! ( supportsMultiWindowMode ( ) ) ) || ( ! ( supportsSplitScreenMultiWindow ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { LAUNCHING_ACTIVITY } ) ; launchActivityToSide ( ) ; HEAD ( 2 ) ; android.server.cts.a1541 Merge ; }

Target:
public void testLaunchToSide ( ) throws java.lang.Exception { if ( ( ! ( supportsMultiWindowMode ( ) ) ) || ( ! ( supportsSplitScreenMultiWindow ( ) ) ) ) { com.android.tradefed.log.LogUtil.CLog.logAndDisplay ( LogLevel.INFO , "Skipping test: no multi-window support" ) ; return ; } launchActivityInDockStack ( android.server.cts.LAUNCHING_ACTIVITY ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { LAUNCHING_ACTIVITY } ) ; launchActivityToSide ( ) ; mAmWmState.computeState ( mDevice , new java.lang.String [ ] { android.server.cts.ActivityManagerDockedStackTests.TEST_ACTIVITY_NAME } ) ; mAmWmState.assertContainsStack ( "Must contain fullscreen stack." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertContainsStack ( "Must contain docked stack." , android.server.cts.DOCKED_STACK_ID ) ; }
Source:
private java.util.List < com.android.jack.analysis.DefinitionMarker > getDefinitions ( @ javax.annotation.Nonnull java.util.List < com.android.jack.analysis.DefinitionMarker > definitions , @ javax.annotation.Nonnull java.util.BitSet in ) { java.util.List < com.android.jack.analysis.DefinitionMarker > reachingDefs = new java.util.ArrayList < com.android.jack.analysis.DefinitionMarker > ( ) ; for ( int i = in.nextSetBit ( 0 ) ; i >= 0 ; i = in.nextSetBit ( ( i + 1 ) ) ) { reachingDefs.add ( definitions.get ( i ) ) ; } return reachingDefs ; }

Target:
private java.util.Set < com.android.jack.analysis.DefinitionMarker > getDefinitions ( @ javax.annotation.Nonnull java.util.List < com.android.jack.analysis.DefinitionMarker > definitions , @ javax.annotation.Nonnull java.util.BitSet in ) { java.util.Set < com.android.jack.analysis.DefinitionMarker > reachingDefs = new java.util.HashSet < com.android.jack.analysis.DefinitionMarker > ( ) ; for ( int i = in.nextSetBit ( 0 ) ; i >= 0 ; i = in.nextSetBit ( ( i + 1 ) ) ) { reachingDefs.add ( definitions.get ( i ) ) ; } return reachingDefs ; }
Source:
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 ) ; }

Target:
synchronized void nAllocationData2D ( long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , android.support.v8.renderscript.Element.DataType dt ) { validate ( ) ; rsnAllocationData2D ( mContext , id , xoff , yoff , mip , face , w , h , d , sizeBytes , dt.mID ) ; }
Source:
public void validatePolicyWithInvalidServerUri ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = android.net.wifi.hotspot2.pps.UpdateParameterTest.createUpdateParameter ( ) ; byte [ ] rawUriBytes = new byte [ ( android.net.wifi.hotspot2.pps.UpdateParameterTest.MAX_URI_BYTES ) + 1 ] ; java.util.Arrays.fill ( rawUriBytes , ( ( byte ) ( 'a' ) ) ) ; updateParam.serverUri = new java.lang.String ( rawUriBytes , java.nio.charset.StandardCharsets.UTF_8 ) ; org.junit.Assert.assertFalse ( updateParam.validate ( ) ) ; }

Target:
public void validatePolicyWithInvalidServerUri ( ) throws java.lang.Exception { android.net.wifi.hotspot2.pps.UpdateParameter updateParam = android.net.wifi.hotspot2.pps.UpdateParameterTest.createUpdateParameter ( ) ; byte [ ] rawUriBytes = new byte [ ( android.net.wifi.hotspot2.pps.UpdateParameterTest.MAX_URI_BYTES ) + 1 ] ; java.util.Arrays.fill ( rawUriBytes , ( ( byte ) ( 'a' ) ) ) ; updateParam.setServerUri ( new java.lang.String ( rawUriBytes , java.nio.charset.StandardCharsets.UTF_8 ) ) ; org.junit.Assert.assertFalse ( updateParam.validate ( ) ) ; }
Source:
public void onIsConferencedChanged ( com.android.server.telecom.Call call ) { if ( ( call.getParentCall ( ) ) != null ) { com.android.server.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from child call with new parent" ) ; return ; } if ( ( call.getChildCalls ( ) . size ( ) ) == 1 ) { com.android.server.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from parent with only one child call" ) ; return ; } updateHeadsetWithCallState ( false ) ; }

Target:
public void onIsConferencedChanged ( com.android.server.telecom.Call call ) { if ( ( call.getParentCall ( ) ) != null ) { android.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from child call with new parent" ) ; return ; } if ( ( call.getChildCalls ( ) . size ( ) ) == 1 ) { android.telecom.Log.d ( this , "Ignoring onIsConferenceChanged from parent with only one child call" ) ; return ; } updateHeadsetWithCallState ( false ) ; }
Source:
public void testAesCbcHmacSha384Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , getAuthKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesCbcHmacSha384Tcp4 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA384 , android.net.cts.IpSecManagerTest.getKey ( 384 ) , 192 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , null , false , 1 , true ) ; }
Source:
private void dispatchUncaughtException ( java.lang.Throwable e ) { getUncaughtExceptionHandler ( ) . uncaughtException ( this , e ) ; }

Target:
public final void dispatchUncaughtException ( java.lang.Throwable e ) { java.lang.Thread.UncaughtExceptionHandler initialUeh = java.lang.Thread.getUncaughtExceptionPreHandler ( ) ; if ( initialUeh != null ) { try { initialUeh.uncaughtException ( this , e ) ; } catch ( java.lang.RuntimeException | java.lang.Error ignored ) { } } getUncaughtExceptionHandler ( ) . uncaughtException ( this , e ) ; }
Source:
protected void handle ( long taskId , @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.INFO , "Reloading configuration" ) ; response.setContentLength ( 0 ) ; try { jackServer.reloadConfig ( ) ; response.setStatus ( Status.OK ) ; } catch ( com.android.sched.util.file.NotFileException | com.android.jack.server.api.v01.ServerException | com.android.sched.util.file.WrongPermissionException | java.io.IOException | com.android.sched.util.file.CannotCreateFileException e ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to reload configuration: " + ( e.getMessage ( ) ) ) ) ; response.setStatus ( Status.INTERNAL_SERVER_ERROR ) ; } }

Target:
protected void handle ( long taskId , @ javax.annotation.Nonnull org.simpleframework.http.Request request , @ javax.annotation.Nonnull org.simpleframework.http.Response response ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.INFO , "Reloading configuration" ) ; response.setContentLength ( 0 ) ; try { jackServer.reloadConfig ( ) ; response.setStatus ( Status.OK ) ; } catch ( com.android.sched.util.file.NotFileException | com.android.jack.server.api.v01.ServerException | com.android.sched.util.file.WrongPermissionException | java.io.IOException | com.android.sched.util.file.CannotCreateFileException | com.android.sched.util.file.CannotChangePermissionException e ) { com.android.jack.server.tasks.ReloadConfig.logger.log ( java.util.logging.Level.SEVERE , "Failed to reload configuration" , e ) ; response.setStatus ( Status.INTERNAL_SERVER_ERROR ) ; } }
Source:
public void connectionEventFailedDoesNotCrashIfDataFileIsMissing ( ) throws java.lang.Exception { mTraceDataFile.delete ( ) ; mLastMileLogger.reportConnectionEvent ( BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; }

Target:
public void dumpDoesNotClearLastFailureData ( ) throws java.lang.Exception { mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_STARTED ) ; android.os.FileUtils.stringToFile ( mTraceDataFile.getPath ( ) , "rdev_connect" ) ; mLastMileLogger.reportConnectionEvent ( com.android.server.wifi.LastMileLoggerTest.FAKE_CONNECTION_ID , BaseWifiDiagnostics.CONNECTION_EVENT_FAILED ) ; getDumpString ( ) ; java.lang.String dumpString = getDumpString ( ) ; org.junit.Assert.assertTrue ( dumpString.contains ( "rdev_connect" ) ) ; }
Source:
public void setSupplicantLogLevel ( boolean turnOnVerbose ) { doStringCommand ( ( "LOG_LEVEL " + ( turnOnVerbose ? "DEBUG" : "INFO" ) ) ) ; }

Target:
public void setSupplicantLogLevel ( boolean turnOnVerbose ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { int logLevel = ( turnOnVerbose ) ? SupplicantStaIfaceHal.LOG_LEVEL_DEBUG : SupplicantStaIfaceHal.LOG_LEVEL_INFO ; mSupplicantStaIfaceHal.setLogLevel ( logLevel ) ; } else { doStringCommand ( ( "LOG_LEVEL " + ( turnOnVerbose ? "DEBUG" : "INFO" ) ) ) ; } }
Source:
public void testNonDstZoneNameWithDstTimestamp ( ) throws java.lang.Exception { java.text.SimpleDateFormat format = new java.text.SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm zzzz" ) ; java.util.Calendar calendar = new java.util.GregorianCalendar ( libcore.java.text.SimpleDateFormatTest.AMERICA_LOS_ANGELES ) ; calendar.setTime ( format.parse ( "2010-12-21T10:00 Pacific Daylight Time" ) ) ; assertEquals ( 9 , calendar.get ( java.util.Calendar.HOUR_OF_DAY ) ) ; assertEquals ( 0 , calendar.get ( java.util.Calendar.MINUTE ) ) ; }

Target:
public void testNonDstZoneNameWithDstTimestamp ( ) throws java.lang.Exception { java.text.SimpleDateFormat format = new java.text.SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm zzzz" , java.util.Locale.US ) ; java.util.Calendar calendar = new java.util.GregorianCalendar ( libcore.java.text.SimpleDateFormatTest.AMERICA_LOS_ANGELES ) ; calendar.setTime ( format.parse ( "2010-12-21T10:00 Pacific Daylight Time" ) ) ; assertEquals ( 9 , calendar.get ( java.util.Calendar.HOUR_OF_DAY ) ) ; assertEquals ( 0 , calendar.get ( java.util.Calendar.MINUTE ) ) ; }
Source:
public void testConnectsToEmergencyNumber_BR ( ) { assertTrue ( shortInfo.connectsToEmergencyNumber ( "911" , RegionCode.BR ) ) ; assertTrue ( shortInfo.connectsToEmergencyNumber ( "190" , RegionCode.BR ) ) ; assertFalse ( shortInfo.connectsToEmergencyNumber ( "999" , RegionCode.BR ) ) ; }

Target:
public void testConnectsToEmergencyNumberWithPlusSign_US ( ) { assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( "+911" , RegionCode.US ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( "＋911" , RegionCode.US ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( " +911" , RegionCode.US ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( "+112" , RegionCode.US ) ) ; assertFalse ( com.android.i18n.phonenumbers.ShortNumberInfoTest.shortInfo.connectsToEmergencyNumber ( "+999" , RegionCode.US ) ) ; }
Source:
public void testMergeWrite ( ) throws java.lang.Exception { com.android.builder.resources.ResourceMerger merger = com.android.builder.resources.ResourceMergerTest.getResourceMerger ( ) ; java.io.File folder = com.android.builder.resources.ResourceMergerTest.getWrittenResources ( ) ; com.android.builder.resources.ResourceSet writtenSet = new com.android.builder.resources.ResourceSet ( "unused" ) ; writtenSet.addSource ( folder ) ; writtenSet.loadFromFiles ( ) ; compareResourceMaps ( merger , writtenSet , false ) ; }

Target:
public void testMergeWrite ( ) throws java.lang.Exception { com.android.builder.resources.ResourceMerger merger = com.android.builder.resources.ResourceMergerTest.getResourceMerger ( ) ; com.android.builder.resources.RecordingLogger logger = new com.android.builder.resources.RecordingLogger ( ) ; java.io.File folder = com.android.builder.resources.ResourceMergerTest.getWrittenResources ( ) ; com.android.builder.resources.ResourceSet writtenSet = new com.android.builder.resources.ResourceSet ( "unused" ) ; writtenSet.addSource ( folder ) ; writtenSet.loadFromFiles ( logger ) ; compareResourceMaps ( merger , writtenSet , false ) ; checkLogger ( logger ) ; }
Source:
public void testAesCbcHmacSha256Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA256 , getAuthKey ( 256 ) , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , crypt , auth , false , 1 , true ) ; }

Target:
public void testAesGcm128Udp6 ( ) throws java.lang.Exception { android.net.IpSecAlgorithm authCrypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_CRYPT_AES_GCM , android.net.cts.IpSecManagerTest.AEAD_KEY , 128 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV6_LOOPBACK , null , null , authCrypt , false , 1 , true ) ; }
Source:
private void refreshDisplay ( ) { com.android.monkeyrunner.MonkeyImage snapshot = device.takeSnapshot ( ) ; currentImage = snapshot.createBufferedImage ( ) ; java.awt.Graphics2D g = scaledImage.createGraphics ( ) ; g.drawImage ( currentImage , 0 , 0 , scaledImage.getWidth ( ) , scaledImage.getHeight ( ) , null ) ; g.dispose ( ) ; display.setIcon ( new javax.swing.ImageIcon ( scaledImage ) ) ; pack ( ) ; }

Target:
private void refreshDisplay ( ) { com.android.monkeyrunner.core.IMonkeyImage snapshot = device.takeSnapshot ( ) ; currentImage = snapshot.createBufferedImage ( ) ; java.awt.Graphics2D g = scaledImage.createGraphics ( ) ; g.drawImage ( currentImage , 0 , 0 , scaledImage.getWidth ( ) , scaledImage.getHeight ( ) , null ) ; g.dispose ( ) ; display.setIcon ( new javax.swing.ImageIcon ( scaledImage ) ) ; pack ( ) ; }
Source:
public static long getMobileTcpRxPackets ( ) { long total = 0 ; for ( java.lang.String iface : android.net.TrafficStats.getMobileIfaces ( ) ) { long stat = android.net.TrafficStats.UNSUPPORTED ; try { stat = android.net.TrafficStats.getStatsService ( ) . getIfaceStats ( iface , android.net.TrafficStats.TYPE_TCP_RX_PACKETS ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } if ( stat != ( android.net.TrafficStats.UNSUPPORTED ) ) { total += stat ; } } return total ; }

Target:
public static long getMobileTcpRxPackets ( ) { long total = 0 ; for ( java.lang.String iface : android.net.TrafficStats.getMobileIfaces ( ) ) { long stat = android.net.TrafficStats.UNSUPPORTED ; try { stat = android.net.TrafficStats.getStatsService ( ) . getIfaceStats ( iface , android.net.TrafficStats.TYPE_TCP_RX_PACKETS ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } total += android.net.TrafficStats.addIfSupported ( stat ) ; } return total ; }
Source:
public K next ( ) { com.google.common.collect.LinkedListMultimap.checkElement ( next ) ; current = next ; seenKeys.add ( current.key ) ; do { next = next.next ; } while ( ( ( next ) != null ) && ( ! ( seenKeys.add ( next.key ) ) ) ) ; return current.key ; }

Target:
public K next ( ) { checkForConcurrentModification ( ) ; com.google.common.collect.LinkedListMultimap.checkElement ( next ) ; current = next ; seenKeys.add ( current.key ) ; do { next = next.next ; } while ( ( ( next ) != null ) && ( ! ( seenKeys.add ( next.key ) ) ) ) ; return current.key ; }
Source:
public void saveSendingFileInfo ( java.lang.String mimeType , java.lang.String uriString , boolean isHandover ) throws java.lang.IllegalArgumentException { synchronized ( this ) { mMultipleFlag = false ; mMimeTypeOfSendingFile = mimeType ; mUriOfSendingFile = uriString ; mIsHandoverInitiated = isHandover ; android.net.Uri uri = android.net.Uri.parse ( uriString ) ; com.android.bluetooth.opp.BluetoothOppUtility.putSendFileInfo ( uri , com.android.bluetooth.opp.BluetoothOppSendFileInfo.generateFileInfo ( mContext , uri , mimeType ) ) ; storeApplicationData ( ) ; } }

Target:
public void saveSendingFileInfo ( java.lang.String mimeType , java.lang.String uriString , boolean isHandover , boolean fromExternal ) throws java.lang.IllegalArgumentException { synchronized ( this ) { mMultipleFlag = false ; mMimeTypeOfSendingFile = mimeType ; mIsHandoverInitiated = isHandover ; android.net.Uri uri = android.net.Uri.parse ( uriString ) ; com.android.bluetooth.opp.BluetoothOppSendFileInfo sendFileInfo = com.android.bluetooth.opp.BluetoothOppSendFileInfo.generateFileInfo ( mContext , uri , mimeType , fromExternal ) ; uri = com.android.bluetooth.opp.BluetoothOppUtility.generateUri ( uri , sendFileInfo ) ; com.android.bluetooth.opp.BluetoothOppUtility.putSendFileInfo ( uri , sendFileInfo ) ; mUriOfSendingFile = uri.toString ( ) ; storeApplicationData ( ) ; } }
Source:
public boolean [ ] someBoolVectorMethod ( boolean [ ] x ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , ( ( "Baz someBoolVectorMethod(" + ( com.android.commands.hidl_test_java.HidlTestJava.toString ( x ) ) ) + ")" ) ) ; boolean [ ] out = new boolean [ x.length ] ; for ( int i = 0 ; i < ( x.length ) ; ++ i ) { out [ i ] = ! ( x [ i ] ) ; } return out ; }

Target:
public java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > someMethodWithFooVectors ( java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > fooInput ) { android.util.Log.d ( com.android.commands.hidl_test_java.HidlTestJava.TAG , ( "Baz someMethodWithFooVectors " + ( com.android.commands.hidl_test_java.HidlTestJava.fooVecToString ( fooInput ) ) ) ) ; java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > fooOutput = new java.util.ArrayList < android.hardware.tests.baz.V1_0.IBase.Foo > ( ) ; fooOutput.add ( fooInput.get ( 1 ) ) ; fooOutput.add ( fooInput.get ( 0 ) ) ; return fooOutput ; }
Source:
public void testEncryption ( ) throws java.lang.Exception { if ( android.security.cts.EncryptionTest.deviceIsEncrypted ( ) ) { return ; } if ( hasLowRAM ( ) ) { android.util.Log.i ( android.security.cts.EncryptionTest.TAG , "hasLowRAM: true" ) ; return ; } assertFalse ( "Device encryption is required" , android.security.cts.EncryptionTest.aesIsFast ( ) ) ; }

Target:
private boolean isRequired ( ) { int first_api_level = android.os.SystemProperties.getInt ( "ro.product.first_api_level" , 0 ) ; if ( ( first_api_level > 0 ) && ( first_api_level < ( android.security.cts.EncryptionTest.min_api_level ) ) ) { return false ; } else { return ! ( hasLowRAM ( ) ) ; } }
Source:
public void testSetPublicIdGetPublicId ( ) { org.xml.sax.helpers.LocatorImpl l = new org.xml.sax.helpers.LocatorImpl ( ) ; l.setPublicId ( tests.api.org.xml.sax.helpers.LocatorImplTest.PUB ) ; assertEquals ( tests.api.org.xml.sax.helpers.LocatorImplTest.PUB , l.getPublicId ( ) ) ; l.setPublicId ( null ) ; assertEquals ( null , l.getPublicId ( ) ) ; }

Target:
public void testSetPublicIdGetPublicId ( ) { org.xml.sax.helpers.LocatorImpl l = new org.xml.sax.helpers.LocatorImpl ( ) ; l.setPublicId ( org.apache.harmony.tests.org.xml.sax.helpers.LocatorImplTest.PUB ) ; assertEquals ( org.apache.harmony.tests.org.xml.sax.helpers.LocatorImplTest.PUB , l.getPublicId ( ) ) ; l.setPublicId ( null ) ; assertEquals ( null , l.getPublicId ( ) ) ; }
Source:
static float computeStraightness ( float [ ] points , float totalLen ) { float dx = ( points [ 2 ] ) - ( points [ 0 ] ) ; float dy = ( points [ 3 ] ) - ( points [ 1 ] ) ; return ( ( float ) ( java.lang.Math.sqrt ( ( ( dx * dx ) + ( dy * dy ) ) ) ) ) / totalLen ; }

Target:
static float computeStraightness ( float [ ] points , float totalLen ) { float dx = ( points [ 2 ] ) - ( points [ 0 ] ) ; float dy = ( points [ 3 ] ) - ( points [ 1 ] ) ; return ( ( float ) ( java.lang.Math.hypot ( dx , dy ) ) ) / totalLen ; }
Source:
private java.util.List < java.lang.String > getEnabledTypes ( com.google.gct.testing.GoogleCloudTestingDimension dimension ) { java.util.List < java.lang.String > enabledTypes = new java.util.LinkedList < java.lang.String > ( ) ; for ( com.google.gct.testing.GoogleCloudTestingType type : dimension.getEnabledTypes ( ) ) { enabledTypes.add ( type.getId ( ) ) ; } return enabledTypes ; }

Target:
private java.util.List < java.lang.String > getEnabledTypes ( com.google.gct.testing.GoogleCloudTestingDimension dimension ) { java.util.List < java.lang.String > enabledTypes = new java.util.LinkedList < java.lang.String > ( ) ; for ( com.google.gct.testing.CloudTestingType type : dimension.getEnabledTypes ( ) ) { enabledTypes.add ( type.getId ( ) ) ; } return enabledTypes ; }
Source:
public java.lang.String getDeviceSoftwareVersion ( int slotId ) { int [ ] subId = android.telephony.SubscriptionManager.getSubId ( slotId ) ; if ( ( subId == null ) || ( ( subId.length ) == 0 ) ) { return null ; } try { com.android.internal.telephony.IPhoneSubInfo info = getSubscriberInfo ( ) ; if ( info == null ) return null ; return info.getDeviceSvnUsingSubId ( subId [ 0 ] , mContext.getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }

Target:
public java.lang.String getImei ( int slotIndex ) { com.android.internal.telephony.ITelephony telephony = getITelephony ( ) ; if ( telephony == null ) return null ; try { return telephony.getImeiForSlot ( slotIndex , getOpPackageName ( ) ) ; } catch ( android.os.RemoteException ex ) { return null ; } catch ( java.lang.NullPointerException ex ) { return null ; } }
Source:
private org.objectweb.asm.ClassReader getClassReader ( java.lang.String internalClassName , java.util.zip.ZipFile jar , java.util.zip.ZipEntry entry ) { try ( java.io.InputStream bytecode = jar.getInputStream ( entry ) ) { return rewriter.reader ( bytecode ) ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalStateException ( ( "Couldn't load " + internalClassName ) , e ) ; } }

Target:
public org.objectweb.asm.ClassReader readIfKnown ( java.lang.String internalClassName ) { java.lang.String filename = ( rewriter.unprefix ( internalClassName ) ) + ".class" ; com.google.devtools.build.android.desugar.InputFileProvider inputFileProvider = indexedInputs.getInputFileProvider ( filename ) ; if ( inputFileProvider != null ) { try ( java.io.InputStream bytecode = inputFileProvider.getInputStream ( filename ) ) { return rewriter.reader ( bytecode ) ; } catch ( java.io.IOException e ) { throw new java.lang.IllegalStateException ( ( "Couldn't load " + internalClassName ) , e ) ; } } return null ; }
Source:
private void setVpnForcedLocked ( boolean enforce ) { final java.util.Set < android.net.UidRange > removedRanges = new android.util.ArraySet ( mBlockedUsers ) ; if ( enforce ) { final java.util.Set < android.net.UidRange > addedRanges = createUserAndRestrictedProfilesRanges ( mUserHandle , null , java.util.Collections.singletonList ( mPackage ) ) ; removedRanges.removeAll ( addedRanges ) ; addedRanges.removeAll ( mBlockedUsers ) ; setAllowOnlyVpnForUids ( false , removedRanges ) ; setAllowOnlyVpnForUids ( true , addedRanges ) ; } else { setAllowOnlyVpnForUids ( false , removedRanges ) ; } }

Target:
public synchronized void onUserStopped ( ) { setLockdown ( false ) ; mAlwaysOn = false ; unregisterPackageChangeReceiverLocked ( ) ; agentDisconnect ( ) ; }
Source:
private static boolean isService ( com.android.ide.eclipse.adt.internal.editors.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; org.w3c.dom.Element node = context.getElement ( ) ; java.lang.String nodeName = node.getNodeName ( ) ; if ( ( ( com.android.sdklib.xml.AndroidManifest.NODE_SERVICE.equals ( nodeName ) ) && ( com.android.sdklib.xml.AndroidManifest.ATTRIBUTE_NAME.equals ( attribute.getLocalName ( ) ) ) ) && ( com.android.ide.common.layout.LayoutConstants.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { return true ; } return false ; }

Target:
private static boolean isService ( com.android.ide.eclipse.adt.internal.editors.Hyperlinks.XmlContext context ) { org.w3c.dom.Attr attribute = context.getAttribute ( ) ; org.w3c.dom.Element node = context.getElement ( ) ; java.lang.String nodeName = node.getNodeName ( ) ; if ( ( ( com.android.sdklib.xml.AndroidManifest.NODE_SERVICE.equals ( nodeName ) ) && ( com.android.sdklib.xml.AndroidManifest.ATTRIBUTE_NAME.equals ( attribute.getLocalName ( ) ) ) ) && ( com.android.util.XmlUtils.ANDROID_URI.equals ( attribute.getNamespaceURI ( ) ) ) ) { return true ; } return false ; }
Source:
private boolean abortIdleOptimizations ( long lowStorageThreshold ) { if ( mAbortIdleOptimization.get ( ) ) { return true ; } long usableSpace = mDataDir.getUsableSpace ( ) ; if ( usableSpace < lowStorageThreshold ) { android.util.Log.w ( com.android.server.pm.BackgroundDexOptService.TAG , ( "Aborting background dex opt job due to low storage: " + usableSpace ) ) ; return true ; } return false ; }

Target:
private int abortIdleOptimizations ( long lowStorageThreshold ) { if ( mAbortIdleOptimization.get ( ) ) { return com.android.server.pm.BackgroundDexOptService.OPTIMIZE_ABORT_BY_JOB_SCHEDULER ; } long usableSpace = mDataDir.getUsableSpace ( ) ; if ( usableSpace < lowStorageThreshold ) { android.util.Log.w ( com.android.server.pm.BackgroundDexOptService.TAG , ( "Aborting background dex opt job due to low storage: " + usableSpace ) ) ; return com.android.server.pm.BackgroundDexOptService.OPTIMIZE_ABORT_NO_SPACE_LEFT ; } return com.android.server.pm.BackgroundDexOptService.OPTIMIZE_CONTINUE ; }
Source:
public void testAesCbcHmacSha1Udp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , android.net.cts.IpSecManagerTest.CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , getAuthKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_UDP , android.net.cts.IpSecManagerTest.IPV4_LOOPBACK , crypt , auth , true , 1 , false ) ; }

Target:
public void testAesCbcHmacSha1Tcp4UdpEncap ( ) throws java.lang.Exception { android.net.IpSecAlgorithm crypt = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.CRYPT_AES_CBC , CRYPT_KEY ) ; android.net.IpSecAlgorithm auth = new android.net.IpSecAlgorithm ( android.net.IpSecAlgorithm.AUTH_HMAC_SHA1 , getKey ( 160 ) , 96 ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV4_LOOPBACK , crypt , auth , null , true , 1 , false ) ; checkTransform ( android.system.OsConstants.IPPROTO_TCP , android.net.cts.IPV4_LOOPBACK , crypt , auth , null , true , 1 , true ) ; }
Source:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , android.bluetooth.le.AdvertisingSetCallback callback ) { startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , 0 , 0 , callback , new android.os.Handler ( android.os.Looper.getMainLooper ( ) ) ) ; }

Target:
public void startAdvertisingSet ( android.bluetooth.le.AdvertisingSetParameters parameters , android.bluetooth.le.AdvertiseData advertiseData , android.bluetooth.le.AdvertiseData scanResponse , android.bluetooth.le.PeriodicAdvertisingParameters periodicParameters , android.bluetooth.le.AdvertiseData periodicData , int timeoutMillis , android.bluetooth.le.AdvertisingSetCallback callback ) { startAdvertisingSet ( parameters , advertiseData , scanResponse , periodicParameters , periodicData , timeoutMillis , callback , new android.os.Handler ( android.os.Looper.getMainLooper ( ) ) ) ; }
Source:
public int processBlock ( byte [ ] in , int inOff , byte [ ] out , int outOff ) throws java.lang.IllegalStateException , org.bouncycastle.crypto.DataLengthException { return encrypting ? encryptBlock ( in , inOff , out , outOff ) : decryptBlock ( in , inOff , out , outOff ) ; }

Target:
protected byte calculateByte ( byte in ) throws java.lang.IllegalStateException , org.bouncycastle.crypto.DataLengthException { return encrypting ? encryptByte ( in ) : decryptByte ( in ) ; }
Source:
public boolean onMenuItemClick ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case R.id.menu_about : about ( ) ; org.chromium.webview_shell.WebViewBrowserActivity.hideKeyboard ( mUrlBar ) ; return true ; default : return false ; } }

Target:
public boolean onMenuItemClick ( android.view.MenuItem item ) { switch ( item.getItemId ( ) ) { case R.id.menu_reset_webview : if ( ( mWebView ) != null ) { android.view.ViewGroup container = getContainer ( ) ; container.removeView ( mWebView ) ; mWebView.destroy ( ) ; mWebView = null ; } createAndInitializeWebView ( ) ; return true ; case R.id.menu_about : about ( ) ; org.chromium.webview_shell.WebViewBrowserActivity.hideKeyboard ( mUrlBar ) ; return true ; default : return false ; } }
Source:
public java.lang.String describeFirstNonRequestableCapability ( ) { if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED ) ) return "NET_CAPABILITY_VALIDATED" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL ) ) return "NET_CAPABILITY_CAPTIVE_PORTAL" ; if ( hasCapability ( android.net.NetworkCapabilities.NET_CAPABILITY_FOREGROUND ) ) return "NET_CAPABILITY_FOREGROUND" ; if ( ( ( mNetworkCapabilities ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ) != 0 ) { return "unknown non-requestable capabilities " + ( java.lang.Long.toHexString ( mNetworkCapabilities ) ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }

Target:
public java.lang.String describeFirstNonRequestableCapability ( ) { final long nonRequestable = ( mNetworkCapabilities ) & ( android.net.NetworkCapabilities.NON_REQUESTABLE_CAPABILITIES ) ; if ( nonRequestable != 0 ) { return android.net.NetworkCapabilities.capabilityNameOf ( com.android.internal.util.BitUtils.unpackBits ( nonRequestable ) [ 0 ] ) ; } if ( ( ( mLinkUpBandwidthKbps ) != 0 ) || ( ( mLinkDownBandwidthKbps ) != 0 ) ) return "link bandwidth" ; if ( hasSignalStrength ( ) ) return "signalStrength" ; return null ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( obj instanceof com.android.server.net.NetworkStatsCollection.Key ) { final com.android.server.net.NetworkStatsCollection.Key key = ( ( com.android.server.net.NetworkStatsCollection.Key ) ( obj ) ) ; return ( ( ( ( uid ) == ( key.uid ) ) && ( ( set ) == ( key.set ) ) ) && ( ( tag ) == ( key.tag ) ) ) && ( com.android.internal.util.Objects.equal ( ident , key.ident ) ) ; } return false ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( obj instanceof com.android.server.net.NetworkStatsCollection.Key ) { final com.android.server.net.NetworkStatsCollection.Key key = ( ( com.android.server.net.NetworkStatsCollection.Key ) ( obj ) ) ; return ( ( ( ( uid ) == ( key.uid ) ) && ( ( set ) == ( key.set ) ) ) && ( ( tag ) == ( key.tag ) ) ) && ( java.util.Objects.equals ( ident , key.ident ) ) ; } return false ; }
Source:
public java.util.Set < java.lang.String > getApplicableFilters ( @ com.android.annotations.NonNull java.util.Set < java.lang.String > allFilters ) { java.util.Set < java.lang.String > list = super . getApplicableFilters ( allFilters ) ; if ( ( isEnable ( ) ) && ( universalApk ) ) { list.add ( null ) ; } return list ; }

Target:
public java.util.Set < java.lang.String > getApplicableFilters ( @ com.android.annotations.NonNull java.util.Set < java.lang.String > allFilters ) { java.util.Set < java.lang.String > list = super . getApplicableFilters ( allFilters ) ; if ( ( isEnable ( ) ) && ( universalApk ) ) { list.add ( com.android.build.SplitOutput.NO_FILTER ) ; } return list ; }