auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public final char char_literal ( ) throws org.jf.smali.RecognitionException { char value = 0 ; org.antlr.runtime.tree.CommonTree CHAR_LITERAL197 = null ; try { { CHAR_LITERAL197 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.CHAR_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_CHAR_LITERAL_in_char_literal3337 ) ) ) ; value = ( CHAR_LITERAL197 != null ? CHAR_LITERAL197.getText ( ) : null ) . charAt ( 1 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }

Target:
public final char char_literal ( ) throws org.jf.smali.RecognitionException { char value = 0 ; org.antlr.runtime.tree.CommonTree CHAR_LITERAL197 = null ; try { { CHAR_LITERAL197 = ( ( org.antlr.runtime.tree.CommonTree ) ( match ( input , org.jf.smali.smaliTreeWalker.CHAR_LITERAL , org.jf.smali.smaliTreeWalker.FOLLOW_CHAR_LITERAL_in_char_literal3339 ) ) ) ; value = ( CHAR_LITERAL197 != null ? CHAR_LITERAL197.getText ( ) : null ) . charAt ( 1 ) ; } } catch ( org.jf.smali.RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return value ; }
Source:
public void drain ( ) { for ( int i = 0 ; i < ( mQueue.size ( ) ) ; i ++ ) { android.media.Image image = mQueue.poll ( ) ; assertNotNull ( "Unable to get an image" , image ) ; image.close ( ) ; } }

Target:
public void drain ( ) { while ( ! ( mQueue.isEmpty ( ) ) ) { android.media.Image image = mQueue.poll ( ) ; assertNotNull ( "Unable to get an image" , image ) ; image.close ( ) ; } }
Source:
public java.lang.String startWpsPinDisplay ( java.lang.String bssid ) { if ( android.text.TextUtils.isEmpty ( bssid ) ) { return doStringCommand ( "WPS_PIN any" ) ; } else { return doStringCommand ( ( "WPS_PIN " + bssid ) ) ; } }

Target:
public java.lang.String startWpsPinDisplay ( java.lang.String bssid ) { if ( com.android.server.wifi.WifiNative.HIDL_SUP_ENABLE ) { return mSupplicantStaIfaceHal.startWpsPinDisplay ( bssid ) ; } else { if ( android.text.TextUtils.isEmpty ( bssid ) ) { return doStringCommand ( "WPS_PIN any" ) ; } else { return doStringCommand ( ( "WPS_PIN " + bssid ) ) ; } } }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( '<' ) . append ( this . getClass ( ) . getSimpleName ( ) ) . append ( ' ' ) ; builder.append ( getDesc ( ) . toString ( ) ) ; builder.append ( '>' ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; builder.append ( '<' ) . append ( this . getClass ( ) . getSimpleName ( ) ) . append ( ' ' ) ; builder.append ( getDesc ( ) . toString ( ) ) ; if ( ( mUpdate ) != null ) { builder.append ( " Updated by: " ) ; builder.append ( mUpdate.toString ( ) ) ; } builder.append ( '>' ) ; return builder.toString ( ) ; }
Source:
public void testInstallWithBadlyFormedBundleVersion ( ) throws java.lang.Exception { java.lang.String invalidBundleVersion = "A01.001" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( invalidBundleVersion , libcore.tzdata.update2.TzDataBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TzDataBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstallWithBadlyFormedBundleVersion ( ) throws java.lang.Exception { java.lang.String invalidBundleVersion = "A01.001" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( invalidBundleVersion , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , "001" ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . addProperty ( Options.ANDROID_MIN_API_LEVEL.getName ( ) , java.lang.String.valueOf ( AndroidApiLevel.ReleasedLevel.N.getLevel ( ) ) ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . compileAndRunTest ( ) ; }

Target:
private void run ( @ javax.annotation.Nonnull com.android.jack.test.runtime.RuntimeTestInfo rti ) throws java.lang.Exception { new com.android.jack.test.helper.RuntimeTestHelper ( rti ) . setSourceLevel ( SourceLevel.JAVA_8 ) . addIgnoredCandidateToolchain ( com.android.jack.test.toolchain.JackApiV01.class ) . setAndroidMinApiLevel ( java.lang.String.valueOf ( AndroidApiLevel.ReleasedLevel.N.getLevel ( ) ) ) . compileAndRunTest ( ) ; }
Source:
public void ropRegManager005 ( ) { com.android.jack.backend.dex.rop.RopRegisterManager rrm = new com.android.jack.backend.dex.rop.RopRegisterManager ( true , false ) ; com.android.jack.ir.sourceinfo.SourceInfo srcPos = com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ; com.android.jack.ir.ast.JParameter parameter = new com.android.jack.ir.ast.JParameter ( srcPos , "" , JPrimitiveTypeEnum.INT.getType ( ) , com.android.jack.ir.ast.JModifier.DEFAULT , null ) ; com.android.jack.ir.ast.JParameterRef ref = new com.android.jack.ir.ast.JParameterRef ( srcPos , parameter ) ; rrm.createRegisterSpec ( parameter ) ; rrm.getRegisterSpec ( ref ) ; }

Target:
public void ropRegManager005 ( ) { com.android.jack.backend.dex.rop.RopRegisterManager rrm = new com.android.jack.backend.dex.rop.RopRegisterManager ( true , false ) ; com.android.jack.ir.sourceinfo.SourceInfo srcPos = com.android.jack.ir.sourceinfo.SourceInfo.UNKNOWN ; com.android.jack.ir.ast.JParameter parameter = new com.android.jack.ir.ast.JParameter ( srcPos , "" , JPrimitiveTypeEnum.INT.getType ( ) , com.android.jack.ir.ast.JModifier.DEFAULT , null ) ; com.android.jack.ir.ast.JParameterRef ref = parameter.makeRef ( srcPos ) ; rrm.createRegisterSpec ( parameter ) ; rrm.getRegisterSpec ( ref ) ; }
Source:
public android.net.wifi.nan.ConfigRequest.Builder setMasterPreference ( int masterPreference ) { if ( masterPreference < 0 ) { throw new java.lang.IllegalArgumentException ( "Master Preference specification must be non-negative" ) ; } if ( ( ( masterPreference == 1 ) || ( masterPreference == 255 ) ) || ( masterPreference > 255 ) ) { throw new java.lang.IllegalArgumentException ( ( "Master Preference specification must not " + "exceed 255 or use 1 or 255 (reserved values)" ) ) ; } mMasterPreference = masterPreference ; return this ; }

Target:
public android.net.wifi.aware.ConfigRequest.Builder setMasterPreference ( int masterPreference ) { if ( masterPreference < 0 ) { throw new java.lang.IllegalArgumentException ( "Master Preference specification must be non-negative" ) ; } if ( ( ( masterPreference == 1 ) || ( masterPreference == 255 ) ) || ( masterPreference > 255 ) ) { throw new java.lang.IllegalArgumentException ( ( "Master Preference specification must not " + "exceed 255 or use 1 or 255 (reserved values)" ) ) ; } mMasterPreference = masterPreference ; return this ; }
Source:
private void addAnnotations ( @ com.android.annotations.Nullable org.eclipse.jdt.internal.compiler.ast.Annotation [ ] annotations , @ com.android.annotations.NonNull com.android.build.gradle.tasks.annotations.Extractor.Item item ) { if ( annotations != null ) { for ( org.eclipse.jdt.internal.compiler.ast.Annotation annotation : annotations ) { if ( isRelevantAnnotation ( annotation ) ) { com.android.build.gradle.tasks.annotations.Extractor.AnnotationData annotationData = createAnnotation ( annotation ) ; if ( annotationData != null ) { if ( annotationData.name.equals ( com.android.build.gradle.tasks.annotations.Extractor.SUPPORT_KEEP ) ) { keepItems.add ( item ) ; } else { item.annotations.add ( annotationData ) ; } } } } } }

Target:
private void addAnnotations ( @ com.android.annotations.Nullable org.eclipse.jdt.internal.compiler.ast.Annotation [ ] annotations , @ com.android.annotations.NonNull com.android.build.gradle.tasks.annotations.Extractor.Item item ) { if ( annotations != null ) { for ( org.eclipse.jdt.internal.compiler.ast.Annotation annotation : annotations ) { if ( isRelevantAnnotation ( annotation ) ) { java.lang.String fqn = com.android.build.gradle.tasks.annotations.Extractor.getFqn ( annotation ) ; if ( com.android.build.gradle.tasks.annotations.Extractor.SUPPORT_KEEP.equals ( fqn ) ) { keepItems.add ( item ) ; } else { addAnnotation ( annotation , fqn , item.annotations ) ; } } } } }
Source:
public void setUp ( com.android.tradefed.invoker.IInvocationContext context ) throws com.android.tradefed.device.DeviceNotAvailableException , com.android.tradefed.targetprep.BuildError , com.android.tradefed.targetprep.TargetSetupError { setUp ( context.getDevices ( ) . get ( 0 ) , context.getBuildInfos ( ) . get ( 0 ) ) ; }

Target:
public void tearDown ( com.android.tradefed.invoker.IInvocationContext context , java.lang.Throwable e ) throws com.android.tradefed.device.DeviceNotAvailableException { if ( ( mVenvDir ) != null ) { try { com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.recursiveDelete ( mVenvDir.toPath ( ) ) ; com.android.tradefed.log.LogUtil.CLog.i ( "Deleted the virtual env's temp working dir, %s." , mVenvDir ) ; } catch ( java.io.IOException exception ) { com.android.tradefed.log.LogUtil.CLog.e ( "Failed to delete %s: %s" , mVenvDir , exception ) ; } mVenvDir = null ; } }
Source:
private static void enableComponent ( android.content.Context context ) { context.getPackageManager ( ) . setComponentEnabledSetting ( new android.content.ComponentName ( context , "com.android.dialer.main.impl.MainActivity" ) , PackageManager.COMPONENT_ENABLED_STATE_ENABLED , PackageManager.DONT_KILL_APP ) ; }

Target:
public static boolean isNuiComponentEnabled ( android.content.Context context ) { if ( ! ( com.android.dialer.app.MainComponent.isNewUiEnabled ( context ) ) ) { return false ; } return ( context.getPackageManager ( ) . getComponentEnabledSetting ( new android.content.ComponentName ( context , com.android.dialer.app.MainComponent.getComponentName ( ) ) ) ) == ( android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED ) ; }
Source:
public synchronized java.util.concurrent.Future < java.lang.Integer > getBattery ( long freshness , java.util.concurrent.TimeUnit timeUnit ) { com.google.common.util.concurrent.SettableFuture < java.lang.Integer > result ; if ( ( ( mBatteryLevel ) == null ) || ( isFetchRequired ( freshness , timeUnit ) ) ) { if ( ( mPendingRequest ) == null ) { mPendingRequest = com.google.common.util.concurrent.SettableFuture.create ( ) ; fetchBatteryAsync ( ) ; } else { } result = mPendingRequest ; } else { result = com.google.common.util.concurrent.SettableFuture.create ( ) ; result.set ( mBatteryLevel ) ; } return result ; }

Target:
public synchronized java.util.concurrent.Future < java.lang.Integer > getBattery ( long freshness , java.util.concurrent.TimeUnit timeUnit ) { com.google.common.util.concurrent.SettableFuture < java.lang.Integer > result ; if ( ( ( mBatteryLevel ) == null ) || ( isFetchRequired ( freshness , timeUnit ) ) ) { if ( ( mPendingRequest ) == null ) { mPendingRequest = com.google.common.util.concurrent.SettableFuture.create ( ) ; initiateBatteryQuery ( ) ; } else { } result = mPendingRequest ; } else { result = com.google.common.util.concurrent.SettableFuture.create ( ) ; result.set ( mBatteryLevel ) ; } return result ; }
Source:
public com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config getUidTagConfig ( ) { return new com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config ( getSecureLong ( android.provider.Settings.Secure.NETSTATS_UID_TAG_BUCKET_DURATION , ( 2 * ( android.text.format.DateUtils.HOUR_IN_MILLIS ) ) ) , getSecureLong ( android.provider.Settings.Secure.NETSTATS_UID_TAG_ROTATE_AGE , ( 5 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) , getSecureLong ( android.provider.Settings.Secure.NETSTATS_UID_TAG_DELETE_AGE , ( 15 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) ) ; }

Target:
public com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config getDevConfig ( ) { return new com.android.server.net.NetworkStatsService.NetworkStatsSettings.Config ( getGlobalLong ( android.provider.Settings.Global.NETSTATS_DEV_BUCKET_DURATION , android.text.format.DateUtils.HOUR_IN_MILLIS ) , getGlobalLong ( android.provider.Settings.Global.NETSTATS_DEV_ROTATE_AGE , ( 15 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) , getGlobalLong ( android.provider.Settings.Global.NETSTATS_DEV_DELETE_AGE , ( 90 * ( android.text.format.DateUtils.DAY_IN_MILLIS ) ) ) ) ; }
Source:
static boolean containsKeyImpl ( java.util.Map < ? , ? > map , @ javax.annotation.Nullable java.lang.Object key ) { for ( java.util.Map.Entry < ? , ? > entry : map.entrySet ( ) ) { if ( com.google.common.base.Objects.equal ( entry.getKey ( ) , key ) ) { return true ; } } return false ; }

Target:
static < V > V safeRemove ( java.util.Map < ? , V > map , java.lang.Object key ) { com.google.common.base.Preconditions.checkNotNull ( map ) ; try { return map.remove ( key ) ; } catch ( java.lang.ClassCastException e ) { return null ; } catch ( java.lang.NullPointerException e ) { return null ; } }
Source:
public boolean enableNetwork ( int netId , boolean disableOthers ) { enforceChangePermission ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncEnableNetwork ( mWifiStateMachineChannel , netId , disableOthers ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return false ; } }

Target:
public boolean enableNetwork ( int netId , boolean disableOthers ) { enforceChangePermission ( ) ; mLog.trace ( "enableNetwork uid=% disableOthers=%" ) . c ( android.os.Binder.getCallingUid ( ) ) . c ( disableOthers ) . flush ( ) ; if ( ( mWifiStateMachineChannel ) != null ) { return mWifiStateMachine.syncEnableNetwork ( mWifiStateMachineChannel , netId , disableOthers ) ; } else { android.util.Slog.e ( com.android.server.wifi.WifiServiceImpl.TAG , "mWifiStateMachineChannel is not initialized" ) ; return false ; } }
Source:
private void handleSuccessfulIpConfiguration ( ) { mLastSignalLevel = - 1 ; com.android.server.wifi.WifiConfiguration c = getCurrentWifiConfiguration ( ) ; if ( c != null ) { c.numConnectionFailures = 0 ; } if ( c != null ) { com.android.server.wifi.ScanResult result = getCurrentScanResult ( ) ; if ( result == null ) { loge ( ( "WifiStateMachine: handleSuccessfulIpConfiguration and no scan results" + ( c.configKey ( ) ) ) ) ; } else { result.numIpConfigFailures = 0 ; mWifiNative.clearBlacklist ( ) ; } } }

Target:
private void handleSuccessfulIpConfiguration ( ) { mLastSignalLevel = - 1 ; android.net.wifi.WifiConfiguration c = getCurrentWifiConfiguration ( ) ; if ( c != null ) { c.getNetworkSelectionStatus ( ) . clearDisableReasonCounter ( WifiConfiguration.NetworkSelectionStatus.DISABLED_DHCP_FAILURE ) ; updateCapabilities ( c ) ; } if ( c != null ) { android.net.wifi.ScanResult result = getCurrentScanResult ( ) ; if ( result == null ) { logd ( ( "WifiStateMachine: handleSuccessfulIpConfiguration and no scan results" + ( c.configKey ( ) ) ) ) ; } else { result.numIpConfigFailures = 0 ; } } }
Source:
public static org.jetbrains.plugins.github.api.GithubPullRequest createPullRequest ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.api.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String user , @ org.jetbrains.annotations.NotNull java.lang.String repo , @ org.jetbrains.annotations.NotNull java.lang.String title , @ org.jetbrains.annotations.NotNull java.lang.String description , @ org.jetbrains.annotations.NotNull java.lang.String from , @ org.jetbrains.annotations.NotNull java.lang.String onto ) throws java.io.IOException { java.lang.String request = org.jetbrains.plugins.github.api.GithubApiUtil.gson.toJson ( new org.jetbrains.plugins.github.api.GithubPullRequestRequest ( title , description , from , onto ) ) ; return org.jetbrains.plugins.github.api.GithubApiUtil.createDataFromRaw ( org.jetbrains.plugins.github.api.GithubApiUtil.fromJson ( org.jetbrains.plugins.github.api.GithubApiUtil.postRequest ( auth , ( ( ( ( "/repos/" + user ) + "/" ) + repo ) + "/pulls" ) , request ) , org.jetbrains.plugins.github.api.GithubPullRequestRaw.class ) , org.jetbrains.plugins.github.api.GithubPullRequest.class ) ; }

Target:
public static org.jetbrains.plugins.github.api.GithubPullRequest createPullRequest ( @ org.jetbrains.annotations.NotNull org.jetbrains.plugins.github.util.GithubAuthData auth , @ org.jetbrains.annotations.NotNull java.lang.String user , @ org.jetbrains.annotations.NotNull java.lang.String repo , @ org.jetbrains.annotations.NotNull java.lang.String title , @ org.jetbrains.annotations.NotNull java.lang.String description , @ org.jetbrains.annotations.NotNull java.lang.String from , @ org.jetbrains.annotations.NotNull java.lang.String onto ) throws java.io.IOException { java.lang.String request = org.jetbrains.plugins.github.api.GithubApiUtil.gson.toJson ( new org.jetbrains.plugins.github.api.GithubPullRequestRequest ( title , description , from , onto ) ) ; return org.jetbrains.plugins.github.api.GithubApiUtil.createDataFromRaw ( org.jetbrains.plugins.github.api.GithubApiUtil.fromJson ( org.jetbrains.plugins.github.api.GithubApiUtil.postRequest ( auth , ( ( ( ( "/repos/" + user ) + "/" ) + repo ) + "/pulls" ) , request ) , org.jetbrains.plugins.github.api.GithubPullRequestRaw.class ) , org.jetbrains.plugins.github.api.GithubPullRequest.class ) ; }
Source:
private void handleShareItemSelected ( ) { android.content.Intent target = new android.content.Intent ( android.content.Intent.ACTION_SEND ) ; target.setType ( "text/plain" ) ; com.android.cts.verifier.TestResultsReport report = new com.android.cts.verifier.TestResultsReport ( this , getListAdapter ( ) ) ; target.putExtra ( Intent.EXTRA_SUBJECT , report.getSubject ( ) ) ; target.putExtra ( Intent.EXTRA_TEXT , report.getBody ( ) ) ; startActivity ( android.content.Intent.createChooser ( target , getString ( R.string.share_test_results ) ) ) ; }

Target:
private void handleClearItemSelected ( ) { mAdapter.clearTestResults ( ) ; android.widget.Toast.makeText ( this , R.string.test_results_cleared , Toast.LENGTH_SHORT ) . show ( ) ; }
Source:
public static void run ( ) throws java.lang.Exception { art.Breakpoint.stopBreakpointWatch ( java.lang.Thread.currentThread ( ) ) ; art.Breakpoint.startBreakpointWatch ( art.Test993.class , art.Test993.class . getDeclaredMethod ( "notifyBreakpointReached" , java.lang.Thread.class , java.lang.reflect.Executable.class , java.lang.Long.TYPE ) , java.lang.Thread.currentThread ( ) ) ; art.Test993.runMethodTests ( ) ; art.Test993.runConstructorTests ( ) ; art.Breakpoint.stopBreakpointWatch ( java.lang.Thread.currentThread ( ) ) ; }

Target:
public static void run ( ) throws java.lang.Exception { art.Breakpoint.stopBreakpointWatch ( java.lang.Thread.currentThread ( ) ) ; art.Breakpoint.startBreakpointWatch ( art.Test993.class , art.Test993.class . getDeclaredMethod ( "notifyBreakpointReached" , java.lang.Thread.class , java.lang.reflect.Executable.class , java.lang.Long.TYPE ) , java.lang.Thread.currentThread ( ) ) ; art.Test993.runMethodTests ( ) ; art.Test993.runBCPMethodTests ( ) ; art.Test993.runConstructorTests ( ) ; art.Breakpoint.stopBreakpointWatch ( java.lang.Thread.currentThread ( ) ) ; }
Source:
public boolean isBackgroundVisibleBehind ( android.os.IBinder token ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { final com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; final boolean visible = ( stack == null ) ? false : stack.hasVisibleBehindActivity ( ) ; if ( DEBUG_VISIBLE_BEHIND ) android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG_VISIBLE_BEHIND , ( ( ( "isBackgroundVisibleBehind: stack=" + stack ) + " visible=" ) + visible ) ) ; return visible ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }

Target:
public boolean isBackgroundVisibleBehind ( android.os.IBinder token ) { final long origId = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( this ) { final com.android.server.am.ActivityStack stack = com.android.server.am.ActivityRecord.getStackLocked ( token ) ; final boolean visible = ( stack == null ) ? false : stack.hasVisibleBehindActivity ( ) ; if ( com.android.server.am.ActivityManagerDebugConfig.DEBUG_VISIBLE_BEHIND ) android.util.Slog.d ( com.android.server.am.ActivityManagerService.TAG_VISIBLE_BEHIND , ( ( ( "isBackgroundVisibleBehind: stack=" + stack ) + " visible=" ) + visible ) ) ; return visible ; } } finally { android.os.Binder.restoreCallingIdentity ( origId ) ; } }
Source:
public static com.android.sdklib.xml.ManifestData parse ( java.io.InputStream manifestFileStream ) throws com.android.sdklib.io.StreamException , java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { if ( manifestFileStream != null ) { javax.xml.parsers.SAXParser parser = com.android.sdklib.xml.AndroidManifestParser.sParserFactory.newSAXParser ( ) ; com.android.sdklib.xml.ManifestData data = new com.android.sdklib.xml.ManifestData ( ) ; com.android.sdklib.xml.AndroidManifestParser.ManifestHandler manifestHandler = new com.android.sdklib.xml.AndroidManifestParser.ManifestHandler ( null , data , null ) ; parser.parse ( new org.xml.sax.InputSource ( manifestFileStream ) , manifestHandler ) ; return data ; } return null ; }

Target:
public static com.android.sdklib.xml.ManifestData parse ( java.io.InputStream manifestFileStream ) throws com.android.io.StreamException , java.io.IOException , javax.xml.parsers.ParserConfigurationException , org.xml.sax.SAXException { if ( manifestFileStream != null ) { javax.xml.parsers.SAXParser parser = com.android.sdklib.xml.AndroidManifestParser.sParserFactory.newSAXParser ( ) ; com.android.sdklib.xml.ManifestData data = new com.android.sdklib.xml.ManifestData ( ) ; com.android.sdklib.xml.AndroidManifestParser.ManifestHandler manifestHandler = new com.android.sdklib.xml.AndroidManifestParser.ManifestHandler ( null , data , null ) ; parser.parse ( new org.xml.sax.InputSource ( manifestFileStream ) , manifestHandler ) ; return data ; } return null ; }
Source:
protected java.util.Properties createProps ( ) { java.util.Properties props = new java.util.Properties ( ) ; props.setProperty ( PkgProps.PKG_MAJOR_REV , "42" ) ; props.setProperty ( PkgProps.PKG_LICENSE , "The License" ) ; props.setProperty ( PkgProps.PKG_DESC , "Some description." ) ; props.setProperty ( PkgProps.PKG_DESC_URL , "http://description/url" ) ; props.setProperty ( PkgProps.PKG_RELEASE_NOTE , "Release Note" ) ; props.setProperty ( PkgProps.PKG_RELEASE_URL , "http://release/note" ) ; props.setProperty ( PkgProps.PKG_SOURCE_URL , "http://source/url" ) ; props.setProperty ( PkgProps.PKG_OBSOLETE , "true" ) ; return props ; }

Target:
protected java.util.Properties createProps ( ) { java.util.Properties props = new java.util.Properties ( ) ; props.setProperty ( PkgProps.PKG_REVISION , "42" ) ; props.setProperty ( PkgProps.PKG_LICENSE , "The License" ) ; props.setProperty ( PkgProps.PKG_DESC , "Some description." ) ; props.setProperty ( PkgProps.PKG_DESC_URL , "http://description/url" ) ; props.setProperty ( PkgProps.PKG_RELEASE_NOTE , "Release Note" ) ; props.setProperty ( PkgProps.PKG_RELEASE_URL , "http://release/note" ) ; props.setProperty ( PkgProps.PKG_SOURCE_URL , "http://source/url" ) ; props.setProperty ( PkgProps.PKG_OBSOLETE , "true" ) ; return props ; }
Source:
public void testInstall_withBadlyFormedRulesVersion ( ) throws java.lang.Exception { final java.lang.String invalidRulesVersion = "203Bc" ; byte [ ] versionBytes = libcore.tzdata.update2.BundleVersion.getBytes ( BundleVersion.FULL_BUNDLE_FORMAT_VERSION , invalidRulesVersion , "001" ) ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( versionBytes ) ; assertFalse ( installer.install ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }

Target:
public void testInstall_withBadlyFormedRevision ( ) throws java.lang.Exception { libcore.tzdata.update2.BundleVersion validBundleVersion = new libcore.tzdata.update2.BundleVersion ( 1 , 1 , libcore.tzdata.update2.TimeZoneBundleInstallerTest.NEW_RULES_VERSION , 1 ) ; byte [ ] invalidRevisionBytes = validBundleVersion.toBytes ( ) ; invalidRevisionBytes [ ( ( invalidRevisionBytes.length ) - 3 ) ] = 'A' ; libcore.tzdata.update2.TimeZoneBundle bundle = libcore.tzdata.update2.TimeZoneBundleInstallerTest.createTimeZoneBundleWithVersionBytes ( invalidRevisionBytes ) ; assertEquals ( TimeZoneBundleInstaller.INSTALL_FAIL_BAD_BUNDLE_STRUCTURE , installer.installWithErrorCode ( bundle.getBytes ( ) ) ) ; assertNoContentInstalled ( ) ; }
Source:
public void setBatchedScanSettings ( com.android.server.wifi.BatchedScanSettings settings , int callingUid , int csph , android.os.WorkSource workSource ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putParcelable ( com.android.server.wifi.WifiStateMachine.BATCHED_SETTING , settings ) ; bundle.putParcelable ( com.android.server.wifi.WifiStateMachine.BATCHED_WORKSOURCE , workSource ) ; sendMessage ( com.android.server.wifi.WifiStateMachine.CMD_SET_BATCHED_SCAN , callingUid , csph , bundle ) ; }

Target:
public boolean syncQueryPasspointIcon ( com.android.internal.util.AsyncChannel channel , long bssid , java.lang.String fileName ) { android.os.Bundle bundle = new android.os.Bundle ( ) ; bundle.putLong ( com.android.server.wifi.WifiStateMachine.EXTRA_OSU_ICON_QUERY_BSSID , bssid ) ; bundle.putString ( com.android.server.wifi.WifiStateMachine.EXTRA_OSU_ICON_QUERY_FILENAME , fileName ) ; android.os.Message resultMsg = channel.sendMessageSynchronously ( com.android.server.wifi.WifiStateMachine.CMD_QUERY_OSU_ICON , bundle ) ; int result = resultMsg.arg1 ; resultMsg.recycle ( ) ; return result == 1 ; }
Source:
public void setPreCompInfo ( org.bouncycastle.math.ec.ECPoint point , org.bouncycastle.math.ec.PreCompInfo preCompInfo ) { checkPoint ( point ) ; point.preCompInfo = preCompInfo ; }

Target:
public void setPreCompInfo ( org.bouncycastle.math.ec.ECPoint point , java.lang.String name , org.bouncycastle.math.ec.PreCompInfo preCompInfo ) { checkPoint ( point ) ; synchronized ( point ) { java.util.Hashtable table = point.preCompTable ; if ( null == table ) { point.preCompTable = table = new java.util.Hashtable ( 4 ) ; } table.put ( name , preCompInfo ) ; } }
Source:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { assert ( ( expr.getType ( ) ) instanceof com.android.jack.ir.ast.JPrimitiveType.JBooleanType ) || ( expr.getType ( ) . equals ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_BOOLEAN ) ) ) ; tr.append ( new com.android.jack.transformations.request.Replace ( expr , new com.android.jack.ir.ast.JPrefixNotOperation ( expr.getSourceInfo ( ) , expr ) ) ) ; return false ; }

Target:
public boolean visit ( @ javax.annotation.Nonnull com.android.jack.ir.ast.JExpression expr ) { assert ( ( expr.getType ( ) ) instanceof com.android.jack.ir.ast.JPrimitiveType.JBooleanType ) || ( expr.getType ( ) . isSameType ( com.android.jack.Jack.getSession ( ) . getPhantomLookup ( ) . getClass ( CommonTypes.JAVA_LANG_BOOLEAN ) ) ) ; tr.append ( new com.android.jack.transformations.request.Replace ( expr , new com.android.jack.ir.ast.JPrefixNotOperation ( expr.getSourceInfo ( ) , expr ) ) ) ; return false ; }
Source:
public boolean showSoftInput ( android.view.View view , int flags , android.os.ResultReceiver resultReceiver ) { checkFocus ( ) ; synchronized ( mH ) { if ( ( ( mServedView ) != view ) && ( ( ( mServedView ) == null ) || ( ! ( mServedView.checkInputConnectionProxy ( view ) ) ) ) ) { return false ; } try { return mService.showSoftInput ( mClient , flags , resultReceiver ) ; } catch ( android.os.RemoteException e ) { } return false ; } }

Target:
public void showSoftInputUnchecked ( int flags , android.os.ResultReceiver resultReceiver ) { try { mService.showSoftInput ( mClient , flags , resultReceiver ) ; } catch ( android.os.RemoteException e ) { throw e.rethrowFromSystemServer ( ) ; } }
Source:
java.util.List < V2 > transform ( final K key , java.util.Collection < V1 > values ) { return com.google.common.collect.Lists.transform ( ( ( java.util.List < V1 > ) ( values ) ) , new com.google.common.base.Function < V1 , V2 > ( ) { @ java.lang.Override public V2 apply ( V1 value ) { return transformer.transformEntry ( key , value ) ; } } ) ; }

Target:
java.util.List < V2 > transform ( K key , java.util.Collection < V1 > values ) { return com.google.common.collect.Lists.transform ( ( ( java.util.List < V1 > ) ( values ) ) , com.google.common.collect.Maps.asValueToValueFunction ( transformer , key ) ) ; }
Source:
native void rsnAllocationRead2D ( long con , long id , int xoff , int yoff , int mip , int face , int w , int h , java.lang.Object d , int sizeBytes , int dt ) ;

Target:
synchronized void nAllocationElementRead ( long id , int xoff , int yoff , int zoff , int mip , int compIdx , byte [ ] d , int sizeBytes ) { validate ( ) ; rsnAllocationElementRead ( mContext , id , xoff , yoff , zoff , mip , compIdx , d , sizeBytes ) ; }
Source:
public void handleCreateConnectionComplete ( java.lang.String callId , android.telecom.ConnectionRequest request , android.telecom.ParcelableConnection connection ) { android.telecom.Log.startSession ( "CSW.hCCC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "handleCreateConnectionComplete %s" , callId ) ; this . handleCreateConnectionComplete ( callId , request , connection ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }

Target:
public void handleCreateConnectionComplete ( java.lang.String callId , android.telecom.ConnectionRequest request , android.telecom.ParcelableConnection connection , android.telecom.Logging.Session.Info sessionInfo ) { android.telecom.Log.startSession ( sessionInfo , "CSW.hCCC" ) ; long token = android.os.Binder.clearCallingIdentity ( ) ; try { synchronized ( mLock ) { logIncoming ( "handleCreateConnectionComplete %s" , callId ) ; this . handleCreateConnectionComplete ( callId , request , connection ) ; } } finally { android.os.Binder.restoreCallingIdentity ( token ) ; android.telecom.Log.endSession ( ) ; } }
Source:
protected java.io.File runTasksOnProject ( java.lang.String name , java.lang.String gradleVersion , java.lang.String ... tasks ) { java.io.File project = new java.io.File ( testDir , name ) ; java.io.File buildGradle = new java.io.File ( project , "build.gradle" ) ; assertTrue ( ( "Missing build.gradle for " + name ) , buildGradle.isFile ( ) ) ; runGradleTasks ( sdkDir , ndkDir , gradleVersion , project , tasks ) ; return project ; }

Target:
protected java.io.File runTasksOnProject ( java.lang.String name , java.lang.String gradleVersion , java.lang.String ... tasks ) { java.io.File project = new java.io.File ( testDir , name ) ; java.io.File buildGradle = new java.io.File ( project , "build.gradle" ) ; assertTrue ( ( "Missing file: " + buildGradle ) , buildGradle.isFile ( ) ) ; runGradleTasks ( sdkDir , ndkDir , gradleVersion , project , tasks ) ; return project ; }
Source:
public static void main ( java.lang.String [ ] args ) { java.lang.String os = java.lang.System.getProperty ( "os.name" ) ; if ( os.startsWith ( "Mac OS" ) ) { java.lang.management.RuntimeMXBean rt = java.lang.management.ManagementFactory.getRuntimeMXBean ( ) ; java.lang.System.setProperty ( ( "JAVA_STARTED_ON_FIRST_THREAD_" + ( rt.getName ( ) . split ( "@" ) [ 0 ] ) ) , "1" ) ; } java.lang.Thread.setDefaultUncaughtExceptionHandler ( new com.android.ddms.Main.UncaughtHandler ( ) ) ; com.android.ddms.PrefsDialog.init ( ) ; com.android.ddmlib.Log.d ( "ddms" , "Initializing" ) ; if ( ( ( args.length ) >= 3 ) && ( args [ 0 ] . equals ( "ping" ) ) ) { com.android.sdkstats.SdkStatsService.ping ( args [ 1 ] , args [ 2 ] , null ) ; return ; } else if ( ( args.length ) > 0 ) { com.android.ddmlib.Log.e ( "ddms" , ( "Unknown argument: " + ( args [ 0 ] ) ) ) ; java.lang.System.exit ( 1 ) ; } java.lang.String ddmsParentLocation = java.lang.System.getProperty ( "com.android.ddms.bindir" ) ; com.android.ddms.Main.ping ( ddmsParentLocation ) ; com.android.ddmlib.DebugPortManager.setProvider ( com.android.ddms.DebugPortProvider.getInstance ( ) ) ; com.android.ddms.UIThread ui = com.android.ddms.UIThread.getInstance ( ) ; try { ui.runUI ( ddmsParentLocation ) ; } finally { com.android.ddms.PrefsDialog.save ( ) ; com.android.ddmlib.AndroidDebugBridge.terminate ( ) ; } com.android.ddmlib.Log.d ( "ddms" , "Bye" ) ; java.lang.System.exit ( 0 ) ; }

Target:
public static void main ( java.lang.String [ ] args ) { if ( com.android.ddms.Main.isMac ( ) ) { java.lang.management.RuntimeMXBean rt = java.lang.management.ManagementFactory.getRuntimeMXBean ( ) ; java.lang.System.setProperty ( ( "JAVA_STARTED_ON_FIRST_THREAD_" + ( rt.getName ( ) . split ( "@" ) [ 0 ] ) ) , "1" ) ; } java.lang.Thread.setDefaultUncaughtExceptionHandler ( new com.android.ddms.Main.UncaughtHandler ( ) ) ; com.android.ddms.PrefsDialog.init ( ) ; com.android.ddmlib.Log.d ( "ddms" , "Initializing" ) ; if ( ( ( args.length ) >= 3 ) && ( args [ 0 ] . equals ( "ping" ) ) ) { com.android.sdkstats.SdkStatsService.ping ( args [ 1 ] , args [ 2 ] , null ) ; return ; } else if ( ( args.length ) > 0 ) { com.android.ddmlib.Log.e ( "ddms" , ( "Unknown argument: " + ( args [ 0 ] ) ) ) ; java.lang.System.exit ( 1 ) ; } java.lang.String ddmsParentLocation = java.lang.System.getProperty ( "com.android.ddms.bindir" ) ; com.android.ddms.Main.ping ( ddmsParentLocation ) ; com.android.ddmlib.DebugPortManager.setProvider ( com.android.ddms.DebugPortProvider.getInstance ( ) ) ; com.android.ddms.UIThread ui = com.android.ddms.UIThread.getInstance ( ) ; try { ui.runUI ( ddmsParentLocation ) ; } finally { com.android.ddms.PrefsDialog.save ( ) ; com.android.ddmlib.AndroidDebugBridge.terminate ( ) ; } com.android.ddmlib.Log.d ( "ddms" , "Bye" ) ; java.lang.System.exit ( 0 ) ; }
Source:
public void successPostsResponse ( ) throws java.lang.Exception { mNetwork.setDataToReturn ( com.android.volley.NetworkDispatcherTest.CANNED_DATA ) ; mNetwork.setNumExceptionsToThrow ( 0 ) ; mNetworkQueue.add ( mRequest ) ; mNetworkQueue.waitUntilEmpty ( com.android.volley.NetworkDispatcherTest.TIMEOUT_MILLIS ) ; assertFalse ( mDelivery.postError_called ) ; assertTrue ( mDelivery.postResponse_called ) ; com.android.volley.Response < ? > response = mDelivery.responsePosted ; assertNotNull ( response ) ; assertTrue ( response.isSuccess ( ) ) ; assertTrue ( java.util.Arrays.equals ( ( ( byte [ ] ) ( response.result ) ) , com.android.volley.NetworkDispatcherTest.CANNED_DATA ) ) ; }

Target:
public void exceptionPostsError ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mNetwork.performRequest ( org.mockito.ArgumentMatchers.any ( com.android.volley.Request.class ) ) ) . thenThrow ( new com.android.volley.ServerError ( ) ) ; mDispatcher.processRequest ( mRequest ) ; org.mockito.Mockito.verify ( mDelivery ) . postError ( org.mockito.ArgumentMatchers.any ( com.android.volley.Request.class ) , org.mockito.ArgumentMatchers.any ( com.android.volley.VolleyError.class ) ) ; org.mockito.Mockito.verify ( mDelivery , org.mockito.Mockito.never ( ) ) . postResponse ( org.mockito.ArgumentMatchers.any ( com.android.volley.Request.class ) , org.mockito.ArgumentMatchers.any ( com.android.volley.Response.class ) ) ; }
Source:
public static java.io.File getDevicePolicyFile ( com.android.tradefed.device.ITestDevice device ) throws java.lang.Exception { java.io.File file ; synchronized ( android.security.cts.SELinuxHostTest.cachedDevicePolicyFiles ) { file = android.security.cts.SELinuxHostTest.cachedDevicePolicyFiles.get ( device ) ; } if ( file != null ) { return file ; } file = java.io.File.createTempFile ( "sepolicy" , ".tmp" ) ; file.deleteOnExit ( ) ; device.pullFile ( "/sys/fs/selinux/policy" , file ) ; synchronized ( android.security.cts.SELinuxHostTest.cachedDevicePolicyFiles ) { android.security.cts.SELinuxHostTest.cachedDevicePolicyFiles.put ( device , file ) ; } return file ; }

Target:
private static java.io.File getDeviceFile ( com.android.tradefed.device.ITestDevice device , java.util.Map < com.android.tradefed.device.ITestDevice , java.io.File > cache , java.lang.String deviceFilePath , java.lang.String tmpFileName ) throws java.lang.Exception { java.io.File file ; synchronized ( cache ) { file = cache.get ( device ) ; } if ( file != null ) { return file ; } file = java.io.File.createTempFile ( tmpFileName , ".tmp" ) ; file.deleteOnExit ( ) ; device.pullFile ( deviceFilePath , file ) ; synchronized ( cache ) { cache.put ( device , file ) ; } return file ; }
Source:
public static void assertArrayEquals ( java.lang.String message , short [ ] expecteds , short [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }

Target:
public static void assertArrayEquals ( java.lang.String message , byte [ ] expecteds , byte [ ] actuals ) { java.lang.String expectedString = java.util.Arrays.toString ( expecteds ) ; java.lang.String actualString = java.util.Arrays.toString ( actuals ) ; if ( ! ( expectedString.equals ( actualString ) ) ) { org.junit.Assert.fail ( message , ( ( ( "expected " + expectedString ) + " but was " ) + actualString ) ) ; } }
Source:
com.android.incallui.videosurface.protocol.VideoSurfaceTexture getLocalVideoSurfaceTexture ( ) { if ( ( mLocalVideoSurfaceTexture ) == null ) { mLocalVideoSurfaceTexture = com.android.incallui.videosurface.bindings.VideoSurfaceBindings.createLocalVideoSurfaceTexture ( mContext.getPackageManager ( ) . hasSystemFeature ( com.android.incallui.InCallPresenter.PIXEL2017_SYSTEM_FEATURE ) ) ; } return mLocalVideoSurfaceTexture ; }

Target:
com.android.incallui.videosurface.protocol.VideoSurfaceTexture getLocalVideoSurfaceTexture ( ) { if ( ( mLocalVideoSurfaceTexture ) == null ) { boolean isPixel2017 = false ; if ( ( mContext ) != null ) { isPixel2017 = mContext.getPackageManager ( ) . hasSystemFeature ( com.android.incallui.InCallPresenter.PIXEL2017_SYSTEM_FEATURE ) ; } mLocalVideoSurfaceTexture = com.android.incallui.videosurface.bindings.VideoSurfaceBindings.createLocalVideoSurfaceTexture ( isPixel2017 ) ; } return mLocalVideoSurfaceTexture ; }
Source:
public void dismissIntruder ( ) { if ( ( mCurrentlyIntrudingNotification ) == null ) return ; try { mBarService.onNotificationClear ( mCurrentlyIntrudingNotification.pkg , mCurrentlyIntrudingNotification.tag , mCurrentlyIntrudingNotification.id ) ; } catch ( com.android.systemui.statusbar.phone.android ex ) { } }

Target:
public void onHeadsUpDismissed ( ) { if ( ( mInterruptingNotificationEntry ) == null ) return ; mHandler.sendEmptyMessage ( com.android.systemui.statusbar.phone.MSG_HIDE_HEADS_UP ) ; if ( mHeadsUpNotificationView.isClearable ( ) ) { try { mBarService.onNotificationClear ( mInterruptingNotificationEntry.notification.getPackageName ( ) , mInterruptingNotificationEntry.notification.getTag ( ) , mInterruptingNotificationEntry.notification.getId ( ) ) ; } catch ( com.android.systemui.statusbar.phone.android ex ) { } } }
Source:
public void TestCharMonkey ( ) { int loopCount = 500 ; int seed = 1 ; if ( ( params.inclusion ) >= 9 ) { loopCount = 10000 ; } com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey m = new com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey ( ) ; com.ibm.icu.text.BreakIterator bi = com.ibm.icu.text.BreakIterator.getCharacterInstance ( java.util.Locale.US ) ; RunMonkey ( bi , m , "char" , seed , loopCount ) ; }

Target:
public void TestCharMonkey ( ) { int loopCount = 500 ; int seed = 1 ; if ( ( com.ibm.icu.dev.test.TestFmwk.getExhaustiveness ( ) ) >= 9 ) { loopCount = 10000 ; } com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey m = new com.ibm.icu.dev.test.rbbi.RBBITestMonkey.RBBICharMonkey ( ) ; com.ibm.icu.text.BreakIterator bi = com.ibm.icu.text.BreakIterator.getCharacterInstance ( java.util.Locale.US ) ; RunMonkey ( bi , m , "char" , seed , loopCount ) ; }
Source:
public void onMatch ( int peerId , byte [ ] serviceSpecificInfo , byte [ ] matchFilter ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "peerId" , peerId ) ; mResults.putByteArray ( "serviceSpecificInfo" , serviceSpecificInfo ) ; mResults.putByteArray ( "matchFilter" , matchFilter ) ; mEventFacade.postEvent ( "WifiNanSessionOnMatch" , mResults ) ; }

Target:
public void onServiceDiscovered ( int peerId , byte [ ] serviceSpecificInfo , byte [ ] matchFilter ) { android.os.Bundle mResults = new android.os.Bundle ( ) ; mResults.putInt ( "discoverySessionId" , mDiscoverySessionId ) ; mResults.putInt ( "peerId" , peerId ) ; mResults.putByteArray ( "serviceSpecificInfo" , serviceSpecificInfo ) ; mResults.putByteArray ( "matchFilter" , matchFilter ) ; mEventFacade.postEvent ( "WifiNanSessionOnServiceDiscovered" , mResults ) ; }
Source:
private static com.android.ddmlib.RawImage createRawImage ( java.lang.String name ) throws java.io.IOException , java.lang.ClassNotFoundException { java.io.ObjectInputStream is = new java.io.ObjectInputStream ( com.android.chimpchat.ImageUtilsTest.class . getResourceAsStream ( name ) ) ; com.android.chimpchat.adb.image.CaptureRawAndConvertedImage.ChimpRawImage wrapper = ( ( com.android.chimpchat.adb.image.CaptureRawAndConvertedImage.ChimpRawImage ) ( is.readObject ( ) ) ) ; is.close ( ) ; return wrapper.toRawImage ( ) ; }

Target:
private static com.android.ddmlib.RawImage createRawImage ( java.lang.String name ) throws java.io.IOException , java.lang.ClassNotFoundException { java.io.ObjectInputStream is = new java.io.ObjectInputStream ( com.android.chimpchat.ImageUtilsTest.class . getResourceAsStream ( name ) ) ; java.lang.Object obj = is.readObject ( ) ; is.close ( ) ; return ( ( com.android.chimpchat.adb.image.CaptureRawAndConvertedImage.IRawImager ) ( obj ) ) . toRawImage ( ) ; }
Source:
public void usbShouldBeTornDownOnTetherError ( ) throws java.lang.Exception { initStateMachine ( android.net.ConnectivityManager.TETHERING_USB ) ; org.mockito.Mockito.doThrow ( android.os.RemoteException.class ) . when ( mNMService ) . tetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_REQUESTED ) ; org.mockito.InOrder usbTeardownOrder = org.mockito.Mockito.inOrder ( mNMService , mInterfaceConfiguration , mTetherHelper ) ; usbTeardownOrder.verify ( mInterfaceConfiguration ) . setInterfaceDown ( ) ; usbTeardownOrder.verify ( mNMService ) . setInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mInterfaceConfiguration ) ; usbTeardownOrder.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR ) ; }

Target:
public void usbShouldBeTornDownOnTetherError ( ) throws java.lang.Exception { initStateMachine ( android.net.ConnectivityManager.TETHERING_USB ) ; org.mockito.Mockito.doThrow ( android.os.RemoteException.class ) . when ( mNMService ) . tetherInterface ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME ) ; dispatchCommand ( TetherInterfaceStateMachine.CMD_TETHER_REQUESTED , com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED ) ; org.mockito.InOrder usbTeardownOrder = org.mockito.Mockito.inOrder ( mNMService , mInterfaceConfiguration , mTetherHelper ) ; usbTeardownOrder.verify ( mInterfaceConfiguration ) . setInterfaceDown ( ) ; usbTeardownOrder.verify ( mNMService ) . setInterfaceConfig ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mInterfaceConfiguration ) ; usbTeardownOrder.verify ( mTetherHelper ) . notifyInterfaceStateChange ( com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest.IFACE_NAME , mTestedSm , com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE , android.net.ConnectivityManager.TETHER_ERROR_TETHER_IFACE_ERROR ) ; }
Source:
public void run ( ) { com.android.monkeyrunner.adb.AdbBackend adb = new com.android.monkeyrunner.adb.AdbBackend ( ) ; final com.android.monkeyrunner.MonkeyDevice device = adb.waitForConnection ( ) ; com.android.monkeyrunner.controller.MonkeyControllerFrame mf = new com.android.monkeyrunner.controller.MonkeyControllerFrame ( device ) ; mf.setVisible ( true ) ; mf.addWindowListener ( new java.awt.event.WindowAdapter ( ) { @ java.lang.Override public void windowClosed ( java.awt.event.WindowEvent e ) { device.dispose ( ) ; } } ) ; }

