auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static void checkSelectorPresence ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement element ) { org.w3c.dom.Attr selectorAttribute = element.getXml ( ) . getAttributeNodeNS ( SdkConstants.TOOLS_URI , Selector.SELECTOR_LOCAL_NAME ) ; if ( ( selectorAttribute != null ) && ( ! ( element.getOperationType ( ) . isSelectable ( ) ) ) ) { java.lang.String message = java.lang.String.format ( "Unsupported tools:selector=\"%1$s\" found on node %2$s at %3$s" , selectorAttribute.getValue ( ) , element.getId ( ) , element.printPosition ( ) ) ; element.addMessage ( mergingReport , com.android.manifmerger.ERROR , message ) ; } }

Target:
private static void checkSelectorPresence ( com.android.manifmerger.MergingReport.Builder mergingReport , com.android.manifmerger.XmlElement element ) { org.w3c.dom.Attr selectorAttribute = element.getXml ( ) . getAttributeNodeNS ( SdkConstants.TOOLS_URI , Selector.SELECTOR_LOCAL_NAME ) ; if ( ( selectorAttribute != null ) && ( ! ( element.supportsSelector ( ) ) ) ) { java.lang.String message = java.lang.String.format ( "Unsupported tools:selector=\"%1$s\" found on node %2$s at %3$s" , selectorAttribute.getValue ( ) , element.getId ( ) , element.printPosition ( ) ) ; element.addMessage ( mergingReport , com.android.manifmerger.ERROR , message ) ; } }
Source:
public ActivityManager.TaskThumbnail getTaskThumbnail ( int id ) { synchronized ( this ) { enforceCallingPermission ( android.Manifest.permission.READ_FRAME_BUFFER , "getTaskThumbnail()" ) ; com.android.server.am.TaskRecord tr = recentTaskForIdLocked ( id ) ; if ( tr != null ) { return tr.getTaskThumbnailLocked ( ) ; } } return null ; }

Target:
public void startInPlaceAnimationOnFrontMostApplication ( android.app.ActivityOptions opts ) throws android.os.RemoteException { if ( ( ( opts.getAnimationType ( ) ) != ( android.app.ActivityOptions.ANIM_CUSTOM_IN_PLACE ) ) || ( ( opts.getCustomInPlaceResId ( ) ) == 0 ) ) { throw new java.lang.IllegalArgumentException ( ( "Expected in-place ActivityOption " + "with valid animation" ) ) ; } mWindowManager.prepareAppTransition ( AppTransition.TRANSIT_TASK_IN_PLACE , false ) ; mWindowManager.overridePendingAppTransitionInPlace ( opts.getPackageName ( ) , opts.getCustomInPlaceResId ( ) ) ; mWindowManager.executeAppTransition ( ) ; }
Source:
protected void tearDown ( ) throws java.lang.Exception { android.media.cts.Utils.toggleNotificationPolicyAccess ( mContext.getPackageName ( ) , getInstrumentation ( ) , false ) ; }

Target:
protected void tearDown ( ) throws java.lang.Exception { try { android.media.cts.Utils.toggleNotificationPolicyAccess ( mContext.getPackageName ( ) , getInstrumentation ( ) , true ) ; for ( java.util.Map.Entry < java.lang.Integer , java.lang.Integer > e : mOriginalStreamVolumes.entrySet ( ) ) { mAudioManager.setStreamVolume ( e.getKey ( ) , e.getValue ( ) , AudioManager.FLAG_ALLOW_RINGER_MODES ) ; } mAudioManager.setRingerMode ( mOriginalRingerMode ) ; } finally { android.media.cts.Utils.toggleNotificationPolicyAccess ( mContext.getPackageName ( ) , getInstrumentation ( ) , false ) ; } }
Source:
public org.intellij.plugins.intelliLang.inject.groovy.Result < java.util.List < org.intellij.plugins.intelliLang.inject.groovy.PsiElement > > compute ( ) { final com.intellij.psi.xml.XmlTag tag = org.intellij.plugins.intelliLang.inject.groovy.PatternEditorContextMembersProvider.getTagByInjectedFile ( file ) ; if ( tag == null ) return org.intellij.plugins.intelliLang.inject.groovy.Result.create ( java.util.Collections.< org.intellij.plugins.intelliLang.inject.groovy.PsiElement > emptyList ( ) , file ) ; return new org.intellij.plugins.intelliLang.inject.groovy.Result < java.util.List < org.intellij.plugins.intelliLang.inject.groovy.PsiElement > > ( org.intellij.plugins.intelliLang.inject.groovy.PatternEditorContextMembersProvider.getRootsByClassNames ( file , tag.getAttributeValue ( "type" ) ) , tag.getContainingFile ( ) ) ; }

Target:
public org.intellij.plugins.intelliLang.inject.groovy.Result < java.util.Set < java.lang.String > > compute ( ) { return org.intellij.plugins.intelliLang.inject.groovy.Result.create ( org.intellij.plugins.intelliLang.inject.groovy.PatternEditorContextMembersProvider.calcDevPatternClassNames ( project ) , PsiModificationTracker.OUT_OF_CODE_BLOCK_MODIFICATION_COUNT ) ; }
Source:
protected android.graphics.Bitmap takeScreenshot ( ) { io.appium.droiddriver.instrumentation.InstrumentationUiDevice.ScreenshotRunnable screenshotRunnable = new io.appium.droiddriver.instrumentation.InstrumentationUiDevice.ScreenshotRunnable ( context.getDriver ( ) . getRootElement ( ) . getRawElement ( ) ) ; context.runOnMainSync ( screenshotRunnable ) ; return screenshotRunnable.screenshot ; }

Target:
protected android.graphics.Bitmap takeScreenshot ( ) { try { return io.appium.droiddriver.util.InstrumentationUtils.runOnMainSyncWithTimeout ( new io.appium.droiddriver.instrumentation.InstrumentationUiDevice.GetScreenshot ( context.getDriver ( ) . getRootElement ( ) . getRawElement ( ) ) ) ; } catch ( java.lang.Throwable e ) { io.appium.droiddriver.util.Logs.log ( Log.ERROR , e ) ; return null ; } }
Source:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { if ( ( ! ( element.hasAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_ID ) ) ) && ( ! ( element.hasAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_TAG ) ) ) ) { context.report ( com.android.tools.lint.checks.MissingIdDetector.ISSUE , element , context.getLocation ( element ) , ( "This <fragment> tag should specify an id or a tag to preserve state " + "across activity restarts" ) , null ) ; } }

