auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public freemarker.template.TemplateModel exec ( java.util.List args ) throws freemarker.template.TemplateModelException { if ( ( args.size ( ) ) != 1 ) { throw new freemarker.template.TemplateModelException ( "Wrong arguments" ) ; } return new freemarker.template.SimpleScalar ( com.android.ide.eclipse.adt.AdtUtils.camelCaseToUnderlines ( args.get ( 0 ) . toString ( ) ) ) ; }

Target:
public freemarker.template.TemplateModel exec ( java.util.List args ) throws freemarker.template.TemplateModelException { if ( ( args.size ( ) ) != 1 ) { throw new freemarker.template.TemplateModelException ( "Wrong arguments" ) ; } return new freemarker.template.SimpleScalar ( com.android.ide.eclipse.adt.AdtUtils.underlinesToCamelCase ( args.get ( 0 ) . toString ( ) ) ) ; }
Source:
public void testStageInstallWithErrorCode_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { libcore.tzdata.shared2.DistroVersion validDistroVersion = new libcore.tzdata.shared2.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRulesVersionBytes = validDistroVersion.toBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; libcore.tzdata.shared2.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }

Target:
public void testStageInstallWithErrorCode_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { com.android.timezone.distro.DistroVersion validDistroVersion = new com.android.timezone.distro.DistroVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneDistroInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRulesVersionBytes = validDistroVersion.toBytes ( ) ; invalidRulesVersionBytes [ ( ( invalidRulesVersionBytes.length ) - 6 ) ] = 'B' ; com.android.timezone.distro.TimeZoneDistro distro = libcore.tzdata.update2.TimeZoneDistroInstallerTest.createTimeZoneDistroWithVersionBytes ( invalidRulesVersionBytes ) ; assertEquals ( TimeZoneDistroInstaller.INSTALL_FAIL_BAD_DISTRO_STRUCTURE , installer.stageInstallWithErrorCode ( distro.getBytes ( ) ) ) ; assertNoDistroOperationStaged ( ) ; assertNoInstalledDistro ( ) ; }
Source:
private void responseLceData ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.LceDataInfo lceInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < java.lang.Integer > ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalLceData ( lceInfo , mRil ) ; sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }

Target:
private void responseLceData ( android.hardware.radio.V1_0.RadioResponseInfo responseInfo , android.hardware.radio.V1_0.LceDataInfo lceInfo ) { com.android.internal.telephony.RILRequest rr = mRil.processResponse ( responseInfo ) ; if ( rr != null ) { java.util.ArrayList < java.lang.Integer > ret = null ; if ( ( responseInfo.error ) == ( android.hardware.radio.V1_0.RadioError.NONE ) ) { ret = com.android.internal.telephony.RIL.convertHalLceData ( lceInfo , mRil ) ; com.android.internal.telephony.RadioResponse.sendMessageResponse ( rr.mResult , ret ) ; } mRil.processResponseDone ( rr , responseInfo , ret ) ; } }
Source:
void printStats ( ) { android.util.Log.d ( com.android.internal.telephony.SmsMessageBodyTest.TAG , ( "Unicode selection count: " + ( mUnicodeCounter ) ) ) ; for ( int i = 0 ; i < 12 ; i ++ ) { android.util.Log.d ( com.android.internal.telephony.SmsMessageBodyTest.TAG , ( ( ( "Language pair index " + i ) + " count: " ) + ( mStatsCounters [ i ] ) ) ) ; } }