Target:
public void run ( ) { com.android.monkeyrunner.core.IMonkeyBackend adb = new com.android.monkeyrunner.adb.AdbBackend ( ) ; final com.android.monkeyrunner.core.IMonkeyDevice device = adb.waitForConnection ( ) ; com.android.monkeyrunner.controller.MonkeyControllerFrame mf = new com.android.monkeyrunner.controller.MonkeyControllerFrame ( device ) ; mf.setVisible ( true ) ; mf.addWindowListener ( new java.awt.event.WindowAdapter ( ) { @ java.lang.Override public void windowClosed ( java.awt.event.WindowEvent e ) { device.dispose ( ) ; } } ) ; }
Source:
public boolean process ( java.util.Set < ? extends javax.lang.model.element.TypeElement > annotations , javax.annotation.processing.RoundEnvironment roundEnv ) { for ( javax.lang.model.element.Element annotatedElement : roundEnv.getElementsAnnotatedWith ( com.google.devtools.common.options.Option.class ) ) { try { javax.lang.model.element.VariableElement optionField = ( ( javax.lang.model.element.VariableElement ) ( annotatedElement ) ) ; checkModifiers ( optionField ) ; checkInOptionBase ( optionField ) ; checkEffectTagRationality ( optionField ) ; checkMetadataTagAndCategoryRationality ( optionField ) ; } catch ( com.google.devtools.common.options.processor.OptionProcessor.OptionProcessorException e ) { error ( e.elementInError , e.getMessage ( ) ) ; } } return true ; }