Target:
public void visitElement ( @ com.android.annotations.NonNull com.android.tools.lint.detector.api.XmlContext context , @ com.android.annotations.NonNull org.w3c.dom.Element element ) { if ( ( ! ( element.hasAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_ID ) ) ) && ( ! ( element.hasAttributeNS ( com.android.SdkConstants.ANDROID_URI , com.android.SdkConstants.ATTR_TAG ) ) ) ) { context.report ( com.android.tools.lint.checks.MissingIdDetector.ISSUE , element , context.getLocation ( element ) , ( "This `<fragment>` tag should specify an id or a tag to preserve state " + "across activity restarts" ) , null ) ; } }
Source:
public void testJobDuration ( ) throws java.lang.Exception { batteryOnScreenOff ( ) ; installPackage ( com.android.server.cts.BatteryStatsValidationTest.DEVICE_SIDE_TEST_APK , true ) ; runDeviceTests ( com.android.server.cts.BatteryStatsValidationTest.DEVICE_SIDE_TEST_PACKAGE , ".BatteryStatsJobDurationTests" , "testJobDuration" ) ; assertValueRange ( "jb" , com.android.server.cts.BatteryStatsValidationTest.DEVICE_SIDE_JOB_COMPONENT , 5 , ( ( long ) ( 3000 * 0.8 ) ) , ( 3000 * 2 ) ) ; batteryOffScreenOn ( ) ; }

Target:
public void testJobDuration ( ) throws java.lang.Exception { batteryOnScreenOff ( ) ; installPackage ( com.android.server.cts.BatteryStatsValidationTest.DEVICE_SIDE_TEST_APK , true ) ; runDeviceTests ( com.android.server.cts.BatteryStatsValidationTest.DEVICE_SIDE_TEST_PACKAGE , ".BatteryStatsJobDurationTests" , "testJobDuration" ) ; assertValueRange ( "jb" , com.android.server.cts.BatteryStatsValidationTest.DEVICE_SIDE_JOB_COMPONENT , 5 , ( ( long ) ( 15000 * 0.8 ) ) , ( 15000 * 2 ) ) ; batteryOffScreenOn ( ) ; }
Source:
final int hash ( java.lang.Object k ) { return java.util.sun.misc.Hashing.singleWordWangJenkinsHash ( k ) ; }