Target:
void printStats ( ) { android.telephony.Rlog.d ( com.android.internal.telephony.SmsMessageBodyTest.TAG , ( "Unicode selection count: " + ( mUnicodeCounter ) ) ) ; for ( int i = 0 ; i < 12 ; i ++ ) { android.telephony.Rlog.d ( com.android.internal.telephony.SmsMessageBodyTest.TAG , ( ( ( "Language pair index " + i ) + " count: " ) + ( mStatsCounters [ i ] ) ) ) ; } }
Source:
public void test_init_and_run_for_SimpleTest_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest.class ; runner.init ( monitor , "" , null , target , skipPastReference , testEnvironment , 0 , false ) ; runner.run ( "" , null , null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( runner , ( ( target.getName ( ) ) + "#testSimple" ) , "" ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }

Target:
public void test_run_for_SimpleTest_should_perform_test ( ) { java.lang.Class < ? > target = vogar.target.junit3.SimpleTest.class ; vogar.target.Runner runner = new vogar.target.junit.JUnitRunner ( monitor , "" , null , target , skipPastReference , testEnvironment , 0 ) ; runner.run ( "" , null , null ) ; org.mockito.Mockito.verify ( monitor ) . outcomeStarted ( runner , ( ( target.getName ( ) ) + "#testSimple" ) , "" ) ; org.mockito.Mockito.verify ( monitor ) . outcomeFinished ( Result.SUCCESS ) ; }
Source:
public void loggerFetchesTxFatesEvenIfFetchingRxFatesFails ( ) { final boolean verbosityToggle = true ; org.mockito.Mockito.when ( mWifiNative.getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ) . thenReturn ( false ) ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionEvent ( WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.mockito.Mockito.verify ( mWifiNative ) . getTxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; org.mockito.Mockito.verify ( mWifiNative ) . getRxPktFates ( org.mockito.Mockito.anyObject ( ) ) ; }

Target:
public void reportConnectionEventPropagatesFailureToLastMileLogger ( ) { final boolean verbosityToggle = false ; mWifiDiagnostics.startLogging ( verbosityToggle ) ; mWifiDiagnostics.reportConnectionEvent ( com.android.server.wifi.WifiDiagnosticsTest.FAKE_CONNECTION_ID , WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; org.mockito.Mockito.verify ( mLastMileLogger ) . reportConnectionEvent ( com.android.server.wifi.WifiDiagnosticsTest.FAKE_CONNECTION_ID , WifiDiagnostics.CONNECTION_EVENT_FAILED ) ; }
Source:
public void testIsValidReference ( ) throws java.lang.Exception { com.android.ide.common.resources.platform.AttributeInfo info = new com.android.ide.common.resources.platform.AttributeInfo ( "test" , com.android.ide.common.api.IAttributeInfo.Format.REFERENCE_SET ) ; assertTrue ( info.isValid ( "@android:string/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@string/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@dimen/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@color/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@animator/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@anim/foo" , null , null ) ) ; assertTrue ( info.isValid ( "?android:attr/textAppearanceMedium" , null , null ) ) ; assertFalse ( info.isValid ( "" , null , null ) ) ; assertFalse ( info.isValid ( "foo" , null , null ) ) ; assertFalse ( info.isValid ( "3.4" , null , null ) ) ; }

Target:
public void testIsValidReference ( ) throws java.lang.Exception { com.android.ide.common.resources.platform.AttributeInfo info = new com.android.ide.common.resources.platform.AttributeInfo ( "test" , com.android.ide.common.api.IAttributeInfo.Format.REFERENCE_SET ) ; assertTrue ( info.isValid ( "@android:string/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@string/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@dimen/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@color/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@animator/foo" , null , null ) ) ; assertTrue ( info.isValid ( "@anim/foo" , null , null ) ) ; assertTrue ( info.isValid ( "?android:attr/textAppearanceMedium" , null , null ) ) ; assertTrue ( info.isValid ( "?textAppearanceMedium" , null , null ) ) ; assertFalse ( info.isValid ( "" , null , null ) ) ; assertFalse ( info.isValid ( "foo" , null , null ) ) ; assertFalse ( info.isValid ( "3.4" , null , null ) ) ; }
Source:
static int [ ] appendInts ( int [ ] cur , int [ ] add ) { if ( add == null ) return cur ; if ( cur == null ) return add ; final int N = add.length ; for ( int i = 0 ; i < N ; i ++ ) { cur = com.android.server.pm.PackageManagerService.appendInt ( cur , add [ i ] ) ; } return cur ; }

Target:
static int [ ] appendInts ( int [ ] cur , int [ ] add ) { if ( add == null ) return cur ; if ( cur == null ) return add ; final int N = add.length ; for ( int i = 0 ; i < N ; i ++ ) { cur = com.android.internal.util.ArrayUtils.appendInt ( cur , add [ i ] ) ; } return cur ; }
Source:
public synchronized float getProgress ( ) throws android.os.RemoteException { if ( ( completeSize ) == 0 ) { return 1.0F ; } return ( ( completeSize ) - ( mDexoptPackages.size ( ) ) ) / ( ( float ) ( completeSize ) ) ; }

Target:
public synchronized float getProgress ( ) throws android.os.RemoteException { if ( ( completeSize ) == 0 ) { return 1.0F ; } int packagesLeft = ( mDexoptPackages.size ( ) ) + ( ( mCommandsForCurrentPackage ) != null ? 1 : 0 ) ; return ( ( completeSize ) - packagesLeft ) / ( ( float ) ( completeSize ) ) ; }
Source:
protected int computeHorizontalScrollRange ( ) { if ( mDrawHistory ) { return mHistoryWidth ; } else { return contentToView ( mContentWidth ) ; } }

Target:
public void clearMatches ( ) { if ( mFindIsUp ) { recordNewContentSize ( mContentWidth , ( ( mContentHeight ) - ( mFindHeight ) ) , false ) ; mFindIsUp = false ; } nativeSetFindIsDown ( ) ; pinScrollTo ( mScrollX , mScrollY , false , 0 ) ; invalidate ( ) ; }
Source:
public void pullExternalCall ( java.lang.String callId ) { try { com.android.server.telecom.Log.startSession ( "ICA.pEC" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.pullExternalCall ( ) ; } else { com.android.server.telecom.Log.w ( this , "pullExternalCall, unknown call id: %s" , callId ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { com.android.server.telecom.Log.endSession ( ) ; } }

Target:
public void pullExternalCall ( java.lang.String callId ) { try { android.telecom.Log.startSession ( "ICA.pEC" , mOwnerComponentName ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { com.android.server.telecom.Call call = mCallIdMapper.getCall ( callId ) ; if ( call != null ) { call.pullExternalCall ( ) ; } else { android.telecom.Log.w ( this , "pullExternalCall, unknown call id: %s" , callId ) ; } } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; } } finally { android.telecom.Log.endSession ( ) ; } }
Source:
public java.lang.String get ( int index ) { com.android.jack.dx.io.DexBuffer.checkBounds ( index , tableOfContents.typeIds.size ) ; return strings.get ( typeIds.get ( index ) . intValue ( ) ) ; }

Target:
private java.util.List < java.lang.String > readStrings ( ) { com.android.jack.dx.io.DexBuffer.Section strings = open ( tableOfContents.stringIds.off ) ; java.lang.String [ ] result = new java.lang.String [ tableOfContents.stringIds.size ] ; for ( int i = 0 ; i < ( tableOfContents.stringIds.size ) ; ++ i ) { result [ i ] = strings.readString ( ) ; } return java.util.Arrays.asList ( result ) ; }
Source:
public void testKeyPairGenerator_GenerateKeyPair_Success ( ) throws java.lang.Exception { mGenerator.initialize ( new android.security.AndroidKeyPairGeneratorSpec ( getContext ( ) , android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 , android.security.AndroidKeyPairGeneratorTest.NOW , android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) ) ; final java.security.KeyPair pair = mGenerator.generateKeyPair ( ) ; assertNotNull ( "The KeyPair returned should not be null" , pair ) ; assertKeyPairCorrect ( pair , android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 , android.security.AndroidKeyPairGeneratorTest.NOW , android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) ; }

Target:
public void testKeyPairGenerator_GenerateKeyPair_Unencrypted_Success ( ) throws java.lang.Exception { mGenerator.initialize ( new android.security.AndroidKeyPairGeneratorSpec.Builder ( getContext ( ) ) . setAlias ( android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 ) . setSubject ( android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 ) . setSerialNumber ( android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 ) . setStartDate ( android.security.AndroidKeyPairGeneratorTest.NOW ) . setEndDate ( android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) . build ( ) ) ; final java.security.KeyPair pair = mGenerator.generateKeyPair ( ) ; assertNotNull ( "The KeyPair returned should not be null" , pair ) ; assertKeyPairCorrect ( pair , android.security.AndroidKeyPairGeneratorTest.TEST_ALIAS_1 , android.security.AndroidKeyPairGeneratorTest.TEST_DN_1 , android.security.AndroidKeyPairGeneratorTest.TEST_SERIAL_1 , android.security.AndroidKeyPairGeneratorTest.NOW , android.security.AndroidKeyPairGeneratorTest.NOW_PLUS_10_YEARS ) ; }
Source:
public boolean isConnected ( int slotId , int featureType , int callSessionType , int callType ) throws android.os.RemoteException { synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isConnected ( callSessionType , callType ) ; } } return false ; }

Target:
public boolean isConnected ( int slotId , int featureType , int callSessionType , int callType ) throws android.os.RemoteException { enforceCallingOrSelfPermission ( android.Manifest.permission.READ_PHONE_STATE , "isConnected" ) ; synchronized ( mFeatures ) { android.telephony.ims.feature.MMTelFeature feature = resolveMMTelFeature ( slotId , featureType ) ; if ( feature != null ) { return feature.isConnected ( callSessionType , callType ) ; } } return false ; }
Source:
private void cancelUserTimeoutAlarm ( ) { if ( com.android.bluetooth.map.BluetoothMapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.map.BluetoothMapService.TAG , "cancelUserTimeOutAlarm()" ) ; android.content.Intent intent = new android.content.Intent ( this , com.android.bluetooth.map.BluetoothMapService.class ) ; android.app.PendingIntent sender = android.app.PendingIntent.getBroadcast ( this , 0 , intent , 0 ) ; android.app.AlarmManager alarmManager = ( ( android.app.AlarmManager ) ( this . getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarmManager.cancel ( sender ) ; mRemoveTimeoutMsg = false ; }

Target:
private void cancelUserTimeoutAlarm ( ) { if ( com.android.bluetooth.map.BluetoothMapService.DEBUG ) android.util.Log.d ( com.android.bluetooth.map.BluetoothMapService.TAG , "cancelUserTimeOutAlarm()" ) ; android.content.Intent timeoutIntent = new android.content.Intent ( com.android.bluetooth.map.BluetoothMapService.USER_CONFIRM_TIMEOUT_ACTION ) ; android.app.PendingIntent pIntent = android.app.PendingIntent.getBroadcast ( this , 0 , timeoutIntent , 0 ) ; pIntent.cancel ( ) ; android.app.AlarmManager alarmManager = ( ( android.app.AlarmManager ) ( this . getSystemService ( Context.ALARM_SERVICE ) ) ) ; alarmManager.cancel ( pIntent ) ; mRemoveTimeoutMsg = false ; }
Source:
public void enter ( ) { super . enter ( ) ; setSpeakerphoneOn ( false ) ; setBluetoothOn ( false ) ; android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_EARPIECE , mAvailableRoutes ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }

Target:
public void enter ( ) { super . enter ( ) ; setSpeakerphoneOn ( false ) ; setBluetoothOn ( false ) ; if ( ( mAudioFocusType ) == ( com.android.server.telecom.CallAudioRouteStateMachine.ACTIVE_FOCUS ) ) { setNotificationsSuppressed ( true ) ; } android.telecom.CallAudioState newState = new android.telecom.CallAudioState ( mIsMuted , com.android.server.telecom.CallAudioRouteStateMachine.ROUTE_EARPIECE , mAvailableRoutes ) ; setSystemAudioState ( newState ) ; updateInternalCallAudioState ( ) ; }
Source:
public void testFocusedViewWithDisabledActionBackward ( ) { mDevice.pressKeyCode ( KeyEvent.KEYCODE_MEDIA_PREVIOUS ) ; mMenuHelper.assertWaitForMenu ( ) ; assertButtonHasFocus ( com.android.tv.tests.ui.PlayControlsRowViewTest.BUTTON_INDEX_PLAY_PAUSE ) ; mDevice.pressBack ( ) ; mDevice.pressKeyCode ( KeyEvent.KEYCODE_MEDIA_REWIND ) ; mMenuHelper.assertWaitForMenu ( ) ; assertButtonHasFocus ( com.android.tv.tests.ui.PlayControlsRowViewTest.BUTTON_INDEX_PLAY_PAUSE ) ; mDevice.pressBack ( ) ; }

Target:
public void testFocusedViewInMenu ( ) { mMenuHelper.showMenu ( ) ; mDevice.pressKeyCode ( KeyEvent.KEYCODE_MEDIA_PLAY ) ; assertButtonHasFocus ( com.android.tv.tests.ui.PlayControlsRowViewTest.BUTTON_ID_PLAY_PAUSE ) ; mMenuHelper.assertNavigateToRow ( R.string.menu_title_channels ) ; mDevice.pressKeyCode ( KeyEvent.KEYCODE_MEDIA_NEXT ) ; assertButtonHasFocus ( com.android.tv.tests.ui.PlayControlsRowViewTest.BUTTON_ID_PLAY_PAUSE ) ; }
Source:
public int getCarrierPrivilegeStatusForCurrentTransaction ( android.content.pm.PackageManager packageManager ) { java.lang.String [ ] packages = packageManager.getPackagesForUid ( android.os.Binder.getCallingUid ( ) ) ; for ( java.lang.String pkg : packages ) { int accessStatus = getCarrierPrivilegeStatus ( packageManager , pkg ) ; if ( accessStatus != ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS ) ) { return accessStatus ; } } return android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS ; }

Target:
public int getCarrierPrivilegeStatusForUid ( android.content.pm.PackageManager packageManager , int uid ) { java.lang.String [ ] packages = packageManager.getPackagesForUid ( uid ) ; for ( java.lang.String pkg : packages ) { int accessStatus = getCarrierPrivilegeStatus ( packageManager , pkg ) ; if ( accessStatus != ( android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS ) ) { return accessStatus ; } } return android.telephony.TelephonyManager.CARRIER_PRIVILEGE_STATUS_NO_ACCESS ; }
Source:
public void testCrLf2 ( ) throws java.lang.Exception { com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatPreferences prefs = com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatPreferences.defaults ( ) ; prefs.removeEmptyLines = true ; check ( ( "<root>\r\n" + ( ( ( ( ( ( ( "\r\n" + "\r\n" ) + "[ <element/>\r\n" ) + " <second/>\r\n" ) + "]\r\n" ) + "\r\n" ) + "\r\n" ) + "</root>\r\n" ) ) , ( " <element/>\r\n" + " <second/>\r\n" ) , ( "<root>\r\n" + ( ( " <element/>\r\n" + " <second/>\r\n" ) + "</root>\r\n" ) ) , prefs ) ; }

Target:
public void testCrLf2 ( ) throws java.lang.Exception { com.android.ide.common.xml.XmlFormatPreferences prefs = com.android.ide.common.xml.XmlFormatPreferences.defaults ( ) ; prefs.removeEmptyLines = true ; check ( ( "<root>\r\n" + ( ( ( ( ( ( ( "\r\n" + "\r\n" ) + "[ <element/>\r\n" ) + " <second/>\r\n" ) + "]\r\n" ) + "\r\n" ) + "\r\n" ) + "</root>\r\n" ) ) , ( " <element/>\r\n" + " <second/>\r\n" ) , ( "<root>\r\n" + ( ( " <element/>\r\n" + " <second/>\r\n" ) + "</root>\r\n" ) ) , prefs ) ; }
Source:
private static org.bouncycastle.crypto.params.DHParameters fromPG ( java.lang.String hexP , java.lang.String hexG ) { java.math.BigInteger p = new java.math.BigInteger ( 1 , org.bouncycastle.util.encoders.Hex.decode ( hexP ) ) ; java.math.BigInteger g = new java.math.BigInteger ( 1 , org.bouncycastle.util.encoders.Hex.decode ( hexG ) ) ; return new org.bouncycastle.crypto.params.DHParameters ( p , g ) ; }

Target:
private static org.bouncycastle.crypto.params.DHParameters fromPG ( java.lang.String hexP , java.lang.String hexG ) { return new org.bouncycastle.crypto.params.DHParameters ( org.bouncycastle.crypto.agreement.DHStandardGroups.fromHex ( hexP ) , org.bouncycastle.crypto.agreement.DHStandardGroups.fromHex ( hexG ) ) ; }
Source:
private void newJumpOffsets ( int oldInstructionOffset , int [ ] oldJumpOffsets ) { for ( int index = 0 ; index < ( oldJumpOffsets.length ) ; index ++ ) { oldJumpOffsets [ index ] = newBranchOffset ( oldInstructionOffset , oldJumpOffsets [ index ] ) ; } }

Target:
private void newJumpOffsets ( int oldInstructionOffset , int [ ] oldJumpOffsets , int newInstructionOffset ) { for ( int index = 0 ; index < ( oldJumpOffsets.length ) ; index ++ ) { oldJumpOffsets [ index ] = newBranchOffset ( oldInstructionOffset , oldJumpOffsets [ index ] , newInstructionOffset ) ; } }
Source:
private void setAndBroadcastNetworkSetTime ( long time ) { if ( com.android.internal.telephony.ServiceStateTracker.DBG ) log ( ( ( "setAndBroadcastNetworkSetTime: time=" + time ) + "ms" ) ) ; android.os.SystemClock.setCurrentTimeMillis ( time ) ; android.content.Intent intent = new android.content.Intent ( TelephonyIntents.ACTION_NETWORK_SET_TIME ) ; intent.addFlags ( Intent.FLAG_RECEIVER_REPLACE_PENDING ) ; intent.putExtra ( "time" , time ) ; mPhone.getContext ( ) . sendStickyBroadcastAsUser ( intent , UserHandle.ALL ) ; com.android.internal.telephony.metrics.TelephonyMetrics.getInstance ( ) . writeNITZEvent ( mPhone.getPhoneId ( ) , time ) ; }

Target:
protected final void loge ( java.lang.String s ) { android.telephony.Rlog.e ( com.android.internal.telephony.ServiceStateTracker.LOG_TAG , ( ( ( "[" + ( mPhone.getPhoneId ( ) ) ) + "] " ) + s ) ) ; }
Source:
private void sendApplicationHiddenForUser ( java.lang.String packageName , com.android.server.pm.PackageSetting pkgSetting , int userId ) { final com.android.server.pm.PackageManagerService.PackageRemovedInfo info = new com.android.server.pm.PackageManagerService.PackageRemovedInfo ( ) ; info.removedPackage = packageName ; info.removedUsers = new int [ ] { userId } ; info.uid = android.os.UserHandle.getUid ( userId , pkgSetting.appId ) ; info.sendBroadcast ( false , false , false ) ; }

Target:
private void sendApplicationHiddenForUser ( java.lang.String packageName , com.android.server.pm.PackageSetting pkgSetting , int userId ) { final com.android.server.pm.PackageManagerService.PackageRemovedInfo info = new com.android.server.pm.PackageManagerService.PackageRemovedInfo ( ) ; info.removedPackage = packageName ; info.removedUsers = new int [ ] { userId } ; info.uid = android.os.UserHandle.getUid ( userId , pkgSetting.appId ) ; info.sendPackageRemovedBroadcasts ( true ) ; }
Source:
void reportFullScanResult ( android.net.wifi.ScanResult result , int bucketsScanned ) { for ( com.android.server.wifi.scanner.WifiScanningServiceImpl.RequestInfo < android.net.wifi.WifiScanner.ScanSettings > entry : mActiveScans ) { if ( com.android.server.wifi.scanner.ScanScheduleUtil.shouldReportFullScanResultForSettings ( mChannelHelper , result , bucketsScanned , entry.settings , ( - 1 ) ) ) { entry.reportEvent ( WifiScanner.CMD_FULL_SCAN_RESULT , 0 , result ) ; } } }

Target:
void reportFullScanResult ( android.net.wifi.ScanResult result , int bucketsScanned ) { for ( com.android.server.wifi.scanner.WifiScanningServiceImpl.RequestInfo < android.net.wifi.WifiScanner.ScanSettings > entry : mActiveScans ) { if ( com.android.server.wifi.scanner.ScanScheduleUtil.shouldReportFullScanResultForSettings ( mChannelHelper , result , bucketsScanned , entry.settings , ( - 1 ) ) ) { entry.reportEvent ( WifiScanner.CMD_FULL_SCAN_RESULT , 0 , result ) ; } } for ( com.android.server.wifi.scanner.WifiScanningServiceImpl.RequestInfo < java.lang.Void > entry : mSingleScanListeners ) { entry.reportEvent ( WifiScanner.CMD_FULL_SCAN_RESULT , 0 , result ) ; } }
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:
private void copy1DRangeFromUnchecked ( int off , int count , java.lang.Object array , android.renderscript.Element.DataType dt , int arrayLen ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copy1DRangeFromUnchecked" ) ; final int dataSize = ( mType.mElement.getBytesSize ( ) ) * count ; data1DChecks ( off , count , ( arrayLen * ( dt.mSize ) ) , dataSize ) ; mRS.nAllocationData1D ( getIDSafe ( ) , off , mSelectedLOD , count , array , dataSize , dt ) ; android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }
Source:
void cleanup ( ) { if ( com.android.bluetooth.btservice.ActiveDeviceManager.DBG ) { android.util.Log.d ( com.android.bluetooth.btservice.ActiveDeviceManager.TAG , "cleanup()" ) ; } mAdapterService.unregisterReceiver ( mReceiver ) ; if ( ( mHandlerThread ) != null ) { mHandlerThread.quit ( ) ; mHandlerThread = null ; } resetState ( ) ; }

Target:
void cleanup ( ) { if ( com.android.bluetooth.btservice.ActiveDeviceManager.DBG ) { android.util.Log.d ( com.android.bluetooth.btservice.ActiveDeviceManager.TAG , "cleanup()" ) ; } mAudioManager.unregisterAudioDeviceCallback ( mAudioManagerAudioDeviceCallback ) ; mAdapterService.unregisterReceiver ( mReceiver ) ; if ( ( mHandlerThread ) != null ) { mHandlerThread.quit ( ) ; mHandlerThread = null ; } resetState ( ) ; }
Source:
public static boolean getBoolean ( android.security.keymaster.KeyCharacteristics keyCharacteristics , int tag ) { if ( keyCharacteristics.hwEnforced.containsTag ( tag ) ) { return keyCharacteristics.hwEnforced.getBoolean ( tag , false ) ; } else { return keyCharacteristics.swEnforced.getBoolean ( tag , false ) ; } }

Target:
public static int [ ] getKeymasterPaddingsFromJcaEncryptionPaddings ( java.lang.String [ ] jcaPaddings ) { if ( ( jcaPaddings == null ) || ( ( jcaPaddings.length ) == 0 ) ) { return libcore.util.EmptyArray.INT ; } int [ ] result = new int [ jcaPaddings.length ] ; for ( int i = 0 ; i < ( jcaPaddings.length ) ; i ++ ) { result [ i ] = android.security.KeymasterUtils.getKeymasterPaddingFromJcaEncryptionPadding ( jcaPaddings [ i ] ) ; } return result ; }
Source:
public < T > T [ ] toArray ( T [ ] array ) { if ( ( array.length ) == 0 ) { array = com.google.common.collect.ObjectArrays.newArray ( array , 1 ) ; } else if ( ( array.length ) > 1 ) { array [ 1 ] = null ; } java.lang.Object [ ] objectArray = array ; objectArray [ 0 ] = element ; return array ; }

Target:
int copyIntoArray ( java.lang.Object [ ] dst , int offset ) { dst [ offset ] = element ; return offset + 1 ; }
Source:
public void onReceivedIcon ( android.graphics.Bitmap bitmap ) { org.chromium.base.TraceEvent.begin ( ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onReceivedIcon" ) ; mWebChromeClient.onReceivedIcon ( mWebView , bitmap ) ; } org.chromium.base.TraceEvent.end ( ) ; }

Target:
public void onReceivedIcon ( android.graphics.Bitmap bitmap ) { try { org.chromium.base.TraceEvent.begin ( "WebViewContentsClientAdapter.onReceivedIcon" ) ; if ( ( mWebChromeClient ) != null ) { if ( com.android.webview.chromium.WebViewContentsClientAdapter.TRACE ) android.util.Log.d ( com.android.webview.chromium.WebViewContentsClientAdapter.TAG , "onReceivedIcon" ) ; mWebChromeClient.onReceivedIcon ( mWebView , bitmap ) ; } } finally { org.chromium.base.TraceEvent.end ( "WebViewContentsClientAdapter.onReceivedIcon" ) ; } }
Source:
public void loadPixelPerfectData ( final com.android.ddmlib.IDevice device ) { executeInBackground ( "Loading pixel perfect data" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( device ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.device.ViewNode viewNode = com.android.hierarchyviewerlib.device.DeviceBridge.loadWindowData ( com.android.hierarchyviewerlib.device.Window.getFocusedWindow ( device ) ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.getModel ( ) . setData ( device , screenshotImage , viewNode ) ; } } } } ) ; }

Target:
public void loadPixelPerfectData ( final com.android.hierarchyviewerlib.device.IHvDevice hvDevice ) { executeInBackground ( "Loading pixel perfect data" , new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.eclipse.swt.graphics.Image screenshotImage = getScreenshotImage ( hvDevice ) ; if ( screenshotImage != null ) { com.android.hierarchyviewerlib.models.ViewNode viewNode = hvDevice.loadWindowData ( com.android.hierarchyviewerlib.models.Window.getFocusedWindow ( hvDevice ) ) ; if ( viewNode != null ) { com.android.hierarchyviewerlib.models.PixelPerfectModel.getModel ( ) . setData ( hvDevice.getDevice ( ) , screenshotImage , viewNode ) ; } } } } ) ; }
Source:
public com.google.common.base.Optional < java.lang.String > formatToValidE164 ( com.android.dialer.DialerPhoneNumber number ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; if ( number.hasDialerInternalPhoneNumber ( ) ) { com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber = com.android.dialer.phonenumberproto.Converter.protoToPojo ( number.getDialerInternalPhoneNumber ( ) ) ; if ( phoneNumberUtil.isValidNumber ( phoneNumber ) ) { return com.google.common.base.Optional.fromNullable ( phoneNumberUtil.format ( phoneNumber , PhoneNumberFormat.E164 ) ) ; } } return com.google.common.base.Optional.absent ( ) ; }

Target:
public com.google.common.base.Optional < java.lang.String > formatToValidE164 ( com.android.dialer.DialerPhoneNumber number ) { com.android.dialer.common.Assert.isWorkerThread ( ) ; com.google.i18n.phonenumbers.Phonenumber.PhoneNumber phoneNumber ; try { phoneNumber = phoneNumberUtil.parse ( number.getNormalizedNumber ( ) , number.getCountryIso ( ) ) ; } catch ( com.google.i18n.phonenumbers.NumberParseException e ) { return com.google.common.base.Optional.absent ( ) ; } if ( phoneNumberUtil.isValidNumber ( phoneNumber ) ) { return com.google.common.base.Optional.fromNullable ( phoneNumberUtil.format ( phoneNumber , PhoneNumberFormat.E164 ) ) ; } return com.google.common.base.Optional.absent ( ) ; }
Source:
public void testPreconditions ( ) { assertNotNull ( mAppTextView1 ) ; assertNotNull ( mAppTextView2 ) ; assertNotNull ( mLib1TextView1 ) ; assertNotNull ( mLib1TextView2 ) ; assertNotNull ( mLib2TextView1 ) ; assertNotNull ( mLib2TextView2 ) ; }

Target:
public void testPreconditions ( ) { assertNotNull ( mAppTextView1 ) ; assertNotNull ( mAppTextView2 ) ; assertNotNull ( mLib1TextView1 ) ; assertNotNull ( mLib1TextView2 ) ; assertNotNull ( mLib2TextView1 ) ; assertNotNull ( mLib2TextView2 ) ; assertNotNull ( mLib2bTextView1 ) ; assertNotNull ( mLib2bTextView2 ) ; assertNotNull ( mLibappTextView1 ) ; assertNotNull ( mLibappTextView2 ) ; }
Source:
public void setComment ( java.lang.String comment ) { if ( comment == null ) { this . comment = null ; return ; } byte [ ] commentBytes = comment.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ; if ( ( commentBytes.length ) > 65535 ) { throw new java.lang.IllegalArgumentException ( ( "Comment too long: " + ( commentBytes.length ) ) ) ; } this . comment = comment ; }

Target:
public void setComment ( java.lang.String comment ) { if ( comment == null ) { this . comment = null ; return ; } java.util.zip.ZipEntry.validateStringLength ( "Comment" , comment ) ; this . comment = comment ; }
Source:
private java.util.Set < java.lang.Integer > getStringIds ( com.android.dx.io.DexBuffer dex , java.util.regex.Pattern pattern ) { java.util.Set < java.lang.Integer > stringIds = new java.util.HashSet < java.lang.Integer > ( ) ; int stringIndex = 0 ; for ( java.lang.String s : dex.strings ( ) ) { if ( pattern.matcher ( s ) . find ( ) ) { stringIds.add ( stringIndex ) ; } stringIndex ++ ; } return stringIds ; }

Target:
private java.util.Set < java.lang.Integer > getStringIds ( com.android.dex.Dex dex , java.util.regex.Pattern pattern ) { java.util.Set < java.lang.Integer > stringIds = new java.util.HashSet < java.lang.Integer > ( ) ; int stringIndex = 0 ; for ( java.lang.String s : dex.strings ( ) ) { if ( pattern.matcher ( s ) . find ( ) ) { stringIds.add ( stringIndex ) ; } stringIndex ++ ; } return stringIds ; }
Source:
public void testObsoleteDstZoneName ( ) throws java.lang.Exception { java.text.SimpleDateFormat format = new java.text.SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm zzzz" ) ; java.util.Date normal = format.parse ( "1970-01-01T00:00 EET" ) ; java.util.Date dst = format.parse ( "1970-01-01T00:00 EEST" ) ; assertEquals ( ( ( 60 * 60 ) * 1000 ) , ( ( normal.getTime ( ) ) - ( dst.getTime ( ) ) ) ) ; }

Target:
public void testObsoleteDstZoneName ( ) 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.Date normal = format.parse ( "1970-01-01T00:00 EET" ) ; java.util.Date dst = format.parse ( "1970-01-01T00:00 EEST" ) ; assertEquals ( ( ( 60 * 60 ) * 1000 ) , ( ( normal.getTime ( ) ) - ( dst.getTime ( ) ) ) ) ; }
Source:
private java.lang.reflect.Type resolveTypeVariable ( final java.lang.reflect.TypeVariable < ? > var ) { final com.google.common.reflect.TypeResolver unguarded = this ; com.google.common.reflect.TypeResolver guarded = new com.google.common.reflect.TypeResolver ( typeTable ) { @ java.lang.Override java.lang.reflect.Type resolveTypeVariable ( java.lang.reflect.TypeVariable < ? > intermediateVar , com.google.common.reflect.TypeResolver guardedResolver ) { if ( intermediateVar.getGenericDeclaration ( ) . equals ( var.getGenericDeclaration ( ) ) ) { return intermediateVar ; } return unguarded.resolveTypeVariable ( intermediateVar , guardedResolver ) ; } } ; return resolveTypeVariable ( var , guarded ) ; }

Target:
final java.lang.reflect.Type resolve ( final java.lang.reflect.TypeVariable < ? > var ) { final com.google.common.reflect.TypeResolver.TypeTable unguarded = this ; com.google.common.reflect.TypeResolver.TypeTable guarded = new com.google.common.reflect.TypeResolver.TypeTable ( ) { @ java.lang.Override public java.lang.reflect.Type resolveInternal ( java.lang.reflect.TypeVariable < ? > intermediateVar , com.google.common.reflect.TypeResolver.TypeTable forDependent ) { if ( intermediateVar.getGenericDeclaration ( ) . equals ( var.getGenericDeclaration ( ) ) ) { return intermediateVar ; } return unguarded.resolveInternal ( intermediateVar , forDependent ) ; } } ; return resolveInternal ( var , guarded ) ; }
Source:
public void int16 ( short v ) throws java.io.IOException { mBuffer [ 0 ] = ( ( byte ) ( ( v > > > 0 ) & 255 ) ) ; mBuffer [ 1 ] = ( ( byte ) ( ( v > > > 8 ) & 255 ) ) ; write ( 2 ) ; }

Target:
private void intv ( long v ) throws java.io.IOException { long uv = v << 1 ; if ( v < 0 ) uv = ~ uv ; uintv ( uv ) ; }
Source:
private java.lang.String computeVariant ( double quantity , android.icu.text.NumberFormat numberFormat , android.icu.text.PluralRules pluralRules ) { if ( numberFormat instanceof android.icu.text.DecimalFormat ) { return pluralRules.select ( ( ( android.icu.text.DecimalFormat ) ( numberFormat ) ) . getFixedDecimal ( quantity ) ) ; } return pluralRules.select ( quantity ) ; }

Target:
public static android.icu.impl.StandardPlural selectPlural ( double number , android.icu.text.NumberFormat numberFormat , android.icu.text.PluralRules rules ) { java.lang.String pluralKeyword ; if ( numberFormat instanceof android.icu.text.DecimalFormat ) { pluralKeyword = rules.select ( ( ( android.icu.text.DecimalFormat ) ( numberFormat ) ) . getFixedDecimal ( number ) ) ; } else { pluralKeyword = rules.select ( number ) ; } return android.icu.impl.StandardPlural.orOtherFromString ( pluralKeyword ) ; }
Source:
public boolean getRingBufferData ( java.lang.String ringName ) { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getRingBufferDataNative ( com.android.server.wifi.WifiNative.sWlan0Index , ringName ) ; } else { return false ; } } }

Target:
public boolean getRingBufferData ( java.lang.String ringName ) { if ( com.android.server.wifi.WifiNative.HIDL_VENDOR_ENABLE ) { return mWifiVendorHal.getRingBufferData ( ringName ) ; } else { synchronized ( com.android.server.wifi.WifiNative.sLock ) { if ( isHalStarted ( ) ) { return com.android.server.wifi.WifiNative.getRingBufferDataNative ( com.android.server.wifi.WifiNative.sWlan0Index , ringName ) ; } else { return false ; } } } }
Source:
public android.net.Uri normalizeScheme ( ) { java.lang.String scheme = getScheme ( ) ; if ( scheme == null ) return this ; java.lang.String lowerScheme = scheme.toLowerCase ( java.util.Locale.US ) ; if ( scheme.equals ( lowerScheme ) ) return this ; return buildUpon ( ) . scheme ( lowerScheme ) . build ( ) ; }

Target:
public android.net.Uri normalizeScheme ( ) { java.lang.String scheme = getScheme ( ) ; if ( scheme == null ) return this ; java.lang.String lowerScheme = scheme.toLowerCase ( java.util.Locale.ROOT ) ; if ( scheme.equals ( lowerScheme ) ) return this ; return buildUpon ( ) . scheme ( lowerScheme ) . build ( ) ; }
Source:
private static java.lang.String toTelecomDisconnectReason ( int telephonyDisconnectCause , java.lang.String reason ) { java.lang.String causeAsString = android.telephony.DisconnectCause.toString ( telephonyDisconnectCause ) ; if ( reason == null ) { return causeAsString ; } else { return ( reason + ", " ) + causeAsString ; } }

Target:
private static java.lang.String toTelecomDisconnectReason ( android.content.Context context , int telephonyDisconnectCause , java.lang.String reason ) { if ( context == null ) { return "" ; } switch ( telephonyDisconnectCause ) { case android.telecom.DisconnectCause.POWER_OFF : case android.telecom.DisconnectCause.OUT_OF_SERVICE : if ( com.android.phone.ImsUtil.shouldPromoteWfc ( context ) ) { return android.telecom.DisconnectCause.REASON_WIFI_ON_BUT_WFC_OFF ; } break ; } java.lang.String causeAsString = android.telephony.DisconnectCause.toString ( telephonyDisconnectCause ) ; if ( reason == null ) { return causeAsString ; } else { return ( reason + ", " ) + causeAsString ; } }
Source:
private boolean isRoamIndForHomeSystem ( java.lang.String roamInd ) { java.lang.String homeRoamIndcators = android.os.SystemProperties.get ( "ro.cdma.homesystem" ) ; if ( ! ( android.text.TextUtils.isEmpty ( homeRoamIndcators ) ) ) { for ( java.lang.String homeRoamInd : homeRoamIndcators.split ( "," ) ) { if ( homeRoamInd.equals ( roamInd ) ) { return true ; } } return false ; } return false ; }

Target:
private boolean isRoamIndForHomeSystem ( java.lang.String roamInd ) { java.lang.String homeRoamIndicators = android.os.SystemProperties.get ( "ro.cdma.homesystem" ) ; if ( ! ( android.text.TextUtils.isEmpty ( homeRoamIndicators ) ) ) { for ( java.lang.String homeRoamInd : homeRoamIndicators.split ( "," ) ) { if ( homeRoamInd.equals ( roamInd ) ) { return true ; } } return false ; } return false ; }
Source:
public void testFlagEExistingI ( ) { int iFlags = PackageManager.INSTALL_INTERNAL ; int rFlags = ( PackageManager.INSTALL_EXTERNAL ) | ( PackageManager.INSTALL_REPLACE_EXISTING ) ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install , rFlags , true , false , ( - 1 ) , ( - 1 ) ) ; }

Target:
public void testManifestIExistingE ( ) { if ( android.os.Environment.isExternalStorageEmulated ( ) ) { return ; } int iFlags = android.content.pm.PackageManager.INSTALL_EXTERNAL ; int rFlags = android.content.pm.PackageManager.INSTALL_REPLACE_EXISTING ; installFromRawResource ( "install.apk" , R.raw.install , iFlags , false , false , ( - 1 ) , ( - 1 ) ) ; installFromRawResource ( "install.apk" , R.raw.install_loc_internal , rFlags , true , false , ( - 1 ) , PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY ) ; }
Source:
public void testCannotSetChunkedStreamingModeAfterFixedLengthStreamingMode ( ) throws java.lang.Exception { server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; connection.setFixedLengthStreamingMode ( 1 ) ; try { connection.setChunkedStreamingMode ( 1 ) ; fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }

Target:
public void testCannotSetFixedLengthStreamingModeAfterChunkedStreamingMode ( ) throws java.lang.Exception { server.play ( ) ; java.net.HttpURLConnection connection = ( ( java.net.HttpURLConnection ) ( server.getUrl ( "/" ) . openConnection ( ) ) ) ; connection.setChunkedStreamingMode ( 1 ) ; try { connection.setFixedLengthStreamingMode ( 1 ) ; org.junit.Assert.fail ( ) ; } catch ( java.lang.IllegalStateException expected ) { } }
Source:
public void startTestImpl ( ) { new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.TestDeviceUnpluggedConstraint ( ) . execute ( ) ; }

Target:
public void startTestImpl ( ) { android.os.BatteryManager bm = ( ( android.os.BatteryManager ) ( getSystemService ( com.android.cts.verifier.jobscheduler.BATTERY_SERVICE ) ) ) ; if ( bm.isCharging ( ) ) { new com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.TestDevicePluggedInConstraint ( ) . execute ( ) ; } else if ( isDevicePluggedIn ( ) ) { mTestState = com.android.cts.verifier.jobscheduler.ChargingConstraintTestActivity.STATE_WAITING_TO_START_ON_CHARGING_TEST ; showWaitingForStableChargingViews ( ) ; } }
Source:
private static java.nio.MappedByteBuffer map ( java.io.RandomAccessFile raf , java.nio.channels.FileChannel.MapMode mode , long size ) throws java.io.IOException { java.nio.channels.FileChannel channel = raf.getChannel ( ) ; boolean threw = true ; try { java.nio.MappedByteBuffer mbb = channel.map ( mode , 0 , size ) ; threw = false ; return mbb ; } finally { com.google.common.io.Closeables.close ( channel , threw ) ; } }

Target:
private static java.nio.MappedByteBuffer map ( java.io.RandomAccessFile raf , java.nio.channels.FileChannel.MapMode mode , long size ) throws java.io.IOException { com.google.common.io.Closer closer = com.google.common.io.Closer.create ( ) ; try { java.nio.channels.FileChannel channel = closer.register ( raf.getChannel ( ) ) ; return channel.map ( mode , 0 , size ) ; } catch ( java.lang.Throwable e ) { throw closer.rethrow ( e ) ; } finally { closer.close ( ) ; } }
Source:
public void test1_4SetBandLevelAfterRelease ( ) throws java.lang.Exception { getEqualizer ( 0 ) ; mEqualizer.release ( ) ; try { mEqualizer.setBandLevel ( ( ( short ) ( 0 ) ) , ( ( short ) ( 0 ) ) ) ; } catch ( java.lang.IllegalStateException e ) { } finally { releaseEqualizer ( ) ; } }

Target:
public void test1_4SetBandLevelAfterRelease ( ) throws java.lang.Exception { getEqualizer ( getSessionId ( ) ) ; mEqualizer.release ( ) ; try { mEqualizer.setBandLevel ( ( ( short ) ( 0 ) ) , ( ( short ) ( 0 ) ) ) ; } catch ( java.lang.IllegalStateException e ) { } finally { releaseEqualizer ( ) ; } }
Source:
public void visitMethod ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable lombok.ast.AstVisitor visitor , @ com.android.annotations.NonNull lombok.ast.MethodInvocation node ) { com.android.tools.lint.client.api.JavaParser.ResolvedNode resolved = context.resolve ( node ) ; if ( resolved instanceof com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) { com.android.tools.lint.client.api.JavaParser.ResolvedMethod method = ( ( com.android.tools.lint.client.api.JavaParser.ResolvedMethod ) ( resolved ) ) ; if ( ( method.getContainingClass ( ) . matches ( "android.app.AlarmManager" ) ) && ( ( method.getArgumentCount ( ) ) == 4 ) ) { com.android.tools.lint.checks.AlarmDetector.ensureAtLeast ( context , node , 1 , 5000L ) ; com.android.tools.lint.checks.AlarmDetector.ensureAtLeast ( context , node , 2 , 60000L ) ; } } }

Target:
public void visitMethod ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.JavaContext context , @ com.android.annotations.Nullable com.intellij.psi.JavaElementVisitor visitor , @ com.android.annotations.NonNull com.intellij.psi.PsiMethodCallExpression node , @ com.android.annotations.NonNull com.intellij.psi.PsiMethod method ) { com.android.tools.lint.client.api.JavaEvaluator evaluator = context.getEvaluator ( ) ; if ( ( evaluator.isMemberInClass ( method , "android.app.AlarmManager" ) ) && ( ( evaluator.getParameterCount ( method ) ) == 4 ) ) { com.android.tools.lint.checks.AlarmDetector.ensureAtLeast ( context , node , 1 , 5000L ) ; com.android.tools.lint.checks.AlarmDetector.ensureAtLeast ( context , node , 2 , 60000L ) ; } }
Source:
public long getRetainedSize ( com.android.ahat.heapdump.AhatHeap heap ) { int index = heap.getIndex ( ) ; return ( 0 <= index ) && ( index < ( mRetainedSizes.length ) ) ? mRetainedSizes [ heap.getIndex ( ) ] : 0 ; }