Target:
public boolean process ( java.util.Set < ? extends javax.lang.model.element.TypeElement > annotations , javax.annotation.processing.RoundEnvironment roundEnv ) { for ( javax.lang.model.element.Element annotatedElement : roundEnv.getElementsAnnotatedWith ( com.google.devtools.common.options.Option.class ) ) { try { javax.lang.model.element.VariableElement optionField = ( ( javax.lang.model.element.VariableElement ) ( annotatedElement ) ) ; checkModifiers ( optionField ) ; checkInOptionBase ( optionField ) ; checkConverter ( optionField ) ; checkEffectTagRationality ( optionField ) ; checkMetadataTagAndCategoryRationality ( optionField ) ; } catch ( com.google.devtools.common.options.processor.OptionProcessorException e ) { error ( e.getElementInError ( ) , e.getMessage ( ) ) ; } } return true ; }
Source:
public boolean isEnabled ( com.intellij.openapi.actionSystem.AnActionEvent e ) { return ( ( ( selectedConfiguration ) != null ) && ( selectedConfiguration.isEditable ( ) ) ) && ( ( editableConfigurations.indexOf ( selectedConfiguration ) ) < ( ( editableConfigurations.size ( ) ) - 1 ) ) ; }

Target:
private void moveDown ( ) { if ( ( selectedConfiguration ) != null ) { int index = editableConfigurations.indexOf ( selectedConfiguration ) ; if ( ( index != ( - 1 ) ) && ( index < ( ( editableConfigurations.size ( ) ) - 1 ) ) ) { moveConfigurationToIndex ( ( index + 1 ) , selectedConfiguration ) ; } } }