Target:
final int hash ( java.lang.Object k ) { int h = k.hashCode ( ) ; h ^= ( h > > > 20 ) ^ ( h > > > 12 ) ; return ( h ^ ( h > > > 7 ) ) ^ ( h > > > 4 ) ; }
Source:
public void testAssistantStackFinishToPreviousApp ( ) throws java.lang.Exception { launchActivityOnDisplay ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerAssistantStackTests.mAssistantDisplayId ) ; enableAssistant ( ) ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK , android.server.cts.ActivityManagerAssistantStackTests.EXTRA_FINISH_SELF , "true" ) ; disableAssistant ( ) ; mAmWmState.waitForValidState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.waitForActivityState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerState.STATE_RESUMED ) ; mAmWmState.assertFocusedActivity ( "TestActivity should be resumed" , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; mAmWmState.assertFrontStack ( "Fullscreen stack should be on top." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.assertFocusedStack ( "Fullscreen stack should be focused." , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; }

Target:
public void testAssistantStackFinishToPreviousApp ( ) throws java.lang.Exception { launchActivityOnDisplay ( android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerAssistantStackTests.mAssistantDisplayId ) ; enableAssistant ( ) ; launchActivity ( android.server.cts.ActivityManagerAssistantStackTests.LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK , android.server.cts.ActivityManagerAssistantStackTests.EXTRA_FINISH_SELF , "true" ) ; disableAssistant ( ) ; mAmWmState.waitForValidState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.FULLSCREEN_WORKSPACE_STACK_ID ) ; mAmWmState.waitForActivityState ( mDevice , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY , android.server.cts.ActivityManagerState.STATE_RESUMED ) ; mAmWmState.assertFocusedActivity ( "TestActivity should be resumed" , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; mAmWmState.assertActivityInFullscreenTypeStack ( "TestActivity should go on a suitable fullscreen-type stack." , android.server.cts.ActivityManagerAssistantStackTests.TEST_ACTIVITY ) ; }
Source:
public java.lang.String getPlatformToolsVersion ( ) { com.android.sdklib.internal.repository.LocalSdkParser parser = new com.android.sdklib.internal.repository.LocalSdkParser ( ) ; java.lang.Package [ ] packages = parser.parseSdk ( mOsSdkPath , this , LocalSdkParser.PARSE_PLATFORM_TOOLS , new com.android.sdklib.internal.repository.NullTaskMonitor ( new com.android.sdklib.NullSdkLog ( ) ) ) ; for ( java.lang.Package pkg : packages ) { if ( ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformToolPackage ) && ( pkg.isLocal ( ) ) ) { return pkg.getRevision ( ) . toShortString ( ) ; } } return null ; }

Target:
public java.lang.String getPlatformToolsVersion ( ) { com.android.sdklib.internal.repository.LocalSdkParser parser = new com.android.sdklib.internal.repository.LocalSdkParser ( ) ; java.lang.Package [ ] packages = parser.parseSdk ( mOsSdkPath , this , LocalSdkParser.PARSE_PLATFORM_TOOLS , new com.android.sdklib.internal.repository.NullTaskMonitor ( com.android.utils.NullLogger.getLogger ( ) ) ) ; for ( java.lang.Package pkg : packages ) { if ( ( pkg instanceof com.android.sdklib.internal.repository.packages.PlatformToolPackage ) && ( pkg.isLocal ( ) ) ) { return pkg.getRevision ( ) . toShortString ( ) ; } } return null ; }
Source:
public void run ( ) { sortPackages ( true ) ; }

Target:
private void loadPackages ( ) { if ( ( mUpdaterData ) == null ) { return ; } try { enableUi ( mGroupPackages , false ) ; boolean firstLoad = mPkgManager.getPackages ( ) . isEmpty ( ) ; mPkgManager.loadPackages ( ) ; if ( firstLoad ) { expandInitial ( mCategories ) ; } } finally { enableUi ( mGroupPackages , true ) ; updateButtonsState ( ) ; updateMenuCheckmarks ( ) ; } }
Source:
private void reportNewProgress ( java.lang.String encodedConfigurationInstance , java.lang.String previousProgress , java.lang.String newProgress ) { newDataReceived = true ; configurationProgress.put ( encodedConfigurationInstance , newProgress ) ; java.lang.String diffProgress = newProgress.substring ( previousProgress.length ( ) ) ; testRunListener.testConfigurationProgress ( com.google.gct.testing.ConfigurationInstance.parseFromEncodedString ( encodedConfigurationInstance ) . getDisplayString ( ) , diffProgress ) ; }

Target:
private void reportNewProgress ( java.lang.String encodedConfigurationInstance , java.lang.String previousProgress , java.lang.String newProgress ) { newDataReceived = true ; configurationProgress.put ( encodedConfigurationInstance , newProgress ) ; java.lang.String diffProgress = newProgress.substring ( previousProgress.length ( ) ) ; testRunListener.testConfigurationProgress ( com.google.gct.testing.ConfigurationInstance.parseFromEncodedString ( encodedConfigurationInstance ) . getResultsViewerDisplayString ( ) , diffProgress ) ; }
Source:
public void onConnectionServiceReleased ( com.android.server.telecom.ConnectionServiceFocusManager.ConnectionServiceFocus connectionServiceFocus ) { mEventHandler.obtainMessage ( com.android.server.telecom.ConnectionServiceFocusManager.MSG_RELEASE_CONNECTION_FOCUS , connectionServiceFocus ) . 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:
private boolean doLaunchAction ( final com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo info , com.android.ddmlib.IDevice device ) { boolean result = info.getLaunchAction ( ) . doLaunchAction ( info , device ) ; com.android.ide.eclipse.ddms.DdmsPlugin.getDefault ( ) . startLogCatMonitor ( device ) ; return result ; }

Target:
private boolean doLaunchAction ( final com.android.ide.eclipse.adt.internal.launch.DelayedLaunchInfo info , java.util.Collection < com.android.ddmlib.IDevice > devices ) { boolean result = info.getLaunchAction ( ) . doLaunchAction ( info , devices ) ; for ( com.android.ddmlib.IDevice d : devices ) { com.android.ide.eclipse.ddms.DdmsPlugin.getDefault ( ) . startLogCatMonitor ( d ) ; } return result ; }
Source:
public void testSetMountPoint ( ) throws java.lang.Exception { org.easymock.EasyMock.expect ( mMockDevice.getMountPoint ( IDevice.MNT_EXTERNAL_STORAGE ) ) . andReturn ( "/sdcard" ) . once ( ) ; org.easymock.EasyMock.replay ( mMockDevice ) ; mMediaPreparer.setMountPoint ( mMockDevice ) ; assertEquals ( mMediaPreparer.baseDeviceShortDir , "/sdcard/test/bbb_short/" ) ; assertEquals ( mMediaPreparer.baseDeviceFullDir , "/sdcard/test/bbb_full/" ) ; }

Target:
public void testSetMountPoint ( ) throws java.lang.Exception { org.easymock.EasyMock.expect ( mMockDevice.getMountPoint ( IDevice.MNT_EXTERNAL_STORAGE ) ) . andReturn ( "/sdcard" ) . once ( ) ; org.easymock.EasyMock.replay ( mMockDevice ) ; mMediaPreparer.setMountPoint ( mMockDevice ) ; assertEquals ( mMediaPreparer.mBaseDeviceShortDir , "/sdcard/test/bbb_short/" ) ; assertEquals ( mMediaPreparer.mBaseDeviceFullDir , "/sdcard/test/bbb_full/" ) ; }
Source:
public void copyFromUnchecked ( int [ ] d ) { android.os.Trace.traceBegin ( RenderScript.TRACE_TAG , "copyFromUnchecked" ) ; mRS.validate ( ) ; if ( ( mCurrentDimZ ) > 0 ) { copy3DRangeFromUnchecked ( 0 , 0 , 0 , mCurrentDimX , mCurrentDimY , mCurrentDimZ , d ) ; } else if ( ( mCurrentDimY ) > 0 ) { copy2DRangeFromUnchecked ( 0 , 0 , mCurrentDimX , mCurrentDimY , d ) ; } else { copy1DRangeFromUnchecked ( 0 , mCurrentCount , d ) ; } android.os.Trace.traceEnd ( RenderScript.TRACE_TAG ) ; }

Target:
public void copyFrom ( int [ ] d ) { validateIsInt32 ( ) ; copyFromUnchecked ( d , Element.DataType.SIGNED_32 , d.length ) ; }
Source:
public void onClick ( android.view.View v ) { com.example.android.deviceconfig.ConfigGenerator configGen = new com.example.android.deviceconfig.ConfigGenerator ( this ) ; final java.lang.String filename = configGen.generateConfig ( ) ; if ( filename != null ) { android.content.Intent emailIntent = new android.content.Intent ( android.content.Intent.ACTION_SEND ) ; emailIntent.setType ( "text/xml" ) ; java.io.File devicesXml = new java.io.File ( filename ) ; emailIntent.putExtra ( Intent.EXTRA_SUBJECT , ( "Device XML: " + ( devicesXml.getName ( ) ) ) ) ; emailIntent.putExtra ( Intent.EXTRA_TEXT , ( "Note: This is intended to generate a base " + ( "XML description. After running this, you should double check the generated " + "information and add all of the missing fields." ) ) ) ; emailIntent.putExtra ( Intent.EXTRA_STREAM , android.net.Uri.parse ( ( "file://" + ( devicesXml.getAbsolutePath ( ) ) ) ) ) ; startActivity ( emailIntent ) ; } }

Target:
public void onClick ( android.view.View v ) { com.example.android.deviceconfig.ConfigGenerator configGen = new com.example.android.deviceconfig.ConfigGenerator ( this , com.example.android.deviceconfig.MyActivity.mGl.getExtensions ( ) ) ; final java.lang.String filename = configGen.generateConfig ( ) ; if ( filename != null ) { android.content.Intent emailIntent = new android.content.Intent ( android.content.Intent.ACTION_SEND ) ; emailIntent.setType ( "text/xml" ) ; java.io.File devicesXml = new java.io.File ( filename ) ; emailIntent.putExtra ( Intent.EXTRA_SUBJECT , ( "Device XML: " + ( devicesXml.getName ( ) ) ) ) ; emailIntent.putExtra ( Intent.EXTRA_TEXT , ( "Note: This is intended to generate a base " + ( "XML description. After running this, you should double check the generated " + "information and add all of the missing fields." ) ) ) ; emailIntent.putExtra ( Intent.EXTRA_STREAM , android.net.Uri.parse ( ( "file://" + ( devicesXml.getAbsolutePath ( ) ) ) ) ) ; startActivity ( emailIntent ) ; } }
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:
private java.lang.reflect.ParameterizedType resolveParameterizedType ( java.lang.reflect.ParameterizedType type ) { java.lang.reflect.Type owner = type.getOwnerType ( ) ; java.lang.reflect.Type resolvedOwner = ( owner == null ) ? null : resolveType ( owner ) ; java.lang.reflect.Type resolvedRawType = resolveType ( type.getRawType ( ) ) ; java.lang.reflect.Type [ ] args = type.getActualTypeArguments ( ) ; java.lang.reflect.Type [ ] resolvedArgs = resolveTypes ( args ) ; return com.google.common.reflect.Types.newParameterizedTypeWithOwner ( resolvedOwner , ( ( java.lang.Class < ? > ) ( resolvedRawType ) ) , resolvedArgs ) ; }
Source:
public void resetDefaultPreferences ( ) { long gal = mPrefs.getLong ( GoogleAccountLogin.PREF_AUTOLOGIN_TIME , ( - 1 ) ) ; mPrefs.edit ( ) . clear ( ) . putLong ( GoogleAccountLogin.PREF_AUTOLOGIN_TIME , gal ) . apply ( ) ; syncManagedSettings ( ) ; }

Target:
public void resetDefaultPreferences ( ) { long gal = mPrefs.getLong ( GoogleAccountLogin.PREF_AUTOLOGIN_TIME , ( - 1 ) ) ; mPrefs.edit ( ) . clear ( ) . putLong ( GoogleAccountLogin.PREF_AUTOLOGIN_TIME , gal ) . apply ( ) ; resetCachedValues ( ) ; syncManagedSettings ( ) ; }
Source:
void foo1 ( int [ ] array , int start , int end ) { for ( int i = start ; i < end ; i ++ ) { array [ i ] = 1 ; sum += array [ i ] ; } }

Target:
void foo2 ( int [ ] array , int start , int end , boolean expectInterpreter ) { for ( int i = start ; i <= end ; i ++ ) { if ( expectInterpreter ) { Main.assertIsInterpreted ( ) ; } else { Main.assertIsManaged ( ) ; } array [ i ] = 1 ; sum += array [ i ] ; } }
Source:
public void checkValue ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull java.lang.String data ) throws com.android.sched.util.codec.CheckingException { if ( ! ( com.android.jack.util.NamingTools.isFullMethodName ( data ) ) ) { throw new com.android.sched.util.codec.CheckingException ( ( ( ( ( "The value must be " + ( getUsage ( ) ) ) + " but is '" ) + data ) + "'" ) ) ; } }

Target:
public com.android.jack.util.MethodNameCodec.MethodNameValue parseString ( @ javax.annotation.Nonnull com.android.sched.util.codec.CodecContext context , @ javax.annotation.Nonnull java.lang.String string ) { try { return checkString ( context , string ) ; } catch ( com.android.sched.util.codec.ParsingException e ) { throw new com.android.sched.util.config.ConfigurationError ( e ) ; } }
Source:
public static long LongNonmatCond_LongVarVar ( long a , long b , long x , long y ) { return a > b ? x : y ; }

Target:
public static long IntMatCond_LongVarVar ( int a , int b , long x , long y ) { if ( Main.doThrow ) { throw new java.lang.Error ( ) ; } long result = ( a > b ) ? x : y ; return result + ( a > b ? 0L : 1L ) ; }
Source:
public java.lang.String getName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( '(' ) ; for ( com.android.jack.ir.ast.JParameter p : method.getParams ( ) ) { sb.append ( getName ( p.getType ( ) ) ) ; } sb.append ( ')' ) ; sb.append ( getName ( method.getType ( ) ) ) ; return sb.toString ( ) ; }