Target:
public com.android.ahat.heapdump.Size getRetainedSize ( com.android.ahat.heapdump.AhatHeap heap ) { int index = heap.getIndex ( ) ; if ( ( ( ( mRetainedSizes ) != null ) && ( 0 <= index ) ) && ( index < ( mRetainedSizes.length ) ) ) { return mRetainedSizes [ heap.getIndex ( ) ] ; } return Size.ZERO ; }
Source:
public java.lang.String getVersionName ( ) { java.lang.String versionName = mMergedFlavor.getVersionName ( ) ; java.lang.String versionSuffix = mBuildType.getVersionNameSuffix ( ) ; if ( ( versionSuffix != null ) && ( ! ( versionSuffix.isEmpty ( ) ) ) ) { if ( versionName == null ) { if ( ! ( mType.isForTesting ( ) ) ) { versionName = getVersionNameFromManifest ( ) ; } else { versionName = "" ; } } versionName = versionName + versionSuffix ; } return versionName ; }

Target:
public java.lang.String getInstrumentationRunner ( ) { com.android.builder.core.VariantConfiguration config = this ; if ( mType.isForTesting ( ) ) { config = getTestedConfig ( ) ; com.google.common.base.Preconditions.checkState ( ( config != null ) ) ; } java.lang.String runner = config.mMergedFlavor.getTestInstrumentationRunner ( ) ; return runner != null ? runner : com.android.builder.core.VariantConfiguration.DEFAULT_TEST_RUNNER ; }
Source:
public void testOnCallAddedRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; org.mockito.Mockito.when ( ringingCall.getHandle ( ) ) . thenReturn ( android.net.Uri.parse ( "tel:555-000" ) ) ; mBluetoothPhoneService.mCallsManagerListener.onCallAdded ( ringingCall ) ; org.mockito.Mockito.verify ( mMockBluetoothHeadset ) . phoneStateChanged ( org.mockito.Matchers.eq ( 0 ) , org.mockito.Matchers.eq ( 0 ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CALL_STATE_INCOMING ) , org.mockito.Matchers.eq ( "555-000" ) , org.mockito.Matchers.eq ( PhoneNumberUtils.TOA_Unknown ) ) ; }

Target:
public void testOnCallAddedRinging ( ) throws java.lang.Exception { com.android.server.telecom.Call ringingCall = createRingingCall ( ) ; org.mockito.Mockito.when ( ringingCall.getHandle ( ) ) . thenReturn ( android.net.Uri.parse ( "tel:555000" ) ) ; mBluetoothPhoneService.mCallsManagerListener.onCallAdded ( ringingCall ) ; org.mockito.Mockito.verify ( mMockBluetoothHeadset ) . phoneStateChanged ( org.mockito.Matchers.eq ( 0 ) , org.mockito.Matchers.eq ( 0 ) , org.mockito.Matchers.eq ( com.android.server.telecom.tests.BluetoothPhoneServiceTest.CALL_STATE_INCOMING ) , org.mockito.Matchers.eq ( "555000" ) , org.mockito.Matchers.eq ( PhoneNumberUtils.TOA_Unknown ) ) ; }