Target:
public java.lang.String getName ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JMethod method ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; sb.append ( '(' ) ; for ( com.android.jack.ir.ast.JParameter p : method.getParams ( ) ) { if ( ( p.getMarker ( com.android.jack.transformations.lambda.CapturedVariable.class ) ) != null ) { continue ; } sb.append ( getName ( p.getType ( ) ) ) ; } sb.append ( ')' ) ; sb.append ( getName ( method.getType ( ) ) ) ; return sb.toString ( ) ; }
Source:
public void testOverlay2Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay2" , BasePlugin.GRADLE_MIN_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , "build/res/all/one/debug/drawable" ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "variant_type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }

Target:
public void testOverlay2Content ( ) throws java.lang.Exception { java.io.File project = buildProject ( "overlay2" , BasePlugin.GRADLE_MIN_VERSION ) ; java.io.File drawableOutput = new java.io.File ( project , ( ( "build/" + ( com.android.build.gradle.BasePlugin.FD_INTERMEDIATES ) ) + "/res/one/debug/drawable" ) ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "no_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; com.android.build.gradle.ManualBuildTest.checkImageColor ( drawableOutput , "variant_type_flavor_overlay.png" , com.android.build.gradle.ManualBuildTest.GREEN ) ; }
Source:
private void notifyNoData ( com.android.internal.telephony.dataconnection.DcFailCause lastFailCauseCode , com.android.internal.telephony.dataconnection.ApnContext apnContext ) { if ( com.android.internal.telephony.dataconnection.DcTracker.DBG ) log ( ( "notifyNoData: type=" + ( apnContext.getApnType ( ) ) ) ) ; if ( ( isPermanentFail ( lastFailCauseCode ) ) && ( ! ( apnContext.getApnType ( ) . equals ( PhoneConstants.APN_TYPE_DEFAULT ) ) ) ) { mPhone.notifyDataConnectionFailed ( apnContext.getReason ( ) , apnContext.getApnType ( ) ) ; } }

Target:
private void onSetPolicyDataEnabled ( boolean enabled ) { synchronized ( mDataEnabledSettings ) { final boolean prevEnabled = isDataEnabled ( ) ; if ( ( mDataEnabledSettings.isPolicyDataEnabled ( ) ) != enabled ) { mDataEnabledSettings.setPolicyDataEnabled ( enabled ) ; if ( prevEnabled != ( isDataEnabled ( ) ) ) { if ( ! prevEnabled ) { reevaluateDataConnections ( ) ; onTrySetupData ( Phone.REASON_DATA_ENABLED ) ; } else { onCleanUpAllConnections ( Phone.REASON_DATA_SPECIFIC_DISABLED ) ; } } } } }
Source:
public void testAssertNoMultilineButtons ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.wrap ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; try { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.isRoot ( ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noMultilineButtons ( ) ) ; } catch ( junit.framework.AssertionFailedError expected ) { return ; } fail ( "Multiline button is not detected" ) ; }

Target:
public void assertNoMultilineButtons ( ) { android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.withId ( R.id.wrap ) ) . perform ( android.support.test.espresso.action.ViewActions.click ( ) ) ; expectedException.expect ( junit.framework.AssertionFailedError.class ) ; android.support.test.espresso.Espresso.onView ( android.support.test.espresso.matcher.ViewMatchers.isRoot ( ) ) . check ( android.support.test.espresso.assertion.LayoutAssertions.noMultilineButtons ( ) ) ; }
Source:
void delete ( @ javax.annotation.Nonnull com.android.sched.vfs.UnionVFS.UnionVFile file ) throws com.android.sched.util.file.CannotDeleteFileException { if ( ! ( isWritable ( ) ) ) { throw new java.lang.UnsupportedOperationException ( ) ; } try { com.android.sched.vfs.UnionVFS.UnionVDir parent = ( ( com.android.sched.vfs.UnionVFS.UnionVDir ) ( file.getParent ( ) ) ) ; parent.internalDelete ( file.getName ( ) ) ; } catch ( java.lang.UnsupportedOperationException e ) { throw new java.lang.AssertionError ( e ) ; } }

Target:
void delete ( @ javax.annotation.Nonnull com.android.sched.vfs.UnionVFS.UnionVFile file ) throws com.android.sched.util.file.CannotDeleteFileException { if ( ! ( isWritable ( ) ) ) { throw new java.lang.UnsupportedOperationException ( ) ; } try { com.android.sched.vfs.UnionVFS.UnionVDir parent = ( ( com.android.sched.vfs.UnionVFS.UnionVDir ) ( file.getParent ( ) ) ) ; parent.internalDelete ( file.getName ( ) ) ; } catch ( java.lang.UnsupportedOperationException e ) { throw new com.android.sched.vfs.UnionVFSReadOnlyException ( e ) ; } }
Source:
public static < K , V > com.google.common.collect.ImmutableBiMap < K , V > of ( K k1 , V v1 , K k2 , V v2 , K k3 , V v3 , K k4 , V v4 ) { return new com.google.common.collect.RegularImmutableBiMap < K , V > ( com.google.common.collect.ImmutableMap.of ( k1 , v1 , k2 , v2 , k3 , v3 , k4 , v4 ) ) ; }

Target:
public static < K , V > com.google.common.collect.ImmutableBiMap < K , V > of ( K k1 , V v1 , K k2 , V v2 , K k3 , V v3 , K k4 , V v4 ) { return new com.google.common.collect.RegularImmutableBiMap < K , V > ( com.google.common.collect.ImmutableMap.entryOf ( k1 , v1 ) , com.google.common.collect.ImmutableMap.entryOf ( k2 , v2 ) , com.google.common.collect.ImmutableMap.entryOf ( k3 , v3 ) , com.google.common.collect.ImmutableMap.entryOf ( k4 , v4 ) ) ; }
Source:
public final void testPkgTypeExtra ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_EXTRAS ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }

Target:
public final void testPkgTypeExtra ( ) { com.android.sdklib.repository.descriptors.IPkgCapabilities p = PkgType.PKG_EXTRAS ; assertFalse ( p.hasMajorRevision ( ) ) ; assertTrue ( p.hasFullRevision ( ) ) ; assertFalse ( p.hasAndroidVersion ( ) ) ; assertTrue ( p.hasPath ( ) ) ; assertTrue ( p.hasVendorId ( ) ) ; assertFalse ( p.hasMinToolsRev ( ) ) ; assertFalse ( p.hasMinPlatformToolsRev ( ) ) ; }
Source:
private void splitInt ( java.lang.String str , int [ ] output ) { if ( str == null ) return ; java.util.StringTokenizer tokenizer = new java.util.StringTokenizer ( str , "," ) ; int index = 0 ; while ( tokenizer.hasMoreElements ( ) ) { java.lang.String token = tokenizer.nextToken ( ) ; output [ ( index ++ ) ] = java.lang.Integer.parseInt ( token ) ; } }

Target:
private void splitFloat ( java.lang.String str , float [ ] output ) { if ( str == null ) return ; android.text.TextUtils.StringSplitter splitter = new android.text.TextUtils.SimpleStringSplitter ( ',' ) ; splitter.setString ( str ) ; int index = 0 ; for ( java.lang.String s : splitter ) { output [ ( index ++ ) ] = java.lang.Float.parseFloat ( s ) ; } }
Source:
public void reloadConfig ( ) throws com.android.jack.server.api.v01.ServerException , com.android.sched.util.file.CannotChangePermissionException , com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.NotFileException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { shutdownConnections ( ) ; try { checkAccess ( serverDir , java.util.EnumSet.of ( java.nio.file.attribute.PosixFilePermission.OWNER_READ , java.nio.file.attribute.PosixFilePermission.OWNER_WRITE , java.nio.file.attribute.PosixFilePermission.OWNER_EXECUTE ) ) ; loadConfig ( ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | java.io.IOException | com.android.sched.util.file.NotFileException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotChangePermissionException e ) { shutdown ( ) ; throw e ; } start ( new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ) ; }

Target:
public void reloadConfig ( ) throws com.android.jack.server.api.v01.ServerException , com.android.sched.util.file.CannotChangePermissionException , com.android.sched.util.file.CannotCreateFileException , com.android.sched.util.file.NotFileException , com.android.sched.util.file.WrongPermissionException , java.io.IOException { shutdownConnections ( ) ; try { checkAccessRight ( serverDir ) ; loadConfig ( ) ; } catch ( com.android.sched.util.file.CannotCreateFileException | java.io.IOException | com.android.sched.util.file.NotFileException | com.android.sched.util.file.WrongPermissionException | com.android.sched.util.file.CannotChangePermissionException e ) { shutdown ( ) ; throw e ; } start ( new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ) ; }
Source:
public void testHasFlagsWithCustomFlagsDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( ) ; intent.addFlags ( ( ( android.content.Intent.FLAG_DEBUG_LOG_RESOLUTION ) | 8 ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( 16 ) . matches ( intent ) ) ; assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( ( ( android.content.Intent.FLAG_ACTIVITY_NO_HISTORY ) | 8 ) ) . matches ( intent ) ) ; }

Target:
public void hasFlagsWithCustomFlagsDoesNotMatch ( ) { android.content.Intent intent = new android.content.Intent ( ) ; intent.addFlags ( ( ( android.content.Intent.FLAG_DEBUG_LOG_RESOLUTION ) | 8 ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( 16 ) . matches ( intent ) ) ; org.junit.Assert.assertFalse ( android.support.test.espresso.intent.matcher.IntentMatchers.hasFlags ( ( ( android.content.Intent.FLAG_ACTIVITY_NO_HISTORY ) | 8 ) ) . matches ( intent ) ) ; }
Source:
private static boolean isOutgoingVideoCall ( com.android.incallui.call.DialerCall call ) { if ( ! ( com.android.incallui.VideoCallPresenter.isVideoCall ( call ) ) ) { return false ; } final int state = call.getState ( ) ; return ( ( DialerCall.State.isDialing ( state ) ) || ( state == ( com.android.incallui.call.DialerCall.State.CONNECTING ) ) ) || ( state == ( com.android.incallui.call.DialerCall.State.SELECT_PHONE_ACCOUNT ) ) ; }

Target:
private static boolean isOutgoingVideoCall ( com.android.incallui.call.DialerCall call ) { if ( ! ( com.android.incallui.VideoCallPresenter.isVideoCall ( call ) ) ) { return false ; } final int state = call.getState ( ) ; return ( ( com.android.incallui.call.state.DialerCallState.isDialing ( state ) ) || ( state == ( com.android.incallui.call.state.DialerCallState.CONNECTING ) ) ) || ( state == ( com.android.incallui.call.state.DialerCallState.SELECT_PHONE_ACCOUNT ) ) ; }
Source:
final void get ( int [ ] dst , int dstOffset , int intCount ) { int byteCount = checkGetBounds ( SizeOf.INT , dst.length , dstOffset , intCount ) ; this . block.peekIntArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , intCount , order.needsSwap ) ; position += byteCount ; }

Target:
final void get ( int [ ] dst , int dstOffset , int intCount ) { checkNotFreed ( ) ; int byteCount = checkGetBounds ( SizeOf.INT , dst.length , dstOffset , intCount ) ; this . block.peekIntArray ( ( ( offset ) + ( position ) ) , dst , dstOffset , intCount , order.needsSwap ) ; position += byteCount ; }
Source:
private final synchronized void update ( java.lang.String newName , int newState ) { if ( ( newName != ( mHeadsetName ) ) || ( newState != ( mHeadsetState ) ) ) { boolean isUnplug = ( newState == 0 ) && ( ( mHeadsetState ) == 1 ) ; mHeadsetName = newName ; mHeadsetState = newState ; mAudioRouteNeedsUpdate = true ; sendIntent ( isUnplug ) ; if ( isUnplug ) { mHandler.sendEmptyMessageDelayed ( 0 , 1000 ) ; } else { updateAudioRoute ( ) ; } } }

Target:
private final synchronized void update ( java.lang.String newName , int newState ) { if ( ( newName != ( mHeadsetName ) ) || ( newState != ( mHeadsetState ) ) ) { boolean isUnplug = ( newState == 0 ) && ( ( mHeadsetState ) > 0 ) ; mHeadsetName = newName ; mHeadsetState = newState ; mAudioRouteNeedsUpdate = true ; sendIntent ( isUnplug ) ; if ( isUnplug ) { mWakeLock.acquire ( ) ; mHandler.sendEmptyMessageDelayed ( 0 , 1000 ) ; } else { updateAudioRoute ( ) ; } } }
Source:
private void restoreDefaultAPN ( int subId ) { android.database.sqlite.SQLiteDatabase db = mOpenHelper.getWritableDatabase ( ) ; try { db.delete ( com.android.providers.telephony.TelephonyProvider.CARRIERS_TABLE , null , null ) ; } catch ( android.database.SQLException e ) { com.android.providers.telephony.TelephonyProvider.loge ( ( "got exception when deleting to restore: " + e ) ) ; } setPreferredApnId ( ( ( long ) ( com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ) , subId ) ; mOpenHelper.initDatabase ( db ) ; }

Target:
private void restoreDefaultAPN ( int subId ) { android.database.sqlite.SQLiteDatabase db = getWritableDatabase ( ) ; try { db.delete ( com.android.providers.telephony.TelephonyProvider.CARRIERS_TABLE , null , null ) ; } catch ( android.database.SQLException e ) { com.android.providers.telephony.TelephonyProvider.loge ( ( "got exception when deleting to restore: " + e ) ) ; } setPreferredApnId ( ( ( long ) ( com.android.providers.telephony.TelephonyProvider.INVALID_APN_ID ) ) , subId ) ; initDatabaseWithDatabaseHelper ( db ) ; }
Source:
public void setDefaultVerifications ( ) { android.hardware.Sensor sensor = mSensorManager.getSensor ( ) ; addVerification ( android.hardware.cts.helpers.sensorverification.EventOrderingVerification.getDefault ( sensor ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.FrequencyVerification.getDefault ( sensor , mRateUs ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.JitterVerification.getDefault ( sensor , mRateUs ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.MagnitudeVerification.getDefault ( sensor ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.MeanVerification.getDefault ( sensor ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.StandardDeviationVerification.getDefault ( sensor ) ) ; }

Target:
public void setDefaultVerifications ( ) { android.hardware.Sensor sensor = mSensorManager.getSensor ( ) ; addVerification ( android.hardware.cts.helpers.sensorverification.EventGapVerification.getDefault ( sensor , mRateUs ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.EventOrderingVerification.getDefault ( sensor ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.FrequencyVerification.getDefault ( sensor , mRateUs ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.JitterVerification.getDefault ( sensor , mRateUs ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.MagnitudeVerification.getDefault ( sensor ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.MeanVerification.getDefault ( sensor ) ) ; addVerification ( android.hardware.cts.helpers.sensorverification.StandardDeviationVerification.getDefault ( sensor ) ) ; }
Source:
java.lang.String getFieldAnnotation ( @ com.android.annotations.NonNull java.lang.String fqn , @ com.android.annotations.NonNull java.lang.String name ) { com.android.build.gradle.tasks.annotations.Extractor.FieldItem item = new com.android.build.gradle.tasks.annotations.Extractor.FieldItem ( fqn , name ) ; return com.android.build.gradle.tasks.annotations.Extractor.getJarMarkerAnnotationName ( findItem ( fqn , item ) ) ; }

Target:
private static boolean isRelevantFrameworkAnnotation ( @ com.android.annotations.NonNull java.lang.String fqn ) { return ( ( ( ( ( fqn.startsWith ( com.android.build.gradle.tasks.annotations.Extractor.ANDROID_ANNOTATIONS_PREFIX ) ) && ( ! ( fqn.endsWith ( ".Widget" ) ) ) ) && ( ! ( fqn.endsWith ( ".TargetApi" ) ) ) ) && ( ! ( fqn.endsWith ( ".SystemApi" ) ) ) ) && ( ! ( fqn.endsWith ( ".SuppressLint" ) ) ) ) && ( ! ( fqn.endsWith ( ".SdkConstant" ) ) ) ; }
Source:
private java.lang.String stringLegalizer ( @ javax.annotation.Nonnull java.lang.String str ) { return str.replace ( '/' , '_' ) . replace ( ';' , '_' ) . replace ( '<' , '_' ) . replace ( '>' , '_' ) . replace ( ':' , '_' ) ; }

Target:
private java.lang.String stringLegalizer ( @ javax.annotation.Nonnull java.lang.String str ) { return str.replace ( '/' , '_' ) . replace ( ';' , '_' ) . replace ( '<' , '_' ) . replace ( '>' , '_' ) . replace ( ':' , '_' ) . replace ( '[' , '_' ) ; }
Source:
public void testPreloadDensity ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.Resources res = getContext ( ) . getResources ( ) ; final int densityDpi = res.getConfiguration ( ) . densityDpi ; try { testPreloadDensityInner ( res , densityDpi ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , densityDpi ) ; } }

Target:
public void testPreloadDensity_tvdpi ( ) throws java.io.IOException , org.xmlpull.v1.XmlPullParserException { final android.content.res.Resources res = mContext.getResources ( ) ; final int densityDpi = res.getConfiguration ( ) . densityDpi ; try { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , 213 ) ; verifyPreloadDensityInner ( res , 213 ) ; } finally { android.graphics.drawable.cts.DrawableTestUtils.setResourcesDensity ( res , densityDpi ) ; } }
Source:
private java.io.File makeFakeTargetInternal ( java.io.File platformsDir ) throws java.io.IOException { java.io.File targetDir = new java.io.File ( platformsDir , "v0_0" ) ; targetDir.mkdirs ( ) ; new java.io.File ( targetDir , com.android.SdkConstants.FN_FRAMEWORK_LIBRARY ) . createNewFile ( ) ; new java.io.File ( targetDir , com.android.SdkConstants.FN_FRAMEWORK_AIDL ) . createNewFile ( ) ; createSourceProps ( targetDir , PkgProps.LAYOUTLIB_API , "5" , PkgProps.LAYOUTLIB_REV , "2" ) ; createFileProps ( SdkConstants.FN_BUILD_PROP , targetDir , SdkManager.PROP_VERSION_RELEASE , "0.0" , SdkManager.PROP_VERSION_SDK , "0" , SdkManager.PROP_VERSION_CODENAME , "REL" ) ; return targetDir ; }

Target:
private java.io.File makeFakeTargetInternal ( java.io.File platformsDir ) throws java.io.IOException { java.io.File targetDir = new java.io.File ( platformsDir , "v0_0" ) ; targetDir.mkdirs ( ) ; new java.io.File ( targetDir , com.android.SdkConstants.FN_FRAMEWORK_LIBRARY ) . createNewFile ( ) ; new java.io.File ( targetDir , com.android.SdkConstants.FN_FRAMEWORK_AIDL ) . createNewFile ( ) ; createSourceProps ( targetDir , PkgProps.PKG_REVISION , "1" , PkgProps.PLATFORM_VERSION , "0.0" , PkgProps.VERSION_API_LEVEL , "0" , PkgProps.LAYOUTLIB_API , "5" , PkgProps.LAYOUTLIB_REV , "2" ) ; createFileProps ( SdkConstants.FN_BUILD_PROP , targetDir , LocalPlatformPkgInfo.PROP_VERSION_RELEASE , "0.0" , LocalPlatformPkgInfo.PROP_VERSION_SDK , "0" , LocalPlatformPkgInfo.PROP_VERSION_CODENAME , "REL" ) ; return targetDir ; }
Source:
void conferenceWith ( com.android.server.telecom.Call otherCall ) { if ( ( mConnectionService ) == null ) { com.android.server.telecom.Log.w ( this , "conference requested on a call without a connection service." ) ; } else { com.android.server.telecom.Log.event ( this , Log.Events.CONFERENCE_WITH , otherCall ) ; mConnectionService.conference ( this , otherCall ) ; } }

Target:
public void pullExternalCall ( ) { if ( ( mConnectionService ) == null ) { android.telecom.Log.w ( this , "pulling a call without a connection service." ) ; } if ( ! ( hasProperty ( Connection.PROPERTY_IS_EXTERNAL_CALL ) ) ) { android.telecom.Log.w ( this , "pullExternalCall - call %s is not an external call." , mId ) ; return ; } if ( ! ( can ( Connection.CAPABILITY_CAN_PULL_CALL ) ) ) { android.telecom.Log.w ( this , "pullExternalCall - call %s is external but cannot be pulled." , mId ) ; return ; } android.telecom.Log.addEvent ( this , LogUtils.Events.REQUEST_PULL ) ; mConnectionService.pullExternalCall ( this ) ; }
Source:
public void logp ( java.util.logging.Level level , java.lang.String sourceClass , java.lang.String sourceMethod , java.lang.String msg ) { if ( ( ( level.intValue ( ) ) < ( levelValue ) ) || ( ( levelValue ) == ( java.util.logging.Logger.offValue ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msg ) ; lr.setSourceClassName ( sourceClass ) ; lr.setSourceMethodName ( sourceMethod ) ; doLog ( lr ) ; }

Target:
public void log ( java.util.logging.Level level , java.util.function.Supplier < java.lang.String > msgSupplier ) { if ( ! ( isLoggable ( level ) ) ) { return ; } java.util.logging.LogRecord lr = new java.util.logging.LogRecord ( level , msgSupplier.get ( ) ) ; doLog ( lr ) ; }
Source:
public static void readFully ( java.io.InputStream in , byte [ ] b , int off , int len ) throws java.io.IOException { if ( ( com.google.common.io.ByteStreams.read ( in , b , off , len ) ) != len ) { throw new java.io.EOFException ( ) ; } }

Target:
public static void readFully ( java.io.InputStream in , byte [ ] b , int off , int len ) throws java.io.IOException { int read = com.google.common.io.ByteStreams.read ( in , b , off , len ) ; if ( read != len ) { throw new java.io.EOFException ( ( ( ( ( "reached end of stream after reading " + read ) + " bytes; " ) + len ) + " bytes expected" ) ) ; } }
Source:
private com.android.sdklib.internal.repository.archives.Archive parseArchive ( org.w3c.dom.Node archiveNode ) { com.android.sdklib.internal.repository.archives.Archive a = new com.android.sdklib.internal.repository.archives.Archive ( this , ( ( com.android.sdklib.internal.repository.archives.Archive.Os ) ( com.android.sdklib.internal.repository.packages.PackageParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_OS , com.android.sdklib.internal.repository.archives.Archive.Os.values ( ) , null ) ) ) , ( ( com.android.sdklib.internal.repository.archives.Archive.Arch ) ( com.android.sdklib.internal.repository.packages.PackageParserUtils.getEnumAttribute ( archiveNode , SdkRepoConstants.ATTR_ARCH , com.android.sdklib.internal.repository.archives.Archive.Arch.values ( ) , Arch.ANY ) ) ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_URL ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlLong ( archiveNode , SdkRepoConstants.NODE_SIZE , 0 ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_CHECKSUM ) ) ; return a ; }

Target:
private com.android.sdklib.internal.repository.archives.Archive parseArchive ( @ com.android.annotations.NonNull org.w3c.dom.Node archiveNode ) { com.android.sdklib.internal.repository.archives.Archive a = new com.android.sdklib.internal.repository.archives.Archive ( this , com.android.sdklib.internal.repository.packages.PackageParserUtils.parseArchFilter ( archiveNode ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_URL ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlLong ( archiveNode , SdkRepoConstants.NODE_SIZE , 0 ) , com.android.sdklib.internal.repository.packages.PackageParserUtils.getXmlString ( archiveNode , SdkRepoConstants.NODE_CHECKSUM ) ) ; return a ; }
Source:
public java.lang.String nvReadItem ( int itemID ) { enforceModifyPermissionOrCarrierPrivilege ( getDefaultSubscription ( ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvReadItem: item " + itemID ) ) ; java.lang.String value = ( ( java.lang.String ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_READ_ITEM , itemID ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( ( "nvReadItem: item " + itemID ) + " is \"" ) + value ) + '"' ) ) ; return value ; }

Target:
public java.lang.String nvReadItem ( int itemID ) { com.android.internal.telephony.TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege ( mApp , getDefaultSubscription ( ) , "nvReadItem" ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( "nvReadItem: item " + itemID ) ) ; java.lang.String value = ( ( java.lang.String ) ( sendRequest ( com.android.phone.PhoneInterfaceManager.CMD_NV_READ_ITEM , itemID ) ) ) ; if ( com.android.phone.PhoneInterfaceManager.DBG ) com.android.phone.PhoneInterfaceManager.log ( ( ( ( ( "nvReadItem: item " + itemID ) + " is \"" ) + value ) + '"' ) ) ; return value ; }
Source:
private void enableInterfaceIPv6PrivacyExtensions ( ) { final java.lang.String PREFER_TEMPADDRS = "2" ; android.net.util.NetdService.run ( ( android.net.INetd netd ) -> { netd.setProcSysNet ( INetd.IPV6 , INetd.CONF , mInterfaceName , "use_tempaddr" , PREFER_TEMPADDRS ) ; } ) ; }

Target:
private boolean startIPv6 ( ) { final java.lang.String PREFER_TEMPADDRS = "2" ; try { android.net.util.NetdService.run ( ( android.net.INetd netd ) -> { netd.setProcSysNet ( INetd.IPV6 , INetd.CONF , mInterfaceName , "use_tempaddr" , PREFER_TEMPADDRS ) ; } ) ; mNwService.enableIpv6 ( mInterfaceName ) ; } catch ( java.lang.IllegalStateException | android.os.RemoteException | android.os.ServiceSpecificException e ) { logError ( "Unable to change interface settings: %s" , e ) ; return false ; } return true ; }